Skip to content

Commit

Permalink
chore: mv oapi helper back to checks package
Browse files Browse the repository at this point in the history
  • Loading branch information
lvlcn-t committed Jan 16, 2024
1 parent cd2f929 commit 9cd651e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pkg/checks/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/caas-team/sparrow/pkg/api"
"github.com/caas-team/sparrow/pkg/checks"
"github.com/caas-team/sparrow/pkg/checks/errors"
"github.com/caas-team/sparrow/pkg/checks/oapi"
"github.com/caas-team/sparrow/pkg/checks/types"
"github.com/getkin/kin-openapi/openapi3"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -149,7 +148,7 @@ func (h *Health) SetConfig(ctx context.Context, conf any) error {
// Schema provides the schema of the data that will be provided
// by the health check
func (h *Health) Schema() (*openapi3.SchemaRef, error) {
return oapi.OpenapiFromPerfData[map[string]string](map[string]string{})
return checks.OpenapiFromPerfData[map[string]string](map[string]string{})
}

// RegisterHandler dynamically registers a server handler
Expand Down
3 changes: 1 addition & 2 deletions pkg/checks/latency/latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"github.com/caas-team/sparrow/pkg/api"
"github.com/caas-team/sparrow/pkg/checks"
"github.com/caas-team/sparrow/pkg/checks/errors"
"github.com/caas-team/sparrow/pkg/checks/oapi"
"github.com/caas-team/sparrow/pkg/checks/types"
)

Expand Down Expand Up @@ -147,7 +146,7 @@ func (l *Latency) SetConfig(ctx context.Context, conf any) error {
// Schema provides the schema of the data that will be provided
// by the latency check
func (l *Latency) Schema() (*openapi3.SchemaRef, error) {
return oapi.OpenapiFromPerfData(make(map[string]Result))
return checks.OpenapiFromPerfData(make(map[string]Result))
}

// RegisterHandler registers a server handler
Expand Down
2 changes: 1 addition & 1 deletion pkg/checks/oapi/oapi.go → pkg/checks/oapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// specific language governing permissions and limitations
// under the License.

package oapi
package checks

import (
"github.com/caas-team/sparrow/pkg/checks/types"
Expand Down
2 changes: 1 addition & 1 deletion pkg/checks/oapi/oapi_test.go → pkg/checks/oapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// specific language governing permissions and limitations
// under the License.

package oapi
package checks

import (
"reflect"
Expand Down

0 comments on commit 9cd651e

Please sign in to comment.