Documentation ¶
Index ¶
- Constants
- Variables
- func HashPassword(password string) ([]byte, error)
- func ValidateActionName(name string) error
- func ValidateArn(name string) error
- func ValidateAuthEntityID(name string) error
- func ValidateStatementEffect(effect string) error
- type Credential
- type CredentialKeys
- type Group
- type PaginationParams
- type Paginator
- type Policy
- type Statement
- type Statements
- type SuperuserConfiguration
- type User
Constants ¶
View Source
const ( StatementEffectAllow = "allow" StatementEffectDeny = "deny" )
Variables ¶
View Source
var (
ErrInvalidStatementSrcFormat = errors.New("invalid statements src format")
)
View Source
var (
ErrValidationError = errors.New("validation error")
)
Functions ¶
func HashPassword ¶ added in v0.63.0
HashPassword generates a hashed password from a plaintext string
func ValidateActionName ¶
func ValidateArn ¶
func ValidateAuthEntityID ¶
func ValidateStatementEffect ¶
Types ¶
type Credential ¶
type CredentialKeys ¶
type CredentialKeys struct { AccessKeyID string `json:"access_key_id"` SecretAccessKey string `json:"secret_access_key"` }
For JSON serialization:
type PaginationParams ¶
type Policy ¶
type Policy struct { ID int `db:"id"` CreatedAt time.Time `db:"created_at"` DisplayName string `db:"display_name" json:"display_name"` Statement Statements `db:"statement"` }
type Statements ¶
type Statements []Statement
func (*Statements) Scan ¶
func (s *Statements) Scan(src interface{}) error
type SuperuserConfiguration ¶
SuperuserConfiguration requests a particular configuration for a superuser.
type User ¶
type User struct { ID int64 `db:"id"` CreatedAt time.Time `db:"created_at"` Username string `db:"display_name" json:"display_name"` // FriendlyName, if set, is a shorter name for the user than // Username. Unlike Username it does not identify the user (it // might not be unique); use it in the user's GUI rather than in // backend code. FriendlyName *string `db:"friendly_name" json:"friendly_name"` Email *string `db:"email" json:"email"` EncryptedPassword []byte `db:"encrypted_password" json:"encrypted_password"` Source string `db:"source" json:"source"` }
func (*User) Authenticate ¶ added in v0.62.0
Authenticate a user from a password Returns nil on success, or an error on failure.
func (*User) UpdatePassword ¶ added in v0.62.0
Click to show internal directories.
Click to hide internal directories.