web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraefikHTTPEntrypoint  = "web"
	TraefikHTTPSEntrypoint = "websecure"
)
View Source
const (
	HeaderNameSSGenAppID = "X-Controller-App-Id"
)

Variables

This section is empty.

Functions

func GetUser

func GetUser(ctx context.Context) *domain.User

func NewH2CClient

func NewH2CClient() *http.Client

func SetUser

func SetUser(ctx *context.Context, user *domain.User)

func UnwrapHandler

func UnwrapHandler(h Handler) echo.HandlerFunc

func UnwrapHandlerFunc

func UnwrapHandlerFunc(f func(ctx Context) error) echo.HandlerFunc

func WrapContextMiddleware

func WrapContextMiddleware() echo.MiddlewareFunc

Types

type Context

type Context interface {
	echo.Context
	CookieValue(name string) (string, error)
}

type DefaultContext

type DefaultContext struct {
	echo.Context
}

func (*DefaultContext) CookieValue

func (c *DefaultContext) CookieValue(name string) (string, error)

type H2CConfig

type H2CConfig struct {
	Port       int
	SetupRoute func(mux *http.ServeMux)
}

type H2CServer

type H2CServer struct {
	// contains filtered or unexported fields
}

func NewH2CServer

func NewH2CServer(c H2CConfig) *H2CServer

func (*H2CServer) Shutdown

func (s *H2CServer) Shutdown(ctx context.Context) error

func (*H2CServer) Start

func (s *H2CServer) Start(_ context.Context) error

type Handler

type Handler interface {
	HandleRequest(c Context) error
}

Jump to

Keyboard shortcuts

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