Documentation ¶
Index ¶
- Constants
- type DB
- func (d *DB) All(ctx context.Context, page int) ([]*model.Service, error)
- func (d *DB) FindByID(ctx context.Context, id uuid.UUID) (*model.Service, error)
- func (d *DB) FindByName(ctx context.Context, name string) ([]*model.Service, error)
- func (d *DB) SearchAll(ctx context.Context, query string) ([]*model.Service, error)
- type ServiceStorage
Constants ¶
View Source
const PageSize = 5
TODO: PageSize is hard coded now, but should be made variable later <2024-01-05, Jesse Dearing> PageSize is the number of services per page.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { DB *pgxpool.Pool ServiceStorage }
func (*DB) All ¶
All will return the number of serices for the page number specified by the `page` parameter
func (*DB) FindByName ¶
type ServiceStorage ¶
type ServiceStorage interface { All(ctx context.Context, page int) ([]model.Service, error) FindByID(ctx context.Context, id uuid.UUID) (*model.Service, error) FindByName(ctx context.Context, name string) ([]*model.Service, error) SearchAll(ctx context.Context, query string) ([]*model.Service, error) }
Click to show internal directories.
Click to hide internal directories.