Documentation ¶
Index ¶
- type BasicAuthValidator
- type BasicAuthenticatedController
- type HeaderAuthValidator
- type HeaderAuthenticatedController
- type HealthCheckController
- type HealthCheckResource
- type MethodNotAllowedController
- func (controller MethodNotAllowedController) Delete(context *http2.Context)
- func (controller MethodNotAllowedController) Get(context *http2.Context)
- func (controller MethodNotAllowedController) GetRoutes() []string
- func (controller MethodNotAllowedController) Options(context *http2.Context)
- func (controller MethodNotAllowedController) Patch(context *http2.Context)
- func (controller MethodNotAllowedController) Post(context *http2.Context)
- func (controller MethodNotAllowedController) Put(context *http2.Context)
- type NoAuthenticationController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuthValidator ¶
type BasicAuthValidator interface {
Validate(context *http.Context, username, password string) bool
}
BasicAuthValidator handles verification of Username/Password
type BasicAuthenticatedController ¶
type BasicAuthenticatedController struct { MethodNotAllowedController Validator BasicAuthValidator }
BasicAuthenticatedController handles operations on the Registration Collection
func (*BasicAuthenticatedController) Authenticate ¶
func (controller *BasicAuthenticatedController) Authenticate(context *http.Context) bool
Authenticate verifies that a valid Registration header was provided
type HeaderAuthValidator ¶
HeaderAuthValidator handles verification by checking header values
type HeaderAuthenticatedController ¶
type HeaderAuthenticatedController struct { MethodNotAllowedController // contains filtered or unexported fields }
HeaderAuthenticatedController handles operations on the Registration Collection
func (*HeaderAuthenticatedController) Authenticate ¶
func (controller *HeaderAuthenticatedController) Authenticate(context *http.Context) bool
Authenticate verifies that a valid Registration header was provided
type HealthCheckController ¶
type HealthCheckController struct { MethodNotAllowedController NoAuthenticationController }
HealthCheckController responds to Get requests with a JSON object representing the status of the server.
func (*HealthCheckController) Get ¶
func (controller *HealthCheckController) Get(context *http.Context)
Get returns a new instance of the HealthCheckResource
func (*HealthCheckController) GetRoutes ¶
func (controller *HealthCheckController) GetRoutes() []string
GetRoutes only responds on the 'health' resource endpoint.
type HealthCheckResource ¶
HealthCheckResource is returned by the HealthCheckController for conveying the status of the server.
type MethodNotAllowedController ¶
type MethodNotAllowedController struct{}
MethodNotAllowedController serves as a base for controllers that do not implement all the complete controller interface.
func (MethodNotAllowedController) Delete ¶
func (controller MethodNotAllowedController) Delete(context *http2.Context)
Delete returns a method not allowed status
func (MethodNotAllowedController) Get ¶
func (controller MethodNotAllowedController) Get(context *http2.Context)
Get returns a method not allowed status
func (MethodNotAllowedController) GetRoutes ¶
func (controller MethodNotAllowedController) GetRoutes() []string
GetRoutes returns an emtpy string array.
func (MethodNotAllowedController) Options ¶
func (controller MethodNotAllowedController) Options(context *http2.Context)
Options returns a method not allowed status
func (MethodNotAllowedController) Patch ¶
func (controller MethodNotAllowedController) Patch(context *http2.Context)
Patch returns a method not allowed status
func (MethodNotAllowedController) Post ¶
func (controller MethodNotAllowedController) Post(context *http2.Context)
Post returns a method not allowed status
func (MethodNotAllowedController) Put ¶
func (controller MethodNotAllowedController) Put(context *http2.Context)
Put returns a method not allowed status
type NoAuthenticationController ¶
type NoAuthenticationController struct {
// contains filtered or unexported fields
}
NoAuthenticationController serves as a base for controllers that do not implement authentication.
func (NoAuthenticationController) Authenticate ¶
func (controller NoAuthenticationController) Authenticate(context *http.Context) (http.Authentication, bool)
Authenticate always returns true