Documentation
¶
Index ¶
- Variables
- func AssertArtifactTypeQueryParamConstraints(obj model.ArtifactTypeQueryParam) error
- func AssertArtifactTypeQueryParamRequired(obj model.ArtifactTypeQueryParam) error
- func AssertBaseModelConstraints(obj model.BaseModel) error
- func AssertBaseModelRequired(obj model.BaseModel) error
- func AssertBaseResourceConstraints(obj model.BaseResource) error
- func AssertBaseResourceDatesConstraints(obj model.BaseResourceDates) error
- func AssertBaseResourceDatesRequired(obj model.BaseResourceDates) error
- func AssertBaseResourceListConstraints(obj model.BaseResourceList) error
- func AssertBaseResourceListRequired(obj model.BaseResourceList) error
- func AssertBaseResourceRequired(obj model.BaseResource) error
- func AssertCatalogArtifactConstraints(obj model.CatalogArtifact) error
- func AssertCatalogArtifactListConstraints(obj model.CatalogArtifactList) error
- func AssertCatalogArtifactListRequired(obj model.CatalogArtifactList) error
- func AssertCatalogArtifactRequired(obj model.CatalogArtifact) error
- func AssertCatalogLabelConstraints(obj model.CatalogLabel) error
- func AssertCatalogLabelListConstraints(obj model.CatalogLabelList) error
- func AssertCatalogLabelListRequired(obj model.CatalogLabelList) error
- func AssertCatalogLabelRequired(obj model.CatalogLabel) error
- func AssertCatalogMetricsArtifactConstraints(obj model.CatalogMetricsArtifact) error
- func AssertCatalogMetricsArtifactRequired(obj model.CatalogMetricsArtifact) error
- func AssertCatalogModelArtifactConstraints(obj model.CatalogModelArtifact) error
- func AssertCatalogModelArtifactRequired(obj model.CatalogModelArtifact) error
- func AssertCatalogModelConstraints(obj model.CatalogModel) error
- func AssertCatalogModelListConstraints(obj model.CatalogModelList) error
- func AssertCatalogModelListRequired(obj model.CatalogModelList) error
- func AssertCatalogModelRequired(obj model.CatalogModel) error
- func AssertCatalogSourceConstraints(obj model.CatalogSource) error
- func AssertCatalogSourceListConstraints(obj model.CatalogSourceList) error
- func AssertCatalogSourceListRequired(obj model.CatalogSourceList) error
- func AssertCatalogSourcePreviewResponseAllOfSummaryConstraints(obj model.CatalogSourcePreviewResponseAllOfSummary) error
- func AssertCatalogSourcePreviewResponseAllOfSummaryRequired(obj model.CatalogSourcePreviewResponseAllOfSummary) error
- func AssertCatalogSourcePreviewResponseConstraints(obj model.CatalogSourcePreviewResponse) error
- func AssertCatalogSourcePreviewResponseRequired(obj model.CatalogSourcePreviewResponse) error
- func AssertCatalogSourceRequired(obj model.CatalogSource) error
- func AssertCatalogSourceStatusConstraints(obj model.CatalogSourceStatus) error
- func AssertCatalogSourceStatusRequired(obj model.CatalogSourceStatus) error
- func AssertErrorConstraints(obj model.Error) error
- func AssertErrorRequired(obj model.Error) error
- func AssertFieldFilterConstraints(obj model.FieldFilter) error
- func AssertFieldFilterRequired(obj model.FieldFilter) error
- func AssertFilterOptionRangeConstraints(obj model.FilterOptionRange) error
- func AssertFilterOptionRangeRequired(obj model.FilterOptionRange) error
- func AssertFilterOptionRequired(obj model.FilterOption) error
- func AssertFilterOptionsListConstraints(obj model.FilterOptionsList) error
- func AssertFilterOptionsListRequired(obj model.FilterOptionsList) error
- func AssertMetadataBoolValueConstraints(obj model.MetadataBoolValue) error
- func AssertMetadataBoolValueRequired(obj model.MetadataBoolValue) error
- func AssertMetadataDoubleValueConstraints(obj model.MetadataDoubleValue) error
- func AssertMetadataDoubleValueRequired(obj model.MetadataDoubleValue) error
- func AssertMetadataIntValueConstraints(obj model.MetadataIntValue) error
- func AssertMetadataIntValueRequired(obj model.MetadataIntValue) error
- func AssertMetadataProtoValueConstraints(obj model.MetadataProtoValue) error
- func AssertMetadataProtoValueRequired(obj model.MetadataProtoValue) error
- func AssertMetadataStringValueConstraints(obj model.MetadataStringValue) error
- func AssertMetadataStringValueRequired(obj model.MetadataStringValue) error
- func AssertMetadataStructValueConstraints(obj model.MetadataStructValue) error
- func AssertMetadataStructValueRequired(obj model.MetadataStructValue) error
- func AssertModelPreviewResultConstraints(obj model.ModelPreviewResult) error
- func AssertModelPreviewResultRequired(obj model.ModelPreviewResult) error
- func AssertOrderByFieldConstraints(obj model.OrderByField) error
- func AssertOrderByFieldRequired(obj model.OrderByField) error
- func AssertRecurseInterfaceRequired[T any](obj interface{}, callback func(T) error) error
- func AssertRecurseValueRequired[T any](value reflect.Value, callback func(T) error) error
- func AssertSortOrderConstraints(obj model.SortOrder) error
- func AssertSortOrderRequired(obj model.SortOrder) error
- func DefaultErrorHandler(w http.ResponseWriter, _ *http.Request, err error, result *ImplResponse)
- func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
- func IsZeroValue(val interface{}) bool
- func Logger(inner http.Handler) http.Handler
- func NewRouter(routers ...Router) chi.Router
- func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)
- func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)
- type Constraint
- type ErrorHandler
- type ImplResponse
- type ModelCatalogServiceAPIController
- func (c *ModelCatalogServiceAPIController) FindLabels(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) FindModels(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) FindModelsFilterOptions(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) FindSources(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) GetAllModelArtifacts(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) GetAllModelPerformanceArtifacts(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) GetModel(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) OrderedRoutes() []Route
- func (c *ModelCatalogServiceAPIController) PreviewCatalogSource(w http.ResponseWriter, r *http.Request)
- func (c *ModelCatalogServiceAPIController) Routes() Routes
- type ModelCatalogServiceAPIOption
- type ModelCatalogServiceAPIRouter
- type ModelCatalogServiceAPIService
- func (m *ModelCatalogServiceAPIService) FindLabels(ctx context.Context, pageSize string, orderBy string, ...) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) FindModels(ctx context.Context, recommended bool, targetRPS int32, latencyProperty string, ...) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) FindModelsFilterOptions(ctx context.Context) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) FindSources(ctx context.Context, name string, strPageSize string, ...) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) GetAllModelArtifacts(ctx context.Context, sourceID string, modelName string, ...) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) GetAllModelPerformanceArtifacts(ctx context.Context, sourceID string, modelName string, targetRPS int32, ...) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) GetModel(ctx context.Context, sourceID, modelName string) (ImplResponse, error)
- func (m *ModelCatalogServiceAPIService) PreviewCatalogSource(ctx context.Context, configParam *os.File, pageSizeParam string, ...) (ImplResponse, error)
- type ModelCatalogServiceAPIServicer
- type Number
- type Operation
- type ParseString
- type ParsingError
- type RequiredError
- type Route
- type Router
- type Routes
Constants ¶
This section is empty.
Variables ¶
var ErrTypeAssertionError = errors.New("unable to assert type")
ErrTypeAssertionError is thrown when type an interface does not match the asserted type
Functions ¶
func AssertArtifactTypeQueryParamConstraints ¶ added in v0.3.0
func AssertArtifactTypeQueryParamConstraints(obj model.ArtifactTypeQueryParam) error
AssertArtifactTypeQueryParamConstraints checks if the values respects the defined constraints
func AssertArtifactTypeQueryParamRequired ¶ added in v0.3.0
func AssertArtifactTypeQueryParamRequired(obj model.ArtifactTypeQueryParam) error
AssertArtifactTypeQueryParamRequired checks if the required fields are not zero-ed
func AssertBaseModelConstraints ¶
AssertBaseModelConstraints checks if the values respects the defined constraints
func AssertBaseModelRequired ¶
AssertBaseModelRequired checks if the required fields are not zero-ed
func AssertBaseResourceConstraints ¶ added in v0.3.2
func AssertBaseResourceConstraints(obj model.BaseResource) error
AssertBaseResourceConstraints checks if the values respects the defined constraints
func AssertBaseResourceDatesConstraints ¶
func AssertBaseResourceDatesConstraints(obj model.BaseResourceDates) error
AssertBaseResourceDatesConstraints checks if the values respects the defined constraints
func AssertBaseResourceDatesRequired ¶
func AssertBaseResourceDatesRequired(obj model.BaseResourceDates) error
AssertBaseResourceDatesRequired checks if the required fields are not zero-ed
func AssertBaseResourceListConstraints ¶
func AssertBaseResourceListConstraints(obj model.BaseResourceList) error
AssertBaseResourceListConstraints checks if the values respects the defined constraints
func AssertBaseResourceListRequired ¶
func AssertBaseResourceListRequired(obj model.BaseResourceList) error
AssertBaseResourceListRequired checks if the required fields are not zero-ed
func AssertBaseResourceRequired ¶ added in v0.3.2
func AssertBaseResourceRequired(obj model.BaseResource) error
AssertBaseResourceRequired checks if the required fields are not zero-ed
func AssertCatalogArtifactConstraints ¶ added in v0.3.3
func AssertCatalogArtifactConstraints(obj model.CatalogArtifact) error
AssertCatalogArtifactConstraints checks if the values respects the defined constraints
func AssertCatalogArtifactListConstraints ¶ added in v0.3.2
func AssertCatalogArtifactListConstraints(obj model.CatalogArtifactList) error
AssertCatalogArtifactListConstraints checks if the values respects the defined constraints
func AssertCatalogArtifactListRequired ¶ added in v0.3.2
func AssertCatalogArtifactListRequired(obj model.CatalogArtifactList) error
AssertCatalogArtifactListRequired checks if the required fields are not zero-ed
func AssertCatalogArtifactRequired ¶ added in v0.3.2
func AssertCatalogArtifactRequired(obj model.CatalogArtifact) error
AssertCatalogArtifactRequired checks if the required fields are not zero-ed
func AssertCatalogLabelConstraints ¶ added in v0.3.3
func AssertCatalogLabelConstraints(obj model.CatalogLabel) error
AssertCatalogLabelConstraints checks if the values respects the defined constraints
func AssertCatalogLabelListConstraints ¶ added in v0.3.3
func AssertCatalogLabelListConstraints(obj model.CatalogLabelList) error
AssertCatalogLabelListConstraints checks if the values respects the defined constraints
func AssertCatalogLabelListRequired ¶ added in v0.3.3
func AssertCatalogLabelListRequired(obj model.CatalogLabelList) error
AssertCatalogLabelListRequired checks if the required fields are not zero-ed
func AssertCatalogLabelRequired ¶ added in v0.3.3
func AssertCatalogLabelRequired(obj model.CatalogLabel) error
AssertCatalogLabelRequired checks if the required fields are not zero-ed
func AssertCatalogMetricsArtifactConstraints ¶ added in v0.3.2
func AssertCatalogMetricsArtifactConstraints(obj model.CatalogMetricsArtifact) error
AssertCatalogMetricsArtifactConstraints checks if the values respects the defined constraints
func AssertCatalogMetricsArtifactRequired ¶ added in v0.3.2
func AssertCatalogMetricsArtifactRequired(obj model.CatalogMetricsArtifact) error
AssertCatalogMetricsArtifactRequired checks if the required fields are not zero-ed
func AssertCatalogModelArtifactConstraints ¶
func AssertCatalogModelArtifactConstraints(obj model.CatalogModelArtifact) error
AssertCatalogModelArtifactConstraints checks if the values respects the defined constraints
func AssertCatalogModelArtifactRequired ¶
func AssertCatalogModelArtifactRequired(obj model.CatalogModelArtifact) error
AssertCatalogModelArtifactRequired checks if the required fields are not zero-ed
func AssertCatalogModelConstraints ¶
func AssertCatalogModelConstraints(obj model.CatalogModel) error
AssertCatalogModelConstraints checks if the values respects the defined constraints
func AssertCatalogModelListConstraints ¶
func AssertCatalogModelListConstraints(obj model.CatalogModelList) error
AssertCatalogModelListConstraints checks if the values respects the defined constraints
func AssertCatalogModelListRequired ¶
func AssertCatalogModelListRequired(obj model.CatalogModelList) error
AssertCatalogModelListRequired checks if the required fields are not zero-ed
func AssertCatalogModelRequired ¶
func AssertCatalogModelRequired(obj model.CatalogModel) error
AssertCatalogModelRequired checks if the required fields are not zero-ed
func AssertCatalogSourceConstraints ¶
func AssertCatalogSourceConstraints(obj model.CatalogSource) error
AssertCatalogSourceConstraints checks if the values respects the defined constraints
func AssertCatalogSourceListConstraints ¶
func AssertCatalogSourceListConstraints(obj model.CatalogSourceList) error
AssertCatalogSourceListConstraints checks if the values respects the defined constraints
func AssertCatalogSourceListRequired ¶
func AssertCatalogSourceListRequired(obj model.CatalogSourceList) error
AssertCatalogSourceListRequired checks if the required fields are not zero-ed
func AssertCatalogSourcePreviewResponseAllOfSummaryConstraints ¶ added in v0.3.4
func AssertCatalogSourcePreviewResponseAllOfSummaryConstraints(obj model.CatalogSourcePreviewResponseAllOfSummary) error
AssertCatalogSourcePreviewResponseAllOfSummaryConstraints checks if the values respects the defined constraints
func AssertCatalogSourcePreviewResponseAllOfSummaryRequired ¶ added in v0.3.4
func AssertCatalogSourcePreviewResponseAllOfSummaryRequired(obj model.CatalogSourcePreviewResponseAllOfSummary) error
AssertCatalogSourcePreviewResponseAllOfSummaryRequired checks if the required fields are not zero-ed
func AssertCatalogSourcePreviewResponseConstraints ¶ added in v0.3.4
func AssertCatalogSourcePreviewResponseConstraints(obj model.CatalogSourcePreviewResponse) error
AssertCatalogSourcePreviewResponseConstraints checks if the values respects the defined constraints
func AssertCatalogSourcePreviewResponseRequired ¶ added in v0.3.4
func AssertCatalogSourcePreviewResponseRequired(obj model.CatalogSourcePreviewResponse) error
AssertCatalogSourcePreviewResponseRequired checks if the required fields are not zero-ed
func AssertCatalogSourceRequired ¶
func AssertCatalogSourceRequired(obj model.CatalogSource) error
AssertCatalogSourceRequired checks if the required fields are not zero-ed
func AssertCatalogSourceStatusConstraints ¶ added in v0.3.4
func AssertCatalogSourceStatusConstraints(obj model.CatalogSourceStatus) error
AssertCatalogSourceStatusConstraints checks if the values respects the defined constraints
func AssertCatalogSourceStatusRequired ¶ added in v0.3.4
func AssertCatalogSourceStatusRequired(obj model.CatalogSourceStatus) error
AssertCatalogSourceStatusRequired checks if the required fields are not zero-ed
func AssertErrorConstraints ¶
AssertErrorConstraints checks if the values respects the defined constraints
func AssertErrorRequired ¶
AssertErrorRequired checks if the required fields are not zero-ed
func AssertFieldFilterConstraints ¶ added in v0.3.4
func AssertFieldFilterConstraints(obj model.FieldFilter) error
AssertFieldFilterConstraints checks if the values respects the defined constraints
func AssertFieldFilterRequired ¶ added in v0.3.4
func AssertFieldFilterRequired(obj model.FieldFilter) error
AssertFieldFilterRequired checks if the required fields are not zero-ed
func AssertFilterOptionRangeConstraints ¶ added in v0.3.2
func AssertFilterOptionRangeConstraints(obj model.FilterOptionRange) error
AssertFilterOptionRangeConstraints checks if the values respects the defined constraints
func AssertFilterOptionRangeRequired ¶ added in v0.3.2
func AssertFilterOptionRangeRequired(obj model.FilterOptionRange) error
AssertFilterOptionRangeRequired checks if the required fields are not zero-ed
func AssertFilterOptionRequired ¶ added in v0.3.2
func AssertFilterOptionRequired(obj model.FilterOption) error
AssertFilterOptionRequired checks if the required fields are not zero-ed
func AssertFilterOptionsListConstraints ¶ added in v0.3.2
func AssertFilterOptionsListConstraints(obj model.FilterOptionsList) error
AssertFilterOptionsListConstraints checks if the values respects the defined constraints
func AssertFilterOptionsListRequired ¶ added in v0.3.2
func AssertFilterOptionsListRequired(obj model.FilterOptionsList) error
AssertFilterOptionsListRequired checks if the required fields are not zero-ed
func AssertMetadataBoolValueConstraints ¶
func AssertMetadataBoolValueConstraints(obj model.MetadataBoolValue) error
AssertMetadataBoolValueConstraints checks if the values respects the defined constraints
func AssertMetadataBoolValueRequired ¶
func AssertMetadataBoolValueRequired(obj model.MetadataBoolValue) error
AssertMetadataBoolValueRequired checks if the required fields are not zero-ed
func AssertMetadataDoubleValueConstraints ¶
func AssertMetadataDoubleValueConstraints(obj model.MetadataDoubleValue) error
AssertMetadataDoubleValueConstraints checks if the values respects the defined constraints
func AssertMetadataDoubleValueRequired ¶
func AssertMetadataDoubleValueRequired(obj model.MetadataDoubleValue) error
AssertMetadataDoubleValueRequired checks if the required fields are not zero-ed
func AssertMetadataIntValueConstraints ¶
func AssertMetadataIntValueConstraints(obj model.MetadataIntValue) error
AssertMetadataIntValueConstraints checks if the values respects the defined constraints
func AssertMetadataIntValueRequired ¶
func AssertMetadataIntValueRequired(obj model.MetadataIntValue) error
AssertMetadataIntValueRequired checks if the required fields are not zero-ed
func AssertMetadataProtoValueConstraints ¶
func AssertMetadataProtoValueConstraints(obj model.MetadataProtoValue) error
AssertMetadataProtoValueConstraints checks if the values respects the defined constraints
func AssertMetadataProtoValueRequired ¶
func AssertMetadataProtoValueRequired(obj model.MetadataProtoValue) error
AssertMetadataProtoValueRequired checks if the required fields are not zero-ed
func AssertMetadataStringValueConstraints ¶
func AssertMetadataStringValueConstraints(obj model.MetadataStringValue) error
AssertMetadataStringValueConstraints checks if the values respects the defined constraints
func AssertMetadataStringValueRequired ¶
func AssertMetadataStringValueRequired(obj model.MetadataStringValue) error
AssertMetadataStringValueRequired checks if the required fields are not zero-ed
func AssertMetadataStructValueConstraints ¶
func AssertMetadataStructValueConstraints(obj model.MetadataStructValue) error
AssertMetadataStructValueConstraints checks if the values respects the defined constraints
func AssertMetadataStructValueRequired ¶
func AssertMetadataStructValueRequired(obj model.MetadataStructValue) error
AssertMetadataStructValueRequired checks if the required fields are not zero-ed
func AssertModelPreviewResultConstraints ¶ added in v0.3.4
func AssertModelPreviewResultConstraints(obj model.ModelPreviewResult) error
AssertModelPreviewResultConstraints checks if the values respects the defined constraints
func AssertModelPreviewResultRequired ¶ added in v0.3.4
func AssertModelPreviewResultRequired(obj model.ModelPreviewResult) error
AssertModelPreviewResultRequired checks if the required fields are not zero-ed
func AssertOrderByFieldConstraints ¶
func AssertOrderByFieldConstraints(obj model.OrderByField) error
AssertOrderByFieldConstraints checks if the values respects the defined constraints
func AssertOrderByFieldRequired ¶
func AssertOrderByFieldRequired(obj model.OrderByField) error
AssertOrderByFieldRequired checks if the required fields are not zero-ed
func AssertRecurseInterfaceRequired ¶
AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. This method traverse nested slices in a preorder fashion.
func AssertRecurseValueRequired ¶
AssertRecurseValueRequired checks each struct in the nested slice against the callback. This method traverse nested slices in a preorder fashion. ErrTypeAssertionError is thrown if the underlying struct does not match type T.
func AssertSortOrderConstraints ¶
AssertSortOrderConstraints checks if the values respects the defined constraints
func AssertSortOrderRequired ¶
AssertSortOrderRequired checks if the required fields are not zero-ed
func DefaultErrorHandler ¶
func DefaultErrorHandler(w http.ResponseWriter, _ *http.Request, err error, result *ImplResponse)
DefaultErrorHandler defines the default logic on how to handle errors from the controller. Any errors from parsing request params will return a StatusBadRequest. Otherwise, the error code originating from the servicer will be used.
func EncodeJSONResponse ¶
func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
func IsZeroValue ¶
func IsZeroValue(val interface{}) bool
IsZeroValue checks if the val is the zero-ed value.
func ReadFormFileToTempFile ¶
ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
Types ¶
type Constraint ¶
func WithMaximum ¶
func WithMaximum[T Number](expected T) Constraint[T]
func WithMinimum ¶
func WithMinimum[T Number](expected T) Constraint[T]
type ErrorHandler ¶
type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
ErrorHandler defines the required method for handling error. You may implement it and inject this into a controller if you would like errors to be handled differently from the DefaultErrorHandler
type ImplResponse ¶
type ImplResponse struct {
Code int
Body interface{}
}
ImplResponse defines an implementation response with error code and the associated body
func ErrorResponse ¶
func ErrorResponse(code int, err error) ImplResponse
func Response ¶
func Response(code int, body interface{}) ImplResponse
Response return a ImplResponse struct filled
type ModelCatalogServiceAPIController ¶
type ModelCatalogServiceAPIController struct {
// contains filtered or unexported fields
}
ModelCatalogServiceAPIController binds http requests to an api service and writes the service results to the http response
func NewModelCatalogServiceAPIController ¶
func NewModelCatalogServiceAPIController(s ModelCatalogServiceAPIServicer, opts ...ModelCatalogServiceAPIOption) *ModelCatalogServiceAPIController
NewModelCatalogServiceAPIController creates a default api controller
func (*ModelCatalogServiceAPIController) FindLabels ¶ added in v0.3.3
func (c *ModelCatalogServiceAPIController) FindLabels(w http.ResponseWriter, r *http.Request)
FindLabels - List All CatalogLabels
func (*ModelCatalogServiceAPIController) FindModels ¶
func (c *ModelCatalogServiceAPIController) FindModels(w http.ResponseWriter, r *http.Request)
FindModels - Search catalog models across sources.
func (*ModelCatalogServiceAPIController) FindModelsFilterOptions ¶ added in v0.3.2
func (c *ModelCatalogServiceAPIController) FindModelsFilterOptions(w http.ResponseWriter, r *http.Request)
FindModelsFilterOptions - Lists fields and available options that can be used in `filterQuery` on the list models endpoint.
func (*ModelCatalogServiceAPIController) FindSources ¶
func (c *ModelCatalogServiceAPIController) FindSources(w http.ResponseWriter, r *http.Request)
FindSources - List All CatalogSources
func (*ModelCatalogServiceAPIController) GetAllModelArtifacts ¶
func (c *ModelCatalogServiceAPIController) GetAllModelArtifacts(w http.ResponseWriter, r *http.Request)
GetAllModelArtifacts - List CatalogArtifacts.
func (*ModelCatalogServiceAPIController) GetAllModelPerformanceArtifacts ¶ added in v0.3.4
func (c *ModelCatalogServiceAPIController) GetAllModelPerformanceArtifacts(w http.ResponseWriter, r *http.Request)
GetAllModelPerformanceArtifacts - List CatalogArtifacts.
func (*ModelCatalogServiceAPIController) GetModel ¶
func (c *ModelCatalogServiceAPIController) GetModel(w http.ResponseWriter, r *http.Request)
GetModel - Get a `CatalogModel`.
func (*ModelCatalogServiceAPIController) OrderedRoutes ¶ added in v0.3.3
func (c *ModelCatalogServiceAPIController) OrderedRoutes() []Route
OrderedRoutes returns all the api routes in a deterministic order for the ModelCatalogServiceAPIController
func (*ModelCatalogServiceAPIController) PreviewCatalogSource ¶ added in v0.3.4
func (c *ModelCatalogServiceAPIController) PreviewCatalogSource(w http.ResponseWriter, r *http.Request)
PreviewCatalogSource - Preview catalog source configuration
func (*ModelCatalogServiceAPIController) Routes ¶
func (c *ModelCatalogServiceAPIController) Routes() Routes
Routes returns all the api routes for the ModelCatalogServiceAPIController
type ModelCatalogServiceAPIOption ¶
type ModelCatalogServiceAPIOption func(*ModelCatalogServiceAPIController)
ModelCatalogServiceAPIOption for how the controller is set up.
func WithModelCatalogServiceAPIErrorHandler ¶
func WithModelCatalogServiceAPIErrorHandler(h ErrorHandler) ModelCatalogServiceAPIOption
WithModelCatalogServiceAPIErrorHandler inject ErrorHandler into controller
type ModelCatalogServiceAPIRouter ¶
type ModelCatalogServiceAPIRouter interface {
FindLabels(http.ResponseWriter, *http.Request)
FindModels(http.ResponseWriter, *http.Request)
FindModelsFilterOptions(http.ResponseWriter, *http.Request)
FindSources(http.ResponseWriter, *http.Request)
PreviewCatalogSource(http.ResponseWriter, *http.Request)
GetModel(http.ResponseWriter, *http.Request)
GetAllModelArtifacts(http.ResponseWriter, *http.Request)
GetAllModelPerformanceArtifacts(http.ResponseWriter, *http.Request)
}
ModelCatalogServiceAPIRouter defines the required methods for binding the api requests to a responses for the ModelCatalogServiceAPI The ModelCatalogServiceAPIRouter implementation should parse necessary information from the http request, pass the data to a ModelCatalogServiceAPIServicer to perform the required actions, then write the service results to the http response.
type ModelCatalogServiceAPIService ¶
type ModelCatalogServiceAPIService struct {
// contains filtered or unexported fields
}
ModelCatalogServiceAPIService is a service that implements the logic for the ModelCatalogServiceAPIServicer This service should implement the business logic for every endpoint for the ModelCatalogServiceAPI s.coreApi. Include any external packages or services that will be required by this service.
func (*ModelCatalogServiceAPIService) FindLabels ¶ added in v0.3.3
func (m *ModelCatalogServiceAPIService) FindLabels(ctx context.Context, pageSize string, orderBy string, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)
func (*ModelCatalogServiceAPIService) FindModels ¶
func (m *ModelCatalogServiceAPIService) FindModels(ctx context.Context, recommended bool, targetRPS int32, latencyProperty string, rpsProperty string, hardwareCountProperty string, hardwareTypeProperty string, sourceIDs []string, q string, sourceLabels []string, filterQuery string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)
func (*ModelCatalogServiceAPIService) FindModelsFilterOptions ¶ added in v0.3.2
func (m *ModelCatalogServiceAPIService) FindModelsFilterOptions(ctx context.Context) (ImplResponse, error)
func (*ModelCatalogServiceAPIService) FindSources ¶
func (m *ModelCatalogServiceAPIService) FindSources(ctx context.Context, name string, strPageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)
func (*ModelCatalogServiceAPIService) GetAllModelArtifacts ¶
func (m *ModelCatalogServiceAPIService) GetAllModelArtifacts(ctx context.Context, sourceID string, modelName string, artifactType []model.ArtifactTypeQueryParam, artifactType2 []model.ArtifactTypeQueryParam, filterQuery string, pageSize string, orderBy string, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)
GetAllModelArtifacts retrieves all model artifacts for a given model from the specified source.
func (*ModelCatalogServiceAPIService) GetAllModelPerformanceArtifacts ¶ added in v0.3.4
func (m *ModelCatalogServiceAPIService) GetAllModelPerformanceArtifacts(ctx context.Context, sourceID string, modelName string, targetRPS int32, recommendations bool, rpsProperty string, latencyProperty string, hardwareCountProperty string, hardwareTypeProperty string, filterQuery string, pageSize string, orderBy string, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)
func (*ModelCatalogServiceAPIService) GetModel ¶
func (m *ModelCatalogServiceAPIService) GetModel(ctx context.Context, sourceID, modelName string) (ImplResponse, error)
func (*ModelCatalogServiceAPIService) PreviewCatalogSource ¶ added in v0.3.4
type ModelCatalogServiceAPIServicer ¶
type ModelCatalogServiceAPIServicer interface {
FindLabels(context.Context, string, string, model.SortOrder, string) (ImplResponse, error)
FindModels(context.Context, bool, int32, string, string, string, string, []string, string, []string, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
FindModelsFilterOptions(context.Context) (ImplResponse, error)
FindSources(context.Context, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
PreviewCatalogSource(context.Context, *os.File, string, string, string, *os.File) (ImplResponse, error)
GetModel(context.Context, string, string) (ImplResponse, error)
GetAllModelArtifacts(context.Context, string, string, []model.ArtifactTypeQueryParam, []model.ArtifactTypeQueryParam, string, string, string, model.SortOrder, string) (ImplResponse, error)
GetAllModelPerformanceArtifacts(context.Context, string, string, int32, bool, string, string, string, string, string, string, string, model.SortOrder, string) (ImplResponse, error)
}
ModelCatalogServiceAPIServicer defines the api actions for the ModelCatalogServiceAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
func NewModelCatalogServiceAPIService ¶
func NewModelCatalogServiceAPIService(provider catalog.APIProvider, sources *catalog.SourceCollection, labels *catalog.LabelCollection, sourceRepository models.CatalogSourceRepository) ModelCatalogServiceAPIServicer
NewModelCatalogServiceAPIService creates a default api service
type Operation ¶
func WithDefaultOrParse ¶
func WithDefaultOrParse[T Number | string | bool](def T, parse ParseString[T]) Operation[T]
func WithRequire ¶
func WithRequire[T Number | string | bool](parse ParseString[T]) Operation[T]
type ParsingError ¶
ParsingError indicates that an error has occurred when parsing request parameters
func (*ParsingError) Error ¶
func (e *ParsingError) Error() string
func (*ParsingError) Unwrap ¶
func (e *ParsingError) Unwrap() error
type RequiredError ¶
type RequiredError struct {
Field string
}
RequiredError indicates that an error has occurred when parsing request parameters
func (*RequiredError) Error ¶
func (e *RequiredError) Error() string
type Route ¶
type Route struct {
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
A Route defines the parameters for an api endpoint