Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthToken ¶
type AuthToken struct {
AccessKey string `gorm:"primary_key"`
SecretKey string
User string `gorm:"index:user_idx"`
ValidUntil *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
func GenerateAuthToken ¶
type AuthTokenDB ¶
type AuthTokenDB struct {
// contains filtered or unexported fields
}
func NewAuthTokenDB ¶
func NewAuthTokenDB(db *gorm.DB) *AuthTokenDB
func NewAuthTokenDBFromConfig ¶
func NewAuthTokenDBFromConfig(c *config.CloudbuildOpts) (*AuthTokenDB, error)
func (*AuthTokenDB) Authenticate ¶
func (at *AuthTokenDB) Authenticate(accessKey, secretKey string) error
func (*AuthTokenDB) CreateToken ¶
func (*AuthTokenDB) ListTokens ¶
func (at *AuthTokenDB) ListTokens() (*[]AuthToken, error)
func (*AuthTokenDB) RemoveToken ¶
func (at *AuthTokenDB) RemoveToken(accessKey string) error
Click to show internal directories.
Click to hide internal directories.