Documentation
¶
Overview ¶
Package resource_manager provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- type ChiServerOptions
- type CreateInstance201JSONResponse
- type CreateInstance400ApplicationProblemPlusJSONResponse
- type CreateInstance404ApplicationProblemPlusJSONResponse
- type CreateInstance409ApplicationProblemPlusJSONResponse
- type CreateInstance422ApplicationProblemPlusJSONResponse
- type CreateInstanceJSONRequestBody
- type CreateInstanceParams
- type CreateInstanceRequestObject
- type CreateInstanceResponseObject
- type CreateInstancedefaultApplicationProblemPlusJSONResponse
- type DeleteInstance204Response
- type DeleteInstance400ApplicationProblemPlusJSONResponse
- type DeleteInstance404ApplicationProblemPlusJSONResponse
- type DeleteInstanceParams
- type DeleteInstanceRequestObject
- type DeleteInstanceResponseObject
- type DeleteInstancedefaultApplicationProblemPlusJSONResponse
- type Error
- type GetInstance200JSONResponse
- type GetInstance400ApplicationProblemPlusJSONResponse
- type GetInstance404ApplicationProblemPlusJSONResponse
- type GetInstanceParams
- type GetInstanceRequestObject
- type GetInstanceResponseObject
- type GetInstancedefaultApplicationProblemPlusJSONResponse
- type InstanceIdPath
- type InvalidParamFormatError
- type ListInstances200JSONResponse
- type ListInstances400ApplicationProblemPlusJSONResponse
- type ListInstancesParams
- type ListInstancesRequestObject
- type ListInstancesResponseObject
- type ListInstancesdefaultApplicationProblemPlusJSONResponse
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateInstance(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteInstance(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetInstance(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListInstances(w http.ResponseWriter, r *http.Request)
- type ServiceTypeInstance
- type ServiceTypeInstanceDeletionStatus
- type ServiceTypeInstanceList
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CreateInstance(w http.ResponseWriter, r *http.Request, params CreateInstanceParams)
- func (_ Unimplemented) DeleteInstance(w http.ResponseWriter, r *http.Request, instanceId InstanceIdPath, ...)
- func (_ Unimplemented) GetInstance(w http.ResponseWriter, r *http.Request, instanceId InstanceIdPath, ...)
- func (_ Unimplemented) ListInstances(w http.ResponseWriter, r *http.Request, params ListInstancesParams)
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type CreateInstance201JSONResponse ¶
type CreateInstance201JSONResponse ServiceTypeInstance
func (CreateInstance201JSONResponse) VisitCreateInstanceResponse ¶
func (response CreateInstance201JSONResponse) VisitCreateInstanceResponse(w http.ResponseWriter) error
type CreateInstance400ApplicationProblemPlusJSONResponse ¶
type CreateInstance400ApplicationProblemPlusJSONResponse Error
func (CreateInstance400ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse ¶
func (response CreateInstance400ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse(w http.ResponseWriter) error
type CreateInstance404ApplicationProblemPlusJSONResponse ¶
type CreateInstance404ApplicationProblemPlusJSONResponse Error
func (CreateInstance404ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse ¶
func (response CreateInstance404ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse(w http.ResponseWriter) error
type CreateInstance409ApplicationProblemPlusJSONResponse ¶
type CreateInstance409ApplicationProblemPlusJSONResponse Error
func (CreateInstance409ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse ¶
func (response CreateInstance409ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse(w http.ResponseWriter) error
type CreateInstance422ApplicationProblemPlusJSONResponse ¶
type CreateInstance422ApplicationProblemPlusJSONResponse Error
func (CreateInstance422ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse ¶
func (response CreateInstance422ApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse(w http.ResponseWriter) error
type CreateInstanceJSONRequestBody ¶
type CreateInstanceJSONRequestBody = ServiceTypeInstance
CreateInstanceJSONRequestBody defines body for CreateInstance for application/json ContentType.
type CreateInstanceParams ¶
type CreateInstanceParams struct {
// Id Optional ID for service type instance
Id *string `form:"id,omitempty" json:"id,omitempty"`
}
CreateInstanceParams defines parameters for CreateInstance.
type CreateInstanceRequestObject ¶
type CreateInstanceRequestObject struct {
Params CreateInstanceParams
Body *CreateInstanceJSONRequestBody
}
type CreateInstanceResponseObject ¶
type CreateInstanceResponseObject interface {
VisitCreateInstanceResponse(w http.ResponseWriter) error
}
type CreateInstancedefaultApplicationProblemPlusJSONResponse ¶
func (CreateInstancedefaultApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse ¶
func (response CreateInstancedefaultApplicationProblemPlusJSONResponse) VisitCreateInstanceResponse(w http.ResponseWriter) error
type DeleteInstance204Response ¶
type DeleteInstance204Response struct {
}
func (DeleteInstance204Response) VisitDeleteInstanceResponse ¶
func (response DeleteInstance204Response) VisitDeleteInstanceResponse(w http.ResponseWriter) error
type DeleteInstance400ApplicationProblemPlusJSONResponse ¶
type DeleteInstance400ApplicationProblemPlusJSONResponse Error
func (DeleteInstance400ApplicationProblemPlusJSONResponse) VisitDeleteInstanceResponse ¶
func (response DeleteInstance400ApplicationProblemPlusJSONResponse) VisitDeleteInstanceResponse(w http.ResponseWriter) error
type DeleteInstance404ApplicationProblemPlusJSONResponse ¶
type DeleteInstance404ApplicationProblemPlusJSONResponse Error
func (DeleteInstance404ApplicationProblemPlusJSONResponse) VisitDeleteInstanceResponse ¶
func (response DeleteInstance404ApplicationProblemPlusJSONResponse) VisitDeleteInstanceResponse(w http.ResponseWriter) error
type DeleteInstanceParams ¶
type DeleteInstanceParams struct {
// Deferred When true, deletion failures are deferred to a cleanup queue
// instead of returning an error. Used during rehydration flows.
Deferred *bool `form:"deferred,omitempty" json:"deferred,omitempty"`
}
DeleteInstanceParams defines parameters for DeleteInstance.
type DeleteInstanceRequestObject ¶
type DeleteInstanceRequestObject struct {
InstanceId InstanceIdPath `json:"instanceId"`
Params DeleteInstanceParams
}
type DeleteInstanceResponseObject ¶
type DeleteInstanceResponseObject interface {
VisitDeleteInstanceResponse(w http.ResponseWriter) error
}
type DeleteInstancedefaultApplicationProblemPlusJSONResponse ¶
func (DeleteInstancedefaultApplicationProblemPlusJSONResponse) VisitDeleteInstanceResponse ¶
func (response DeleteInstancedefaultApplicationProblemPlusJSONResponse) VisitDeleteInstanceResponse(w http.ResponseWriter) error
type Error ¶
type Error struct {
// Detail Human-readable explanation specific to this occurrence
Detail *string `json:"detail,omitempty"`
// Instance URI reference for this specific error occurrence
Instance *string `json:"instance,omitempty"`
// Status HTTP status code
Status *int `json:"status,omitempty"`
// Title Short human-readable summary of the problem
Title string `json:"title"`
// Type URI reference identifying the error type
Type string `json:"type"`
}
Error RFC 7807 compliant error response
type GetInstance200JSONResponse ¶
type GetInstance200JSONResponse ServiceTypeInstance
func (GetInstance200JSONResponse) VisitGetInstanceResponse ¶
func (response GetInstance200JSONResponse) VisitGetInstanceResponse(w http.ResponseWriter) error
type GetInstance400ApplicationProblemPlusJSONResponse ¶
type GetInstance400ApplicationProblemPlusJSONResponse Error
func (GetInstance400ApplicationProblemPlusJSONResponse) VisitGetInstanceResponse ¶
func (response GetInstance400ApplicationProblemPlusJSONResponse) VisitGetInstanceResponse(w http.ResponseWriter) error
type GetInstance404ApplicationProblemPlusJSONResponse ¶
type GetInstance404ApplicationProblemPlusJSONResponse Error
func (GetInstance404ApplicationProblemPlusJSONResponse) VisitGetInstanceResponse ¶
func (response GetInstance404ApplicationProblemPlusJSONResponse) VisitGetInstanceResponse(w http.ResponseWriter) error
type GetInstanceParams ¶
type GetInstanceParams struct {
// ShowDeleted If true, soft-deleted instances are returned instead of 404.
// Defaults to false.
ShowDeleted *bool `form:"show_deleted,omitempty" json:"show_deleted,omitempty"`
}
GetInstanceParams defines parameters for GetInstance.
type GetInstanceRequestObject ¶
type GetInstanceRequestObject struct {
InstanceId InstanceIdPath `json:"instanceId"`
Params GetInstanceParams
}
type GetInstanceResponseObject ¶
type GetInstanceResponseObject interface {
VisitGetInstanceResponse(w http.ResponseWriter) error
}
type GetInstancedefaultApplicationProblemPlusJSONResponse ¶
func (GetInstancedefaultApplicationProblemPlusJSONResponse) VisitGetInstanceResponse ¶
func (response GetInstancedefaultApplicationProblemPlusJSONResponse) VisitGetInstanceResponse(w http.ResponseWriter) error
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListInstances200JSONResponse ¶
type ListInstances200JSONResponse ServiceTypeInstanceList
func (ListInstances200JSONResponse) VisitListInstancesResponse ¶
func (response ListInstances200JSONResponse) VisitListInstancesResponse(w http.ResponseWriter) error
type ListInstances400ApplicationProblemPlusJSONResponse ¶
type ListInstances400ApplicationProblemPlusJSONResponse Error
func (ListInstances400ApplicationProblemPlusJSONResponse) VisitListInstancesResponse ¶
func (response ListInstances400ApplicationProblemPlusJSONResponse) VisitListInstancesResponse(w http.ResponseWriter) error
type ListInstancesParams ¶
type ListInstancesParams struct {
// Provider Filter service provider
Provider *string `form:"provider,omitempty" json:"provider,omitempty"`
// ServiceType Filter instances by service type
ServiceType *string `form:"service_type,omitempty" json:"service_type,omitempty"`
// ShowDeleted If true, soft-deleted instances are included in the results
// alongside active instances. Defaults to false.
ShowDeleted *bool `form:"show_deleted,omitempty" json:"show_deleted,omitempty"`
// MaxPageSize Maximum number of results per page
MaxPageSize *int `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`
// PageToken Token for pagination
PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`
}
ListInstancesParams defines parameters for ListInstances.
type ListInstancesRequestObject ¶
type ListInstancesRequestObject struct {
Params ListInstancesParams
}
type ListInstancesResponseObject ¶
type ListInstancesResponseObject interface {
VisitListInstancesResponse(w http.ResponseWriter) error
}
type ListInstancesdefaultApplicationProblemPlusJSONResponse ¶
func (ListInstancesdefaultApplicationProblemPlusJSONResponse) VisitListInstancesResponse ¶
func (response ListInstancesdefaultApplicationProblemPlusJSONResponse) VisitListInstancesResponse(w http.ResponseWriter) error
type RequiredHeaderError ¶
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 ServerInterface ¶
type ServerInterface interface {
// List all service type instances
// (GET /service-type-instances)
ListInstances(w http.ResponseWriter, r *http.Request, params ListInstancesParams)
// Create an instance of a service type
// (POST /service-type-instances)
CreateInstance(w http.ResponseWriter, r *http.Request, params CreateInstanceParams)
// Delete an instance
// (DELETE /service-type-instances/{instanceId})
DeleteInstance(w http.ResponseWriter, r *http.Request, instanceId InstanceIdPath, params DeleteInstanceParams)
// Get an instance of service type
// (GET /service-type-instances/{instanceId})
GetInstance(w http.ResponseWriter, r *http.Request, instanceId InstanceIdPath, params GetInstanceParams)
}
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) CreateInstance ¶
func (siw *ServerInterfaceWrapper) CreateInstance(w http.ResponseWriter, r *http.Request)
CreateInstance operation middleware
func (*ServerInterfaceWrapper) DeleteInstance ¶
func (siw *ServerInterfaceWrapper) DeleteInstance(w http.ResponseWriter, r *http.Request)
DeleteInstance operation middleware
func (*ServerInterfaceWrapper) GetInstance ¶
func (siw *ServerInterfaceWrapper) GetInstance(w http.ResponseWriter, r *http.Request)
GetInstance operation middleware
func (*ServerInterfaceWrapper) ListInstances ¶
func (siw *ServerInterfaceWrapper) ListInstances(w http.ResponseWriter, r *http.Request)
ListInstances operation middleware
type ServiceTypeInstance ¶
type ServiceTypeInstance struct {
// CreateTime Timestamp when the instance was first created
CreateTime *time.Time `json:"create_time,omitempty"`
// DeletionStatus Deletion status for deferred deletions. Absent for active
// instances. SCHEDULED indicates the instance is queued for cleanup.
// FAILED indicates the cleanup has exceeded maximum retries.
// PENDING_PROVIDER indicates the instance is waiting for its
// provider to become healthy before cleanup is retried.
DeletionStatus *ServiceTypeInstanceDeletionStatus `json:"deletion_status,omitempty"`
// Id Unique identifier for the Service Type Instance
Id *string `json:"id,omitempty"`
// Path Resource path identifier
Path *string `json:"path,omitempty"`
// ProviderName Name of the provider
ProviderName string `json:"provider_name"`
// Spec Service specification following one of the supported service type
// schemas (VMSpec, ContainerSpec, DatabaseSpec, or ClusterSpec).
Spec map[string]interface{} `json:"spec"`
// Status Status of the instance
Status *string `json:"status,omitempty"`
// UpdateTime Timestamp when the instance was last updated
UpdateTime *time.Time `json:"update_time,omitempty"`
}
ServiceTypeInstance Full service type instance resource representation
type ServiceTypeInstanceDeletionStatus ¶
type ServiceTypeInstanceDeletionStatus string
ServiceTypeInstanceDeletionStatus Deletion status for deferred deletions. Absent for active instances. SCHEDULED indicates the instance is queued for cleanup. FAILED indicates the cleanup has exceeded maximum retries. PENDING_PROVIDER indicates the instance is waiting for its provider to become healthy before cleanup is retried.
const ( FAILED ServiceTypeInstanceDeletionStatus = "FAILED" PENDINGPROVIDER ServiceTypeInstanceDeletionStatus = "PENDING_PROVIDER" SCHEDULED ServiceTypeInstanceDeletionStatus = "SCHEDULED" )
Defines values for ServiceTypeInstanceDeletionStatus.
func (ServiceTypeInstanceDeletionStatus) Valid ¶
func (e ServiceTypeInstanceDeletionStatus) Valid() bool
Valid indicates whether the value is a known member of the ServiceTypeInstanceDeletionStatus enum.
type ServiceTypeInstanceList ¶
type ServiceTypeInstanceList struct {
Instances *[]ServiceTypeInstance `json:"instances,omitempty"`
// NextPageToken Token for retrieving the next page of results
NextPageToken *string `json:"next_page_token,omitempty"`
}
ServiceTypeInstanceList Paginated list of instances
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 StrictHandlerFunc ¶
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List all service type instances
// (GET /service-type-instances)
ListInstances(ctx context.Context, request ListInstancesRequestObject) (ListInstancesResponseObject, error)
// Create an instance of a service type
// (POST /service-type-instances)
CreateInstance(ctx context.Context, request CreateInstanceRequestObject) (CreateInstanceResponseObject, error)
// Delete an instance
// (DELETE /service-type-instances/{instanceId})
DeleteInstance(ctx context.Context, request DeleteInstanceRequestObject) (DeleteInstanceResponseObject, error)
// Get an instance of service type
// (GET /service-type-instances/{instanceId})
GetInstance(ctx context.Context, request GetInstanceRequestObject) (GetInstanceResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) CreateInstance ¶
func (_ Unimplemented) CreateInstance(w http.ResponseWriter, r *http.Request, params CreateInstanceParams)
Create an instance of a service type (POST /service-type-instances)
func (Unimplemented) DeleteInstance ¶
func (_ Unimplemented) DeleteInstance(w http.ResponseWriter, r *http.Request, instanceId InstanceIdPath, params DeleteInstanceParams)
Delete an instance (DELETE /service-type-instances/{instanceId})
func (Unimplemented) GetInstance ¶
func (_ Unimplemented) GetInstance(w http.ResponseWriter, r *http.Request, instanceId InstanceIdPath, params GetInstanceParams)
Get an instance of service type (GET /service-type-instances/{instanceId})
func (Unimplemented) ListInstances ¶
func (_ Unimplemented) ListInstances(w http.ResponseWriter, r *http.Request, params ListInstancesParams)
List all service type instances (GET /service-type-instances)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error