Documentation ¶
Index ¶
- Constants
- type Repo
- func (r *Repo) Add(ctx context.Context, c client.Client) error
- func (r *Repo) Get(ctx context.Context, id data.Id) (*client.Client, error)
- func (r *Repo) List(ctx context.Context) ([]*client.Client, error)
- func (r *Repo) ListByIds(ctx context.Context, ids []data.Id) ([]*client.Client, error)
- func (r *Repo) Remove(ctx context.Context, id data.Id) error
- func (r *Repo) Set(ctx context.Context, c client.Client) error
Constants ¶
View Source
const SelectFrom = `SELECT c.id, c.name, c.created_at, c.updated_at FROM ` + Table + ` AS c`
SelectFrom is the query to get all of our columns without any filtering, ordering, etc.
View Source
const Table = "clients"
Table is table we are querying for our client entities.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo is a client.Repo implementation that uses a SQL database as storage.
Click to show internal directories.
Click to hide internal directories.