infra

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(c context.Context) (*sql.Tx, error)

func NewSQLTransaction

func NewSQLTransaction(db *sql.DB) *sqlTransaction

Types

type BarSQLRepository

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

func NewBarSQLRepository

func NewBarSQLRepository(db *sql.DB) *BarSQLRepository

func (*BarSQLRepository) Create

func (r *BarSQLRepository) Create(c context.Context, value int) (int, error)

func (*BarSQLRepository) Find

func (r *BarSQLRepository) Find(id int) (*entity.Bar, error)

type FooSQLRepository

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

func NewFooSQLRepository

func NewFooSQLRepository(db *sql.DB) *FooSQLRepository

func (*FooSQLRepository) Create

func (r *FooSQLRepository) Create(c context.Context, value int) (int, error)

func (*FooSQLRepository) Find

func (r *FooSQLRepository) Find(id int) (*entity.Foo, error)

Jump to

Keyboard shortcuts

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