Documentation ¶
Index ¶
- func New(ctx context.Context) (db.DB, error)
- type Bun
- type Client
- func (c *Client) Close(ctx context.Context) db.Error
- func (c *Client) Create(ctx context.Context, i any) db.Error
- func (c *Client) DoMigration(ctx context.Context) db.Error
- func (c *Client) LoadTestData(ctx context.Context) db.Error
- func (u *Client) ReadUserByEmail(ctx context.Context, email string) (*models.User, db.Error)
- func (u *Client) ReadUserByID(ctx context.Context, id string) (*models.User, db.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶ added in v0.0.4
type Client struct {
// contains filtered or unexported fields
}
Client is a DB interface compatible client for Bun
func (*Client) DoMigration ¶ added in v0.0.4
DoMigration runs schema migrations on the database
func (*Client) LoadTestData ¶ added in v0.0.4
func (*Client) ReadUserByEmail ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.