server

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: LGPL-3.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyAuthenticatedHandlerFunction added in v0.4.0

type APIKeyAuthenticatedHandlerFunction func(auth *token.AuthService, db *sql.DB, w http.ResponseWriter, r *http.Request)

type JWTAuthenticatedHandlerFunction added in v0.4.0

type JWTAuthenticatedHandlerFunction func(auth *token.AuthService, claims *token.UserClaims, db *sql.DB, w http.ResponseWriter, r *http.Request)

type Server

type Server struct {
	Router    *chi.Mux
	DB        *sql.DB
	Config    *config.Config
	TLSConfig *tls.Config
	Auth      *token.AuthService
	Validator *token.ValidationService
}

Server has router and db instances

func NewServer added in v0.2.1

func NewServer(config *config.Config) *Server

func (*Server) Run

func (s *Server) Run(conf *config.Config)

type ServiceKeyAuthenticatedHandlerFunction added in v0.4.0

type ServiceKeyAuthenticatedHandlerFunction func(auth *token.AuthService, db *sql.DB, w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL