orchestrator

package
v0.0.0-...-29a1262 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Templates = make(map[string]*template.Template)

Functions

func ChangeSettings

func ChangeSettings(login string, r *http.Request) error

func CheckPassword

func CheckPassword(password string) bool

func GenerateAndSetToken

func GenerateAndSetToken(w http.ResponseWriter, login string)

func GetLoginFromToken

func GetLoginFromToken(r *http.Request) (string, error)

func JSONResp

func JSONResp(w http.ResponseWriter, message string, status int, token ...string)

func ParseTemplateDir

func ParseTemplateDir(dir string, subdir string) error

func RefreshToken

func RefreshToken(w http.ResponseWriter, r *http.Request) error

func ValidateToken

func ValidateToken(r *http.Request) bool

Types

type Claims

type Claims struct {
	Login string `json:"login"`
	jwt.RegisteredClaims
}

type Controller

type Controller struct {
	Logger        *log.Logger
	NextRequestID func() string
}

func (*Controller) Calculator

func (c *Controller) Calculator(w http.ResponseWriter, r *http.Request)

func (*Controller) Favicon

func (c *Controller) Favicon(w http.ResponseWriter, r *http.Request)

func (*Controller) Logging

func (c *Controller) Logging(hdlr http.Handler) http.Handler

func (*Controller) Login

func (c *Controller) Login(w http.ResponseWriter, r *http.Request)

func (*Controller) Login_api

func (c *Controller) Login_api(w http.ResponseWriter, r *http.Request)

func (*Controller) Profile

func (c *Controller) Profile(w http.ResponseWriter, r *http.Request)

func (*Controller) Register

func (c *Controller) Register(w http.ResponseWriter, r *http.Request)

func (*Controller) Register_api

func (c *Controller) Register_api(w http.ResponseWriter, r *http.Request)

func (*Controller) Settings

func (c *Controller) Settings(w http.ResponseWriter, r *http.Request)

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context, server *http.Server) context.Context

func (*Controller) Tracing

func (c *Controller) Tracing(hdlr http.Handler) http.Handler

type Middleware

type Middleware func(http.Handler) http.Handler

type Middlewares

type Middlewares []Middleware

func (Middlewares) Apply

func (mws Middlewares) Apply(hdlr http.Handler) http.Handler

Jump to

Keyboard shortcuts

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