db

package
v0.0.0-...-b7bd2ad Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlbumCacheInsertBulkNullableParams

type AlbumCacheInsertBulkNullableParams struct {
	ID                   []string    `json:"id"`
	Uri                  []string    `json:"uri"`
	Name                 []string    `json:"name"`
	ArtistID             []string    `json:"artist_id"`
	ArtistUri            []string    `json:"artist_uri"`
	ArtistName           []string    `json:"artist_name"`
	AlbumGroup           []*string   `json:"album_group"`
	AlbumType            []*string   `json:"album_type"`
	ImageUrl             []*string   `json:"image_url"`
	ReleaseDate          []time.Time `json:"release_date"`
	ReleaseDatePrecision []*string   `json:"release_date_precision"`
	Genres               []*string   `json:"genres"`
	Popularity           []int32     `json:"popularity"`
}

type AlbumCacheInsertBulkParams

type AlbumCacheInsertBulkParams struct {
	ID                   []string      `json:"id"`
	URI                  []string      `json:"uri"`
	Name                 []string      `json:"name"`
	ArtistID             []string      `json:"artist_id"`
	ArtistURI            []string      `json:"artist_uri"`
	ArtistName           []string      `json:"artist_name"`
	AlbumGroup           []string      `json:"album_group"`
	AlbumType            []string      `json:"album_type"`
	ImageUrl             []string      `json:"image_url"`
	ReleaseDate          []pgtype.Date `json:"release_date"`
	ReleaseDatePrecision []string      `json:"release_date_precision"`
	Genres               [][]byte      `json:"genres"`
	Popularity           []int32       `json:"popularity"`
}

type AlbumCacheInsertOneParams

type AlbumCacheInsertOneParams struct {
	ID                   string     `json:"id"`
	URI                  string     `json:"uri"`
	Name                 string     `json:"name"`
	ArtistID             string     `json:"artist_id"`
	ArtistURI            string     `json:"artist_uri"`
	ArtistName           string     `json:"artist_name"`
	AlbumGroup           *string    `json:"album_group"`
	AlbumType            *string    `json:"album_type"`
	ImageUrl             *string    `json:"image_url"`
	ReleaseDate          *time.Time `json:"release_date"`
	ReleaseDatePrecision *string    `json:"release_date_precision"`
	Genres               []string   `json:"genres"`
	Popularity           *int32     `json:"popularity"`
	Upc                  *string    `json:"upc"`
	SpotifyTrackIds      []string   `json:"spotify_track_ids"`
	TrackIsrcs           []string   `json:"track_isrcs"`
}

type AlbumCacheUpdateOneParams

type AlbumCacheUpdateOneParams struct {
	Name            string   `json:"name"`
	ImageUrl        *string  `json:"image_url"`
	Genres          []string `json:"genres"`
	Popularity      *int32   `json:"popularity"`
	Upc             *string  `json:"upc"`
	SpotifyTrackIds []string `json:"spotify_track_ids"`
	TrackIsrcs      []string `json:"track_isrcs"`
	ID              string   `json:"id"`
}

type AlbumData

type AlbumData struct {
	ID                   string     `json:"id"`
	URI                  string     `json:"uri"`
	Name                 string     `json:"name"`
	ArtistID             string     `json:"artist_id"`
	ArtistURI            string     `json:"artist_uri"`
	ArtistName           string     `json:"artist_name"`
	AlbumGroup           *string    `json:"album_group"`
	AlbumType            *string    `json:"album_type"`
	ImageUrl             *string    `json:"image_url"`
	ReleaseDate          *time.Time `json:"release_date"`
	ReleaseDatePrecision *string    `json:"release_date_precision"`
	Genres               []string   `json:"genres"`
	Popularity           *int32     `json:"popularity"`
	Upc                  *string    `json:"upc"`
	SpotifyTrackIds      []string   `json:"spotify_track_ids"`
	TrackIsrcs           []string   `json:"track_isrcs"`
}

type ArtistCacheInsertBulkParams

type ArtistCacheInsertBulkParams struct {
	ID            string   `json:"id"`
	URI           string   `json:"uri"`
	Name          string   `json:"name"`
	ImageUrl      *string  `json:"image_url"`
	Genres        []string `json:"genres"`
	Popularity    *int32   `json:"popularity"`
	FollowerCount *int32   `json:"follower_count"`
}

type ArtistCacheInsertOneParams

type ArtistCacheInsertOneParams struct {
	ID            string   `json:"id"`
	URI           string   `json:"uri"`
	Name          string   `json:"name"`
	ImageUrl      *string  `json:"image_url"`
	Genres        []string `json:"genres"`
	Popularity    *int32   `json:"popularity"`
	FollowerCount *int32   `json:"follower_count"`
}

type ArtistCacheUpdateOneParams

type ArtistCacheUpdateOneParams struct {
	Name          string   `json:"name"`
	ImageUrl      *string  `json:"image_url"`
	Genres        []string `json:"genres"`
	Popularity    *int32   `json:"popularity"`
	FollowerCount *int32   `json:"follower_count"`
	ID            string   `json:"id"`
}

type ArtistData

type ArtistData struct {
	ID            string   `json:"id"`
	URI           string   `json:"uri"`
	Name          string   `json:"name"`
	ImageUrl      *string  `json:"image_url"`
	Genres        []string `json:"genres"`
	Popularity    *int32   `json:"popularity"`
	FollowerCount *int32   `json:"follower_count"`
}

type DBService

type DBService struct {
	Pool *pgxpool.Pool
	// contains filtered or unexported fields
}

func Service

func Service() *DBService

func (*DBService) BeginTx

func (d *DBService) BeginTx(ctx context.Context) (pgx.Tx, error)

func (*DBService) Initialize

func (d *DBService) Initialize() error

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
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type GetSpotifyTokensByRoomCodeRow

type GetSpotifyTokensByRoomCodeRow struct {
	EncryptedAccessToken  []byte    `json:"encrypted_access_token"`
	AccessTokenExpiry     time.Time `json:"access_token_expiry"`
	EncryptedRefreshToken []byte    `json:"encrypted_refresh_token"`
}

type HistoryGetAlbumStreamCountByYearParams

type HistoryGetAlbumStreamCountByYearParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	Year        int32     `json:"year"`
}

type HistoryGetAlbumStreamCountByYearRow

type HistoryGetAlbumStreamCountByYearRow struct {
	AlbumName   string `json:"album_name"`
	Occurrences int64  `json:"occurrences"`
}

type HistoryGetAllParams

type HistoryGetAllParams struct {
	UserID      uuid.UUID  `json:"user_id"`
	MinMsPlayed int32      `json:"min_ms_played"`
	StartDate   *time.Time `json:"start_date"`
	EndDate     *time.Time `json:"end_date"`
	MaxCount    int32      `json:"max_count"`
}

type HistoryGetAllRow

type HistoryGetAllRow struct {
	Timestamp        time.Time    `json:"timestamp"`
	TrackName        string       `json:"track_name"`
	ArtistName       string       `json:"artist_name"`
	AlbumName        string       `json:"album_name"`
	MsPlayed         int32        `json:"ms_played"`
	SpotifyTrackUri  string       `json:"spotify_track_uri"`
	SpotifyAlbumUri  *string      `json:"spotify_album_uri"`
	SpotifyArtistUri *string      `json:"spotify_artist_uri"`
	ImageUrl         *string      `json:"image_url"`
	OtherArtists     TrackArtists `json:"other_artists"`
	Isrc             *string      `json:"isrc"`
}

type HistoryGetArtistStreamCountByYearParams

type HistoryGetArtistStreamCountByYearParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	Year        int32     `json:"year"`
}

type HistoryGetArtistStreamCountByYearRow

type HistoryGetArtistStreamCountByYearRow struct {
	ArtistName  string `json:"artist_name"`
	Occurrences int64  `json:"occurrences"`
}

type HistoryGetByAlbumURIParams

type HistoryGetByAlbumURIParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	URI         *string   `json:"uri"`
}

type HistoryGetByAlbumURIRow

type HistoryGetByAlbumURIRow struct {
	Timestamp        time.Time `json:"timestamp"`
	TrackName        string    `json:"track_name"`
	ArtistName       string    `json:"artist_name"`
	AlbumName        string    `json:"album_name"`
	MsPlayed         int32     `json:"ms_played"`
	SpotifyTrackUri  string    `json:"spotify_track_uri"`
	SpotifyArtistUri *string   `json:"spotify_artist_uri"`
	SpotifyAlbumUri  *string   `json:"spotify_album_uri"`
}

type HistoryGetByArtistURIParams

type HistoryGetByArtistURIParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	URI         *string   `json:"uri"`
}

type HistoryGetByArtistURIRow

type HistoryGetByArtistURIRow struct {
	Timestamp       time.Time `json:"timestamp"`
	TrackName       string    `json:"track_name"`
	AlbumName       string    `json:"album_name"`
	MsPlayed        int32     `json:"ms_played"`
	SpotifyTrackUri string    `json:"spotify_track_uri"`
	SpotifyAlbumUri *string   `json:"spotify_album_uri"`
	Isrc            *string   `json:"isrc"`
}

type HistoryGetByTrackURIParams

type HistoryGetByTrackURIParams struct {
	URI         string    `json:"uri"`
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
}

type HistoryGetByTrackURIRow

type HistoryGetByTrackURIRow struct {
	Timestamp        time.Time `json:"timestamp"`
	TrackName        string    `json:"track_name"`
	ArtistName       string    `json:"artist_name"`
	AlbumName        string    `json:"album_name"`
	MsPlayed         int32     `json:"ms_played"`
	SpotifyTrackUri  string    `json:"spotify_track_uri"`
	SpotifyArtistUri *string   `json:"spotify_artist_uri"`
	SpotifyAlbumUri  *string   `json:"spotify_album_uri"`
	Isrc             *string   `json:"isrc"`
}

type HistoryGetNewArtistsParams

type HistoryGetNewArtistsParams struct {
	UserID    uuid.UUID `json:"user_id"`
	StartDate time.Time `json:"start_date"`
	EndDate   time.Time `json:"end_date"`
}

type HistoryGetNewArtistsRow

type HistoryGetNewArtistsRow struct {
	ID            string   `json:"id"`
	Count         int64    `json:"count"`
	DistinctDates []string `json:"distinct_dates"`
}

type HistoryGetRecentArtistStreamsParams

type HistoryGetRecentArtistStreamsParams struct {
	UserID     uuid.UUID `json:"user_id"`
	ArtistUris []string  `json:"artist_uris"`
}

type HistoryGetRecentArtistStreamsRow

type HistoryGetRecentArtistStreamsRow struct {
	SpotifyArtistUri *string `json:"spotify_artist_uri"`
	SpotifyTrackUri  string  `json:"spotify_track_uri"`
	StreamCount      int64   `json:"stream_count"`
}

type HistoryGetTimestampRangeRow

type HistoryGetTimestampRangeRow struct {
	First time.Time `json:"first"`
	Last  time.Time `json:"last"`
}

type HistoryGetTopAlbumsByReleaseParams

type HistoryGetTopAlbumsByReleaseParams struct {
	Interval string    `json:"interval"`
	UserID   uuid.UUID `json:"user_id"`
}

type HistoryGetTopAlbumsByReleaseRow

type HistoryGetTopAlbumsByReleaseRow struct {
	ReleaseInterval pgtype.Date `json:"release_interval"`
	Streams         int64       `json:"streams"`
	Name            string      `json:"name"`
	ArtistName      string      `json:"artist_name"`
}

type HistoryGetTopAlbumsInTimeframeParams

type HistoryGetTopAlbumsInTimeframeParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	StartDate   time.Time `json:"start_date"`
	EndDate     time.Time `json:"end_date"`
	ArtistURI   *string   `json:"artist_uri"`
	Max         int32     `json:"max"`
}

type HistoryGetTopAlbumsInTimeframeRow

type HistoryGetTopAlbumsInTimeframeRow struct {
	SpotifyAlbumUri *string `json:"spotify_album_uri"`
	Occurrences     int64   `json:"occurrences"`
	Tracks          []byte  `json:"tracks"`
}

type HistoryGetTopAlbumsNotInCacheRow

type HistoryGetTopAlbumsNotInCacheRow struct {
	SpotifyAlbumUri *string `json:"spotify_album_uri"`
	Count           int64   `json:"count"`
}

type HistoryGetTopArtistsInTimeframeParams

type HistoryGetTopArtistsInTimeframeParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	StartDate   time.Time `json:"start_date"`
	EndDate     time.Time `json:"end_date"`
	Max         int32     `json:"max"`
}

type HistoryGetTopArtistsInTimeframeRow

type HistoryGetTopArtistsInTimeframeRow struct {
	SpotifyArtistUri *string `json:"spotify_artist_uri"`
	Occurrences      int64   `json:"occurrences"`
	Tracks           []byte  `json:"tracks"`
}

type HistoryGetTopTracksInTimeframeDedupParams

type HistoryGetTopTracksInTimeframeDedupParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	StartDate   time.Time `json:"start_date"`
	EndDate     time.Time `json:"end_date"`
	ArtistUris  []string  `json:"artist_uris"`
	AlbumURI    *string   `json:"album_uri"`
	MaxTracks   int32     `json:"max_tracks"`
}

type HistoryGetTopTracksInTimeframeDedupRow

type HistoryGetTopTracksInTimeframeDedupRow struct {
	Isrc             *string `json:"isrc"`
	Occurrences      int64   `json:"occurrences"`
	SpotifyTrackUris []byte  `json:"spotify_track_uris"`
	SpotifyTrackUri  string  `json:"spotify_track_uri"`
}

type HistoryGetTopTracksInTimeframeParams

type HistoryGetTopTracksInTimeframeParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	StartDate   time.Time `json:"start_date"`
	EndDate     time.Time `json:"end_date"`
	ArtistUris  []string  `json:"artist_uris"`
	AlbumURI    *string   `json:"album_uri"`
	MaxTracks   int32     `json:"max_tracks"`
}

type HistoryGetTopTracksInTimeframeRow

type HistoryGetTopTracksInTimeframeRow struct {
	SpotifyTrackUri string `json:"spotify_track_uri"`
	Occurrences     int64  `json:"occurrences"`
}

type HistoryGetTopTracksNotInCacheRow

type HistoryGetTopTracksNotInCacheRow struct {
	SpotifyTrackUri string `json:"spotify_track_uri"`
	Count           int64  `json:"count"`
}

type HistoryGetTopTracksWithoutURIsRow

type HistoryGetTopTracksWithoutURIsRow struct {
	SpotifyTrackUri string `json:"spotify_track_uri"`
	Count           int64  `json:"count"`
}

type HistoryGetTrackStreamCountByYearParams

type HistoryGetTrackStreamCountByYearParams struct {
	UserID      uuid.UUID `json:"user_id"`
	MinMsPlayed int32     `json:"min_ms_played"`
	Year        int32     `json:"year"`
}

type HistoryGetTrackStreamCountByYearRow

type HistoryGetTrackStreamCountByYearRow struct {
	TrackName   string `json:"track_name"`
	Occurrences int64  `json:"occurrences"`
}

type HistoryGetTrackURIForAlbumParams

type HistoryGetTrackURIForAlbumParams struct {
	ArtistName string    `json:"artist_name"`
	UserID     uuid.UUID `json:"user_id"`
}

type HistoryInsertBulkNullableParams

type HistoryInsertBulkNullableParams struct {
	UserIds          []uuid.UUID `json:"user_ids"`
	Timestamp        []time.Time `json:"timestamp"`
	Platform         []string    `json:"platform"`
	MsPlayed         []int32     `json:"ms_played"`
	ConnCountry      []string    `json:"conn_country"`
	IpAddr           []*string   `json:"ip_addr"`
	UserAgent        []*string   `json:"user_agent"`
	TrackName        []string    `json:"track_name"`
	ArtistName       []string    `json:"artist_name"`
	AlbumName        []string    `json:"album_name"`
	SpotifyTrackUri  []string    `json:"spotify_track_uri"`
	SpotifyArtistUri []*string   `json:"spotify_artist_uri"`
	SpotifyAlbumUri  []*string   `json:"spotify_album_uri"`
	ReasonStart      []*string   `json:"reason_start"`
	ReasonEnd        []*string   `json:"reason_end"`
	Shuffle          []bool      `json:"shuffle"`
	Skipped          []*bool     `json:"skipped"`
	Offline          []bool      `json:"offline"`
	IncognitoMode    []bool      `json:"incognito_mode"`
	FromHistory      []bool      `json:"from_history"`
	ISRC             []*string   `json:"isrc"`
}

type HistoryInsertBulkParams

type HistoryInsertBulkParams struct {
	UserIds          []uuid.UUID `json:"user_ids"`
	Timestamp        []time.Time `json:"timestamp"`
	Platform         []string    `json:"platform"`
	MsPlayed         []int32     `json:"ms_played"`
	ConnCountry      []string    `json:"conn_country"`
	IpAddr           []string    `json:"ip_addr"`
	UserAgent        []string    `json:"user_agent"`
	TrackName        []string    `json:"track_name"`
	ArtistName       []string    `json:"artist_name"`
	AlbumName        []string    `json:"album_name"`
	SpotifyTrackUri  []string    `json:"spotify_track_uri"`
	SpotifyArtistUri []string    `json:"spotify_artist_uri"`
	SpotifyAlbumUri  []string    `json:"spotify_album_uri"`
	ReasonStart      []string    `json:"reason_start"`
	ReasonEnd        []string    `json:"reason_end"`
	Shuffle          []bool      `json:"shuffle"`
	Skipped          []bool      `json:"skipped"`
	Offline          []bool      `json:"offline"`
	IncognitoMode    []bool      `json:"incognito_mode"`
	FromHistory      []bool      `json:"from_history"`
	Isrc             []string    `json:"isrc"`
}

type HistoryInsertOneParams

type HistoryInsertOneParams struct {
	UserID           uuid.UUID  `json:"user_id"`
	Timestamp        time.Time  `json:"timestamp"`
	Platform         string     `json:"platform"`
	MsPlayed         int32      `json:"ms_played"`
	ConnCountry      string     `json:"conn_country"`
	IpAddr           *string    `json:"ip_addr"`
	UserAgent        *string    `json:"user_agent"`
	TrackName        string     `json:"track_name"`
	ArtistName       string     `json:"artist_name"`
	AlbumName        string     `json:"album_name"`
	SpotifyTrackUri  string     `json:"spotify_track_uri"`
	SpotifyArtistUri *string    `json:"spotify_artist_uri"`
	SpotifyAlbumUri  *string    `json:"spotify_album_uri"`
	ReasonStart      *string    `json:"reason_start"`
	ReasonEnd        *string    `json:"reason_end"`
	Shuffle          bool       `json:"shuffle"`
	Skipped          *bool      `json:"skipped"`
	Offline          bool       `json:"offline"`
	OfflineTimestamp *time.Time `json:"offline_timestamp"`
	IncognitoMode    bool       `json:"incognito_mode"`
	FromHistory      bool       `json:"from_history"`
	Isrc             *string    `json:"isrc"`
}

type HistorySetURIsForTrackParams

type HistorySetURIsForTrackParams struct {
	SpotifyArtistUri *string `json:"spotify_artist_uri"`
	SpotifyAlbumUri  *string `json:"spotify_album_uri"`
	SpotifyTrackUri  string  `json:"spotify_track_uri"`
}

type MissingArtistURIsRow

type MissingArtistURIsRow struct {
	SpotifyTrackUri string      `json:"spotify_track_uri"`
	Count           int64       `json:"count"`
	TrackName       interface{} `json:"track_name"`
	ArtistName      interface{} `json:"artist_name"`
	UserIds         []string    `json:"user_ids"`
}

type MissingISRCNumbersRow

type MissingISRCNumbersRow struct {
	UserID           uuid.UUID  `json:"user_id"`
	Timestamp        time.Time  `json:"timestamp"`
	Platform         string     `json:"platform"`
	MsPlayed         int32      `json:"ms_played"`
	ConnCountry      string     `json:"conn_country"`
	IpAddr           *string    `json:"ip_addr"`
	UserAgent        *string    `json:"user_agent"`
	TrackName        string     `json:"track_name"`
	ArtistName       string     `json:"artist_name"`
	AlbumName        string     `json:"album_name"`
	SpotifyTrackUri  string     `json:"spotify_track_uri"`
	ReasonStart      *string    `json:"reason_start"`
	ReasonEnd        *string    `json:"reason_end"`
	Shuffle          bool       `json:"shuffle"`
	Skipped          *bool      `json:"skipped"`
	Offline          bool       `json:"offline"`
	OfflineTimestamp *time.Time `json:"offline_timestamp"`
	IncognitoMode    bool       `json:"incognito_mode"`
	SpotifyArtistUri *string    `json:"spotify_artist_uri"`
	SpotifyAlbumUri  *string    `json:"spotify_album_uri"`
	FromHistory      bool       `json:"from_history"`
	Isrc             *string    `json:"isrc"`
	Isrc_2           *string    `json:"isrc_2"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AlbumCacheGetByID

func (q *Queries) AlbumCacheGetByID(ctx context.Context, albumIds []string) ([]*AlbumData, error)

func (*Queries) AlbumCacheInsertBulk

func (q *Queries) AlbumCacheInsertBulk(ctx context.Context, arg AlbumCacheInsertBulkParams) error

func (*Queries) AlbumCacheInsertBulkNullable

func (q *Queries) AlbumCacheInsertBulkNullable(ctx context.Context, arg AlbumCacheInsertBulkNullableParams) error

func (*Queries) AlbumCacheInsertOne

func (q *Queries) AlbumCacheInsertOne(ctx context.Context, arg AlbumCacheInsertOneParams) error

func (*Queries) AlbumCacheUpdateOne

func (q *Queries) AlbumCacheUpdateOne(ctx context.Context, arg AlbumCacheUpdateOneParams) error

func (*Queries) ArtistCacheGetByID

func (q *Queries) ArtistCacheGetByID(ctx context.Context, artistIds []string) ([]*ArtistData, error)

func (*Queries) ArtistCacheGetPresentIDs

func (q *Queries) ArtistCacheGetPresentIDs(ctx context.Context, artistIds []string) ([]string, error)

func (*Queries) ArtistCacheInsertBulk

func (q *Queries) ArtistCacheInsertBulk(ctx context.Context, arg []ArtistCacheInsertBulkParams) (int64, error)

func (*Queries) ArtistCacheInsertOne

func (q *Queries) ArtistCacheInsertOne(ctx context.Context, arg ArtistCacheInsertOneParams) error

func (*Queries) ArtistCacheUpdateOne

func (q *Queries) ArtistCacheUpdateOne(ctx context.Context, arg ArtistCacheUpdateOneParams) error

func (*Queries) GetSpotifyTokensByRoomCode

func (q *Queries) GetSpotifyTokensByRoomCode(ctx context.Context, code string) (*GetSpotifyTokensByRoomCodeRow, error)

func (*Queries) HistoryGetAll

func (q *Queries) HistoryGetAll(ctx context.Context, arg HistoryGetAllParams) ([]*HistoryGetAllRow, error)

func (*Queries) HistoryGetByAlbumURI

func (q *Queries) HistoryGetByAlbumURI(ctx context.Context, arg HistoryGetByAlbumURIParams) ([]*HistoryGetByAlbumURIRow, error)

func (*Queries) HistoryGetByArtistURI

func (q *Queries) HistoryGetByArtistURI(ctx context.Context, arg HistoryGetByArtistURIParams) ([]*HistoryGetByArtistURIRow, error)

func (*Queries) HistoryGetByTrackURI

func (q *Queries) HistoryGetByTrackURI(ctx context.Context, arg HistoryGetByTrackURIParams) ([]*HistoryGetByTrackURIRow, error)

func (*Queries) HistoryGetNewArtists

func (q *Queries) HistoryGetNewArtists(ctx context.Context, arg HistoryGetNewArtistsParams) ([]*HistoryGetNewArtistsRow, error)

func (*Queries) HistoryGetTimestampRange

func (q *Queries) HistoryGetTimestampRange(ctx context.Context, userID uuid.UUID) (*HistoryGetTimestampRangeRow, error)

func (*Queries) HistoryGetTopAlbumsNotInCache

func (q *Queries) HistoryGetTopAlbumsNotInCache(ctx context.Context) ([]*HistoryGetTopAlbumsNotInCacheRow, error)

func (*Queries) HistoryGetTopTracksNotInCache

func (q *Queries) HistoryGetTopTracksNotInCache(ctx context.Context) ([]*HistoryGetTopTracksNotInCacheRow, error)

func (*Queries) HistoryGetTopTracksWithoutURIs

func (q *Queries) HistoryGetTopTracksWithoutURIs(ctx context.Context) ([]*HistoryGetTopTracksWithoutURIsRow, error)

func (*Queries) HistoryGetTrackURIForAlbum

func (q *Queries) HistoryGetTrackURIForAlbum(ctx context.Context, arg HistoryGetTrackURIForAlbumParams) (string, error)

func (*Queries) HistoryInsertBulk

func (q *Queries) HistoryInsertBulk(ctx context.Context, arg HistoryInsertBulkParams) error

func (*Queries) HistoryInsertBulkNullable

func (q *Queries) HistoryInsertBulkNullable(ctx context.Context, arg HistoryInsertBulkNullableParams) error

func (*Queries) HistoryInsertOne

func (q *Queries) HistoryInsertOne(ctx context.Context, arg HistoryInsertOneParams) error

func (*Queries) HistorySetURIsForTrack

func (q *Queries) HistorySetURIsForTrack(ctx context.Context, arg HistorySetURIsForTrackParams) error

func (*Queries) MissingArtistURIs

func (q *Queries) MissingArtistURIs(ctx context.Context) ([]*MissingArtistURIsRow, error)

func (*Queries) MissingISRCNumbers

func (q *Queries) MissingISRCNumbers(ctx context.Context) ([]*MissingISRCNumbersRow, error)

func (*Queries) RoomAddMember

func (q *Queries) RoomAddMember(ctx context.Context, arg RoomAddMemberParams) error

func (*Queries) RoomAddMemberByUsername

func (q *Queries) RoomAddMemberByUsername(ctx context.Context, arg RoomAddMemberByUsernameParams) (uuid.UUID, error)

func (*Queries) RoomDeleteByID

func (q *Queries) RoomDeleteByID(ctx context.Context, code string) error

func (*Queries) RoomGetAllGuests

func (q *Queries) RoomGetAllGuests(ctx context.Context, roomID uuid.UUID) ([]*RoomGetAllGuestsRow, error)

func (*Queries) RoomGetAllMembers

func (q *Queries) RoomGetAllMembers(ctx context.Context, roomID uuid.UUID) ([]*RoomGetAllMembersRow, error)

func (*Queries) RoomGetByCode

func (q *Queries) RoomGetByCode(ctx context.Context, code string) (*RoomGetByCodeRow, error)

func (*Queries) RoomGetHostID

func (q *Queries) RoomGetHostID(ctx context.Context, code string) (uuid.UUID, error)

func (*Queries) RoomGetIDByCode

func (q *Queries) RoomGetIDByCode(ctx context.Context, code string) (uuid.UUID, error)

func (*Queries) RoomGetQueueTracks

func (q *Queries) RoomGetQueueTracks(ctx context.Context, roomID uuid.UUID) ([]*RoomGetQueueTracksRow, error)

func (*Queries) RoomGuestGetName

func (q *Queries) RoomGuestGetName(ctx context.Context, arg RoomGuestGetNameParams) (string, error)

func (*Queries) RoomGuestInsert

func (q *Queries) RoomGuestInsert(ctx context.Context, arg RoomGuestInsertParams) (*RoomGuestInsertRow, error)

func (*Queries) RoomGuestInsertWithID

func (q *Queries) RoomGuestInsertWithID(ctx context.Context, arg RoomGuestInsertWithIDParams) (*RoomGuestInsertWithIDRow, error)

func (*Queries) RoomInsertWithPassword

func (q *Queries) RoomInsertWithPassword(ctx context.Context, arg RoomInsertWithPasswordParams) (*RoomInsertWithPasswordRow, error)

func (*Queries) RoomMarkTracksAsPlayed

func (q *Queries) RoomMarkTracksAsPlayed(ctx context.Context, arg RoomMarkTracksAsPlayedParams) error

func (*Queries) RoomRemoveMember

func (q *Queries) RoomRemoveMember(ctx context.Context, arg RoomRemoveMemberParams) error

func (*Queries) RoomSetGuestQueueTrack

func (q *Queries) RoomSetGuestQueueTrack(ctx context.Context, arg RoomSetGuestQueueTrackParams) error

func (*Queries) RoomSetIsOpen

func (q *Queries) RoomSetIsOpen(ctx context.Context, arg RoomSetIsOpenParams) error

func (*Queries) RoomSetMemberQueueTrack

func (q *Queries) RoomSetMemberQueueTrack(ctx context.Context, arg RoomSetMemberQueueTrackParams) error

func (*Queries) RoomSetModerator

func (q *Queries) RoomSetModerator(ctx context.Context, arg RoomSetModeratorParams) error

func (*Queries) RoomUpdatePassword

func (q *Queries) RoomUpdatePassword(ctx context.Context, arg RoomUpdatePasswordParams) error

func (*Queries) RoomUpdateSpotifyTokens

func (q *Queries) RoomUpdateSpotifyTokens(ctx context.Context, arg RoomUpdateSpotifyTokensParams) error

func (*Queries) RoomUserIsMember

func (q *Queries) RoomUserIsMember(ctx context.Context, arg RoomUserIsMemberParams) (bool, error)

func (*Queries) RoomValidatePassword

func (q *Queries) RoomValidatePassword(ctx context.Context, arg RoomValidatePasswordParams) (bool, error)

func (*Queries) TableSizesAndRows

func (q *Queries) TableSizesAndRows(ctx context.Context) ([]*TableSizesAndRowsRow, error)

func (*Queries) TrackCacheGetByID

func (q *Queries) TrackCacheGetByID(ctx context.Context, trackIds []string) ([]*TrackData, error)

func (*Queries) TrackCacheInsertBulk

func (q *Queries) TrackCacheInsertBulk(ctx context.Context, arg TrackCacheInsertBulkParams) error

func (*Queries) TrackCacheInsertBulkNullable

func (q *Queries) TrackCacheInsertBulkNullable(ctx context.Context, arg TrackCacheInsertBulkNullableParams) error

func (*Queries) TracksGetPrimaryURIs

func (q *Queries) TracksGetPrimaryURIs(ctx context.Context, uris []string) ([]*TracksGetPrimaryURIsRow, error)

func (*Queries) UncachedTracks

func (q *Queries) UncachedTracks(ctx context.Context) ([]*UncachedTracksRow, error)

func (*Queries) UserDeleteFriendRequest

func (q *Queries) UserDeleteFriendRequest(ctx context.Context, arg UserDeleteFriendRequestParams) error

func (*Queries) UserDeleteSpotifyInfo

func (q *Queries) UserDeleteSpotifyInfo(ctx context.Context, id uuid.UUID) error

func (*Queries) UserDeleteSpotifyToken

func (q *Queries) UserDeleteSpotifyToken(ctx context.Context, userID uuid.UUID) error

func (*Queries) UserGetAllWithSpotify

func (q *Queries) UserGetAllWithSpotify(ctx context.Context) ([]*User, error)

func (*Queries) UserGetByID

func (q *Queries) UserGetByID(ctx context.Context, id uuid.UUID) (*UserGetByIDRow, error)

func (*Queries) UserGetByUsername

func (q *Queries) UserGetByUsername(ctx context.Context, username string) (*UserGetByUsernameRow, error)

func (*Queries) UserGetFriendRequestExists

func (q *Queries) UserGetFriendRequestExists(ctx context.Context, arg UserGetFriendRequestExistsParams) (bool, error)

func (*Queries) UserGetFriendSuggestions

func (q *Queries) UserGetFriendSuggestions(ctx context.Context, userID uuid.UUID) ([]*UserGetFriendSuggestionsRow, error)

func (*Queries) UserGetFriends

func (q *Queries) UserGetFriends(ctx context.Context, userID uuid.UUID) ([]*User, error)

func (*Queries) UserGetHostedRooms

func (q *Queries) UserGetHostedRooms(ctx context.Context, arg UserGetHostedRoomsParams) ([]*UserGetHostedRoomsRow, error)

func (*Queries) UserGetJoinedRooms

func (q *Queries) UserGetJoinedRooms(ctx context.Context, arg UserGetJoinedRoomsParams) ([]*UserGetJoinedRoomsRow, error)

func (*Queries) UserGetReceivedFriendRequests

func (q *Queries) UserGetReceivedFriendRequests(ctx context.Context, userID uuid.UUID) ([]*UserGetReceivedFriendRequestsRow, error)

func (*Queries) UserGetSentFriendRequests

func (q *Queries) UserGetSentFriendRequests(ctx context.Context, userID uuid.UUID) ([]*UserGetSentFriendRequestsRow, error)

func (*Queries) UserGetSpotifyTokens

func (q *Queries) UserGetSpotifyTokens(ctx context.Context, userID uuid.UUID) (*UserGetSpotifyTokensRow, error)

func (*Queries) UserHasSpotifyHistory

func (q *Queries) UserHasSpotifyHistory(ctx context.Context, userID uuid.UUID) (bool, error)

func (*Queries) UserInsertFriend

func (q *Queries) UserInsertFriend(ctx context.Context, arg UserInsertFriendParams) error

func (*Queries) UserInsertWithPassword

func (q *Queries) UserInsertWithPassword(ctx context.Context, arg UserInsertWithPasswordParams) (uuid.UUID, error)

func (*Queries) UserIsFriends

func (q *Queries) UserIsFriends(ctx context.Context, arg UserIsFriendsParams) (bool, error)

func (*Queries) UserSendFriendRequest

func (q *Queries) UserSendFriendRequest(ctx context.Context, arg UserSendFriendRequestParams) error

func (*Queries) UserUpdatePassword

func (q *Queries) UserUpdatePassword(ctx context.Context, arg UserUpdatePasswordParams) error

func (*Queries) UserUpdateSpotifyInfo

func (q *Queries) UserUpdateSpotifyInfo(ctx context.Context, arg UserUpdateSpotifyInfoParams) error

func (*Queries) UserUpdateSpotifyTokens

func (q *Queries) UserUpdateSpotifyTokens(ctx context.Context, arg UserUpdateSpotifyTokensParams) error

func (*Queries) UserValidatePassword

func (q *Queries) UserValidatePassword(ctx context.Context, arg UserValidatePasswordParams) (bool, error)

func (*Queries) UsersToFetchHistory

func (q *Queries) UsersToFetchHistory(ctx context.Context) ([]*User, error)

func (*Queries) WithTx

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

type Room

type Room struct {
	ID                uuid.UUID  `json:"id"`
	Name              string     `json:"name"`
	Code              string     `json:"code"`
	Created           time.Time  `json:"created"`
	HostID            uuid.UUID  `json:"host_id"`
	PasswordProtected bool       `json:"password_protected"`
	Updated           *time.Time `json:"updated"`
	IsOpen            bool       `json:"is_open"`
}

type RoomAddMemberByUsernameParams

type RoomAddMemberByUsernameParams struct {
	RoomID      uuid.UUID `json:"room_id"`
	Username    string    `json:"username"`
	IsModerator bool      `json:"is_moderator"`
}

type RoomAddMemberParams

type RoomAddMemberParams struct {
	UserID uuid.UUID `json:"user_id"`
	RoomID uuid.UUID `json:"room_id"`
}

type RoomGetAllGuestsRow

type RoomGetAllGuestsRow struct {
	Name         string    `json:"name"`
	ID           uuid.UUID `json:"id"`
	QueuedTracks int32     `json:"queued_tracks"`
}

type RoomGetAllMembersRow

type RoomGetAllMembersRow struct {
	UserID          uuid.UUID `json:"user_id"`
	Username        string    `json:"username"`
	DisplayName     string    `json:"display_name"`
	SpotifyName     *string   `json:"spotify_name"`
	SpotifyImageUrl *string   `json:"spotify_image_url"`
	IsModerator     bool      `json:"is_moderator"`
	QueuedTracks    int32     `json:"queued_tracks"`
}

type RoomGetByCodeRow

type RoomGetByCodeRow struct {
	ID              uuid.UUID `json:"id"`
	Name            string    `json:"name"`
	HostID          uuid.UUID `json:"host_id"`
	HostUsername    string    `json:"host_username"`
	HostDisplay     string    `json:"host_display"`
	HostSpotifyName *string   `json:"host_spotify_name"`
	HostImage       *string   `json:"host_image"`
	Code            string    `json:"code"`
	Created         time.Time `json:"created"`
}

type RoomGetQueueTracksRow

type RoomGetQueueTracksRow struct {
	TrackID    string    `json:"track_id"`
	GuestName  *string   `json:"guest_name"`
	MemberName *string   `json:"member_name"`
	Timestamp  time.Time `json:"timestamp"`
	Played     bool      `json:"played"`
}

type RoomGuest

type RoomGuest struct {
	ID     uuid.UUID `json:"id"`
	RoomID uuid.UUID `json:"room_id"`
	Name   string    `json:"name"`
}

type RoomGuestGetNameParams

type RoomGuestGetNameParams struct {
	RoomID  uuid.UUID `json:"room_id"`
	GuestID uuid.UUID `json:"guest_id"`
}

type RoomGuestInsertParams

type RoomGuestInsertParams struct {
	Name     string `json:"name"`
	RoomCode string `json:"room_code"`
}

type RoomGuestInsertRow

type RoomGuestInsertRow struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

type RoomGuestInsertWithIDParams

type RoomGuestInsertWithIDParams struct {
	Name     string    `json:"name"`
	GuestID  uuid.UUID `json:"guest_id"`
	RoomCode string    `json:"room_code"`
}

type RoomGuestInsertWithIDRow

type RoomGuestInsertWithIDRow struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

type RoomInsertWithPasswordParams

type RoomInsertWithPasswordParams struct {
	Name     string    `json:"name"`
	HostID   uuid.UUID `json:"host_id"`
	RoomPass string    `json:"room_pass"`
}

type RoomInsertWithPasswordRow

type RoomInsertWithPasswordRow struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	HostID  uuid.UUID `json:"host_id"`
	Code    string    `json:"code"`
	Created time.Time `json:"created"`
}

type RoomMarkTracksAsPlayedParams

type RoomMarkTracksAsPlayedParams struct {
	RoomID    uuid.UUID `json:"room_id"`
	Timestamp time.Time `json:"timestamp"`
}

type RoomMember

type RoomMember struct {
	ID          uuid.UUID `json:"id"`
	UserID      uuid.UUID `json:"user_id"`
	RoomID      uuid.UUID `json:"room_id"`
	IsModerator bool      `json:"is_moderator"`
}

type RoomPassword

type RoomPassword struct {
	ID                uuid.UUID `json:"id"`
	RoomID            uuid.UUID `json:"room_id"`
	EncryptedPassword *string   `json:"encrypted_password"`
}

type RoomQueueTrack

type RoomQueueTrack struct {
	ID        uuid.UUID  `json:"id"`
	TrackID   string     `json:"track_id"`
	GuestID   *uuid.UUID `json:"guest_id"`
	RoomID    uuid.UUID  `json:"room_id"`
	Timestamp time.Time  `json:"timestamp"`
	UserID    *uuid.UUID `json:"user_id"`
	Played    bool       `json:"played"`
}

type RoomRemoveMemberParams

type RoomRemoveMemberParams struct {
	RoomID uuid.UUID `json:"room_id"`
	UserID uuid.UUID `json:"user_id"`
}

type RoomSetGuestQueueTrackParams

type RoomSetGuestQueueTrackParams struct {
	TrackID  string    `json:"track_id"`
	GuestID  uuid.UUID `json:"guest_id"`
	RoomCode string    `json:"room_code"`
}

type RoomSetIsOpenParams

type RoomSetIsOpenParams struct {
	ID     uuid.UUID `json:"id"`
	IsOpen bool      `json:"is_open"`
}

type RoomSetMemberQueueTrackParams

type RoomSetMemberQueueTrackParams struct {
	TrackID  string    `json:"track_id"`
	UserID   uuid.UUID `json:"user_id"`
	RoomCode string    `json:"room_code"`
}

type RoomSetModeratorParams

type RoomSetModeratorParams struct {
	RoomID      uuid.UUID `json:"room_id"`
	UserID      uuid.UUID `json:"user_id"`
	IsModerator bool      `json:"is_moderator"`
}

type RoomUpdatePasswordParams

type RoomUpdatePasswordParams struct {
	RoomID   uuid.UUID `json:"room_id"`
	RoomPass string    `json:"room_pass"`
}

type RoomUpdateSpotifyTokensParams

type RoomUpdateSpotifyTokensParams struct {
	Code                  string    `json:"code"`
	EncryptedAccessToken  []byte    `json:"encrypted_access_token"`
	AccessTokenExpiry     time.Time `json:"access_token_expiry"`
	EncryptedRefreshToken []byte    `json:"encrypted_refresh_token"`
}

type RoomUserIsMemberParams

type RoomUserIsMemberParams struct {
	UserID uuid.UUID `json:"user_id"`
	RoomID uuid.UUID `json:"room_id"`
}

type RoomValidatePasswordParams

type RoomValidatePasswordParams struct {
	Code     string `json:"code"`
	RoomPass string `json:"room_pass"`
}

type SchemaMigration

type SchemaMigration struct {
	Version int64 `json:"version"`
	Dirty   bool  `json:"dirty"`
}

type SpotifyHistory

type SpotifyHistory struct {
	UserID           uuid.UUID  `json:"user_id"`
	Timestamp        time.Time  `json:"timestamp"`
	Platform         string     `json:"platform"`
	MsPlayed         int32      `json:"ms_played"`
	ConnCountry      string     `json:"conn_country"`
	IpAddr           *string    `json:"ip_addr"`
	UserAgent        *string    `json:"user_agent"`
	TrackName        string     `json:"track_name"`
	ArtistName       string     `json:"artist_name"`
	AlbumName        string     `json:"album_name"`
	SpotifyTrackUri  string     `json:"spotify_track_uri"`
	ReasonStart      *string    `json:"reason_start"`
	ReasonEnd        *string    `json:"reason_end"`
	Shuffle          bool       `json:"shuffle"`
	Skipped          *bool      `json:"skipped"`
	Offline          bool       `json:"offline"`
	OfflineTimestamp *time.Time `json:"offline_timestamp"`
	IncognitoMode    bool       `json:"incognito_mode"`
	SpotifyArtistUri *string    `json:"spotify_artist_uri"`
	SpotifyAlbumUri  *string    `json:"spotify_album_uri"`
	FromHistory      bool       `json:"from_history"`
	Isrc             *string    `json:"isrc"`
}

type SpotifyPermissionsVersion

type SpotifyPermissionsVersion struct {
	ID          int64  `json:"id"`
	Description string `json:"description"`
}

type SpotifyToken

type SpotifyToken struct {
	ID                    uuid.UUID `json:"id"`
	UserID                uuid.UUID `json:"user_id"`
	EncryptedAccessToken  []byte    `json:"encrypted_access_token"`
	AccessTokenExpiry     time.Time `json:"access_token_expiry"`
	EncryptedRefreshToken []byte    `json:"encrypted_refresh_token"`
	PermissionsVersion    int64     `json:"permissions_version"`
}

type TableSizesAndRowsRow

type TableSizesAndRowsRow struct {
	Schema         string  `json:"schema"`
	Table          string  `json:"table"`
	RowsEstimate   float32 `json:"rows_estimate"`
	RelSizeBytes   int64   `json:"rel_size_bytes"`
	IndexSizeBytes int64   `json:"index_size_bytes"`
	TotalSizeBytes int64   `json:"total_size_bytes"`
}

type TrackArtist

type TrackArtist struct {
	ID   *string `json:"id"`
	URI  *string `json:"uri"`
	Name string  `json:"name"`
}

type TrackArtists

type TrackArtists []TrackArtist

func (*TrackArtists) Scan

func (a *TrackArtists) Scan(src interface{}) (err error)

func (TrackArtists) Value

func (a TrackArtists) Value() (driver.Value, error)

type TrackCacheInsertBulkNullableParams

type TrackCacheInsertBulkNullableParams struct {
	ID           []string  `json:"id"`
	Uri          []string  `json:"uri"`
	Name         []string  `json:"name"`
	AlbumID      []string  `json:"album_id"`
	AlbumUri     []string  `json:"album_uri"`
	AlbumName    []string  `json:"album_name"`
	ArtistID     []string  `json:"artist_id"`
	ArtistUri    []string  `json:"artist_uri"`
	ArtistName   []string  `json:"artist_name"`
	ImageUrl     []*string `json:"image_url"`
	OtherArtists []*string `json:"other_artists"`
	DurationMs   []int32   `json:"duration_ms"`
	Popularity   []int32   `json:"popularity"`
	Explicit     []bool    `json:"explicit"`
	PreviewUrl   []string  `json:"preview_url"`
	DiscNumber   []int32   `json:"disc_number"`
	TrackNumber  []int32   `json:"track_number"`
	Type         []string  `json:"type"`
	ExternalIds  []*string `json:"external_ids"`
	Isrc         []*string `json:"isrc"`
}

type TrackCacheInsertBulkParams

type TrackCacheInsertBulkParams struct {
	ID           []string `json:"id"`
	URI          []string `json:"uri"`
	Name         []string `json:"name"`
	AlbumID      []string `json:"album_id"`
	AlbumURI     []string `json:"album_uri"`
	AlbumName    []string `json:"album_name"`
	ArtistID     []string `json:"artist_id"`
	ArtistURI    []string `json:"artist_uri"`
	ArtistName   []string `json:"artist_name"`
	ImageUrl     []string `json:"image_url"`
	OtherArtists [][]byte `json:"other_artists"`
	DurationMs   []int32  `json:"duration_ms"`
	Popularity   []int32  `json:"popularity"`
	Explicit     []bool   `json:"explicit"`
	PreviewUrl   []string `json:"preview_url"`
	DiscNumber   []int32  `json:"disc_number"`
	TrackNumber  []int32  `json:"track_number"`
	Type         []string `json:"type"`
	ExternalIds  [][]byte `json:"external_ids"`
	Isrc         []string `json:"isrc"`
}

type TrackData

type TrackData struct {
	ID           string           `json:"id"`
	URI          string           `json:"uri"`
	Name         string           `json:"name"`
	AlbumID      string           `json:"album_id"`
	AlbumURI     string           `json:"album_uri"`
	AlbumName    string           `json:"album_name"`
	ArtistID     string           `json:"artist_id"`
	ArtistURI    string           `json:"artist_uri"`
	ArtistName   string           `json:"artist_name"`
	ImageUrl     *string          `json:"image_url"`
	OtherArtists TrackArtists     `json:"other_artists"`
	DurationMs   int32            `json:"duration_ms"`
	Popularity   int32            `json:"popularity"`
	Explicit     bool             `json:"explicit"`
	PreviewUrl   string           `json:"preview_url"`
	DiscNumber   int32            `json:"disc_number"`
	TrackNumber  int32            `json:"track_number"`
	Type         string           `json:"type"`
	ExternalIds  TrackExternalIDs `json:"external_ids"`
	Isrc         *string          `json:"isrc"`
}

type TrackExternalIDs

type TrackExternalIDs map[string]string

func (*TrackExternalIDs) Scan

func (ids *TrackExternalIDs) Scan(src interface{}) (err error)

func (TrackExternalIDs) Value

func (ids TrackExternalIDs) Value() (driver.Value, error)

type TracksGetPrimaryURIsRow

type TracksGetPrimaryURIsRow struct {
	Isrc         *string `json:"isrc"`
	OriginalUris []byte  `json:"original_uris"`
	PrimaryUri   string  `json:"primary_uri"`
}

type UncachedTracksRow

type UncachedTracksRow struct {
	SpotifyTrackUri string `json:"spotify_track_uri"`
	Count           int64  `json:"count"`
	TrackName       string `json:"track_name"`
	ArtistName      string `json:"artist_name"`
}

type User

type User struct {
	ID              uuid.UUID `json:"id"`
	Username        string    `json:"username"`
	DisplayName     string    `json:"display_name"`
	SpotifyAccount  *string   `json:"spotify_account"`
	SpotifyName     *string   `json:"spotify_name"`
	SpotifyImageUrl *string   `json:"spotify_image_url"`
	Created         time.Time `json:"created"`
}

type UserDeleteFriendRequestParams

type UserDeleteFriendRequestParams struct {
	UserID   uuid.UUID `json:"user_id"`
	FriendID uuid.UUID `json:"friend_id"`
}

type UserFriend

type UserFriend struct {
	UserID         uuid.UUID `json:"user_id"`
	FriendID       uuid.UUID `json:"friend_id"`
	AddedTimestamp time.Time `json:"added_timestamp"`
}

type UserFriendRequest

type UserFriendRequest struct {
	UserID           uuid.UUID `json:"user_id"`
	FriendID         uuid.UUID `json:"friend_id"`
	RequestTimestamp time.Time `json:"request_timestamp"`
}

type UserGetByIDRow

type UserGetByIDRow struct {
	ID              uuid.UUID `json:"id"`
	Username        string    `json:"username"`
	DisplayName     string    `json:"display_name"`
	SpotifyAccount  *string   `json:"spotify_account"`
	SpotifyName     *string   `json:"spotify_name"`
	SpotifyImageUrl *string   `json:"spotify_image_url"`
}

type UserGetByUsernameRow

type UserGetByUsernameRow struct {
	ID              uuid.UUID `json:"id"`
	Username        string    `json:"username"`
	DisplayName     string    `json:"display_name"`
	SpotifyAccount  *string   `json:"spotify_account"`
	SpotifyName     *string   `json:"spotify_name"`
	SpotifyImageUrl *string   `json:"spotify_image_url"`
}

type UserGetFriendRequestExistsParams

type UserGetFriendRequestExistsParams struct {
	UserID   uuid.UUID `json:"user_id"`
	FriendID uuid.UUID `json:"friend_id"`
}

type UserGetFriendSuggestionsRow

type UserGetFriendSuggestionsRow struct {
	ID              uuid.UUID `json:"id"`
	Username        string    `json:"username"`
	DisplayName     string    `json:"display_name"`
	SpotifyImageUrl *string   `json:"spotify_image_url"`
}

type UserGetHostedRoomsParams

type UserGetHostedRoomsParams struct {
	ID     uuid.UUID `json:"id"`
	IsOpen bool      `json:"is_open"`
}

type UserGetHostedRoomsRow

type UserGetHostedRoomsRow struct {
	ID                  uuid.UUID `json:"id"`
	Name                string    `json:"name"`
	Code                string    `json:"code"`
	Created             time.Time `json:"created"`
	HostID              uuid.UUID `json:"host_id"`
	HostUsername        string    `json:"host_username"`
	HostDisplayName     string    `json:"host_display_name"`
	HostSpotifyImageUrl *string   `json:"host_spotify_image_url"`
}

type UserGetJoinedRoomsParams

type UserGetJoinedRoomsParams struct {
	UserID uuid.UUID `json:"user_id"`
	IsOpen bool      `json:"is_open"`
}

type UserGetJoinedRoomsRow

type UserGetJoinedRoomsRow struct {
	ID                  uuid.UUID `json:"id"`
	Name                string    `json:"name"`
	Code                string    `json:"code"`
	Created             time.Time `json:"created"`
	HostID              uuid.UUID `json:"host_id"`
	HostUsername        string    `json:"host_username"`
	HostDisplayName     string    `json:"host_display_name"`
	HostSpotifyImageUrl *string   `json:"host_spotify_image_url"`
}

type UserGetReceivedFriendRequestsRow

type UserGetReceivedFriendRequestsRow struct {
	ID               uuid.UUID `json:"id"`
	Username         string    `json:"username"`
	DisplayName      string    `json:"display_name"`
	SpotifyImageUrl  *string   `json:"spotify_image_url"`
	RequestTimestamp time.Time `json:"request_timestamp"`
}

type UserGetSentFriendRequestsRow

type UserGetSentFriendRequestsRow struct {
	ID               uuid.UUID `json:"id"`
	Username         string    `json:"username"`
	DisplayName      string    `json:"display_name"`
	SpotifyImageUrl  *string   `json:"spotify_image_url"`
	RequestTimestamp time.Time `json:"request_timestamp"`
}

type UserGetSpotifyTokensRow

type UserGetSpotifyTokensRow struct {
	EncryptedAccessToken  []byte    `json:"encrypted_access_token"`
	AccessTokenExpiry     time.Time `json:"access_token_expiry"`
	EncryptedRefreshToken []byte    `json:"encrypted_refresh_token"`
}

type UserInsertFriendParams

type UserInsertFriendParams struct {
	UserID   uuid.UUID `json:"user_id"`
	FriendID uuid.UUID `json:"friend_id"`
}

type UserInsertWithPasswordParams

type UserInsertWithPasswordParams struct {
	Username    string `json:"username"`
	DisplayName string `json:"display_name"`
	UserPass    string `json:"user_pass"`
}

type UserIsFriendsParams

type UserIsFriendsParams struct {
	UserID   uuid.UUID `json:"user_id"`
	FriendID uuid.UUID `json:"friend_id"`
}

type UserPassword

type UserPassword struct {
	ID                uuid.UUID  `json:"id"`
	UserID            *uuid.UUID `json:"user_id"`
	EncryptedPassword string     `json:"encrypted_password"`
}

type UserSendFriendRequestParams

type UserSendFriendRequestParams struct {
	UserID   uuid.UUID `json:"user_id"`
	FriendID uuid.UUID `json:"friend_id"`
}

type UserUpdatePasswordParams

type UserUpdatePasswordParams struct {
	UserPass string    `json:"user_pass"`
	UserID   uuid.UUID `json:"user_id"`
}

type UserUpdateSpotifyInfoParams

type UserUpdateSpotifyInfoParams struct {
	ID              uuid.UUID `json:"id"`
	SpotifyAccount  *string   `json:"spotify_account"`
	SpotifyName     *string   `json:"spotify_name"`
	SpotifyImageUrl *string   `json:"spotify_image_url"`
}

type UserUpdateSpotifyTokensParams

type UserUpdateSpotifyTokensParams struct {
	UserID                uuid.UUID `json:"user_id"`
	EncryptedAccessToken  []byte    `json:"encrypted_access_token"`
	AccessTokenExpiry     time.Time `json:"access_token_expiry"`
	EncryptedRefreshToken []byte    `json:"encrypted_refresh_token"`
}

type UserValidatePasswordParams

type UserValidatePasswordParams struct {
	UserPass string `json:"user_pass"`
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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