app

package
v1.36.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublishedKey     = "pub-key"
	SecretKey        = "secret-key"
	TestPublishedKey = "test-pub-key"
	TestSecretKey    = "test-secret-key"
)

Variables

This section is empty.

Functions

func Query

Types

type App

type App struct {
	mixin.Model[App]

	Name string `json:"name"`

	ApiKeys []*oauthtoken.Token `json:"apiKeys,omitempty" datastore:"-"`

	SecretKey []byte `json:"-"`
}

func New

func New(db *datastore.Datastore) *App

func (*App) AfterCreate

func (a *App) AfterCreate() error

func (*App) BeforeCreate

func (a *App) BeforeCreate() error

Hooks

func (*App) GetApiKeyByName

func (a *App) GetApiKeyByName(name string) (*oauthtoken.Token, bool, error)

func (*App) LoadApiKeys

func (a *App) LoadApiKeys() error

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

func (a *App) RevokeApiKeyByName(name string) (*oauthtoken.Token, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL