providerauth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(path string) *Database

func (*Database) Client

func (db *Database) Client(ctx context.Context) (*bun.DB, error)

func (*Database) Close

func (db *Database) Close() error

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(database *Database) (*Repository, error)

func (*Repository) Get

func (*Repository) Put

func (r *Repository) Put(ctx context.Context, token authcache.Token) error

type TokenRow

type TokenRow struct {
	bun.BaseModel `bun:"table:provider_auth_tokens,alias:provider_auth_tokens"`

	ID          int64     `bun:"id,pk,autoincrement"`
	ProviderID  string    `bun:"provider_id,notnull"`
	AuthScope   string    `bun:"auth_scope,notnull"`
	Environment string    `bun:"environment,notnull"`
	AppKeyHash  string    `bun:"app_key_hash,notnull"`
	AccessToken string    `bun:"access_token,notnull"`
	TokenType   string    `bun:"token_type,notnull,default:''"`
	ExpiresIn   int       `bun:"expires_in,notnull,default:0"`
	ExpiresAt   time.Time `bun:"expires_at,notnull"`
	IssuedAt    time.Time `bun:"issued_at,notnull"`
	UpdatedAt   time.Time `bun:"updated_at,notnull"`
}

Jump to

Keyboard shortcuts

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