openapi

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func AssertBaseModelConstraints(obj model.BaseModel) error

AssertBaseModelConstraints checks if the values respects the defined constraints

func AssertBaseModelRequired

func AssertBaseModelRequired(obj model.BaseModel) error

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 AssertCatalogAssetTypeConstraints added in v0.3.7

func AssertCatalogAssetTypeConstraints(obj model.CatalogAssetType) error

AssertCatalogAssetTypeConstraints checks if the values respects the defined constraints

func AssertCatalogAssetTypeRequired added in v0.3.7

func AssertCatalogAssetTypeRequired(obj model.CatalogAssetType) error

AssertCatalogAssetTypeRequired 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

func AssertErrorConstraints(obj model.Error) error

AssertErrorConstraints checks if the values respects the defined constraints

func AssertErrorRequired

func AssertErrorRequired(obj model.Error) error

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 AssertMCPArtifactConstraints added in v0.3.7

func AssertMCPArtifactConstraints(obj model.MCPArtifact) error

AssertMCPArtifactConstraints checks if the values respects the defined constraints

func AssertMCPArtifactRequired added in v0.3.7

func AssertMCPArtifactRequired(obj model.MCPArtifact) error

AssertMCPArtifactRequired checks if the required fields are not zero-ed

func AssertMCPEndpointsConstraints added in v0.3.7

func AssertMCPEndpointsConstraints(obj model.MCPEndpoints) error

AssertMCPEndpointsConstraints checks if the values respects the defined constraints

func AssertMCPEndpointsRequired added in v0.3.7

func AssertMCPEndpointsRequired(obj model.MCPEndpoints) error

AssertMCPEndpointsRequired checks if the required fields are not zero-ed

func AssertMCPEnvVarMetadataConstraints added in v0.3.7

func AssertMCPEnvVarMetadataConstraints(obj model.MCPEnvVarMetadata) error

AssertMCPEnvVarMetadataConstraints checks if the values respects the defined constraints

func AssertMCPEnvVarMetadataRequired added in v0.3.7

func AssertMCPEnvVarMetadataRequired(obj model.MCPEnvVarMetadata) error

AssertMCPEnvVarMetadataRequired checks if the required fields are not zero-ed

func AssertMCPResourceRecommendationConstraints added in v0.3.7

func AssertMCPResourceRecommendationConstraints(obj model.MCPResourceRecommendation) error

AssertMCPResourceRecommendationConstraints checks if the values respects the defined constraints

func AssertMCPResourceRecommendationHighConstraints added in v0.3.7

func AssertMCPResourceRecommendationHighConstraints(obj model.MCPResourceRecommendationHigh) error

AssertMCPResourceRecommendationHighConstraints checks if the values respects the defined constraints

func AssertMCPResourceRecommendationHighRequired added in v0.3.7

func AssertMCPResourceRecommendationHighRequired(obj model.MCPResourceRecommendationHigh) error

AssertMCPResourceRecommendationHighRequired checks if the required fields are not zero-ed

func AssertMCPResourceRecommendationMinimalConstraints added in v0.3.7

func AssertMCPResourceRecommendationMinimalConstraints(obj model.MCPResourceRecommendationMinimal) error

AssertMCPResourceRecommendationMinimalConstraints checks if the values respects the defined constraints

func AssertMCPResourceRecommendationMinimalRequired added in v0.3.7

func AssertMCPResourceRecommendationMinimalRequired(obj model.MCPResourceRecommendationMinimal) error

AssertMCPResourceRecommendationMinimalRequired checks if the required fields are not zero-ed

func AssertMCPResourceRecommendationRecommendedConstraints added in v0.3.7

func AssertMCPResourceRecommendationRecommendedConstraints(obj model.MCPResourceRecommendationRecommended) error

AssertMCPResourceRecommendationRecommendedConstraints checks if the values respects the defined constraints

func AssertMCPResourceRecommendationRecommendedRequired added in v0.3.7

func AssertMCPResourceRecommendationRecommendedRequired(obj model.MCPResourceRecommendationRecommended) error

AssertMCPResourceRecommendationRecommendedRequired checks if the required fields are not zero-ed

func AssertMCPResourceRecommendationRequired added in v0.3.7

func AssertMCPResourceRecommendationRequired(obj model.MCPResourceRecommendation) error

AssertMCPResourceRecommendationRequired checks if the required fields are not zero-ed

func AssertMCPRuntimeMetadataCapabilitiesConstraints added in v0.3.7

func AssertMCPRuntimeMetadataCapabilitiesConstraints(obj model.MCPRuntimeMetadataCapabilities) error

AssertMCPRuntimeMetadataCapabilitiesConstraints checks if the values respects the defined constraints

func AssertMCPRuntimeMetadataCapabilitiesRequired added in v0.3.7

func AssertMCPRuntimeMetadataCapabilitiesRequired(obj model.MCPRuntimeMetadataCapabilities) error

AssertMCPRuntimeMetadataCapabilitiesRequired checks if the required fields are not zero-ed

func AssertMCPRuntimeMetadataConstraints added in v0.3.7

func AssertMCPRuntimeMetadataConstraints(obj model.MCPRuntimeMetadata) error

AssertMCPRuntimeMetadataConstraints checks if the values respects the defined constraints

func AssertMCPRuntimeMetadataHealthEndpointsConstraints added in v0.3.7

func AssertMCPRuntimeMetadataHealthEndpointsConstraints(obj model.MCPRuntimeMetadataHealthEndpoints) error

AssertMCPRuntimeMetadataHealthEndpointsConstraints checks if the values respects the defined constraints

func AssertMCPRuntimeMetadataHealthEndpointsRequired added in v0.3.7

func AssertMCPRuntimeMetadataHealthEndpointsRequired(obj model.MCPRuntimeMetadataHealthEndpoints) error

AssertMCPRuntimeMetadataHealthEndpointsRequired checks if the required fields are not zero-ed

func AssertMCPRuntimeMetadataRequired added in v0.3.7

func AssertMCPRuntimeMetadataRequired(obj model.MCPRuntimeMetadata) error

AssertMCPRuntimeMetadataRequired checks if the required fields are not zero-ed

func AssertMCPSecurityIndicatorConstraints added in v0.3.7

func AssertMCPSecurityIndicatorConstraints(obj model.MCPSecurityIndicator) error

AssertMCPSecurityIndicatorConstraints checks if the values respects the defined constraints

func AssertMCPSecurityIndicatorRequired added in v0.3.7

func AssertMCPSecurityIndicatorRequired(obj model.MCPSecurityIndicator) error

AssertMCPSecurityIndicatorRequired checks if the required fields are not zero-ed

func AssertMCPServerConstraints added in v0.3.7

func AssertMCPServerConstraints(obj model.MCPServer) error

AssertMCPServerConstraints checks if the values respects the defined constraints

func AssertMCPServerListConstraints added in v0.3.7

func AssertMCPServerListConstraints(obj model.MCPServerList) error

AssertMCPServerListConstraints checks if the values respects the defined constraints

func AssertMCPServerListRequired added in v0.3.7

func AssertMCPServerListRequired(obj model.MCPServerList) error

AssertMCPServerListRequired checks if the required fields are not zero-ed

func AssertMCPServerRequired added in v0.3.7

func AssertMCPServerRequired(obj model.MCPServer) error

AssertMCPServerRequired checks if the required fields are not zero-ed

func AssertMCPToolConstraints added in v0.3.7

func AssertMCPToolConstraints(obj model.MCPTool) error

AssertMCPToolConstraints checks if the values respects the defined constraints

func AssertMCPToolParameterConstraints added in v0.3.7

func AssertMCPToolParameterConstraints(obj model.MCPToolParameter) error

AssertMCPToolParameterConstraints checks if the values respects the defined constraints

func AssertMCPToolParameterRequired added in v0.3.7

func AssertMCPToolParameterRequired(obj model.MCPToolParameter) error

AssertMCPToolParameterRequired checks if the required fields are not zero-ed

func AssertMCPToolRequired added in v0.3.7

func AssertMCPToolRequired(obj model.MCPTool) error

AssertMCPToolRequired checks if the required fields are not zero-ed

func AssertMCPToolWithServerConstraints added in v0.3.7

func AssertMCPToolWithServerConstraints(obj model.MCPToolWithServer) error

AssertMCPToolWithServerConstraints checks if the values respects the defined constraints

func AssertMCPToolWithServerRequired added in v0.3.7

func AssertMCPToolWithServerRequired(obj model.MCPToolWithServer) error

AssertMCPToolWithServerRequired checks if the required fields are not zero-ed

func AssertMCPToolsListConstraints added in v0.3.7

func AssertMCPToolsListConstraints(obj model.MCPToolsList) error

AssertMCPToolsListConstraints checks if the values respects the defined constraints

func AssertMCPToolsListRequired added in v0.3.7

func AssertMCPToolsListRequired(obj model.MCPToolsList) error

AssertMCPToolsListRequired 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

func AssertRecurseInterfaceRequired[T any](obj interface{}, callback func(T) error) error

AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. This method traverse nested slices in a preorder fashion.

func AssertRecurseValueRequired

func AssertRecurseValueRequired[T any](value reflect.Value, callback func(T) error) error

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

func AssertSortOrderConstraints(obj model.SortOrder) error

AssertSortOrderConstraints checks if the values respects the defined constraints

func AssertSortOrderRequired

func AssertSortOrderRequired(obj model.SortOrder) error

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 Logger

func Logger(inner http.Handler) http.Handler

func NewRouter

func NewRouter(routers ...Router) chi.Router

NewRouter creates a new router for any number of api routers

func ReadFormFileToTempFile

func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)

ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file

func ReadFormFilesToTempFiles

func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)

ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files

Types

type Constraint

type Constraint[T Number | string | bool] func(actual T) error

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 MCPCatalogServiceAPIController added in v0.3.7

type MCPCatalogServiceAPIController struct {
	// contains filtered or unexported fields
}

MCPCatalogServiceAPIController binds http requests to an api service and writes the service results to the http response

func NewMCPCatalogServiceAPIController added in v0.3.7

func NewMCPCatalogServiceAPIController(s MCPCatalogServiceAPIServicer, opts ...MCPCatalogServiceAPIOption) *MCPCatalogServiceAPIController

NewMCPCatalogServiceAPIController creates a default api controller

func (*MCPCatalogServiceAPIController) FindMCPServerTools added in v0.3.7

func (c *MCPCatalogServiceAPIController) FindMCPServerTools(w http.ResponseWriter, r *http.Request)

FindMCPServerTools - List tools exposed by an `MCPServer`.

func (*MCPCatalogServiceAPIController) FindMCPServers added in v0.3.7

FindMCPServers - List MCP servers.

func (*MCPCatalogServiceAPIController) FindMCPServersFilterOptions added in v0.3.7

func (c *MCPCatalogServiceAPIController) FindMCPServersFilterOptions(w http.ResponseWriter, r *http.Request)

FindMCPServersFilterOptions - Lists fields, values, and named queries that can be used in `filterQuery` on the list MCP servers endpoint.

func (*MCPCatalogServiceAPIController) GetMCPServer added in v0.3.7

GetMCPServer - Get an `MCPServer`.

func (*MCPCatalogServiceAPIController) GetMCPServerTool added in v0.3.7

func (c *MCPCatalogServiceAPIController) GetMCPServerTool(w http.ResponseWriter, r *http.Request)

GetMCPServerTool - Get an `MCPTool` from an `MCPServer`.

func (*MCPCatalogServiceAPIController) OrderedRoutes added in v0.3.7

func (c *MCPCatalogServiceAPIController) OrderedRoutes() []Route

OrderedRoutes returns all the api routes in a deterministic order for the MCPCatalogServiceAPIController

func (*MCPCatalogServiceAPIController) Routes added in v0.3.7

Routes returns all the api routes for the MCPCatalogServiceAPIController

type MCPCatalogServiceAPIOption added in v0.3.7

type MCPCatalogServiceAPIOption func(*MCPCatalogServiceAPIController)

MCPCatalogServiceAPIOption for how the controller is set up.

func WithMCPCatalogServiceAPIErrorHandler added in v0.3.7

func WithMCPCatalogServiceAPIErrorHandler(h ErrorHandler) MCPCatalogServiceAPIOption

WithMCPCatalogServiceAPIErrorHandler inject ErrorHandler into controller

type MCPCatalogServiceAPIRouter added in v0.3.7

type MCPCatalogServiceAPIRouter interface {
	FindMCPServers(http.ResponseWriter, *http.Request)
	FindMCPServersFilterOptions(http.ResponseWriter, *http.Request)
	GetMCPServer(http.ResponseWriter, *http.Request)
	FindMCPServerTools(http.ResponseWriter, *http.Request)
	GetMCPServerTool(http.ResponseWriter, *http.Request)
}

MCPCatalogServiceAPIRouter defines the required methods for binding the api requests to a responses for the MCPCatalogServiceAPI The MCPCatalogServiceAPIRouter implementation should parse necessary information from the http request, pass the data to a MCPCatalogServiceAPIServicer to perform the required actions, then write the service results to the http response.

type MCPCatalogServiceAPIService added in v0.3.7

type MCPCatalogServiceAPIService struct {
	// contains filtered or unexported fields
}

MCPCatalogServiceAPIService is a service that implements the logic for the MCPCatalogServiceAPIServicer

func (*MCPCatalogServiceAPIService) FindMCPServerTools added in v0.3.7

func (m *MCPCatalogServiceAPIService) FindMCPServerTools(ctx context.Context, serverID string, filterQuery string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)

FindMCPServerTools - List MCP server tools.

func (*MCPCatalogServiceAPIService) FindMCPServers added in v0.3.7

func (m *MCPCatalogServiceAPIService) FindMCPServers(ctx context.Context, name string, q string, sourceLabel []string, filterQuery string, namedQuery string, includeTools bool, toolLimit int32, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error)

FindMCPServers - List MCP servers.

func (*MCPCatalogServiceAPIService) FindMCPServersFilterOptions added in v0.3.7

func (m *MCPCatalogServiceAPIService) FindMCPServersFilterOptions(ctx context.Context) (ImplResponse, error)

FindMCPServersFilterOptions - Lists fields, values, and named queries that can be used in `filterQuery` on the list MCP servers endpoint.

func (*MCPCatalogServiceAPIService) GetMCPServer added in v0.3.7

func (m *MCPCatalogServiceAPIService) GetMCPServer(ctx context.Context, serverID string, includeTools bool) (ImplResponse, error)

GetMCPServer - Get an `MCPServer`.

func (*MCPCatalogServiceAPIService) GetMCPServerTool added in v0.3.7

func (m *MCPCatalogServiceAPIService) GetMCPServerTool(ctx context.Context, serverID string, toolName string) (ImplResponse, error)

GetMCPServerTool - Get an `MCPTool` from an `MCPServer`.

type MCPCatalogServiceAPIServicer added in v0.3.7

type MCPCatalogServiceAPIServicer interface {
	FindMCPServers(context.Context, string, string, []string, string, string, bool, int32, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
	FindMCPServersFilterOptions(context.Context) (ImplResponse, error)
	GetMCPServer(context.Context, string, bool) (ImplResponse, error)
	FindMCPServerTools(context.Context, string, string, string, model.OrderByField, model.SortOrder, string) (ImplResponse, error)
	GetMCPServerTool(context.Context, string, string) (ImplResponse, error)
}

MCPCatalogServiceAPIServicer defines the api actions for the MCPCatalogServiceAPI 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 NewMCPCatalogServiceAPIService added in v0.3.7

func NewMCPCatalogServiceAPIService(mcpProvider catalog.MCPProvider) MCPCatalogServiceAPIServicer

NewMCPCatalogServiceAPIService creates a default api service

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

NewModelCatalogServiceAPIController creates a default api controller

func (*ModelCatalogServiceAPIController) FindLabels added in v0.3.3

FindLabels - List All CatalogLabels

func (*ModelCatalogServiceAPIController) FindModels

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

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

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

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, assetType model.CatalogAssetType, 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

func (m *ModelCatalogServiceAPIService) PreviewCatalogSource(ctx context.Context, configParam *os.File, pageSizeParam string, nextPageTokenParam string, filterStatusParam string, catalogDataParam *os.File) (ImplResponse, error)

type ModelCatalogServiceAPIServicer

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, mcpSources *catalog.MCPSourceCollection, labels *catalog.LabelCollection, sourceRepository models.CatalogSourceRepository) ModelCatalogServiceAPIServicer

NewModelCatalogServiceAPIService creates a default api service

type Number

type Number interface {
	~int32 | ~int64 | ~float32 | ~float64
}

type Operation

type Operation[T Number | string | bool] func(actual string) (T, bool, error)

func WithDefaultOrParse

func WithDefaultOrParse[T Number | string | bool](def T, parse ParseString[T]) Operation[T]

func WithParse

func WithParse[T Number | string | bool](parse ParseString[T]) Operation[T]

func WithRequire

func WithRequire[T Number | string | bool](parse ParseString[T]) Operation[T]

type ParseString

type ParseString[T Number | string | bool] func(v string) (T, error)

type ParsingError

type ParsingError struct {
	Param string
	Err   error
}

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

type Router

type Router interface {
	Routes() Routes
	OrderedRoutes() []Route
}

Router defines the required methods for retrieving api routes

type Routes

type Routes map[string]Route

Routes is a map of defined api endpoints

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL