Documentation
¶
Index ¶
- func NewEndpointInfo(name, version string) *endpointInfo
- type AnyEndpointIfc
- type DeleteEndpointIfc
- type Endpoint
- type EndpointIfc
- type EndpointInfoIfc
- type GetEndpointIfc
- type HeadEndpointIfc
- type Module
- type ModuleIfc
- type OptionsEndpointIfc
- type PatchEndpointIfc
- type PostEndpointIfc
- type PutEndpointIfc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEndpointInfo ¶
func NewEndpointInfo(name, version string) *endpointInfo
Make a new one of these
Types ¶
type AnyEndpointIfc ¶
type AnyEndpointIfc interface {
HandleAny(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: ANY METHOD request handling
type DeleteEndpointIfc ¶
type DeleteEndpointIfc interface {
HandleDelete(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: DELETE request handling
type Endpoint ¶
type Endpoint struct {
// Embedded struct(s)
*cfg.Configurable
*dep.DependencyInjectable
*startable.Startable
// contains filtered or unexported fields
}
Exported to support embedding
func NewEndpoint ¶
type EndpointIfc ¶
type EndpointIfc interface {
// Embedded interface(s)
cfg.ConfigurableIfc
dep.DependencyInjectableIfc
startable.StartableIfc
// Our own interface
GetInfo() *endpointInfo
}
Required: Endpoint public interface
type EndpointInfoIfc ¶
EndpointInfo public interface
type GetEndpointIfc ¶
type GetEndpointIfc interface {
HandleGet(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: GET request handling
type HeadEndpointIfc ¶
type HeadEndpointIfc interface {
HandleHead(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: HEAD request handling
type Module ¶
type Module struct {
// Embedded struct(s)
*cfg.Configurable
*dep.DependencyInjectable
*startable.Startable
// contains filtered or unexported fields
}
Exported to support embedding
func NewModule ¶
func NewModule(moduleName string, endpoints ...EndpointIfc) *Module
func (*Module) GetEndpoints ¶
func (r *Module) GetEndpoints() []EndpointIfc
ModuleWrapper wants our endpoints
func (*Module) InjectDependencies ¶
func (r *Module) InjectDependencies(depinst ...dep.DependencyInstanceIfc) error
type ModuleIfc ¶
type ModuleIfc interface {
// Embedded Interface(s)
cfg.ConfigurableIfc
dep.DependencyInjectableIfc
startable.StartableIfc
// Our own interface
GetName() string
GetEndpoints() []EndpointIfc
}
type OptionsEndpointIfc ¶
type OptionsEndpointIfc interface {
HandleOptions(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: OPTIONS request handling
type PatchEndpointIfc ¶
type PatchEndpointIfc interface {
HandlePatch(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: PATCH request handling
type PostEndpointIfc ¶
type PostEndpointIfc interface {
HandlePost(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: POST request handling
type PutEndpointIfc ¶
type PutEndpointIfc interface {
HandlePut(request http.HttpRequestIfc) http.HttpResponseIfc
}
Optional: Endpoint public interface: PUT request handling