handler

package
v0.0.0-...-81dc835 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConfigureResolveRoute

func ConfigureResolveRoute(route httproute.Route) []httproute.Route

Types

type Database

type Database interface {
	ReadOnly(ctx context.Context, do func(ctx context.Context) error) error
}

type IdentityService

type IdentityService interface {
	ListByUser(ctx context.Context, userID string) ([]*identity.Info, error)
}

type ResolveHandler

type ResolveHandler struct {
	Database       Database
	Identities     IdentityService
	Verification   VerificationService
	Logger         ResolveHandlerLogger
	Users          UserProvider
	RolesAndGroups RolesAndGroupsProvider
}

func (*ResolveHandler) Handle

func (h *ResolveHandler) Handle(ctx context.Context, rw http.ResponseWriter, r *http.Request) (err error)

func (*ResolveHandler) ServeHTTP

func (h *ResolveHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ResolveHandlerLogger

type ResolveHandlerLogger struct{ *log.Logger }

func NewResolveHandlerLogger

func NewResolveHandlerLogger(lf *log.Factory) ResolveHandlerLogger

type RolesAndGroupsProvider

type RolesAndGroupsProvider interface {
	ListEffectiveRolesByUserID(ctx context.Context, userID string) ([]*model.Role, error)
}

type UserProvider

type UserProvider interface {
	Get(ctx context.Context, id string, role accesscontrol.Role) (*model.User, error)
}

type VerificationService

type VerificationService interface {
	IsUserVerified(ctx context.Context, identities []*identity.Info) (bool, error)
}

Jump to

Keyboard shortcuts

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