Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Providers is what we offer to dependency injection. Providers = wire.NewSet( ProvideService, ProvideAuthService, ProvideUsersService, ) )
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { UserAttributionMiddleware(next http.Handler) http.Handler PermissionFilterMiddleware(permissions ...authorization.Permission) func(next http.Handler) http.Handler ServiceAdminMiddleware(next http.Handler) http.Handler AuthenticateUser(ctx context.Context, loginData *types.UserLoginInput) (*types.User, *http.Cookie, error) LogoutUser(ctx context.Context, sessionCtxData *types.SessionContextData, req *http.Request, res http.ResponseWriter) error }
AuthService is a subset of the larger types.AuthService interface.
func ProvideAuthService ¶
func ProvideAuthService(x types.AuthService) AuthService
ProvideAuthService does what I hope one day wire figures out how to do.
type Config ¶
type Config struct { UseFakeData bool `json:"use_fake_data" mapstructure:"use_fake_data" toml:"use_fake_data"` // contains filtered or unexported fields }
Config configures the frontend service.
type Service ¶
Service serves HTML.
func ProvideService ¶
func ProvideService( cfg *Config, logger logging.Logger, authService AuthService, usersService UsersService, dataStore database.DataManager, routeParamManager routing.RouteParamManager, ) Service
ProvideService builds a new Service.
type UsersService ¶
type UsersService interface { RegisterUser(ctx context.Context, registrationInput *types.UserRegistrationInput) (*types.UserCreationResponse, error) VerifyUserTwoFactorSecret(ctx context.Context, input *types.TOTPSecretVerificationInput) error }
UsersService is a subset of the larger types.UsersService interface.
func ProvideUsersService ¶
func ProvideUsersService(x types.UserDataService) UsersService
ProvideUsersService does what I hope one day wire figures out how to do.
Click to show internal directories.
Click to hide internal directories.