client

package
v0.0.0-...-86597e6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient() *ent.Client

func GetDB

func GetDB() *sql.DB

func MockRunInTransaction

func MockRunInTransaction(err error) func(ctx context.Context, db *ent.Client, execFunc func(ctx context.Context, tx *ent.Tx) error) (err error)

func RunInTransaction

func RunInTransaction(ctx context.Context, db *ent.Client, execFunc func(ctx context.Context, tx *ent.Tx) error) (err error)

func SetClient

func SetClient(client *ent.Client)

func SetDB

func SetDB(db *sql.DB)

Types

type Client

type Client struct {
	*ent.Client
	// contains filtered or unexported fields
}

func NewDB

func NewDB(ctx context.Context, cfg *config.Config) (*Client, error)

func (*Client) PingContext

func (c *Client) PingContext(ctx context.Context) error

Jump to

Keyboard shortcuts

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