Documentation ¶
Overview ¶
Package server contains the server functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOpenAPISpec ¶ added in v0.6.0
NewOpenAPISpec creates a new OpenAPI 3.1.0 specification based on the configured go interfaces and the operation types appended within the individual handlers
Types ¶
type APIKey ¶ added in v0.6.0
type APIKey struct {
Name string
}
APIKey is a struct that represents an API Key security scheme
func (*APIKey) Scheme ¶ added in v0.6.0
func (k *APIKey) Scheme() *openapi3.SecurityScheme
Scheme returns the API Key security scheme
type Basic ¶ added in v0.6.0
Basic is a struct that represents a Basic Auth security scheme
func (*Basic) Scheme ¶ added in v0.6.0
func (b *Basic) Scheme() *openapi3.SecurityScheme
Scheme returns the Basic Auth security scheme
type OAuth2 ¶ added in v0.6.0
type OAuth2 struct { AuthorizationURL string TokenURL string RefreshURL string Scopes map[string]string }
OAuth2 is a struct that represents an OAuth2 security scheme
func (*OAuth2) Scheme ¶ added in v0.6.0
func (i *OAuth2) Scheme() *openapi3.SecurityScheme
Scheme returns the OAuth2 security scheme
type OpenID ¶ added in v0.6.0
type OpenID struct {
ConnectURL string
}
OpenID is a struct that represents an OpenID Connect security scheme
func (*OpenID) Scheme ¶ added in v0.6.0
func (i *OpenID) Scheme() *openapi3.SecurityScheme
Scheme returns the OpenID Connect security scheme
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(c config.Config, l *zap.SugaredLogger) *Server
NewServer returns a new Server configuration
func (*Server) AddHandler ¶
func (s *Server) AddHandler(r handler)
AddHandler provides the ability to add additional HTTP handlers that process requests. The handler that is provided should have a Routes(*echo.Group) function, which allows the routes to be added to the server.