Documentation ¶
Index ¶
- func BindRepositoryPermissions(next http.Handler) http.Handler
- func IsRepositoryAdmin(next http.Handler) http.Handler
- func IsRepositoryMember(next http.Handler) http.Handler
- type CompanyAuthzMiddleware
- type CtxKey
- type ICompanyAuthzMiddleware
- type IRepositoryAuthzMiddleware
- type ITokenAuthz
- type TokenAuthz
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompanyAuthzMiddleware ¶
type CompanyAuthzMiddleware struct {
// contains filtered or unexported fields
}
func (*CompanyAuthzMiddleware) IsCompanyAdmin ¶
func (c *CompanyAuthzMiddleware) IsCompanyAdmin(next http.Handler) http.Handler
nolint
func (*CompanyAuthzMiddleware) IsCompanyMember ¶
func (c *CompanyAuthzMiddleware) IsCompanyMember(next http.Handler) http.Handler
nolint
type CtxKey ¶
type CtxKey string
const CompanyIDCtxKey CtxKey = "companyID"
const RepositoryIDCtxKey CtxKey = "repositoryID"
const RepositoryPermissionsCtxKey CtxKey = "repositoryPermissions"
type ICompanyAuthzMiddleware ¶
type ICompanyAuthzMiddleware interface { IsCompanyMember(next http.Handler) http.Handler IsCompanyAdmin(next http.Handler) http.Handler }
func NewCompanyAuthzMiddleware ¶
func NewCompanyAuthzMiddleware( databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) ICompanyAuthzMiddleware
type IRepositoryAuthzMiddleware ¶
type IRepositoryAuthzMiddleware interface { IsRepositoryMember(next http.Handler) http.Handler IsRepositoryAdmin(next http.Handler) http.Handler }
func NewRepositoryAuthzMiddleware ¶
func NewRepositoryAuthzMiddleware( databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) IRepositoryAuthzMiddleware
type ITokenAuthz ¶
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
Click to show internal directories.
Click to hide internal directories.