Documentation ¶ Index ¶ func Get() (*sql.DB, error) func Init() (*sql.DB, error) func MustGet() *sql.DB func SetUser(e Executable, role string, id uuid.UUID) error func WithRLS(ctx context.Context, db *sql.DB, role string, id uuid.UUID) (*sql.Tx, error) type Executable Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Get ¶ func Get() (*sql.DB, error) func Init ¶ func Init() (*sql.DB, error) func MustGet ¶ func MustGet() *sql.DB func SetUser ¶ func SetUser(e Executable, role string, id uuid.UUID) error func WithRLS ¶ func WithRLS( ctx context.Context, db *sql.DB, role string, id uuid.UUID, ) (*sql.Tx, error) Types ¶ type Executable ¶ type Executable interface { Exec(query string, args ...any) (sql.Result, error) } Source Files ¶ View all Source files db.gorole.gotransaction.go Click to show internal directories. Click to hide internal directories.