Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct { // ID is a short unique identifier. ID uint // Easily recognisable name for an admin. Name string // Time the admin was activated. // Tokens that are genereted before this time will be invalid. // Admins can be reactivated to invalidate old tokens. ActivatedAt time.Time // Time at which an admin expires. // This is by default the expiration date of any token. // This can be used to give temporary admin access. Expiry time.Time // Authorization token that is generated for the admin. // This will only be set upon creation. AuthorizationToken string }
An Admin has access to resources that are protected with an AdminToken.
func (*Admin) Reactivate ¶
func (a *Admin) Reactivate()
Reactivate admin and invalidate all old tokens.
Click to show internal directories.
Click to hide internal directories.