Documentation
¶
Index ¶
- Constants
- func Query(db *datastore.Datastore) datastore.Query
- type App
- func (a *App) AfterCreate() error
- func (a *App) BeforeCreate() error
- func (a *App) GetApiKeyByName(name string) (*oauthtoken.Token, bool, error)
- func (a *App) LoadApiKeys() error
- func (a *App) NewApiKey(name string, claims oauthtoken.Claims) (*oauthtoken.Token, error)
- func (a *App) ResetDefaultKeys()
- func (a *App) RevokeApiKeyByName(name string) (*oauthtoken.Token, bool, error)
Constants ¶
View Source
const ( PublishedKey = "pub-key" SecretKey = "secret-key" TestPublishedKey = "test-pub-key" TestSecretKey = "test-secret-key" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
mixin.Model[App]
Name string `json:"name"`
ApiKeys []*oauthtoken.Token `json:"apiKeys,omitempty" datastore:"-"`
SecretKey []byte `json:"-"`
}
func (*App) AfterCreate ¶
func (*App) GetApiKeyByName ¶
func (*App) LoadApiKeys ¶
func (*App) NewApiKey ¶
func (a *App) NewApiKey(name string, claims oauthtoken.Claims) (*oauthtoken.Token, error)
func (*App) ResetDefaultKeys ¶
func (a *App) ResetDefaultKeys()
func (*App) RevokeApiKeyByName ¶
Click to show internal directories.
Click to hide internal directories.