Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainSummary ¶
DomainSummary represents a total number of positions for domain.
type Position ¶
type Position struct { URL string `db:"url" json:"url"` Position int `db:"position" json:"position"` Keyword string `db:"keyword" json:"keyword"` Volume int `db:"volume" json:"volume"` Results int `db:"results" json:"results"` CPC float64 `db:"cpc" json:"cpc"` Updated string `db:"updated" json:"updated"` }
Position represents a single domain's position.
type PositionRepo ¶
type PositionRepo struct {
// contains filtered or unexported fields
}
PositionRepo represents a data access layer to 'position' table.
func NewPositionRepo ¶
func NewPositionRepo(log *zap.Logger, conn *sqlx.DB) *PositionRepo
NewPositionRepo returns new instance of PositionRepo.
func (*PositionRepo) GetPositions ¶
func (pr *PositionRepo) GetPositions(ctx context.Context, domain, orderBy string, limit, offset int) ([]*Position, error)
GetPositions returns a slice of positions for the given domain.
func (*PositionRepo) GetSummary ¶
GetSummary returns a total number of positions for the given domain.
Click to show internal directories.
Click to hide internal directories.