MCPcopy Create free account
hub / github.com/Hound-Media-Server/hound / APIKey

Struct APIKey

server/database/api_keys.go:13–21  ·  view source on GitHub ↗

Note: keys are stored in plaintext

Source from the content-addressed store, hash-verified

11
12// Note: keys are stored in plaintext
13type APIKey struct {
14 KeyID int64 `xorm:"pk autoincr 'key_id'" json:"key_id"`
15 APIKey string `xorm:"'api_key'" json:"api_key"`
16 Name string `xorm:"'name'" json:"name"`
17 UserID int64 `xorm:"'user_id'" json:"user_id"`
18 RevokedAt *time.Time `xorm:"timestampz 'revoked_at'" json:"revoked_at"`
19 ExpiresAt time.Time `xorm:"timestampz 'expires_at'" json:"expires_at"`
20 CreatedAt time.Time `xorm:"timestampz created" json:"created_at"`
21}
22
23func instantiateAPIKeysTable() error {
24 return databaseEngine.Table(apiKeysTable).Sync2(new(APIKey))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected