Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository[T any] interface { Create(ctx context.Context, model *T) (*T, error) Get(ctx context.Context, id string) (*T, error) GetAll(ctx context.Context, limit, offset int) ([]T, error) GetAllByField(ctx context.Context, fieldName, fieldValue string) ([]T, error) Update(ctx context.Context, id string, model *T) (*T, error) Delete(ctx context.Context, id string) error }
func NewRepository ¶
func NewRepository[T any](db *gorm.DB) Repository[T]
Click to show internal directories.
Click to hide internal directories.