ondeck

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type City

type City struct {
	Slug string `json:"slug"`
	Name string `json:"name"`
}

type CreateCityParams

type CreateCityParams struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type CreateVenueParams

type CreateVenueParams struct {
	Slug            string         `json:"slug"`
	Name            string         `json:"name"`
	City            string         `json:"city"`
	SpotifyPlaylist string         `json:"spotify_playlist"`
	Status          string         `json:"status"`
	Statuses        sql.NullString `json:"statuses"`
	Tags            sql.NullString `json:"tags"`
}

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 DeleteVenueParams

type DeleteVenueParams struct {
	Slug   string `json:"slug"`
	Slug_2 string `json:"slug_2"`
}

type GetVenueParams

type GetVenueParams struct {
	Slug string `json:"slug"`
	City string `json:"city"`
}

type Querier

type Querier interface {
	CreateCity(ctx context.Context, arg CreateCityParams) error
	CreateVenue(ctx context.Context, arg CreateVenueParams) (sql.Result, error)
	DeleteVenue(ctx context.Context, arg DeleteVenueParams) error
	GetCity(ctx context.Context, slug string) (City, error)
	GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error)
	ListCities(ctx context.Context) ([]City, error)
	ListVenues(ctx context.Context, city string) ([]Venue, error)
	UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error
	UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) error
	VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CreateCity

func (q *Queries) CreateCity(ctx context.Context, arg CreateCityParams) error

func (*Queries) CreateVenue

func (q *Queries) CreateVenue(ctx context.Context, arg CreateVenueParams) (sql.Result, error)

func (*Queries) DeleteVenue

func (q *Queries) DeleteVenue(ctx context.Context, arg DeleteVenueParams) error

func (*Queries) GetCity

func (q *Queries) GetCity(ctx context.Context, slug string) (City, error)

func (*Queries) GetVenue

func (q *Queries) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error)

func (*Queries) ListCities

func (q *Queries) ListCities(ctx context.Context) ([]City, error)

func (*Queries) ListVenues

func (q *Queries) ListVenues(ctx context.Context, city string) ([]Venue, error)

func (*Queries) UpdateCityName

func (q *Queries) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error

func (*Queries) UpdateVenueName

func (q *Queries) UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) error

func (*Queries) VenueCountByCity

func (q *Queries) VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error)

func (*Queries) WithTx

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

type UpdateCityNameParams

type UpdateCityNameParams struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type UpdateVenueNameParams

type UpdateVenueNameParams struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Venue

type Venue struct {
	ID              int64          `json:"id"`
	Status          string         `json:"status"`
	Statuses        sql.NullString `json:"statuses"`
	Slug            string         `json:"slug"`
	Name            string         `json:"name"`
	City            string         `json:"city"`
	SpotifyPlaylist string         `json:"spotify_playlist"`
	SongkickID      sql.NullString `json:"songkick_id"`
	Tags            sql.NullString `json:"tags"`
	CreatedAt       time.Time      `json:"created_at"`
}

type VenueCountByCityRow

type VenueCountByCityRow struct {
	City  string `json:"city"`
	Count int64  `json:"count"`
}

Jump to

Keyboard shortcuts

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