featured_selection

package
v0.0.0-...-3bb7120 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type FeaturedSelection

type FeaturedSelection struct {
	ID           int64
	ResourcePath string
	BannerInfo   []byte
	ImageUrl     string
	QueryParams  []byte
	StartDate    pgtype.Date
	EndDate      pgtype.Date
	DisplayOrder *int32
	CreatedAt    pgtype.Timestamptz
	UpdatedAt    pgtype.Timestamptz
}

type Querier

type Querier interface {
	Create(ctx context.Context, resourcePath string, bannerInfo []byte, imageUrl string, queryParams []byte, startDate pgtype.Date, endDate pgtype.Date, displayOrder *int32) (*FeaturedSelection, error)
	ListAllActive(ctx context.Context) ([]*FeaturedSelection, error)
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) Create

func (q *Queries) Create(ctx context.Context, resourcePath string, bannerInfo []byte, imageUrl string, queryParams []byte, startDate pgtype.Date, endDate pgtype.Date, displayOrder *int32) (*FeaturedSelection, error)

func (*Queries) ListAllActive

func (q *Queries) ListAllActive(ctx context.Context) ([]*FeaturedSelection, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Repository

type Repository interface {
	Querier
}

func NewRepository

func NewRepository(db *pgxpool.Pool) Repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL