Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Placeholders = map[string]reflect.Kind{ "{string}": reflect.String, "{int}": reflect.Int, "{float}": reflect.Float64, "{struct}": reflect.Struct, "{bool}": reflect.Bool, }
Placeholders are the templated types you can use in your controllers
Functions ¶
This section is empty.
Types ¶
type HttpController ¶
type HttpController interface{}
type HttpServer ¶
type HttpServer struct { *http.Server Auth *goauth.AuthenticationMiddleware // contains filtered or unexported fields }
func NewHttpServer ¶
func NewHttpServer(addr string) *HttpServer
NewHttpServer creates a new server that can then be configured
func NewTLSServer ¶
func NewTLSServer(addr string, conf *tls.Config) *HttpServer
NewTLSServer creates a new http(s) server with a TLS configuration.
func (*HttpServer) RegisterAuthenticationMiddleware ¶ added in v1.4.0
func (hs *HttpServer) RegisterAuthenticationMiddleware(t goauth.AuthenticationMiddleware, logFunc goauth.LoginUser, createJwt goauth.GenerateSignedJWT)
func (*HttpServer) RegisterEndpoints ¶
func (hs *HttpServer) RegisterEndpoints(basePath string, controller HttpController) error
RegisterEndpoints creates a new endpoint based off a HttpController. You can then register these controllers to a server
Click to show internal directories.
Click to hide internal directories.