middlewares

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtxKey

type CtxKey string
const CompanyIDCtxKey CtxKey = "companyID"
const RepositoryIDCtxKey CtxKey = "repositoryID"

type HorusAuthzMiddleware added in v1.2.0

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

func (*HorusAuthzMiddleware) IsApplicationAdmin added in v1.2.0

func (h *HorusAuthzMiddleware) IsApplicationAdmin(next http.Handler) http.Handler

nolint

func (*HorusAuthzMiddleware) IsCompanyAdmin added in v1.2.0

func (h *HorusAuthzMiddleware) IsCompanyAdmin(next http.Handler) http.Handler

func (*HorusAuthzMiddleware) IsCompanyMember added in v1.2.0

func (h *HorusAuthzMiddleware) IsCompanyMember(next http.Handler) http.Handler

func (*HorusAuthzMiddleware) IsRepositoryAdmin added in v1.2.0

func (h *HorusAuthzMiddleware) IsRepositoryAdmin(next http.Handler) http.Handler

func (*HorusAuthzMiddleware) IsRepositoryMember added in v1.2.0

func (h *HorusAuthzMiddleware) IsRepositoryMember(next http.Handler) http.Handler

func (*HorusAuthzMiddleware) IsRepositorySupervisor added in v1.2.0

func (h *HorusAuthzMiddleware) IsRepositorySupervisor(next http.Handler) http.Handler

func (*HorusAuthzMiddleware) SetContextAccountID added in v1.2.0

func (h *HorusAuthzMiddleware) SetContextAccountID(next http.Handler) http.Handler

type IHorusAuthzMiddleware added in v1.2.0

type IHorusAuthzMiddleware interface {
	SetContextAccountID(next http.Handler) http.Handler
	IsApplicationAdmin(next http.Handler) http.Handler
	IsCompanyMember(next http.Handler) http.Handler
	IsCompanyAdmin(next http.Handler) http.Handler
	IsRepositoryMember(next http.Handler) http.Handler
	IsRepositoryAdmin(next http.Handler) http.Handler
	IsRepositorySupervisor(next http.Handler) http.Handler
}

func NewHorusAuthzMiddleware added in v1.2.0

func NewHorusAuthzMiddleware(grpcCon grpc.ClientConnInterface) IHorusAuthzMiddleware

type ITokenAuthz

type ITokenAuthz interface {
	IsAuthorized(next http.Handler) http.Handler
}

func NewTokenAuthz

func NewTokenAuthz(postgresRead relational.InterfaceRead) ITokenAuthz

type TokenAuthz

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

func (*TokenAuthz) IsAuthorized

func (t *TokenAuthz) IsAuthorized(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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