Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertToModel ¶ added in v0.0.8
type ConvertToModel[T any] interface { ToModel() T }
type FilterType ¶
type FilterType string
type GormFilter ¶
type HasRepository ¶ added in v0.0.32
type HasRepository[T Entity] interface { NewRepository() Repository[T] }
type Initializable ¶ added in v0.0.32
type Initializable[T Entity] interface { New() T NewSlice() []T }
type NotFilterableError ¶ added in v0.0.10
type NotFilterableError struct {
Field string
}
func (NotFilterableError) Error ¶ added in v0.0.10
func (e NotFilterableError) Error() string
type Repository ¶ added in v0.0.32
type Repository[T Entity] interface { Conn() *gorm.DB Select(query interface{}, args ...interface{}) *gorm.DB // table name added to select Filter(filters ...GormFilter) *gorm.DB GetByID(id int64) (T, error) GetByIDs(ids ...int64) ([]T, error) GetOne(filters ...GormFilter) (T, error) GetResults(filters ...GormFilter) ([]T, error) }
Click to show internal directories.
Click to hide internal directories.