handler

package
v0.0.0-...-0dc46f9 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteHttpError

func WriteHttpError(w http.ResponseWriter, err error)

Types

type AdminMux

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

func NewAdminMux

func NewAdminMux() *AdminMux

func (*AdminMux) ApiFallbackHandler

func (a *AdminMux) ApiFallbackHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) AttachGroupToPrincipalHandler

func (a *AdminMux) AttachGroupToPrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) AttachPermissionToRoleHandler

func (a *AdminMux) AttachPermissionToRoleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) AttachRoleToGroupHandler

func (a *AdminMux) AttachRoleToGroupHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) AttachRoleToPrincipalHandler

func (a *AdminMux) AttachRoleToPrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) CreateAPIKeyHandler

func (a *AdminMux) CreateAPIKeyHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) CreateGroupHandler

func (a *AdminMux) CreateGroupHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) CreateMappingRuleHandler

func (a *AdminMux) CreateMappingRuleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) CreatePermissionHandler

func (a *AdminMux) CreatePermissionHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) CreatePrincipalHandler

func (a *AdminMux) CreatePrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) CreateRoleHandler

func (a *AdminMux) CreateRoleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DeleteGroupHandler

func (a *AdminMux) DeleteGroupHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DeletePermissionHandler

func (a *AdminMux) DeletePermissionHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DeletePrincipalHandler

func (a *AdminMux) DeletePrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DeleteRoleHandler

func (a *AdminMux) DeleteRoleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DetachGroupToPrincipalHandler

func (a *AdminMux) DetachGroupToPrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DetachPermissionToRoleHandler

func (a *AdminMux) DetachPermissionToRoleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DetachRoleToGroupHandler

func (a *AdminMux) DetachRoleToGroupHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) DetachRoleToPrincipalHandler

func (a *AdminMux) DetachRoleToPrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) GetGroupHandler

func (a *AdminMux) GetGroupHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) GetMappingRuleHandler

func (a *AdminMux) GetMappingRuleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) GetPrincipalHandler

func (a *AdminMux) GetPrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) GetRoleHandler

func (a *AdminMux) GetRoleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) ListGroupsHandler

func (a *AdminMux) ListGroupsHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) ListMappingRulesHandler

func (a *AdminMux) ListMappingRulesHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) ListPermissionsHandler

func (a *AdminMux) ListPermissionsHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) ListPrincipalsHandler

func (a *AdminMux) ListPrincipalsHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) ListRolesHandler

func (a *AdminMux) ListRolesHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) Mux

func (a *AdminMux) Mux() http.Handler

func (*AdminMux) PermissionGetHandler

func (a *AdminMux) PermissionGetHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) UpdateGroupHandler

func (a *AdminMux) UpdateGroupHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) UpdateMappingRuleHandler

func (a *AdminMux) UpdateMappingRuleHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) UpdatePermissionHandler

func (a *AdminMux) UpdatePermissionHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) UpdatePrincipalHandler

func (a *AdminMux) UpdatePrincipalHandler(w http.ResponseWriter, req *http.Request)

func (*AdminMux) UpdateRoleHandler

func (a *AdminMux) UpdateRoleHandler(w http.ResponseWriter, req *http.Request)

type AuthMux

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

func NewAuthMux

func NewAuthMux() *AuthMux

func (*AuthMux) AuthRequest

func (a *AuthMux) AuthRequest(w http.ResponseWriter, req *http.Request)

func (*AuthMux) CallbackAuth

func (a *AuthMux) CallbackAuth(w http.ResponseWriter, req *http.Request)

func (*AuthMux) Mux

func (a *AuthMux) Mux() http.Handler

func (*AuthMux) SignIn

func (a *AuthMux) SignIn(w http.ResponseWriter, req *http.Request)

func (*AuthMux) StartAuth

func (a *AuthMux) StartAuth(w http.ResponseWriter, req *http.Request)

func (*AuthMux) Unauthorized

func (a *AuthMux) Unauthorized(w http.ResponseWriter, req *http.Request)

type Context

type Context = context.Context

type HttpError

type HttpError interface {
	Error() string
	StatusCode() int
	Detail() error
}

func NewHttpError

func NewHttpError(code int, message string, detail error) HttpError

func NewHttpErrorFromErr

func NewHttpErrorFromErr(err error) HttpError

type PayloadData

type PayloadData interface {
	String() string
	Restore(data string) error
}

type SessionPayload

type SessionPayload struct {
	ExpireAt time.Time
	Data     PayloadData
}

func RestoreSessionPayload

func RestoreSessionPayload(fromCookie string, box PayloadData) (*SessionPayload, error)

func (*SessionPayload) MakeCookie

func (s *SessionPayload) MakeCookie(req *http.Request, key string, extend time.Duration) *http.Cookie

func (*SessionPayload) RevokeCookie

func (s *SessionPayload) RevokeCookie(domain, key string) *http.Cookie

func (*SessionPayload) String

func (s *SessionPayload) String() string

Jump to

Keyboard shortcuts

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