queries

package
v0.0.0-...-06ea526 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllAreas

func GetAllAreas(ctx context.Context) (areas map[string][]Area, err error)

func GetArea

func GetArea(ctx context.Context, prefecture string, area string) (id int, err error)

func GetLives

func GetLives(query LiveQuery) (lives []util.Live, err error)

func GetUserByID

func GetUserByID(ctx context.Context, id int) (user util.User, err error)

func GetUserByUsername

func GetUserByUsername(ctx context.Context, username string) (user util.User, err error)

func GetUserByUsernameOrEmail

func GetUserByUsernameOrEmail(ctx context.Context, query string) (user util.User, err error)

func PostArtists

func PostArtists(ctx context.Context, artists []string) (n int64, err error)

func PostLiveHouses

func PostLiveHouses(ctx context.Context, livehouses []util.LiveHouse) (n int, err error)

func PostLives

func PostLives(ctx context.Context, lives []util.Live) (deleted int64, added int64, modified int64, addedArtists int64, err error)

func PostUser

func PostUser(ctx context.Context, user util.User) (err error)

func PushAliases

func PushAliases(ctx context.Context, tx pgx.Tx, artist string, aliases []string) (n int64, err error)

Types

type Area

type Area struct {
	Id         int
	Prefecture string
	Name       string
}

type LiveQuery

type LiveQuery struct {
	Areas  map[int]bool
	Artist string
}

Jump to

Keyboard shortcuts

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