Documentation ¶
Index ¶
- func NewPostgresBaseRepo[C, U, G any](config config.PostgresConfig) config.IBaseRepo[C, U, G]
- type BaseRepo
- func (b *BaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
- func (b *BaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
- func (b *BaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
- func (b *BaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), ...)
- func (b *BaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresBaseRepo ¶
func NewPostgresBaseRepo[C, U, G any](config config.PostgresConfig) config.IBaseRepo[C, U, G]
Types ¶
type BaseRepo ¶
type BaseRepo[C, U, G any] struct { PrimaryKey string `json:"primary_key"` Table string `json:"table"` // contains filtered or unexported fields }
func (*BaseRepo[C, U, G]) ChangeStatus ¶
Click to show internal directories.
Click to hide internal directories.