Documentation
¶
Index ¶
- type DBProvider
- type Logger
- type Option
- type Store
- func (s *Store[T]) Create(ctx context.Context, obj *T) error
- func (s *Store[T]) Delete(ctx context.Context, opts *where.WhereOptions) error
- func (s *Store[T]) Get(ctx context.Context, opts *where.WhereOptions) (*T, error)
- func (s *Store[T]) List(ctx context.Context, opts *where.WhereOptions) (count int64, ret []*T, err error)
- func (s *Store[T]) Update(ctx context.Context, obj *T, wheres ...where.Where) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBProvider ¶
DBProvider is a marker interface for database providers.
type Store ¶
type Store[T any] struct { // contains filtered or unexported fields }
Store is a generic store.
func NewStore ¶
func NewStore[T any](storage DBProvider, logger Logger) *Store[T]
NewStore creates a new store.
Click to show internal directories.
Click to hide internal directories.