repository

package
v1.0.48 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

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]

Jump to

Keyboard shortcuts

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