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) (*gorm.DB, error)

func NewGORMTransaction

func NewGORMTransaction(db *gorm.DB) *gormTransaction

Types

type BarGORMRepository

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

func NewBarGORMRepository

func NewBarGORMRepository(db *gorm.DB) *BarGORMRepository

func (*BarGORMRepository) Create

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

func (*BarGORMRepository) Find

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

type FooGORMRepository

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

func NewFooGORMRepository

func NewFooGORMRepository(db *gorm.DB) *FooGORMRepository

func (*FooGORMRepository) Create

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

func (*FooGORMRepository) Find

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

Jump to

Keyboard shortcuts

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