gqlmodel

package
v0.0.0-...-61aba5b Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AlbumArtistName = "AlbumArtist"
View Source
const AlbumName = "Album"
View Source
const GenreName = "Genre"
View Source
const TrackName = "Track"

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	DiskNo        int    `json:"diskNo"`
	DiskTotal     int    `json:"diskTotal"`
	AlbumArtistID string `json:"albumArtist"`
}

func NewAlbum

func NewAlbum(album *dbmodel.Album) *Album

func NewAlbums

func NewAlbums(albums dbmodel.AlbumSlice) []*Album

func (Album) IsNode

func (Album) IsNode()

type AlbumArtist

type AlbumArtist struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func NewAlbumArtist

func NewAlbumArtist(albumArtist *dbmodel.AlbumArtist) *AlbumArtist

func NewAlbumArtists

func NewAlbumArtists(albumArtists dbmodel.AlbumArtistSlice) []*AlbumArtist

func (AlbumArtist) IsNode

func (AlbumArtist) IsNode()

type AlbumArtistEdge

type AlbumArtistEdge struct {
	Cursor string       `json:"cursor"`
	Node   *AlbumArtist `json:"node"`
}

func (AlbumArtistEdge) IsEdge

func (AlbumArtistEdge) IsEdge()

type AlbumArtistPagination

type AlbumArtistPagination struct {
	PageInfo *PaginationInfo    `json:"pageInfo"`
	Edges    []*AlbumArtistEdge `json:"edges"`
	Nodes    []*AlbumArtist     `json:"nodes"`
}

func NewAlbumArtistPagination

func NewAlbumArtistPagination(albumArtists dbmodel.AlbumArtistSlice, total int64, limit int, offset *int) *AlbumArtistPagination

func (AlbumArtistPagination) IsPagination

func (AlbumArtistPagination) IsPagination()

type AlbumEdge

type AlbumEdge struct {
	Cursor string `json:"cursor"`
	Node   *Album `json:"node"`
}

func (AlbumEdge) IsEdge

func (AlbumEdge) IsEdge()

type AlbumPagination

type AlbumPagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Edges    []*AlbumEdge    `json:"edges"`
	Nodes    []*Album        `json:"nodes"`
}

func NewAlbumPagination

func NewAlbumPagination(albums dbmodel.AlbumSlice, total int64, limit int, offset *int) *AlbumPagination

func (AlbumPagination) IsPagination

func (AlbumPagination) IsPagination()

type Connection

type Connection interface {
	IsConnection()
}

type Edge

type Edge interface {
	IsEdge()
}

type Genre

type Genre struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func NewGenre

func NewGenre(genre *dbmodel.Genre) *Genre

func NewGenres

func NewGenres(genres dbmodel.GenreSlice) []*Genre

func (Genre) IsNode

func (Genre) IsNode()

type GenreEdge

type GenreEdge struct {
	Cursor string `json:"cursor"`
	Node   *Genre `json:"node"`
}

func (GenreEdge) IsEdge

func (GenreEdge) IsEdge()

type GenrePagination

type GenrePagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Edges    []*GenreEdge    `json:"edges"`
	Nodes    []*Genre        `json:"nodes"`
}

func NewGenrePagination

func NewGenrePagination(genres dbmodel.GenreSlice, total int64, limit int, offset *int) *GenrePagination

func (GenrePagination) IsPagination

func (GenrePagination) IsPagination()

type Node

type Node interface {
	IsNode()
}

type PageInfo

type PageInfo struct {
	HasNextPage     bool    `json:"hasNextPage"`
	HasPreviousPage bool    `json:"hasPreviousPage"`
	StartCursor     *string `json:"startCursor"`
	EndCursor       *string `json:"endCursor"`
}

type Pagination

type Pagination interface {
	IsPagination()
}

type PaginationInfo

type PaginationInfo struct {
	Page             int  `json:"page"`
	PaginationLength int  `json:"paginationLength"`
	HasNextPage      bool `json:"hasNextPage"`
	HasPreviousPage  bool `json:"hasPreviousPage"`
	Count            int  `json:"count"`
	TotalCount       int  `json:"totalCount"`
	Limit            int  `json:"limit"`
	Offset           int  `json:"offset"`
}

type Track

type Track struct {
	ID            string `json:"id"`
	Title         string `json:"title"`
	Artist        string `json:"artist"`
	Composer      string `json:"composer"`
	TrackNo       int    `json:"trackNo"`
	Lyrics        string `json:"lyrics"`
	Comment       string `json:"comment"`
	Year          int    `json:"year"`
	URL           string `json:"url"`
	DownloadURL   string `json:"download_url"`
	AlbumID       string `json:"album"`
	GenreID       string `json:"genre"`
	AlbumArtistID string `json:"albumArtist"`
}

func NewTrack

func NewTrack(track *dbmodel.Track) *Track

func NewTracks

func NewTracks(tracks dbmodel.TrackSlice) []*Track

func (Track) IsNode

func (Track) IsNode()

type TrackEdge

type TrackEdge struct {
	Cursor string `json:"cursor"`
	Node   *Track `json:"node"`
}

func (TrackEdge) IsEdge

func (TrackEdge) IsEdge()

type TrackPagination

type TrackPagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Edges    []*TrackEdge    `json:"edges"`
	Nodes    []*Track        `json:"nodes"`
}

func NewTrackPagination

func NewTrackPagination(tracks dbmodel.TrackSlice, total int64, limit int, offset *int) *TrackPagination

func (TrackPagination) IsPagination

func (TrackPagination) IsPagination()

Jump to

Keyboard shortcuts

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