app

package
v1.42.53 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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