Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository[T Model] interface { // Fetch a single item by its ID GetByID(ctx context.Context, id string) (T, error) // Fetch multiple items by their IDs GetByIDList(ctx context.Context, ids []string) ([]T, error) // Create a new item Create(ctx context.Context, item T) (*string, error) // Save (create or update) an item Save(ctx context.Context, item T) error // Update an existing item Update(ctx context.Context, item T) error // Delete an item by its ID Delete(ctx context.Context, id string) error // Delete multiple items by their IDs DeleteList(ctx context.Context, ids []string) error }
Click to show internal directories.
Click to hide internal directories.