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