pg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New(url string, configurator func(db *sqlx.DB)) (*Store, error)

func (*Store) Close

func (st *Store) Close() error

func (*Store) CreateToken

func (st *Store) CreateToken(ctx context.Context, params dbo.TokenParams) error

func (*Store) DeleteToken

func (st *Store) DeleteToken(ctx context.Context, ref dbo.TokenRef) error

func (*Store) FindToken

func (st *Store) FindToken(ctx context.Context, id dbo.KeyID) (*dbo.Token, error)

func (*Store) GetToken

func (st *Store) GetToken(ctx context.Context, ref dbo.TokenRef) (*dbo.Token, error)

func (*Store) ListTokens

func (st *Store) ListTokens(ctx context.Context, user string) ([]*dbo.Token, error)

func (*Store) UpdateTokenConfig

func (st *Store) UpdateTokenConfig(ctx context.Context, ref dbo.TokenRef, config dbo.TokenConfig) error

func (*Store) UpdateTokenKey

func (st *Store) UpdateTokenKey(ctx context.Context, ref dbo.TokenRef, key dbo.Key) error

func (*Store) UpdateTokensStats

func (st *Store) UpdateTokensStats(ctx context.Context, stats []dbo.TokenStat) error

Jump to

Keyboard shortcuts

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