Documentation ¶
Index ¶
Constants ¶
View Source
const ApiKeyMinCharacterLength = 32
View Source
const RootUsername = "root"
Variables ¶
View Source
var ErrInvalidLogin = errors.New("Invalid login")
ErrInvalidLogin is returned when the login is not valid
View Source
var ErrNoBootstrapNoUsers = errors.New("You must specify RISER_BOOTSTRAP_APIKEY is required when there are no users. Use \"riser ops generate-apikey\" to generate the key.")
ErrNoBoostrapNoUsers is returned when no bootstrap is specified and no active users are provisioned in the DB
View Source
var ErrRootUserExists = errors.New("The root user already exists")
ErrRootUserExists is returned when the root user exists with an active API key
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { LoginWithApiKey(apiKeyPlainText string) (*core.User, error) BootstrapRootUser(apiKeyPlainText string) error }
func NewService ¶
func NewService(users core.UserRepository, apikeys core.ApiKeyRepository) Service
Click to show internal directories.
Click to hide internal directories.