bun

package
v0.0.0-...-a915469 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a DB interface compatible client for Bun.

func New

func New(ctx context.Context) (*Client, error)

New creates a new bun database client.

func (*Client) Close

func (c *Client) Close(_ context.Context) db.Error

Close closes the bun db connection.

func (*Client) CreateAcceptedTermsURL

func (c *Client) CreateAcceptedTermsURL(ctx context.Context, acceptedTermsURLs ...*models.AcceptedTermsURL) db.Error

func (*Client) CreateAccount

func (c *Client) CreateAccount(ctx context.Context, account *models.Account) db.Error

func (*Client) CreateEphemeralPublicKey

func (c *Client) CreateEphemeralPublicKey(ctx context.Context, ephemeralPublicKey *models.EphemeralPublicKey) db.Error

func (*Client) CreateToken

func (c *Client) CreateToken(ctx context.Context, token *models.Token) db.Error

func (*Client) DeleteToken

func (c *Client) DeleteToken(ctx context.Context, token *models.Token) db.Error

func (*Client) DoMigration

func (c *Client) DoMigration(ctx context.Context) db.Error

DoMigration runs schema migrations on the database.

func (*Client) IncEphemeralPublicKeyVerifyCountByPublicKey

func (c *Client) IncEphemeralPublicKeyVerifyCountByPublicKey(ctx context.Context, publicKey string) (int64, db.Error)

func (*Client) ReadAcceptedTermsURLForAccount

func (c *Client) ReadAcceptedTermsURLForAccount(ctx context.Context, accountID int64) ([]*models.AcceptedTermsURL, db.Error)

func (*Client) ReadAccountByToken

func (c *Client) ReadAccountByToken(ctx context.Context, token string) (*models.Account, db.Error)

func (*Client) ReadAccountByUserID

func (c *Client) ReadAccountByUserID(ctx context.Context, userID string) (*models.Account, db.Error)

func (*Client) ReadTokenByToken

func (c *Client) ReadTokenByToken(ctx context.Context, t string) (*models.Token, db.Error)

func (*Client) UpdateAccount

func (c *Client) UpdateAccount(ctx context.Context, account *models.Account) db.Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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