Documentation
¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: collection_handler.go
Generated by this command:
mockgen -source=collection_handler.go -package=service -destination=collection_handler_mock.go
Package service is a generated GoMock package.
Index ¶
- func SendError(w http.ResponseWriter, status int, msg string, args ...any)
- type CollectionAdapter
- type CollectionAdapterBuilder
- type CollectionHandler
- type CollectionRequest
- type CollectionResponse
- type DeploymentManagerCollectionHandler
- type DeploymentManagerCollectionHandlerBuilder
- func (b *DeploymentManagerCollectionHandlerBuilder) Build() (result *DeploymentManagerCollectionHandler, err error)
- func (b *DeploymentManagerCollectionHandlerBuilder) SetBackendToken(value string) *DeploymentManagerCollectionHandlerBuilder
- func (b *DeploymentManagerCollectionHandlerBuilder) SetBackendURL(value string) *DeploymentManagerCollectionHandlerBuilder
- func (b *DeploymentManagerCollectionHandlerBuilder) SetCloudID(value string) *DeploymentManagerCollectionHandlerBuilder
- func (b *DeploymentManagerCollectionHandlerBuilder) SetLogger(value *slog.Logger) *DeploymentManagerCollectionHandlerBuilder
- func (b *DeploymentManagerCollectionHandlerBuilder) SetTransportWrapper(value func(http.RoundTripper) http.RoundTripper) *DeploymentManagerCollectionHandlerBuilder
- type DeploymentManagerObjectHandler
- type DeploymentManagerObjectHandlerBuilder
- func (b *DeploymentManagerObjectHandlerBuilder) Build() (result *DeploymentManagerObjectHandler, err error)
- func (b *DeploymentManagerObjectHandlerBuilder) SetBackendToken(value string) *DeploymentManagerObjectHandlerBuilder
- func (b *DeploymentManagerObjectHandlerBuilder) SetBackendURL(value string) *DeploymentManagerObjectHandlerBuilder
- func (b *DeploymentManagerObjectHandlerBuilder) SetCloudID(value string) *DeploymentManagerObjectHandlerBuilder
- func (b *DeploymentManagerObjectHandlerBuilder) SetLogger(value *slog.Logger) *DeploymentManagerObjectHandlerBuilder
- func (b *DeploymentManagerObjectHandlerBuilder) SetTransportWrapper(value func(http.RoundTripper) http.RoundTripper) *DeploymentManagerObjectHandlerBuilder
- type MockCollectionHandler
- type MockCollectionHandlerMockRecorder
- type ObjectAdapter
- type ObjectAdapterBuilder
- func (b *ObjectAdapterBuilder) Build() (result *ObjectAdapter, err error)
- func (b *ObjectAdapterBuilder) SetHandler(value ObjectHandler) *ObjectAdapterBuilder
- func (b *ObjectAdapterBuilder) SetID(value string) *ObjectAdapterBuilder
- func (b *ObjectAdapterBuilder) SetLogger(logger *slog.Logger) *ObjectAdapterBuilder
- type ObjectHandler
- type ObjectRequest
- type ObjectResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectionAdapter ¶
type CollectionAdapter struct {
// contains filtered or unexported fields
}
func (*CollectionAdapter) ServeHTTP ¶
func (a *CollectionAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
Serve is the implementation of the http.Handler interface.
type CollectionAdapterBuilder ¶
type CollectionAdapterBuilder struct {
// contains filtered or unexported fields
}
func NewCollectionAdapter ¶
func NewCollectionAdapter() *CollectionAdapterBuilder
func (*CollectionAdapterBuilder) Build ¶
func (b *CollectionAdapterBuilder) Build() (result *CollectionAdapter, err error)
Build uses the data stored in the builder to create and configure a new adapter.
func (*CollectionAdapterBuilder) SetHandler ¶
func (b *CollectionAdapterBuilder) SetHandler(value CollectionHandler) *CollectionAdapterBuilder
SetHandler sets the object that will handle the requests. This is mandatory.
func (*CollectionAdapterBuilder) SetLogger ¶
func (b *CollectionAdapterBuilder) SetLogger(logger *slog.Logger) *CollectionAdapterBuilder
SetLogger sets the logger that the server will use to write to the log. This is mandatory.
type CollectionHandler ¶
type CollectionHandler interface {
Get(ctx context.Context, request *CollectionRequest) (response *CollectionResponse, err error)
}
CollectionHandler is the interface implemented by objects that know how to handle requests to list the items in a collection of objects.
type CollectionRequest ¶
CollectionRequest represents a request for a collection of objects.
type CollectionResponse ¶
CollectionResponse represents the response to the request to get the list of items of a collection.
type DeploymentManagerCollectionHandler ¶
type DeploymentManagerCollectionHandler struct {
// contains filtered or unexported fields
}
DeploymentManagerCollectionHander knows how to respond to requests to list deployment managers. Don't create instances of this type directly, use the NewDeploymentManagerCollectionHandler function instead.
func (*DeploymentManagerCollectionHandler) Get ¶
func (h *DeploymentManagerCollectionHandler) Get(ctx context.Context, request *CollectionRequest) (response *CollectionResponse, err error)
Get is part of the implementation of the collection handler interface.
type DeploymentManagerCollectionHandlerBuilder ¶
type DeploymentManagerCollectionHandlerBuilder struct {
// contains filtered or unexported fields
}
DeploymentManagerCollectionHandlerBuilder contains the data and logic needed to create a new deployment manager collection handler. Don't create instances of this type directly, use the NewDeploymentManagerCollectionHandler function instead.
func NewDeploymentManagerCollectionHandler ¶
func NewDeploymentManagerCollectionHandler() *DeploymentManagerCollectionHandlerBuilder
NewDeploymentManagerCollectionHandler creates a builder that can then be used to configure and create a handler for the collection of deployment managers.
func (*DeploymentManagerCollectionHandlerBuilder) Build ¶
func (b *DeploymentManagerCollectionHandlerBuilder) Build() ( result *DeploymentManagerCollectionHandler, err error)
Build uses the data stored in the builder to create and configure a new handler.
func (*DeploymentManagerCollectionHandlerBuilder) SetBackendToken ¶
func (b *DeploymentManagerCollectionHandlerBuilder) SetBackendToken( value string) *DeploymentManagerCollectionHandlerBuilder
SetBackendURL sets the URL of the backend server This is mandatory..
func (*DeploymentManagerCollectionHandlerBuilder) SetBackendURL ¶
func (b *DeploymentManagerCollectionHandlerBuilder) SetBackendURL( value string) *DeploymentManagerCollectionHandlerBuilder
SetBackendToken sets the authentication token that will be used to authenticate to the backend server. This is mandatory.
func (*DeploymentManagerCollectionHandlerBuilder) SetCloudID ¶
func (b *DeploymentManagerCollectionHandlerBuilder) SetCloudID( value string) *DeploymentManagerCollectionHandlerBuilder
SetCloudID sets the identifier of the O-Cloud of this handler. This is mandatory.
func (*DeploymentManagerCollectionHandlerBuilder) SetLogger ¶
func (b *DeploymentManagerCollectionHandlerBuilder) SetLogger( value *slog.Logger) *DeploymentManagerCollectionHandlerBuilder
SetLogger sets the logger that the handler will use to write to the log. This is mandatory.
func (*DeploymentManagerCollectionHandlerBuilder) SetTransportWrapper ¶
func (b *DeploymentManagerCollectionHandlerBuilder) SetTransportWrapper( value func(http.RoundTripper) http.RoundTripper) *DeploymentManagerCollectionHandlerBuilder
SetTransportWrapper sets the wrapper that will be used to configure the HTTP clients used to connect to other servers, including the backend server. This is optional.
type DeploymentManagerObjectHandler ¶
type DeploymentManagerObjectHandler struct {
// contains filtered or unexported fields
}
DeploymentManagerObjectHander knows how to respond to requests to list deployment managers. Don't create instances of this type directly, use the NewDeploymentManagerObjectHandler function instead.
func (*DeploymentManagerObjectHandler) Get ¶
func (h *DeploymentManagerObjectHandler) Get(ctx context.Context, request *ObjectRequest) (response *ObjectResponse, err error)
Get is part of the implementation of the collection handler interface.
type DeploymentManagerObjectHandlerBuilder ¶
type DeploymentManagerObjectHandlerBuilder struct {
// contains filtered or unexported fields
}
DeploymentManagerObjectHandlerBuilder contains the data and logic needed to create a new deployment manager object handler. Don't create instances of this type directly, use the NewDeploymentManagerObjectHandler function instead.
func NewDeploymentManagerObjectHandler ¶
func NewDeploymentManagerObjectHandler() *DeploymentManagerObjectHandlerBuilder
NewDeploymentManagerObjectHandler creates a builder that can then be used to configure and create a handler for an individual deployment manager.
func (*DeploymentManagerObjectHandlerBuilder) Build ¶
func (b *DeploymentManagerObjectHandlerBuilder) Build() ( result *DeploymentManagerObjectHandler, err error)
Build uses the data stored in the builder to create and configure a new handler.
func (*DeploymentManagerObjectHandlerBuilder) SetBackendToken ¶
func (b *DeploymentManagerObjectHandlerBuilder) SetBackendToken( value string) *DeploymentManagerObjectHandlerBuilder
SetBackendURL sets the URL of the backend server This is mandatory..
func (*DeploymentManagerObjectHandlerBuilder) SetBackendURL ¶
func (b *DeploymentManagerObjectHandlerBuilder) SetBackendURL( value string) *DeploymentManagerObjectHandlerBuilder
SetBackendToken sets the authentication token that will be used to authenticate to the backend server. This is mandatory.
func (*DeploymentManagerObjectHandlerBuilder) SetCloudID ¶
func (b *DeploymentManagerObjectHandlerBuilder) SetCloudID( value string) *DeploymentManagerObjectHandlerBuilder
SetCloudID sets the identifier of the O-Cloud of this handler. This is mandatory.
func (*DeploymentManagerObjectHandlerBuilder) SetLogger ¶
func (b *DeploymentManagerObjectHandlerBuilder) SetLogger( value *slog.Logger) *DeploymentManagerObjectHandlerBuilder
SetLogger sets the logger that the handler will use to write to the log. This is mandatory.
func (*DeploymentManagerObjectHandlerBuilder) SetTransportWrapper ¶
func (b *DeploymentManagerObjectHandlerBuilder) SetTransportWrapper( value func(http.RoundTripper) http.RoundTripper) *DeploymentManagerObjectHandlerBuilder
SetTransportWrapper sets the wrapper that will be used to configure the HTTP clients used to connect to other servers, including the backend server. This is optional.
type MockCollectionHandler ¶
type MockCollectionHandler struct {
// contains filtered or unexported fields
}
MockCollectionHandler is a mock of CollectionHandler interface.
func NewMockCollectionHandler ¶
func NewMockCollectionHandler(ctrl *gomock.Controller) *MockCollectionHandler
NewMockCollectionHandler creates a new mock instance.
func (*MockCollectionHandler) EXPECT ¶
func (m *MockCollectionHandler) EXPECT() *MockCollectionHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCollectionHandler) Get ¶
func (m *MockCollectionHandler) Get(ctx context.Context, request *CollectionRequest) (*CollectionResponse, error)
Get mocks base method.
type MockCollectionHandlerMockRecorder ¶
type MockCollectionHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockCollectionHandlerMockRecorder is the mock recorder for MockCollectionHandler.
type ObjectAdapter ¶
type ObjectAdapter struct {
// contains filtered or unexported fields
}
func (*ObjectAdapter) ServeHTTP ¶
func (a *ObjectAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
Serve is the implementation of the http.Handler interface.
type ObjectAdapterBuilder ¶
type ObjectAdapterBuilder struct {
// contains filtered or unexported fields
}
func NewObjectAdapter ¶
func NewObjectAdapter() *ObjectAdapterBuilder
func (*ObjectAdapterBuilder) Build ¶
func (b *ObjectAdapterBuilder) Build() (result *ObjectAdapter, err error)
Build uses the data stored in the builder to create and configure a new adapter.
func (*ObjectAdapterBuilder) SetHandler ¶
func (b *ObjectAdapterBuilder) SetHandler(value ObjectHandler) *ObjectAdapterBuilder
SetHandler sets the object that will handle the requests. This is mandatory.
func (*ObjectAdapterBuilder) SetID ¶
func (b *ObjectAdapterBuilder) SetID(value string) *ObjectAdapterBuilder
SetID sets the name of the path variable that contains the identifier of the object. This is mandatory.
func (*ObjectAdapterBuilder) SetLogger ¶
func (b *ObjectAdapterBuilder) SetLogger(logger *slog.Logger) *ObjectAdapterBuilder
SetLogger sets the logger that the server will use to write to the log. This is mandatory.
type ObjectHandler ¶
type ObjectHandler interface {
Get(ctx context.Context, request *ObjectRequest) (response *ObjectResponse, err error)
}
ObjectHandler is the interface implemented by objects that know how to handle requests to get individual objects.
type ObjectRequest ¶
type ObjectRequest struct {
ID string
}
ObjectHandler represents a request for an individual object.
type ObjectResponse ¶
ObjectResponse represents the response to the request to get an individual object.