Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPasswordMismatch indicates that a user entered two different passwords ErrPasswordMismatch = errors.New("passwords didn't match") )
View Source
var IsDebug bool
IsDebug determines if debugging is enabled
Functions ¶
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf prints log messages only if debugging is enabled
func ReadPassword ¶
ReadPassword reads a password from stdin
Types ¶
type CmdFactory ¶
type CmdFactory struct {
Config func() (*config.Config, error)
Claims func() (*UserClaims, error)
IAMClient func() (*iam.APIClient, error)
}
CmdFactory provides methods to obtain commonly used structures
func NewDefaultCmdFactory ¶
func NewDefaultCmdFactory(configFlag, debugFlag *pflag.Flag) *CmdFactory
NewDefaultCmdFactory creates a new command factory
type UserClaims ¶
type UserClaims struct {
jwt.StandardClaims
IsAdmin bool `json:"is_admin"`
Version uint `json:"version"`
}
UserClaims represents claims in an auth JWT
Click to show internal directories.
Click to hide internal directories.