repositories

package
v0.0.0-...-b942761 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB) error

Types

type LogRepository

type LogRepository interface {
	Get(id int64) (*models.Log, error)
	List(q string, offset int64, limit int64, ordering string, data interface{}) (int64, error)

	Create(*models.Log) error
	Update(id int64, info map[string]interface{}) (err error)
	Delete(ids []int64) (err error)
}

func NewLoggingRepository

func NewLoggingRepository(db *gorm.DB) LogRepository

type LogRepositoryImp

type LogRepositoryImp struct {
	Db *gorm.DB
}

func (*LogRepositoryImp) Create

func (s *LogRepositoryImp) Create(data *models.Log) (err error)

func (*LogRepositoryImp) Delete

func (s *LogRepositoryImp) Delete(ids []int64) (err error)

func (*LogRepositoryImp) Get

func (s *LogRepositoryImp) Get(id int64) (data *models.Log, err error)

func (*LogRepositoryImp) List

func (s *LogRepositoryImp) List(q string, offset int64, limit int64, ordering string, data interface{}) (n int64, err error)

func (*LogRepositoryImp) Update

func (s *LogRepositoryImp) Update(id int64, info map[string]interface{}) (err error)

Jump to

Keyboard shortcuts

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