Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Album struct { Artist func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Tracks func(childComplexity int) int } AlbumCount struct { Album func(childComplexity int) int Playcount func(childComplexity int) int } AlbumTopTracksResponse struct { Album func(childComplexity int) int TopTracks func(childComplexity int) int } AmbiguousTrack struct { Albums func(childComplexity int) int Artist func(childComplexity int) int Name func(childComplexity int) int } AmbiguousTrackCount struct { Name func(childComplexity int) int Playcount func(childComplexity int) int } Artist struct { ID func(childComplexity int) int Name func(childComplexity int) int Tags func(childComplexity int) int } ArtistCount struct { Artist func(childComplexity int) int Playcount func(childComplexity int) int User func(childComplexity int) int } ArtistRankResponse struct { Above func(childComplexity int) int Artist func(childComplexity int) int Below func(childComplexity int) int Listeners func(childComplexity int) int Playcount func(childComplexity int) int Rank func(childComplexity int) int } ArtistSearchResult struct { ArtistID func(childComplexity int) int ArtistName func(childComplexity int) int GlobalPlaycount func(childComplexity int) int ListenerCount func(childComplexity int) int } ArtistSearchResults struct { Artists func(childComplexity int) int } ArtistTopAlbumsResponse struct { Artist func(childComplexity int) int TopAlbums func(childComplexity int) int } ArtistTopTracksResponse struct { Artist func(childComplexity int) int TopTracks func(childComplexity int) int } GuildMember struct { GuildID func(childComplexity int) int User func(childComplexity int) int UserID func(childComplexity int) int } Mutation struct { AddUserToGuild func(childComplexity int, discordID string, guildID string) int DeleteGuild func(childComplexity int, guildID string) int ImportRatings func(childComplexity int, csv string, user model.UserInput) int Login func(childComplexity int, username string, session *string, discordID string) int Logout func(childComplexity int, discordID string) int RemoveUserFromGuild func(childComplexity int, discordID string, guildID string) int SyncGuild func(childComplexity int, guildID string, discordIDs []string) int TagArtists func(childComplexity int, artists []*model.ArtistInput, tags []*model.TagInput, markAsChecked *bool) int UpdatePrivacy func(childComplexity int, user model.UserInput, privacy *model.Privacy) int } PageInfo struct { RecordCount func(childComplexity int) int } Play struct { ID func(childComplexity int) int ScrobbledAt func(childComplexity int) int Track func(childComplexity int) int User func(childComplexity int) int } PlaysResponse struct { PageInfo func(childComplexity int) int Plays func(childComplexity int) int } Query struct { AlbumPlays func(childComplexity int, user model.UserInput, settings *model.AlbumPlaysSettings) int AlbumTopTracks func(childComplexity int, user model.UserInput, album model.AlbumInput) int ArtistPlays func(childComplexity int, user model.UserInput, settings *model.ArtistPlaysSettings) int ArtistRank func(childComplexity int, artist model.ArtistInput, userInput model.UserInput, serverID *string) int ArtistTopAlbums func(childComplexity int, user model.UserInput, artist model.ArtistInput) int ArtistTopTracks func(childComplexity int, user model.UserInput, artist model.ArtistInput) int Artists func(childComplexity int, inputs []*model.ArtistInput, tag *model.TagInput, pageInput *model.PageInput, requireTagsForMissing *bool) int GuildMembers func(childComplexity int, guildID string) int Ping func(childComplexity int) int Plays func(childComplexity int, playsInput model.PlaysInput, pageInput *model.PageInput) int RateYourMusicArtist func(childComplexity int, keywords string) int Ratings func(childComplexity int, settings *model.RatingsSettings) int SearchArtist func(childComplexity int, criteria model.ArtistSearchCriteria, settings *model.SearchSettings) int Tags func(childComplexity int, settings *model.TagsSettings, requireTagsForMissing *bool) int TrackPlays func(childComplexity int, user model.UserInput, settings *model.TrackPlaysSettings) int TrackTopAlbums func(childComplexity int, user model.UserInput, track model.TrackInput) int Users func(childComplexity int, inputs []*model.UserInput) int WhoFirstArtist func(childComplexity int, artist model.ArtistInput, settings *model.WhoKnowsSettings, whoLast *bool) int WhoKnowsAlbum func(childComplexity int, album model.AlbumInput, settings *model.WhoKnowsSettings) int WhoKnowsArtist func(childComplexity int, artist model.ArtistInput, settings *model.WhoKnowsSettings) int WhoKnowsTrack func(childComplexity int, track model.TrackInput, settings *model.WhoKnowsSettings) int } RateYourMusicAlbum struct { ArtistName func(childComplexity int) int ArtistNativeName func(childComplexity int) int RateYourMusicID func(childComplexity int) int ReleaseYear func(childComplexity int) int Title func(childComplexity int) int } RateYourMusicArtist struct { ArtistName func(childComplexity int) int ArtistNativeName func(childComplexity int) int } Rating struct { RateYourMusicAlbum func(childComplexity int) int Rating func(childComplexity int) int } RatingsResponse struct { PageInfo func(childComplexity int) int Ratings func(childComplexity int) int } Tag struct { Name func(childComplexity int) int Occurrences func(childComplexity int) int } TagsResponse struct { PageInfo func(childComplexity int) int Tags func(childComplexity int) int } TaskStartResponse struct { Success func(childComplexity int) int TaskName func(childComplexity int) int Token func(childComplexity int) int } Track struct { Album func(childComplexity int) int Artist func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int } TrackCount struct { Playcount func(childComplexity int) int Track func(childComplexity int) int } TrackTopAlbumsResponse struct { TopAlbums func(childComplexity int) int Track func(childComplexity int) int } User struct { DiscordID func(childComplexity int) int ID func(childComplexity int) int Privacy func(childComplexity int) int Username func(childComplexity int) int } WhoFirstArtistResponse struct { Artist func(childComplexity int) int Rows func(childComplexity int) int Undated func(childComplexity int) int } WhoFirstRow struct { ScrobbledAt func(childComplexity int) int User func(childComplexity int) int } WhoKnowsAlbumResponse struct { Album func(childComplexity int) int Rows func(childComplexity int) int } WhoKnowsArtistResponse struct { Artist func(childComplexity int) int Rows func(childComplexity int) int } WhoKnowsRow struct { Playcount func(childComplexity int) int User func(childComplexity int) int } WhoKnowsTrackResponse struct { Rows func(childComplexity int) int Track func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { Login(ctx context.Context, username string, session *string, discordID string) (*model.User, error) Logout(ctx context.Context, discordID string) (*string, error) UpdatePrivacy(ctx context.Context, user model.UserInput, privacy *model.Privacy) (*string, error) AddUserToGuild(ctx context.Context, discordID string, guildID string) (*model.GuildMember, error) RemoveUserFromGuild(ctx context.Context, discordID string, guildID string) (*string, error) SyncGuild(ctx context.Context, guildID string, discordIDs []string) (*string, error) DeleteGuild(ctx context.Context, guildID string) (*string, error) ImportRatings(ctx context.Context, csv string, user model.UserInput) (*string, error) TagArtists(ctx context.Context, artists []*model.ArtistInput, tags []*model.TagInput, markAsChecked *bool) (*string, error) }
type QueryResolver ¶
type QueryResolver interface { Ping(ctx context.Context) (string, error) Artists(ctx context.Context, inputs []*model.ArtistInput, tag *model.TagInput, pageInput *model.PageInput, requireTagsForMissing *bool) ([]*model.Artist, error) WhoKnowsArtist(ctx context.Context, artist model.ArtistInput, settings *model.WhoKnowsSettings) (*model.WhoKnowsArtistResponse, error) WhoKnowsAlbum(ctx context.Context, album model.AlbumInput, settings *model.WhoKnowsSettings) (*model.WhoKnowsAlbumResponse, error) WhoKnowsTrack(ctx context.Context, track model.TrackInput, settings *model.WhoKnowsSettings) (*model.WhoKnowsTrackResponse, error) ArtistRank(ctx context.Context, artist model.ArtistInput, userInput model.UserInput, serverID *string) (*model.ArtistRankResponse, error) WhoFirstArtist(ctx context.Context, artist model.ArtistInput, settings *model.WhoKnowsSettings, whoLast *bool) (*model.WhoFirstArtistResponse, error) GuildMembers(ctx context.Context, guildID string) ([]*model.GuildMember, error) Users(ctx context.Context, inputs []*model.UserInput) ([]*model.User, error) ArtistTopTracks(ctx context.Context, user model.UserInput, artist model.ArtistInput) (*model.ArtistTopTracksResponse, error) ArtistTopAlbums(ctx context.Context, user model.UserInput, artist model.ArtistInput) (*model.ArtistTopAlbumsResponse, error) AlbumTopTracks(ctx context.Context, user model.UserInput, album model.AlbumInput) (*model.AlbumTopTracksResponse, error) TrackTopAlbums(ctx context.Context, user model.UserInput, track model.TrackInput) (*model.TrackTopAlbumsResponse, error) SearchArtist(ctx context.Context, criteria model.ArtistSearchCriteria, settings *model.SearchSettings) (*model.ArtistSearchResults, error) Plays(ctx context.Context, playsInput model.PlaysInput, pageInput *model.PageInput) (*model.PlaysResponse, error) ArtistPlays(ctx context.Context, user model.UserInput, settings *model.ArtistPlaysSettings) ([]*model.ArtistCount, error) AlbumPlays(ctx context.Context, user model.UserInput, settings *model.AlbumPlaysSettings) ([]*model.AlbumCount, error) TrackPlays(ctx context.Context, user model.UserInput, settings *model.TrackPlaysSettings) ([]*model.AmbiguousTrackCount, error) Ratings(ctx context.Context, settings *model.RatingsSettings) (*model.RatingsResponse, error) RateYourMusicArtist(ctx context.Context, keywords string) (*model.RateYourMusicArtist, error) Tags(ctx context.Context, settings *model.TagsSettings, requireTagsForMissing *bool) (*model.TagsResponse, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.