generated

package
v0.0.0-...-927675b Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package generated provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type APIVersion

type APIVersion struct {
	Version *string `json:"version,omitempty"`
}

APIVersion Information about a version of the API.

type APIVersions

type APIVersions struct {
	ApiVersions *[]APIVersion `json:"apiVersions,omitempty"`
	UriPrefix   *string       `json:"uriPrefix,omitempty"`
}

APIVersions Information about a list of versions of the API.

type GetAllVersions200JSONResponse

type GetAllVersions200JSONResponse APIVersions

func (GetAllVersions200JSONResponse) VisitGetAllVersionsResponse

func (response GetAllVersions200JSONResponse) VisitGetAllVersionsResponse(w http.ResponseWriter) error

type GetAllVersions400ApplicationProblemPlusJSONResponse

type GetAllVersions400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetAllVersions400ApplicationProblemPlusJSONResponse) VisitGetAllVersionsResponse

func (response GetAllVersions400ApplicationProblemPlusJSONResponse) VisitGetAllVersionsResponse(w http.ResponseWriter) error

type GetAllVersions500ApplicationProblemPlusJSONResponse

type GetAllVersions500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetAllVersions500ApplicationProblemPlusJSONResponse) VisitGetAllVersionsResponse

func (response GetAllVersions500ApplicationProblemPlusJSONResponse) VisitGetAllVersionsResponse(w http.ResponseWriter) error

type GetAllVersionsRequestObject

type GetAllVersionsRequestObject struct {
}

type GetAllVersionsResponseObject

type GetAllVersionsResponseObject interface {
	VisitGetAllVersionsResponse(w http.ResponseWriter) error
}

type GetMinorVersions200JSONResponse

type GetMinorVersions200JSONResponse APIVersions

func (GetMinorVersions200JSONResponse) VisitGetMinorVersionsResponse

func (response GetMinorVersions200JSONResponse) VisitGetMinorVersionsResponse(w http.ResponseWriter) error

type GetMinorVersions400ApplicationProblemPlusJSONResponse

type GetMinorVersions400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetMinorVersions400ApplicationProblemPlusJSONResponse) VisitGetMinorVersionsResponse

func (response GetMinorVersions400ApplicationProblemPlusJSONResponse) VisitGetMinorVersionsResponse(w http.ResponseWriter) error

type GetMinorVersions500ApplicationProblemPlusJSONResponse

type GetMinorVersions500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetMinorVersions500ApplicationProblemPlusJSONResponse) VisitGetMinorVersionsResponse

func (response GetMinorVersions500ApplicationProblemPlusJSONResponse) VisitGetMinorVersionsResponse(w http.ResponseWriter) error

type GetMinorVersionsRequestObject

type GetMinorVersionsRequestObject struct {
}

type GetMinorVersionsResponseObject

type GetMinorVersionsResponseObject interface {
	VisitGetMinorVersionsResponse(w http.ResponseWriter) error
}

type GetResource200JSONResponse

type GetResource200JSONResponse ResourceInfo

func (GetResource200JSONResponse) VisitGetResourceResponse

func (response GetResource200JSONResponse) VisitGetResourceResponse(w http.ResponseWriter) error

type GetResource400ApplicationProblemPlusJSONResponse

type GetResource400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResource400ApplicationProblemPlusJSONResponse) VisitGetResourceResponse

func (response GetResource400ApplicationProblemPlusJSONResponse) VisitGetResourceResponse(w http.ResponseWriter) error

type GetResource404ApplicationProblemPlusJSONResponse

type GetResource404ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResource404ApplicationProblemPlusJSONResponse) VisitGetResourceResponse

func (response GetResource404ApplicationProblemPlusJSONResponse) VisitGetResourceResponse(w http.ResponseWriter) error

type GetResource500ApplicationProblemPlusJSONResponse

type GetResource500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResource500ApplicationProblemPlusJSONResponse) VisitGetResourceResponse

func (response GetResource500ApplicationProblemPlusJSONResponse) VisitGetResourceResponse(w http.ResponseWriter) error

type GetResourcePool200JSONResponse

type GetResourcePool200JSONResponse ResourcePoolInfo

func (GetResourcePool200JSONResponse) VisitGetResourcePoolResponse

func (response GetResourcePool200JSONResponse) VisitGetResourcePoolResponse(w http.ResponseWriter) error

type GetResourcePool400ApplicationProblemPlusJSONResponse

type GetResourcePool400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePool400ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResponse

func (response GetResourcePool400ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResponse(w http.ResponseWriter) error

type GetResourcePool404ApplicationProblemPlusJSONResponse

type GetResourcePool404ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePool404ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResponse

func (response GetResourcePool404ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResponse(w http.ResponseWriter) error

type GetResourcePool500ApplicationProblemPlusJSONResponse

type GetResourcePool500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePool500ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResponse

func (response GetResourcePool500ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResponse(w http.ResponseWriter) error

type GetResourcePoolRequestObject

type GetResourcePoolRequestObject struct {
	HwMgrId        string `json:"hwMgrId"`
	ResourcePoolId string `json:"resourcePoolId"`
}

type GetResourcePoolResources200JSONResponse

type GetResourcePoolResources200JSONResponse []ResourceInfo

func (GetResourcePoolResources200JSONResponse) VisitGetResourcePoolResourcesResponse

func (response GetResourcePoolResources200JSONResponse) VisitGetResourcePoolResourcesResponse(w http.ResponseWriter) error

type GetResourcePoolResources400ApplicationProblemPlusJSONResponse

type GetResourcePoolResources400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePoolResources400ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResourcesResponse

func (response GetResourcePoolResources400ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResourcesResponse(w http.ResponseWriter) error

type GetResourcePoolResources500ApplicationProblemPlusJSONResponse

type GetResourcePoolResources500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePoolResources500ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResourcesResponse

func (response GetResourcePoolResources500ApplicationProblemPlusJSONResponse) VisitGetResourcePoolResourcesResponse(w http.ResponseWriter) error

type GetResourcePoolResourcesRequestObject

type GetResourcePoolResourcesRequestObject struct {
	HwMgrId        string `json:"hwMgrId"`
	ResourcePoolId string `json:"resourcePoolId"`
}

type GetResourcePoolResourcesResponseObject

type GetResourcePoolResourcesResponseObject interface {
	VisitGetResourcePoolResourcesResponse(w http.ResponseWriter) error
}

type GetResourcePoolResponseObject

type GetResourcePoolResponseObject interface {
	VisitGetResourcePoolResponse(w http.ResponseWriter) error
}

type GetResourcePools200JSONResponse

type GetResourcePools200JSONResponse []ResourcePoolInfo

func (GetResourcePools200JSONResponse) VisitGetResourcePoolsResponse

func (response GetResourcePools200JSONResponse) VisitGetResourcePoolsResponse(w http.ResponseWriter) error

type GetResourcePools400ApplicationProblemPlusJSONResponse

type GetResourcePools400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePools400ApplicationProblemPlusJSONResponse) VisitGetResourcePoolsResponse

func (response GetResourcePools400ApplicationProblemPlusJSONResponse) VisitGetResourcePoolsResponse(w http.ResponseWriter) error

type GetResourcePools403ApplicationProblemPlusJSONResponse

type GetResourcePools403ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePools403ApplicationProblemPlusJSONResponse) VisitGetResourcePoolsResponse

func (response GetResourcePools403ApplicationProblemPlusJSONResponse) VisitGetResourcePoolsResponse(w http.ResponseWriter) error

type GetResourcePools500ApplicationProblemPlusJSONResponse

type GetResourcePools500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResourcePools500ApplicationProblemPlusJSONResponse) VisitGetResourcePoolsResponse

func (response GetResourcePools500ApplicationProblemPlusJSONResponse) VisitGetResourcePoolsResponse(w http.ResponseWriter) error

type GetResourcePoolsRequestObject

type GetResourcePoolsRequestObject struct {
	HwMgrId string `json:"hwMgrId"`
}

type GetResourcePoolsResponseObject

type GetResourcePoolsResponseObject interface {
	VisitGetResourcePoolsResponse(w http.ResponseWriter) error
}

type GetResourceRequestObject

type GetResourceRequestObject struct {
	HwMgrId    string `json:"hwMgrId"`
	ResourceId string `json:"resourceId"`
}

type GetResourceResponseObject

type GetResourceResponseObject interface {
	VisitGetResourceResponse(w http.ResponseWriter) error
}

type GetResources200JSONResponse

type GetResources200JSONResponse []ResourceInfo

func (GetResources200JSONResponse) VisitGetResourcesResponse

func (response GetResources200JSONResponse) VisitGetResourcesResponse(w http.ResponseWriter) error

type GetResources400ApplicationProblemPlusJSONResponse

type GetResources400ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResources400ApplicationProblemPlusJSONResponse) VisitGetResourcesResponse

func (response GetResources400ApplicationProblemPlusJSONResponse) VisitGetResourcesResponse(w http.ResponseWriter) error

type GetResources500ApplicationProblemPlusJSONResponse

type GetResources500ApplicationProblemPlusJSONResponse ProblemDetails

func (GetResources500ApplicationProblemPlusJSONResponse) VisitGetResourcesResponse

func (response GetResources500ApplicationProblemPlusJSONResponse) VisitGetResourcesResponse(w http.ResponseWriter) error

type GetResourcesRequestObject

type GetResourcesRequestObject struct {
	HwMgrId string `json:"hwMgrId"`
}

type GetResourcesResponseObject

type GetResourcesResponseObject interface {
	VisitGetResourcesResponse(w http.ResponseWriter) error
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type ProblemDetails

type ProblemDetails struct {
	// AdditionalAttributes Any number of additional attributes, as defined in a specification or by an implementation.
	AdditionalAttributes *map[string]string `json:"additionalAttributes,omitempty"`

	// Detail A human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail"`

	// Instance A URI reference that identifies the specific occurrence of the problem.
	// It may yield further information if dereferenced.
	Instance *string `json:"instance,omitempty"`

	// Status The HTTP status code for this occurrence of the problem.
	Status int `json:"status"`

	// Title A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem,
	// except for purposes of localization. If type is given and other than "about:blank", this attribute shall also be provided.
	Title *string `json:"title,omitempty"`

	// Type A URI reference according to IETF RFC 3986 [3] that identifies the problem type. It is encouraged that the URI provides
	// human-readable documentation for the problem (e.g. usingHTML) when dereferenced. When this member is not present,
	// its value is assumed to be "about:blank".
	Type *string `json:"type,omitempty"`
}

ProblemDetails defines model for ProblemDetails.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ResourceInfo

type ResourceInfo struct {
	// AdminState The administrative state of the resource
	AdminState ResourceInfoAdminState `json:"adminState"`

	// Description Human readable description of the resource.
	Description string `json:"description"`

	// GlobalAssetId Identifier or serial number of the resource, if available.
	GlobalAssetId *string `json:"globalAssetId,omitempty"`

	// Name Short name for the resource.
	Name string `json:"name"`

	// OperationalState The operational state of the resource
	OperationalState ResourceInfoOperationalState `json:"operationalState"`

	// ResourceId Identifier for the Resource.
	ResourceId     string                 `json:"resourceId"`
	ResourcePoolId string                 `json:"resourcePoolId"`
	UsageState     ResourceInfoUsageState `json:"usageState"`
}

ResourceInfo Information about a resource.

type ResourceInfoAdminState

type ResourceInfoAdminState string

ResourceInfoAdminState The administrative state of the resource

const (
	ResourceInfoAdminStateLOCKED       ResourceInfoAdminState = "LOCKED"
	ResourceInfoAdminStateSHUTTINGDOWN ResourceInfoAdminState = "SHUTTING_DOWN"
	ResourceInfoAdminStateUNKNOWN      ResourceInfoAdminState = "UNKNOWN"
	ResourceInfoAdminStateUNLOCKED     ResourceInfoAdminState = "UNLOCKED"
)

Defines values for ResourceInfoAdminState.

type ResourceInfoOperationalState

type ResourceInfoOperationalState string

ResourceInfoOperationalState The operational state of the resource

const (
	ResourceInfoOperationalStateDISABLED ResourceInfoOperationalState = "DISABLED"
	ResourceInfoOperationalStateENABLED  ResourceInfoOperationalState = "ENABLED"
	ResourceInfoOperationalStateUNKNOWN  ResourceInfoOperationalState = "UNKNOWN"
)

Defines values for ResourceInfoOperationalState.

type ResourceInfoUsageState

type ResourceInfoUsageState string

ResourceInfoUsageState defines model for ResourceInfo.UsageState.

const (
	ACTIVE  ResourceInfoUsageState = "ACTIVE"
	BUSY    ResourceInfoUsageState = "BUSY"
	IDLE    ResourceInfoUsageState = "IDLE"
	UNKNOWN ResourceInfoUsageState = "UNKNOWN"
)

Defines values for ResourceInfoUsageState.

type ResourcePoolInfo

type ResourcePoolInfo struct {
	// Description Human readable description of the resource pool.
	Description string `json:"description"`

	// Name Human readable name of the resource pool.
	Name string `json:"name"`

	// ResourcePoolId Identifier for the Resource Pool in the hardware manager instance.
	ResourcePoolId string `json:"resourcePoolId"`

	// SiteId Identifier for the location of the resource pool.
	SiteId *string `json:"siteId,omitempty"`
}

ResourcePoolInfo Information about a resource pool.

type ServeMux

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

ServeMux is an abstraction of http.ServeMux.

type ServerInterface

type ServerInterface interface {
	// Get minor API versions
	// (GET /hardware-manager/inventory/v1/api_versions)
	GetMinorVersions(w http.ResponseWriter, r *http.Request)
	// Retrieve the list of resource pools
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resourcePools)
	GetResourcePools(w http.ResponseWriter, r *http.Request, hwMgrId string)
	// Retrieve the list of resources for a given resource pool
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resourcePools/${resourcePoolId}/resources)
	GetResourcePoolResources(w http.ResponseWriter, r *http.Request, hwMgrId string, resourcePoolId string)
	// Retrieve exactly one resource pool
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resourcePools/{resourcePoolId})
	GetResourcePool(w http.ResponseWriter, r *http.Request, hwMgrId string, resourcePoolId string)
	// Retrieve the list of resources
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resources)
	GetResources(w http.ResponseWriter, r *http.Request, hwMgrId string)
	// Retrieve exactly one resource
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resources/{resourceId})
	GetResource(w http.ResponseWriter, r *http.Request, hwMgrId string, resourceId string)
	// Get API versions
	// (GET /o2ims-infrastructureMonitoring/api_versions)
	GetAllVersions(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetAllVersions

func (siw *ServerInterfaceWrapper) GetAllVersions(w http.ResponseWriter, r *http.Request)

GetAllVersions operation middleware

func (*ServerInterfaceWrapper) GetMinorVersions

func (siw *ServerInterfaceWrapper) GetMinorVersions(w http.ResponseWriter, r *http.Request)

GetMinorVersions operation middleware

func (*ServerInterfaceWrapper) GetResource

func (siw *ServerInterfaceWrapper) GetResource(w http.ResponseWriter, r *http.Request)

GetResource operation middleware

func (*ServerInterfaceWrapper) GetResourcePool

func (siw *ServerInterfaceWrapper) GetResourcePool(w http.ResponseWriter, r *http.Request)

GetResourcePool operation middleware

func (*ServerInterfaceWrapper) GetResourcePoolResources

func (siw *ServerInterfaceWrapper) GetResourcePoolResources(w http.ResponseWriter, r *http.Request)

GetResourcePoolResources operation middleware

func (*ServerInterfaceWrapper) GetResourcePools

func (siw *ServerInterfaceWrapper) GetResourcePools(w http.ResponseWriter, r *http.Request)

GetResourcePools operation middleware

func (*ServerInterfaceWrapper) GetResources

func (siw *ServerInterfaceWrapper) GetResources(w http.ResponseWriter, r *http.Request)

GetResources operation middleware

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Get minor API versions
	// (GET /hardware-manager/inventory/v1/api_versions)
	GetMinorVersions(ctx context.Context, request GetMinorVersionsRequestObject) (GetMinorVersionsResponseObject, error)
	// Retrieve the list of resource pools
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resourcePools)
	GetResourcePools(ctx context.Context, request GetResourcePoolsRequestObject) (GetResourcePoolsResponseObject, error)
	// Retrieve the list of resources for a given resource pool
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resourcePools/${resourcePoolId}/resources)
	GetResourcePoolResources(ctx context.Context, request GetResourcePoolResourcesRequestObject) (GetResourcePoolResourcesResponseObject, error)
	// Retrieve exactly one resource pool
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resourcePools/{resourcePoolId})
	GetResourcePool(ctx context.Context, request GetResourcePoolRequestObject) (GetResourcePoolResponseObject, error)
	// Retrieve the list of resources
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resources)
	GetResources(ctx context.Context, request GetResourcesRequestObject) (GetResourcesResponseObject, error)
	// Retrieve exactly one resource
	// (GET /hardware-manager/inventory/v1/manager/${hwMgrId}/resources/{resourceId})
	GetResource(ctx context.Context, request GetResourceRequestObject) (GetResourceResponseObject, error)
	// Get API versions
	// (GET /o2ims-infrastructureMonitoring/api_versions)
	GetAllVersions(ctx context.Context, request GetAllVersionsRequestObject) (GetAllVersionsResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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