swagger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

* Detectordag * * API for detectordag JAMStack dashboard * * API version: 1.0.0 * Contact: briggySmalls90@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Detectordag * * API for detectordag JAMStack dashboard * * API version: 1.0.0 * Contact: briggySmalls90@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Detectordag * * API for detectordag JAMStack dashboard * * API version: 1.0.0 * Contact: briggySmalls90@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Detectordag * * API for detectordag JAMStack dashboard * * API version: 1.0.0 * Contact: briggySmalls90@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

View Source
const (
	AuthenticationHeaderPrefix = "Bearer "
)

Variables

View Source
var (
	ErrNoAuthHeader           = errors.New("Authorization header not set")
	ErrMalformattedAuthHeader = errors.New("Authorization header badly formed")
)

Functions

func NewRouter

func NewRouter(config *Config, db database.Client, shadow shadow.Client, email email.Client) *mux.Router

func OptionsHandlerFactory

func OptionsHandlerFactory(methods []string) http.Handler

OptionsHandlerFactory creates a handler for a route

Types

type Config

type Config struct {
	JwtSecret   string `split_words:"true"`
	JwtDuration string `split_words:"true"`
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) ParseDuration

func (c *Config) ParseDuration() (time.Duration, error)

type CustomAuthClaims

type CustomAuthClaims struct {
	AccountId string `json:"accountId"`
	jwt.StandardClaims
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

Jump to

Keyboard shortcuts

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