meta

package
v0.0.0-...-e1ec090 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNoUser

func CheckNoUser(ctx context.Context) error

func CheckUserMatches

func CheckUserMatches(ctx context.Context, id string) error

func DoughnutMiddleware

func DoughnutMiddleware(next http.Handler) http.Handler

func EnforcePassword

func EnforcePassword(next http.Handler) http.Handler

func GetNestedPreloads

func GetNestedPreloads(ctx *graphql.OperationContext, fields []graphql.CollectedField, prefix string) (preloads []string)

func GetPreloadString

func GetPreloadString(prefix, name string) string

func GetPreloads

func GetPreloads(ctx context.Context) []string

func HasRequestedField

func HasRequestedField(ctx context.Context, field string) bool

Types

type AlbumCombinationConversionMap

type AlbumCombinationConversionMap struct{ *ConversionMap }

func CreateAlbumCombinationConversionMap

func CreateAlbumCombinationConversionMap() AlbumCombinationConversionMap

func (AlbumCombinationConversionMap) Append

func (lm AlbumCombinationConversionMap) Append(artistName, albumName string, album interface{})

func (AlbumCombinationConversionMap) Get

func (lm AlbumCombinationConversionMap) Get(artistName, albumName string) (interface{}, string, bool)

type AlbumConversionCounter

type AlbumConversionCounter struct{ *ConversionMap }

func CreateAlbumConversionCounter

func CreateAlbumConversionCounter() AlbumConversionCounter

func (AlbumConversionCounter) Get

func (lcm AlbumConversionCounter) Get(artistName, albumName string) (int32, string, string)

func (AlbumConversionCounter) Increment

func (lcm AlbumConversionCounter) Increment(artistName, albumName string)

type AlbumConversionMap

type AlbumConversionMap struct{ *ConversionMap }

func CreateAlbumConversionMap

func CreateAlbumConversionMap() AlbumConversionMap

func (AlbumConversionMap) Get

func (lm AlbumConversionMap) Get(artistName, albumName string) (db.Album, string, bool)

func (AlbumConversionMap) Merge

func (lm AlbumConversionMap) Merge(target AlbumConversionMap)

func (AlbumConversionMap) Set

func (lm AlbumConversionMap) Set(artistName, albumName string, album db.Album)

type ArtistConversionCounter

type ArtistConversionCounter struct{ *ConversionMap }

func CreateArtistConversionCounter

func CreateArtistConversionCounter() ArtistConversionCounter

func (ArtistConversionCounter) Get

func (acm ArtistConversionCounter) Get(artistName string) (int32, string)

func (ArtistConversionCounter) Increment

func (acm ArtistConversionCounter) Increment(artistName string)

func (ArtistConversionCounter) Set

func (acm ArtistConversionCounter) Set(artistName string, value int32)

type ArtistConversionMap

type ArtistConversionMap struct{ *ConversionMap }

func CreateArtistConversionMap

func CreateArtistConversionMap() ArtistConversionMap

func (ArtistConversionMap) Get

func (am ArtistConversionMap) Get(artistName string) (db.Artist, string, bool)

func (ArtistConversionMap) Merge

func (am ArtistConversionMap) Merge(target ArtistConversionMap)

func (ArtistConversionMap) Set

func (am ArtistConversionMap) Set(artistName string, artist db.Artist)

type ContextKey

type ContextKey string
const ContextDiscordIDKey ContextKey = "doughnutDiscordID"
const ContextIsGowonKey ContextKey = "isGowon"

type ConversionMap

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

func (ConversionMap) GetMap

func (cm ConversionMap) GetMap() map[string]ConversionMapItem

type ConversionMapItem

type ConversionMapItem struct {
	Key   string
	Value interface{}
}

type Date

type Date int

func (Date) MarshalGQL

func (d Date) MarshalGQL(w io.Writer)

func (*Date) UnmarshalGQL

func (d *Date) UnmarshalGQL(v interface{}) error

type RateYourMusicAlbumConversionMap

type RateYourMusicAlbumConversionMap struct{ *ConversionMap }

func CreateRateYourMusicAlbumConversionMap

func CreateRateYourMusicAlbumConversionMap() RateYourMusicAlbumConversionMap

func (RateYourMusicAlbumConversionMap) Get

func (RateYourMusicAlbumConversionMap) Set

type TagConversionMap

type TagConversionMap struct{ *ConversionMap }

func CreateTagConversionMap

func CreateTagConversionMap() TagConversionMap

func (TagConversionMap) Get

func (tm TagConversionMap) Get(tagName string) (db.Tag, string, bool)

func (TagConversionMap) Set

func (tm TagConversionMap) Set(tagName string, artist db.Tag)

type TrackConversionCounter

type TrackConversionCounter struct{ *ConversionMap }

func CreateTrackConversionCounter

func CreateTrackConversionCounter() TrackConversionCounter

func (TrackConversionCounter) Get

func (tcm TrackConversionCounter) Get(artistName, albumName, trackName string) (int32, string, string, string)

func (TrackConversionCounter) Increment

func (tcm TrackConversionCounter) Increment(artistName, albumName, trackName string)

type TrackConversionMap

type TrackConversionMap struct{ *ConversionMap }

func CreateTrackConversionMap

func CreateTrackConversionMap() TrackConversionMap

func (TrackConversionMap) Get

func (tm TrackConversionMap) Get(artistName, albumName, trackName string) (db.Track, string, bool)

func (TrackConversionMap) Merge

func (tm TrackConversionMap) Merge(target TrackConversionMap)

func (TrackConversionMap) Set

func (tm TrackConversionMap) Set(artistName, albumName, trackName string, track db.Track)

Jump to

Keyboard shortcuts

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