Documentation ¶
Overview ¶
Package resolvers implements resolvers for the GraphQL interface.
Index ¶
- func CreateNoAuthorisationError() error
- func GraphiQLHandler(w http.ResponseWriter, r *http.Request)
- func InitSchema(env *app.MetadataContext) *graphql.Schema
- func NewRelayHandler(env *app.MetadataContext) (*graphql.Schema, *relay.Handler)
- type BoolResponseResolver
- type ByCreationDate
- type ByUpdatedAt
- type CreateSTResponse
- type CreateSTResponseResolver
- func (r *CreateSTResponseResolver) DASHStreamingPath() string
- func (r *CreateSTResponseResolver) Error() *ErrorResolver
- func (r *CreateSTResponseResolver) HLSStreamingPath() string
- func (r *CreateSTResponseResolver) Jwt() string
- func (r *CreateSTResponseResolver) MetadataPath() string
- func (r *CreateSTResponseResolver) Streams() []*StreamResolver
- type EpisodeAddedEventResolver
- type EpisodeDeletedEventResolver
- type EpisodeFileResolver
- func (r *EpisodeFileResolver) FileName() string
- func (r *EpisodeFileResolver) FilePath() (string, error)
- func (r *EpisodeFileResolver) FileSize() string
- func (r *EpisodeFileResolver) Library() *LibraryResolver
- func (r *EpisodeFileResolver) Streams() (streams []*StreamResolver)
- func (r *EpisodeFileResolver) TotalDuration() *float64
- func (r *EpisodeFileResolver) UUID() string
- type EpisodeResolver
- func (r *EpisodeResolver) AirDate() string
- func (r *EpisodeResolver) EpisodeNumber() int32
- func (r *EpisodeResolver) Files() (files []*EpisodeFileResolver)
- func (r *EpisodeResolver) Name() string
- func (r *EpisodeResolver) Overview() string
- func (r *EpisodeResolver) PlayState(ctx context.Context) *PlayStateResolver
- func (r *EpisodeResolver) Season() *SeasonResolver
- func (r *EpisodeResolver) StillPath() string
- func (r *EpisodeResolver) TmdbID() int32
- func (r *EpisodeResolver) UUID() string
- type Error
- type ErrorResolver
- type InviteResolver
- type LibResResolv
- type Library
- type LibraryResolver
- func (r *LibraryResolver) Backend() int32
- func (r *LibraryResolver) Episodes() (eps []*EpisodeResolver)
- func (r *LibraryResolver) FilePath() string
- func (r *LibraryResolver) Healthy() bool
- func (r *LibraryResolver) ID() int32
- func (r *LibraryResolver) IsRefreshing() bool
- func (r *LibraryResolver) Kind() int32
- func (r *LibraryResolver) Movies(ctx context.Context) []*MovieResolver
- func (r *LibraryResolver) Name() string
- func (r *LibraryResolver) RcloneName() *string
- func (r *LibraryResolver) Series() (series []*SeriesResolver)
- type LibraryResponse
- type MediaItemResolver
- type MediaStatsResolver
- type MetadataEventResolver
- func (r *MetadataEventResolver) ToEpisodeAddedEvent() (*EpisodeAddedEventResolver, bool)
- func (r *MetadataEventResolver) ToEpisodeDeletedEvent() (*EpisodeDeletedEventResolver, bool)
- func (r *MetadataEventResolver) ToMovieAddedEvent() (*MovieAddedEventResolver, bool)
- func (r *MetadataEventResolver) ToMovieDeletedEvent() (*MovieDeletedEventResolver, bool)
- func (r *MetadataEventResolver) ToMovieUpdatedEvent() (*MovieUpdatedEventResolver, bool)
- func (r *MetadataEventResolver) ToSeasonAddedEvent() (*SeasonAddedEventResolver, bool)
- func (r *MetadataEventResolver) ToSeasonDeletedEvent() (*SeasonDeletedEventResolver, bool)
- func (r *MetadataEventResolver) ToSeriesAddedEvent() (*SeriesAddedEventResolver, bool)
- func (r *MetadataEventResolver) ToSeriesDeletedEvent() (*SeriesDeletedEventResolver, bool)
- type MovieAddedEventResolver
- type MovieDeletedEventResolver
- type MovieFileResolver
- func (r *MovieFileResolver) FileName() string
- func (r *MovieFileResolver) FilePath() (string, error)
- func (r *MovieFileResolver) FileSize() string
- func (r *MovieFileResolver) Library() *LibraryResolver
- func (r *MovieFileResolver) LibraryID() int32
- func (r *MovieFileResolver) Streams() (streams []*StreamResolver)
- func (r *MovieFileResolver) TotalDuration() *float64
- func (r *MovieFileResolver) UUID() string
- type MovieResolver
- func (r *MovieResolver) BackdropPath() string
- func (r *MovieResolver) Files() (res []*MovieFileResolver)
- func (r *MovieResolver) ImdbID() string
- func (r *MovieResolver) Name() string
- func (r *MovieResolver) Overview() string
- func (r *MovieResolver) PlayState(ctx context.Context) *PlayStateResolver
- func (r *MovieResolver) PosterPath() string
- func (r *MovieResolver) PosterURL(ctx context.Context, args *posterURLArgs) string
- func (r *MovieResolver) Title() string
- func (r *MovieResolver) TmdbID() int32
- func (r *MovieResolver) UUID() string
- func (r *MovieResolver) Year() string
- type MovieSort
- type MovieUpdatedEventResolver
- type NearbyEpisodesQueryArgs
- type NearbyEpisodesResolver
- type PlayStateResolver
- type PlayStateResponseResolver
- type Resolver
- func (r *Resolver) AddLibraryManager(lib *db.Library)
- func (r *Resolver) CreateLibrary(ctx context.Context, args *createLibraryArgs) *LibResResolv
- func (r *Resolver) CreatePlayState(ctx context.Context, args *playStateArgs) *PlayStateResponseResolver
- func (r *Resolver) CreateStreamingTicket(ctx context.Context, args *struct{ UUID string }) *CreateSTResponseResolver
- func (r *Resolver) CreateUserInvite(ctx context.Context) *UserInviteResponseResolver
- func (r *Resolver) DeleteLibrary(ctx context.Context, args struct{ ... }) *LibResResolv
- func (r *Resolver) DeleteUser(ctx context.Context, args struct{ ... }) *UserResponseResolver
- func (r *Resolver) Episode(ctx context.Context, args *mustUUIDArgs) *EpisodeResolver
- func (r *Resolver) Folders(ctx context.Context, args *folderArgs) (folders []*string)
- func (r *Resolver) Invites(ctx context.Context) *[]*InviteResolver
- func (r *Resolver) Libraries(ctx context.Context) []*LibraryResolver
- func (r *Resolver) MediaStats(ctx context.Context) *MediaStatsResolver
- func (r *Resolver) Movies(ctx context.Context, args *movieQueryArgs) []*MovieResolver
- func (r *Resolver) MoviesChanged(ctx context.Context) <-chan *MetadataEventResolver
- func (r *Resolver) NearbyEpisodes(_ context.Context, args *NearbyEpisodesQueryArgs) *NearbyEpisodesResolver
- func (r *Resolver) RecentlyAdded(ctx context.Context) *[]*MediaItemResolver
- func (r *Resolver) RefreshAgentMetadata(ctx context.Context, args struct{ ... }) bool
- func (r *Resolver) Remotes() (remotes []*string)
- func (r *Resolver) RescanLibraries(ctx context.Context) bool
- func (r *Resolver) RescanLibrary(ctx context.Context, args struct{ ... }) bool
- func (r *Resolver) Search(args *searchArgs) *[]*SearchItemResolver
- func (r *Resolver) Season(ctx context.Context, args *mustUUIDArgs) *SeasonResolver
- func (r *Resolver) SeasonChanged(ctx context.Context, args *seasonChangedArgs) (<-chan *MetadataEventResolver, error)
- func (r *Resolver) Series(ctx context.Context, args *seriesQueryArgs) []*SeriesResolver
- func (r *Resolver) SeriesChanged(ctx context.Context) <-chan *MetadataEventResolver
- func (r *Resolver) TmdbSearchMovies(ctx context.Context, args *tmdbSearchMoviesArgs) ([]*TmdbMovieSearchItemResolver, error)
- func (r *Resolver) TmdbSearchSeries(ctx context.Context, args *tmdbSearchSeriesArgs) ([]*TmdbSeriesSearchItemResolver, error)
- func (r *Resolver) UnidentifiedEpisodeFiles(args *unidentifiedEpisodeFilesArgs) []*EpisodeFileResolver
- func (r *Resolver) UnidentifiedMovieFiles(ctx context.Context, args *unidentifiedMovieFilesArgs) []*MovieFileResolver
- func (r *Resolver) UpNext(ctx context.Context) *[]*MediaItemResolver
- func (r *Resolver) UpdateEpisodeFileMetadata(ctx context.Context, args ...) *UpdateEpisodeFileMetadataPayloadResolver
- func (r *Resolver) UpdateMovieFileMetadata(ctx context.Context, args *struct{ Input UpdateMovieFileMetadataInput }) *UpdateMovieFileMetadataPayloadResolver
- func (r *Resolver) UpdateStreams(args *mustUUIDArgs) bool
- func (r *Resolver) Users(ctx context.Context) (users []*UserResolver)
- type SearchItemResolver
- type SeasonAddedEventResolver
- type SeasonDeletedEventResolver
- type SeasonResolver
- func (r *SeasonResolver) AirDate() string
- func (r *SeasonResolver) Episodes() []*EpisodeResolver
- func (r *SeasonResolver) Name() string
- func (r *SeasonResolver) Overview() string
- func (r *SeasonResolver) PosterPath() string
- func (r *SeasonResolver) SeasonNumber() int32
- func (r *SeasonResolver) Series() *SeriesResolver
- func (r *SeasonResolver) TmdbID() int32
- func (r *SeasonResolver) UUID() string
- func (r *SeasonResolver) UnwatchedEpisodesCount(ctx context.Context) int32
- type SeriesAddedEventResolver
- type SeriesDeletedEventResolver
- type SeriesResolver
- func (r *SeriesResolver) BackdropPath() string
- func (r *SeriesResolver) FirstAirDate() string
- func (r *SeriesResolver) Name() string
- func (r *SeriesResolver) OriginalName() string
- func (r *SeriesResolver) Overview() string
- func (r *SeriesResolver) PosterPath() string
- func (r *SeriesResolver) Seasons() []*SeasonResolver
- func (r *SeriesResolver) Status() string
- func (r *SeriesResolver) TmdbID() int32
- func (r *SeriesResolver) Type() string
- func (r *SeriesResolver) UUID() string
- func (r *SeriesResolver) UnwatchedEpisodesCount(ctx context.Context) int32
- type SeriesSort
- type StreamResolver
- func (r *StreamResolver) BitRate() *int32
- func (r *StreamResolver) CodecMime() *string
- func (r *StreamResolver) CodecName() *string
- func (r *StreamResolver) Language() *string
- func (r *StreamResolver) Profile() *string
- func (r *StreamResolver) Resolution() *string
- func (r *StreamResolver) StreamID() *int32
- func (r *StreamResolver) StreamType() *string
- func (r *StreamResolver) StreamURL() *string
- func (r *StreamResolver) Title() *string
- func (r *StreamResolver) TotalDuration() *float64
- type TmdbMovieSearchItemResolver
- func (r *TmdbMovieSearchItemResolver) BackdropPath() string
- func (r *TmdbMovieSearchItemResolver) Overview() string
- func (r *TmdbMovieSearchItemResolver) PosterPath() string
- func (r *TmdbMovieSearchItemResolver) ReleaseYear() (*int32, error)
- func (r *TmdbMovieSearchItemResolver) Title() string
- func (r *TmdbMovieSearchItemResolver) TmdbID() int32
- type TmdbSeriesSearchItemResolver
- type UpdateEpisodeFileMetadataInput
- type UpdateEpisodeFileMetadataPayloadResolver
- type UpdateMovieFileMetadataInput
- type UpdateMovieFileMetadataPayloadResolver
- type UserInviteResponse
- type UserInviteResponseResolver
- type UserResolver
- type UserResponse
- type UserResponseResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNoAuthorisationError ¶
func CreateNoAuthorisationError() error
CreateNoAuthorisationError returns a standard error for unauthorised requests.
func GraphiQLHandler ¶
func GraphiQLHandler(w http.ResponseWriter, r *http.Request)
GraphiQLHandler returns graphql handler.
func InitSchema ¶
func InitSchema(env *app.MetadataContext) *graphql.Schema
InitSchema inits the graphql schema.
func NewRelayHandler ¶
func NewRelayHandler(env *app.MetadataContext) (*graphql.Schema, *relay.Handler)
NewRelayHandler handles graphql requests.
Types ¶
type BoolResponseResolver ¶
type BoolResponseResolver struct {
// contains filtered or unexported fields
}
BoolResponseResolver is a resolver with a bool success flag
func (*BoolResponseResolver) Success ¶
func (bs *BoolResponseResolver) Success() bool
Success resolves success
type ByCreationDate ¶
type ByCreationDate []sortable
ByCreationDate is a sortable type to sort by creation date.
func (ByCreationDate) Len ¶
func (a ByCreationDate) Len() int
func (ByCreationDate) Less ¶
func (a ByCreationDate) Less(i, j int) bool
func (ByCreationDate) Swap ¶
func (a ByCreationDate) Swap(i, j int)
type ByUpdatedAt ¶
type ByUpdatedAt []sortable
ByUpdatedAt is a sortable type to sort by updated_at date.
func (ByUpdatedAt) Len ¶
func (a ByUpdatedAt) Len() int
func (ByUpdatedAt) Less ¶
func (a ByUpdatedAt) Less(i, j int) bool
func (ByUpdatedAt) Swap ¶
func (a ByUpdatedAt) Swap(i, j int)
type CreateSTResponse ¶
type CreateSTResponse struct { Error *ErrorResolver Jwt string MetadataPath string DASHStreamingPath string HLSStreamingPath string Streams []*StreamResolver }
CreateSTResponse holds new jwt data.
type CreateSTResponseResolver ¶
type CreateSTResponseResolver struct {
// contains filtered or unexported fields
}
CreateSTResponseResolver resolves CreateSTResponse.
func (*CreateSTResponseResolver) DASHStreamingPath ¶
func (r *CreateSTResponseResolver) DASHStreamingPath() string
DASHStreamingPath returns URI to DASH manifest.
func (*CreateSTResponseResolver) Error ¶
func (r *CreateSTResponseResolver) Error() *ErrorResolver
Error returns error.
func (*CreateSTResponseResolver) HLSStreamingPath ¶
func (r *CreateSTResponseResolver) HLSStreamingPath() string
HLSStreamingPath returns URI to HLS manifest.
func (*CreateSTResponseResolver) Jwt ¶
func (r *CreateSTResponseResolver) Jwt() string
Jwt returns streaming token.
func (*CreateSTResponseResolver) MetadataPath ¶
func (r *CreateSTResponseResolver) MetadataPath() string
MetadataPath has the path to the various metadata codecs
func (*CreateSTResponseResolver) Streams ¶ added in v0.2.0
func (r *CreateSTResponseResolver) Streams() []*StreamResolver
Streams returns all known streams for the file in question
type EpisodeAddedEventResolver ¶ added in v0.3.3
type EpisodeAddedEventResolver struct {
// contains filtered or unexported fields
}
func (*EpisodeAddedEventResolver) Episode ¶ added in v0.3.3
func (r *EpisodeAddedEventResolver) Episode() *EpisodeResolver
type EpisodeDeletedEventResolver ¶ added in v0.3.3
type EpisodeDeletedEventResolver struct {
// contains filtered or unexported fields
}
func (*EpisodeDeletedEventResolver) EpisodeUUID ¶ added in v0.3.3
func (r *EpisodeDeletedEventResolver) EpisodeUUID() string
type EpisodeFileResolver ¶
type EpisodeFileResolver struct {
// contains filtered or unexported fields
}
EpisodeFileResolver resolves episodefile.
func (*EpisodeFileResolver) FileName ¶
func (r *EpisodeFileResolver) FileName() string
FileName returns filename.
func (*EpisodeFileResolver) FilePath ¶
func (r *EpisodeFileResolver) FilePath() (string, error)
FilePath returns filesystem path to file.
func (*EpisodeFileResolver) FileSize ¶
func (r *EpisodeFileResolver) FileSize() string
FileSize returns episode filesize
func (*EpisodeFileResolver) Library ¶ added in v0.2.0
func (r *EpisodeFileResolver) Library() *LibraryResolver
Library returns library
func (*EpisodeFileResolver) Streams ¶
func (r *EpisodeFileResolver) Streams() (streams []*StreamResolver)
Streams return stream information.
func (*EpisodeFileResolver) TotalDuration ¶
func (r *EpisodeFileResolver) TotalDuration() *float64
TotalDuration returns the total duration in seconds based on the first encountered videostream.
type EpisodeResolver ¶
type EpisodeResolver struct {
// contains filtered or unexported fields
}
EpisodeResolver resolves episode.
func (*EpisodeResolver) AirDate ¶
func (r *EpisodeResolver) AirDate() string
AirDate returns air date.
func (*EpisodeResolver) EpisodeNumber ¶
func (r *EpisodeResolver) EpisodeNumber() int32
EpisodeNumber returns episode number.
func (*EpisodeResolver) Files ¶
func (r *EpisodeResolver) Files() (files []*EpisodeFileResolver)
Files return all files for this episode.
func (*EpisodeResolver) Overview ¶
func (r *EpisodeResolver) Overview() string
Overview returns overview.
func (*EpisodeResolver) PlayState ¶
func (r *EpisodeResolver) PlayState(ctx context.Context) *PlayStateResolver
PlayState returns episode playstate information.
func (*EpisodeResolver) Season ¶
func (r *EpisodeResolver) Season() *SeasonResolver
Season returns the season the episode belongs to.
func (*EpisodeResolver) StillPath ¶
func (r *EpisodeResolver) StillPath() string
StillPath returns uri to still image.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is a generic user level error.
type ErrorResolver ¶
type ErrorResolver struct {
// contains filtered or unexported fields
}
ErrorResolver holds error information.
func CreateErrResolver ¶
func CreateErrResolver(err error) *ErrorResolver
CreateErrResolver creates a resolver around the given error.
func (*ErrorResolver) HasError ¶
func (r *ErrorResolver) HasError() bool
HasError returns bool if an error has been found.
func (*ErrorResolver) Message ¶
func (r *ErrorResolver) Message() string
Message returns the error message.
type InviteResolver ¶
type InviteResolver struct {
// contains filtered or unexported fields
}
InviteResolver is a resolver for the invite model.
func (*InviteResolver) Code ¶
func (ir *InviteResolver) Code() *string
Code returns the invite code.
func (*InviteResolver) User ¶
func (ir *InviteResolver) User() (*UserResolver, error)
User returns the user who redeemed this invite.
type LibResResolv ¶
type LibResResolv struct {
// contains filtered or unexported fields
}
LibResResolv holds a library response.
func (*LibResResolv) Library ¶
func (r *LibResResolv) Library() *LibraryResolver
Library returns the library.
type Library ¶
type Library struct { db.Library Movies []*MovieResolver Episodes []*EpisodeResolver }
Library wrapper around the db.Library package so it can contain related resolvers.
type LibraryResolver ¶
type LibraryResolver struct {
// contains filtered or unexported fields
}
LibraryResolver resolver for Library.
func (*LibraryResolver) Backend ¶ added in v0.2.0
func (r *LibraryResolver) Backend() int32
Backend returns library's backend type
func (*LibraryResolver) Episodes ¶
func (r *LibraryResolver) Episodes() (eps []*EpisodeResolver)
Episodes returns episodes in Library.
func (*LibraryResolver) FilePath ¶
func (r *LibraryResolver) FilePath() string
FilePath returns filesystem path for library.
func (*LibraryResolver) Healthy ¶ added in v0.2.0
func (r *LibraryResolver) Healthy() bool
Healthy returns library name
func (*LibraryResolver) IsRefreshing ¶ added in v0.1.2
func (r *LibraryResolver) IsRefreshing() bool
IsRefreshing tells us whether the library is currently doing a scan.
func (*LibraryResolver) Movies ¶
func (r *LibraryResolver) Movies(ctx context.Context) []*MovieResolver
Movies returns movies in Library.
func (*LibraryResolver) RcloneName ¶ added in v0.2.0
func (r *LibraryResolver) RcloneName() *string
RcloneName returns library Rclonename
func (*LibraryResolver) Series ¶ added in v0.4.0
func (r *LibraryResolver) Series() (series []*SeriesResolver)
Series return seasons based on episodes in a Library.
type LibraryResponse ¶
type LibraryResponse struct { Error *ErrorResolver Library *LibraryResolver }
LibraryResponse generic response.
type MediaItemResolver ¶
type MediaItemResolver struct {
// contains filtered or unexported fields
}
MediaItemResolver is a resolver around media types.
func (*MediaItemResolver) ToEpisode ¶
func (r *MediaItemResolver) ToEpisode() (*EpisodeResolver, bool)
ToEpisode tries to convert media to Episode
func (*MediaItemResolver) ToMovie ¶
func (r *MediaItemResolver) ToMovie() (*MovieResolver, bool)
ToMovie tries to convert media to Movie
type MediaStatsResolver ¶ added in v0.4.0
type MediaStatsResolver struct{}
func (*MediaStatsResolver) EpisodeCount ¶ added in v0.4.0
func (r *MediaStatsResolver) EpisodeCount() (int32, error)
func (*MediaStatsResolver) MovieCount ¶ added in v0.4.0
func (r *MediaStatsResolver) MovieCount() (int32, error)
func (*MediaStatsResolver) SeasonCount ¶ added in v0.4.0
func (r *MediaStatsResolver) SeasonCount() (int32, error)
func (*MediaStatsResolver) SeriesCount ¶ added in v0.4.0
func (r *MediaStatsResolver) SeriesCount() (int32, error)
type MetadataEventResolver ¶ added in v0.3.3
type MetadataEventResolver struct {
// contains filtered or unexported fields
}
func ToEventResolver ¶ added in v0.3.3
func ToEventResolver(e *metadata.MetadataEvent) *MetadataEventResolver
func (*MetadataEventResolver) ToEpisodeAddedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToEpisodeAddedEvent() (*EpisodeAddedEventResolver, bool)
func (*MetadataEventResolver) ToEpisodeDeletedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToEpisodeDeletedEvent() (*EpisodeDeletedEventResolver, bool)
func (*MetadataEventResolver) ToMovieAddedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToMovieAddedEvent() (*MovieAddedEventResolver, bool)
func (*MetadataEventResolver) ToMovieDeletedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToMovieDeletedEvent() (*MovieDeletedEventResolver, bool)
func (*MetadataEventResolver) ToMovieUpdatedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToMovieUpdatedEvent() (*MovieUpdatedEventResolver, bool)
func (*MetadataEventResolver) ToSeasonAddedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToSeasonAddedEvent() (*SeasonAddedEventResolver, bool)
func (*MetadataEventResolver) ToSeasonDeletedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToSeasonDeletedEvent() (*SeasonDeletedEventResolver, bool)
func (*MetadataEventResolver) ToSeriesAddedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToSeriesAddedEvent() (*SeriesAddedEventResolver, bool)
func (*MetadataEventResolver) ToSeriesDeletedEvent ¶ added in v0.3.3
func (r *MetadataEventResolver) ToSeriesDeletedEvent() (*SeriesDeletedEventResolver, bool)
type MovieAddedEventResolver ¶ added in v0.3.3
type MovieAddedEventResolver struct {
// contains filtered or unexported fields
}
func (*MovieAddedEventResolver) Movie ¶ added in v0.3.3
func (r *MovieAddedEventResolver) Movie() *MovieResolver
type MovieDeletedEventResolver ¶ added in v0.3.3
type MovieDeletedEventResolver struct {
// contains filtered or unexported fields
}
func (*MovieDeletedEventResolver) MovieUUID ¶ added in v0.3.3
func (r *MovieDeletedEventResolver) MovieUUID() string
type MovieFileResolver ¶
type MovieFileResolver struct {
// contains filtered or unexported fields
}
MovieFileResolver resolves the movie information
func (*MovieFileResolver) FileName ¶
func (r *MovieFileResolver) FileName() string
FileName returns movie filename
func (*MovieFileResolver) FilePath ¶
func (r *MovieFileResolver) FilePath() (string, error)
FilePath returns filesystem path
func (*MovieFileResolver) FileSize ¶
func (r *MovieFileResolver) FileSize() string
FileSize returns movie filesize
func (*MovieFileResolver) Library ¶ added in v0.2.0
func (r *MovieFileResolver) Library() *LibraryResolver
Library returns library
func (*MovieFileResolver) LibraryID ¶
func (r *MovieFileResolver) LibraryID() int32
LibraryID returns library id
func (*MovieFileResolver) Streams ¶
func (r *MovieFileResolver) Streams() (streams []*StreamResolver)
Streams return all streams
func (*MovieFileResolver) TotalDuration ¶
func (r *MovieFileResolver) TotalDuration() *float64
TotalDuration returns the total duration in seconds based on the first encountered videostream.
type MovieResolver ¶
type MovieResolver struct {
// contains filtered or unexported fields
}
MovieResolver is a resolver for movies.
func (*MovieResolver) BackdropPath ¶
func (r *MovieResolver) BackdropPath() string
BackdropPath returns backdrop
func (*MovieResolver) Files ¶
func (r *MovieResolver) Files() (res []*MovieFileResolver)
Files return files for movie.
func (*MovieResolver) Overview ¶
func (r *MovieResolver) Overview() string
Overview returns movie summary
func (*MovieResolver) PlayState ¶
func (r *MovieResolver) PlayState(ctx context.Context) *PlayStateResolver
PlayState returns playstate for given user.
func (*MovieResolver) PosterPath ¶
func (r *MovieResolver) PosterPath() string
PosterPath returns poster
type MovieUpdatedEventResolver ¶ added in v0.3.3
type MovieUpdatedEventResolver struct {
// contains filtered or unexported fields
}
func (*MovieUpdatedEventResolver) Movie ¶ added in v0.3.3
func (r *MovieUpdatedEventResolver) Movie() *MovieResolver
type NearbyEpisodesQueryArgs ¶ added in v0.4.0
NearbyEpisodesQueryArgs contains the arguments that can be passed into the nearbyEpisodes query
type NearbyEpisodesResolver ¶ added in v0.4.0
type NearbyEpisodesResolver struct {
// contains filtered or unexported fields
}
NearbyEpisodesResolver resolves the episodes directly before and after any given episode, identified by its UUID.
func (*NearbyEpisodesResolver) Next ¶ added in v0.4.0
func (r *NearbyEpisodesResolver) Next() ([]*EpisodeResolver, error)
Next returns the next n episodes before the one identified by the given UUID.
func (*NearbyEpisodesResolver) Previous ¶ added in v0.4.0
func (r *NearbyEpisodesResolver) Previous() ([]*EpisodeResolver, error)
Previous returns the previous n episodes before the one identified by the given UUID.
type PlayStateResolver ¶
type PlayStateResolver struct {
// contains filtered or unexported fields
}
PlayStateResolver resolves playstate
func (*PlayStateResolver) Finished ¶
func (res *PlayStateResolver) Finished() bool
Finished returns a bool when content has been watched.
func (*PlayStateResolver) Playtime ¶
func (res *PlayStateResolver) Playtime() float64
Playtime current playtime.
func (*PlayStateResolver) UUID ¶
func (res *PlayStateResolver) UUID() string
UUID returns UUID of the mediaItem
type PlayStateResponseResolver ¶
type PlayStateResponseResolver struct {
// contains filtered or unexported fields
}
PlayStateResponseResolver returns whether the playstate was created.
func (*PlayStateResponseResolver) PlayState ¶
func (res *PlayStateResponseResolver) PlayState() *PlayStateResolver
PlayState holds the ps object
func (*PlayStateResponseResolver) Success ¶
func (res *PlayStateResponseResolver) Success() bool
Success returns true if successfully created.
func (*PlayStateResponseResolver) UUID ¶
func (res *PlayStateResponseResolver) UUID() string
UUID mediaitem
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver container object for all resolvers.
func NewResolver ¶ added in v0.3.0
func NewResolver(env *app.MetadataContext) *Resolver
NewResolver creates a new resolver
func (*Resolver) AddLibraryManager ¶ added in v0.3.0
AddLibraryManager adds a new manager
func (*Resolver) CreateLibrary ¶
func (r *Resolver) CreateLibrary(ctx context.Context, args *createLibraryArgs) *LibResResolv
CreateLibrary creates a library.
func (*Resolver) CreatePlayState ¶
func (r *Resolver) CreatePlayState(ctx context.Context, args *playStateArgs) *PlayStateResponseResolver
CreatePlayState creates a new playstate (or overwrite an existing one) for the given media.
func (*Resolver) CreateStreamingTicket ¶
func (r *Resolver) CreateStreamingTicket(ctx context.Context, args *struct{ UUID string }) *CreateSTResponseResolver
CreateStreamingTicket create a new streaming request for the given content.
func (*Resolver) CreateUserInvite ¶
func (r *Resolver) CreateUserInvite(ctx context.Context) *UserInviteResponseResolver
CreateUserInvite creates a new invite code.
func (*Resolver) DeleteLibrary ¶
func (r *Resolver) DeleteLibrary(ctx context.Context, args struct{ ID int32 }) *LibResResolv
DeleteLibrary deletes a library.
func (*Resolver) DeleteUser ¶
func (r *Resolver) DeleteUser(ctx context.Context, args struct{ ID int32 }) *UserResponseResolver
DeleteUser deletes the given user.
func (*Resolver) Episode ¶
func (r *Resolver) Episode(ctx context.Context, args *mustUUIDArgs) *EpisodeResolver
Episode returns episode.
func (*Resolver) Folders ¶ added in v0.4.0
Remotes returns all Folders in the given path, takes a FileLocator and returns all folders in the given folder
func (*Resolver) Invites ¶
func (r *Resolver) Invites(ctx context.Context) *[]*InviteResolver
Invites returns all current invites.
func (*Resolver) Libraries ¶
func (r *Resolver) Libraries(ctx context.Context) []*LibraryResolver
Libraries return all libraries.
func (*Resolver) MediaStats ¶ added in v0.4.0
func (r *Resolver) MediaStats(ctx context.Context) *MediaStatsResolver
MediaStats returns some stats about the media in your server
func (*Resolver) Movies ¶
func (r *Resolver) Movies(ctx context.Context, args *movieQueryArgs) []*MovieResolver
Movies returns all movies.
func (*Resolver) MoviesChanged ¶ added in v0.3.3
func (r *Resolver) MoviesChanged(ctx context.Context) <-chan *MetadataEventResolver
func (*Resolver) NearbyEpisodes ¶ added in v0.4.0
func (r *Resolver) NearbyEpisodes(_ context.Context, args *NearbyEpisodesQueryArgs) *NearbyEpisodesResolver
NearbyEpisodes returns the next "x" episodes before and after the episode identified by the provided UUID.
func (*Resolver) RecentlyAdded ¶
func (r *Resolver) RecentlyAdded(ctx context.Context) *[]*MediaItemResolver
RecentlyAdded returns recently added media content.
func (*Resolver) RefreshAgentMetadata ¶
func (r *Resolver) RefreshAgentMetadata(ctx context.Context, args struct { LibraryID *int32 UUID *string }) bool
RefreshAgentMetadata refreshes all metadata from agent
func (*Resolver) RescanLibraries ¶
RescanLibraries rescans all libraries for new files.
func (*Resolver) RescanLibrary ¶ added in v0.4.0
func (r *Resolver) RescanLibrary(ctx context.Context, args struct { ID *int32 FilePath *string }) bool
RescanLibrary can scan (parts) of a Library
func (*Resolver) Search ¶
func (r *Resolver) Search(args *searchArgs) *[]*SearchItemResolver
Search searches for media content.
func (*Resolver) Season ¶
func (r *Resolver) Season(ctx context.Context, args *mustUUIDArgs) *SeasonResolver
Season returns season.
func (*Resolver) SeasonChanged ¶ added in v0.3.3
func (r *Resolver) SeasonChanged( ctx context.Context, args *seasonChangedArgs) (<-chan *MetadataEventResolver, error)
func (*Resolver) Series ¶
func (r *Resolver) Series(ctx context.Context, args *seriesQueryArgs) []*SeriesResolver
Series return series.
func (*Resolver) SeriesChanged ¶ added in v0.3.3
func (r *Resolver) SeriesChanged(ctx context.Context) <-chan *MetadataEventResolver
func (*Resolver) TmdbSearchMovies ¶ added in v0.3.0
func (r *Resolver) TmdbSearchMovies(ctx context.Context, args *tmdbSearchMoviesArgs) ([]*TmdbMovieSearchItemResolver, error)
func (*Resolver) TmdbSearchSeries ¶ added in v0.3.0
func (r *Resolver) TmdbSearchSeries(ctx context.Context, args *tmdbSearchSeriesArgs) ([]*TmdbSeriesSearchItemResolver, error)
func (*Resolver) UnidentifiedEpisodeFiles ¶ added in v0.3.0
func (r *Resolver) UnidentifiedEpisodeFiles( args *unidentifiedEpisodeFilesArgs) []*EpisodeFileResolver
UnidentifiedEpisodeFiles returns unidentified episode files
func (*Resolver) UnidentifiedMovieFiles ¶ added in v0.3.0
func (r *Resolver) UnidentifiedMovieFiles( ctx context.Context, args *unidentifiedMovieFilesArgs) []*MovieFileResolver
UnidentifiedMovieFiles return unidentified movie files
func (*Resolver) UpNext ¶
func (r *Resolver) UpNext(ctx context.Context) *[]*MediaItemResolver
UpNext returns episode/movie that could populate a dashboard.
func (*Resolver) UpdateEpisodeFileMetadata ¶ added in v0.3.0
func (r *Resolver) UpdateEpisodeFileMetadata( ctx context.Context, args *struct { Input UpdateEpisodeFileMetadataInput }, ) *UpdateEpisodeFileMetadataPayloadResolver
UpdateEpisodeFileMetadata handles the updateMediaItemMetadata mutation
func (*Resolver) UpdateMovieFileMetadata ¶ added in v0.3.0
func (r *Resolver) UpdateMovieFileMetadata( ctx context.Context, args *struct{ Input UpdateMovieFileMetadataInput }, ) *UpdateMovieFileMetadataPayloadResolver
UpdateMovieFileMetadata handles the updateMediaItemMetadata mutation
func (*Resolver) UpdateStreams ¶
UpdateStreams is a resolver method for the UpdateStreams method
type SearchItemResolver ¶
type SearchItemResolver struct {
// contains filtered or unexported fields
}
SearchItemResolver wrapper around search items.
func (*SearchItemResolver) ToMovie ¶
func (r *SearchItemResolver) ToMovie() (*MovieResolver, bool)
ToMovie parses content to a movie.
func (*SearchItemResolver) ToSeries ¶
func (r *SearchItemResolver) ToSeries() (*SeriesResolver, bool)
ToSeries parses content to a series.
type SeasonAddedEventResolver ¶ added in v0.3.3
type SeasonAddedEventResolver struct {
// contains filtered or unexported fields
}
func (*SeasonAddedEventResolver) Season ¶ added in v0.3.3
func (r *SeasonAddedEventResolver) Season() *SeasonResolver
type SeasonDeletedEventResolver ¶ added in v0.3.3
type SeasonDeletedEventResolver struct {
// contains filtered or unexported fields
}
func (*SeasonDeletedEventResolver) SeasonUUID ¶ added in v0.3.3
func (r *SeasonDeletedEventResolver) SeasonUUID() string
type SeasonResolver ¶
type SeasonResolver struct {
// contains filtered or unexported fields
}
SeasonResolver resolves season
func (*SeasonResolver) AirDate ¶
func (r *SeasonResolver) AirDate() string
AirDate returns seasonal air date.
func (*SeasonResolver) Episodes ¶
func (r *SeasonResolver) Episodes() []*EpisodeResolver
Episodes returns seasonal episodes.
func (*SeasonResolver) Overview ¶
func (r *SeasonResolver) Overview() string
Overview returns season overview.
func (*SeasonResolver) PosterPath ¶
func (r *SeasonResolver) PosterPath() string
PosterPath resturn uri to poster.
func (*SeasonResolver) SeasonNumber ¶
func (r *SeasonResolver) SeasonNumber() int32
SeasonNumber returns season number.
func (*SeasonResolver) Series ¶
func (r *SeasonResolver) Series() *SeriesResolver
Series returns the series this season belongs to.
func (*SeasonResolver) UnwatchedEpisodesCount ¶
func (r *SeasonResolver) UnwatchedEpisodesCount(ctx context.Context) int32
UnwatchedEpisodesCount returns the amount of unwatched episodes for the given season
type SeriesAddedEventResolver ¶ added in v0.3.3
type SeriesAddedEventResolver struct {
// contains filtered or unexported fields
}
func (*SeriesAddedEventResolver) Series ¶ added in v0.3.3
func (r *SeriesAddedEventResolver) Series() *SeriesResolver
type SeriesDeletedEventResolver ¶ added in v0.3.3
type SeriesDeletedEventResolver struct {
// contains filtered or unexported fields
}
func (*SeriesDeletedEventResolver) SeriesUUID ¶ added in v0.3.3
func (r *SeriesDeletedEventResolver) SeriesUUID() string
type SeriesResolver ¶
type SeriesResolver struct {
// contains filtered or unexported fields
}
SeriesResolver resolvers a serie.
func (*SeriesResolver) BackdropPath ¶
func (r *SeriesResolver) BackdropPath() string
BackdropPath returns uri to backdrop.
func (*SeriesResolver) FirstAirDate ¶
func (r *SeriesResolver) FirstAirDate() string
FirstAirDate returns air date.
func (*SeriesResolver) OriginalName ¶ added in v0.4.0
func (r *SeriesResolver) OriginalName() string
OriginalName returns original name
func (*SeriesResolver) Overview ¶
func (r *SeriesResolver) Overview() string
Overview returns overview.
func (*SeriesResolver) PosterPath ¶
func (r *SeriesResolver) PosterPath() string
PosterPath resturn uri to poster.
func (*SeriesResolver) Seasons ¶
func (r *SeriesResolver) Seasons() []*SeasonResolver
Seasons returns all seasons.
func (*SeriesResolver) Status ¶
func (r *SeriesResolver) Status() string
Status returns serie status.
func (*SeriesResolver) UnwatchedEpisodesCount ¶
func (r *SeriesResolver) UnwatchedEpisodesCount(ctx context.Context) int32
UnwatchedEpisodesCount returns the amount of unwatched episodes for the given season
type SeriesSort ¶ added in v0.4.0
type SeriesSort string
func (*SeriesSort) ToString ¶ added in v0.4.0
func (ss *SeriesSort) ToString() string
type StreamResolver ¶
type StreamResolver struct {
// contains filtered or unexported fields
}
StreamResolver resolves stream information.
func (*StreamResolver) BitRate ¶
func (r *StreamResolver) BitRate() *int32
BitRate returns stream bitrate if a fixed bitrate is used.
func (*StreamResolver) CodecMime ¶
func (r *StreamResolver) CodecMime() *string
CodecMime returns codecmime
func (*StreamResolver) CodecName ¶
func (r *StreamResolver) CodecName() *string
CodecName returns codecname
func (*StreamResolver) Language ¶
func (r *StreamResolver) Language() *string
Language returns language information for the given string if present.
func (*StreamResolver) Profile ¶
func (r *StreamResolver) Profile() *string
Profile returns codec profile.
func (*StreamResolver) Resolution ¶
func (r *StreamResolver) Resolution() *string
Resolution returns stream resolution if present.
func (*StreamResolver) StreamID ¶
func (r *StreamResolver) StreamID() *int32
StreamID returns stream id.
func (*StreamResolver) StreamType ¶
func (r *StreamResolver) StreamType() *string
StreamType returns stream type (sub/audio/video)
func (*StreamResolver) StreamURL ¶ added in v0.2.0
func (r *StreamResolver) StreamURL() *string
StreamURL returns a streamURL
func (*StreamResolver) Title ¶
func (r *StreamResolver) Title() *string
Title returns stream title if present.
func (*StreamResolver) TotalDuration ¶
func (r *StreamResolver) TotalDuration() *float64
TotalDuration returns the total duriation of the stream in seconds.
type TmdbMovieSearchItemResolver ¶ added in v0.3.0
type TmdbMovieSearchItemResolver struct {
// contains filtered or unexported fields
}
func (*TmdbMovieSearchItemResolver) BackdropPath ¶ added in v0.3.0
func (r *TmdbMovieSearchItemResolver) BackdropPath() string
func (*TmdbMovieSearchItemResolver) Overview ¶ added in v0.3.0
func (r *TmdbMovieSearchItemResolver) Overview() string
func (*TmdbMovieSearchItemResolver) PosterPath ¶ added in v0.3.0
func (r *TmdbMovieSearchItemResolver) PosterPath() string
func (*TmdbMovieSearchItemResolver) ReleaseYear ¶ added in v0.3.0
func (r *TmdbMovieSearchItemResolver) ReleaseYear() (*int32, error)
func (*TmdbMovieSearchItemResolver) Title ¶ added in v0.3.0
func (r *TmdbMovieSearchItemResolver) Title() string
func (*TmdbMovieSearchItemResolver) TmdbID ¶ added in v0.3.0
func (r *TmdbMovieSearchItemResolver) TmdbID() int32
type TmdbSeriesSearchItemResolver ¶ added in v0.3.0
type TmdbSeriesSearchItemResolver struct {
// contains filtered or unexported fields
}
func (*TmdbSeriesSearchItemResolver) BackdropPath ¶ added in v0.3.0
func (r *TmdbSeriesSearchItemResolver) BackdropPath() string
func (*TmdbSeriesSearchItemResolver) FirstAirYear ¶ added in v0.3.0
func (r *TmdbSeriesSearchItemResolver) FirstAirYear() (*int32, error)
func (*TmdbSeriesSearchItemResolver) Name ¶ added in v0.3.0
func (r *TmdbSeriesSearchItemResolver) Name() string
func (*TmdbSeriesSearchItemResolver) PosterPath ¶ added in v0.3.0
func (r *TmdbSeriesSearchItemResolver) PosterPath() string
func (*TmdbSeriesSearchItemResolver) TmdbID ¶ added in v0.3.0
func (r *TmdbSeriesSearchItemResolver) TmdbID() int32
type UpdateEpisodeFileMetadataInput ¶ added in v0.3.0
type UpdateEpisodeFileMetadataInput struct { EpisodeFileUUID *string SeriesUUID *string TmdbID int32 }
UpdateEpisodeFileMetadataInput is a request
type UpdateEpisodeFileMetadataPayloadResolver ¶ added in v0.3.0
type UpdateEpisodeFileMetadataPayloadResolver struct {
// contains filtered or unexported fields
}
UpdateEpisodeFileMetadataPayloadResolver is the payload
func (*UpdateEpisodeFileMetadataPayloadResolver) Error ¶ added in v0.3.0
func (r *UpdateEpisodeFileMetadataPayloadResolver) Error() *ErrorResolver
Error returns error.
type UpdateMovieFileMetadataInput ¶ added in v0.3.0
UpdateMovieFileMetadataInput is a request
type UpdateMovieFileMetadataPayloadResolver ¶ added in v0.3.0
type UpdateMovieFileMetadataPayloadResolver struct {
// contains filtered or unexported fields
}
UpdateMovieFileMetadataPayloadResolver is the payload
func (*UpdateMovieFileMetadataPayloadResolver) Error ¶ added in v0.3.0
func (r *UpdateMovieFileMetadataPayloadResolver) Error() *ErrorResolver
Error returns error.
func (*UpdateMovieFileMetadataPayloadResolver) MediaItem ¶ added in v0.3.0
func (r *UpdateMovieFileMetadataPayloadResolver) MediaItem() *MediaItemResolver
MediaItem returns the media item
type UserInviteResponse ¶
type UserInviteResponse struct { Error *ErrorResolver Code string }
UserInviteResponse response when creating a new invite.
type UserInviteResponseResolver ¶
type UserInviteResponseResolver struct {
// contains filtered or unexported fields
}
UserInviteResponseResolver resolver.
func (*UserInviteResponseResolver) Code ¶
func (r *UserInviteResponseResolver) Code() string
Code returns the given invite code.
func (*UserInviteResponseResolver) Error ¶
func (r *UserInviteResponseResolver) Error() *ErrorResolver
Error returns the error for the given object.
type UserResolver ¶
type UserResolver struct {
// contains filtered or unexported fields
}
UserResolver resolves user.
type UserResponse ¶
type UserResponse struct { Error *ErrorResolver User *UserResolver }
UserResponse holds user information and error if needed.
type UserResponseResolver ¶
type UserResponseResolver struct {
// contains filtered or unexported fields
}
UserResponseResolver resolves userresponse.
func (*UserResponseResolver) Error ¶
func (r *UserResponseResolver) Error() *ErrorResolver
Error returns error.
func (*UserResponseResolver) User ¶
func (r *UserResponseResolver) User() *UserResolver
User returns user.
Source Files ¶
- folders.go
- graphiql.go
- helpers.go
- invites.go
- library.go
- media_item.go
- mediastats.go
- movies.go
- moviesort.go
- nearby_episodes.go
- pagination.go
- play_state.go
- queryargs.go
- recent.go
- remotes.go
- resolvers.go
- schema.go
- search.go
- series.go
- seriessort.go
- streaming_ticket.go
- streams.go
- subscriptions.go
- tmdb_search.go
- unidentified_episode_files.go
- unidentified_movie_files.go
- update_episode_file_metadata.go
- update_movie_file_metadata.go
- upnext.go
- users.go