server

package
v0.0.0-...-0268f66 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContextKeyAuth is a contextKey of type Auth.
	ContextKeyAuth contextKey = iota
	// ContextKeyRepository is a contextKey of type Repository.
	ContextKeyRepository
)
View Source
const MAX_RESULTS_LIMIT = 20

Variables

View Source
var ErrInvalidcontextKey = errors.New("not a valid contextKey")

Functions

func GetAuthInfo

func GetAuthInfo(r *http.Request) (auth domain.AuthInfo)

func GetRepository

func GetRepository(r *http.Request) (repo db.Repository)

func New

func New(db *pgxpool.Pool, publicKey rsa.PublicKey) *chi.Mux

FIXME: probably MUCH better to use JWKS here so we don't have to restart the server to change keys.

func NewVehiclesRouter

func NewVehiclesRouter() *chi.Mux

func ParsecontextKey

func ParsecontextKey(name string) (contextKey, error)

ParsecontextKey attempts to convert a string to a contextKey.

Types

type ListVehiclesParams

type ListVehiclesParams struct {
	Limit  int
	Offset int
}

Jump to

Keyboard shortcuts

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