Documentation ¶ Index ¶ type DBTX type Images type Querier type Queries func New(db DBTX) *Queries func (q *Queries) CreateImage(ctx context.Context, photo []byte) (Images, error) func (q *Queries) GetRanDomImage(ctx context.Context) (Images, error) func (q *Queries) WithTx(tx *sql.Tx) *Queries Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type DBTX ¶ type DBTX interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) PrepareContext(context.Context, string) (*sql.Stmt, error) QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) QueryRowContext(context.Context, string, ...interface{}) *sql.Row } type Images ¶ type Images struct { ID int64 `json:"id"` Photo []byte `json:"photo"` } type Querier ¶ type Querier interface { CreateImage(ctx context.Context, photo []byte) (Images, error) GetRanDomImage(ctx context.Context) (Images, error) } type Queries ¶ type Queries struct { // contains filtered or unexported fields } func New ¶ func New(db DBTX) *Queries func (*Queries) CreateImage ¶ func (q *Queries) CreateImage(ctx context.Context, photo []byte) (Images, error) func (*Queries) GetRanDomImage ¶ func (q *Queries) GetRanDomImage(ctx context.Context) (Images, error) func (*Queries) WithTx ¶ func (q *Queries) WithTx(tx *sql.Tx) *Queries Source Files ¶ View all Source files db.go images.sql.go models.go querier.go Click to show internal directories. Click to hide internal directories.