Documentation ¶
Index ¶
- func ErrToDomainErr(err error) error
- func ModelToDomain(f Fact) service.Fact
- func Schema() string
- type CreateFactParams
- type DBTX
- type Fact
- type Queries
- func (q *Queries) CreateFact(ctx context.Context, arg CreateFactParams) (Fact, error)
- func (q *Queries) DeleteFact(ctx context.Context, id int64) error
- func (q *Queries) GetFact(ctx context.Context, id int64) (Fact, error)
- func (q *Queries) GetFacts(ctx context.Context) ([]Fact, error)
- func (q *Queries) GetRandomFact(ctx context.Context) (Fact, error)
- func (q *Queries) SoftDeleteFact(ctx context.Context, id int64) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Repo
- func (r *Repo) CreateFact(ctx context.Context, content, source string) (service.Fact, error)
- func (r *Repo) DeleteFact(ctx context.Context, id int64) error
- func (r *Repo) Fact(ctx context.Context, id int64) (service.Fact, error)
- func (r *Repo) Facts(ctx context.Context) ([]service.Fact, error)
- func (r *Repo) RandomFact(ctx context.Context) (service.Fact, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrToDomainErr ¶
func ModelToDomain ¶
Types ¶
type CreateFactParams ¶
type CreateFactParams struct { Content string Source sql.NullString }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateFact ¶
func (*Queries) SoftDeleteFact ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) CreateFact ¶
Click to show internal directories.
Click to hide internal directories.