Documentation ¶
Overview ¶
Package server provides a preconfigured HTTP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
Driver implements the driver.Server interface. The zero value is a valid http.Server.
func NewDriver ¶
func NewDriver() *Driver
NewDriver creates a Driver enfolding a http.Server with default timeouts.
func (*Driver) ListenAndServe ¶
ListenAndServe sets the address and handler on Driver's http.Server, then calls ListenAndServe on it.
type Server ¶
type Server struct { Driver driver.Server // all logging is done with a zerolog.Logger Logger zerolog.Logger // Addr optionally specifies the TCP address for the server to listen on, // in the form "host:port". If empty, ":http" (port 80) is used. // The service names are defined in RFC 6335 and assigned by IANA. // See net.Dial for details of the address format. Addr string // Services used by the various HTTP routes and middleware. Services // contains filtered or unexported fields }
Server represents an HTTP server.
func (*Server) ListenAndServe ¶
ListenAndServe is a wrapper to use wherever http.ListenAndServe is used.
type Services ¶
type Services struct { OrgServicer diygoapi.OrgServicer AppServicer diygoapi.AppServicer RegisterUserService diygoapi.RegisterUserServicer PingService diygoapi.PingServicer LoggerService diygoapi.LoggerServicer GenesisServicer diygoapi.GenesisServicer AuthenticationServicer diygoapi.AuthenticationServicer AuthorizationServicer diygoapi.AuthorizationServicer PermissionServicer diygoapi.PermissionServicer RoleServicer diygoapi.RoleServicer MovieServicer diygoapi.MovieServicer }
Services are used by the application service handlers
Click to show internal directories.
Click to hide internal directories.