http

package
v0.0.0-...-38d2dd1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(c Config, m Model, g Guard, lg logging.Logger, allowedOrigins ...string) (http.Handler, error)

Types

type Config

type Config interface {
	ImagesDir() string
}

type Guard

type Guard interface {
	APIKeyValid(key string) (string, error)
}

type Model

type Model interface {
	NewBase64Image(token, folder, img string) (time.Time, string, error)
	NewImage(token, folder string, img io.ReadCloser) (time.Time, string, error)
	errors.ToHTTPResponser
}

type TokenValidator

type TokenValidator interface {
	Validate(token string, claims jwt.Claims) (*jwt.Token, error)
	IsAuthError(error) bool
}

Jump to

Keyboard shortcuts

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