Documentation
¶
Index ¶
- type Generic
- func (s *Generic[T]) Create(request T, ctx context.Context) (T, error)
- func (s *Generic[T]) Delete(id int, ctx context.Context) error
- func (s *Generic[T]) Exists(id int) bool
- func (s *Generic[T]) ExistsByName(name string) bool
- func (s *Generic[T]) List() ([]T, error)
- func (s *Generic[T]) Read(id int) (T, error)
- func (s *Generic[T]) Update(id int, request T, ctx context.Context) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generic ¶
type Generic[T any] struct { // contains filtered or unexported fields }
func (*Generic[T]) ExistsByName ¶
ExistsByName checks if an entry exists in the database
Click to show internal directories.
Click to hide internal directories.