galp

package
v0.0.0-...-e9e7fc5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//TMPLIndex contains HTML Template for Index
	TMPLIndex = `` /* 901-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	IsDev          bool     `env:"DEV_MODE" envDefault:"true"`
	Port           string   `env:"APP_PORT" envDefault:"8080"`
	Services       []string `env:"EXPOSE_SERVICES" envSeparator:";"`
	HeaderIDKey    string   `env:"HEADER_ID_KEY" envDefault:"GALP-UID"`
	JWTTTL         int      `env:"APP_JWT_TTL" envDefault:"72"`
	JWTPKPath      string   `env:"APP_JWT_KEY" envDefault:"./galp.key"`
	JWTAuth        *jwtauth.JWTAuth
	AllowedOrigins []string `env:"ALLOWED_ORIGINS" envSeparator:"," envDefault:"*"`
	AllowedMethods []string `env:"ALLOWED_METHODS" envSeparator:"," envDefault:"GET,POST,PUT,DELETE,OPTIONS"`
	AllowedHeaders []string `env:"ALLOWED_HEADERS" envSeparator:"," envDefault:"Accept,Authorization,Content-Type,X-CSRF-Token"`
	ExposedHeaders []string `env:"EXPOSED_HEADERS" envSeparator:"," envDefault:"Origin,Link,Authorization"`
	MaxAge         int      `env:"MAX_AGE" envDefault:"300"` // Maximum value not ignored by any of major browsers
}

App grouping Chi routes and handlers

func (App) Router

func (a App) Router() http.Handler

Router Chi router

Jump to

Keyboard shortcuts

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