Documentation ¶
Index ¶
- type Book
- type QueryArgs
- type Repository
- func (r *Repository) DeleteByID(ctx context.Context, id string) error
- func (r *Repository) FindByID(ctx context.Context, id string) (*Book, error)
- func (r *Repository) FindFeaturedBooks(ctx context.Context) []Book
- func (r *Repository) GetAll(ctx context.Context, args QueryArgs) []Book
- func (r *Repository) GetTotalCount(ctx context.Context) (int, error)
- func (r *Repository) InsertNew(ctx context.Context, in *Book) (*Book, error)
- func (r *Repository) Query(ctx context.Context, args QueryArgs) []Book
- func (r *Repository) Update(ctx context.Context, in *Book) (*Book, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *ent.Client) *Repository
func (*Repository) DeleteByID ¶
func (r *Repository) DeleteByID(ctx context.Context, id string) error
func (*Repository) FindFeaturedBooks ¶
func (r *Repository) FindFeaturedBooks(ctx context.Context) []Book
func (*Repository) GetTotalCount ¶
func (r *Repository) GetTotalCount(ctx context.Context) (int, error)
Click to show internal directories.
Click to hide internal directories.