gql

package
v0.10.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 21 Imported by: 0

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 {
	Content struct {
		Adult            func(childComplexity int) int
		Attributes       func(childComplexity int) int
		Collections      func(childComplexity int) int
		CreatedAt        func(childComplexity int) int
		ExternalLinks    func(childComplexity int) int
		ID               func(childComplexity int) int
		MetadataSource   func(childComplexity int) int
		OriginalLanguage func(childComplexity int) int
		OriginalTitle    func(childComplexity int) int
		Overview         func(childComplexity int) int
		Popularity       func(childComplexity int) int
		ReleaseDate      func(childComplexity int) int
		ReleaseYear      func(childComplexity int) int
		Runtime          func(childComplexity int) int
		Source           func(childComplexity int) int
		Title            func(childComplexity int) int
		Type             func(childComplexity int) int
		UpdatedAt        func(childComplexity int) int
		VoteAverage      func(childComplexity int) int
		VoteCount        func(childComplexity int) int
	}

	ContentAttribute struct {
		CreatedAt      func(childComplexity int) int
		Key            func(childComplexity int) int
		MetadataSource func(childComplexity int) int
		Source         func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
		Value          func(childComplexity int) int
	}

	ContentCollection struct {
		CreatedAt      func(childComplexity int) int
		ID             func(childComplexity int) int
		MetadataSource func(childComplexity int) int
		Name           func(childComplexity int) int
		Source         func(childComplexity int) int
		Type           func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
	}

	ContentTypeAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	Episodes struct {
		Label   func(childComplexity int) int
		Seasons func(childComplexity int) int
	}

	ExternalLink struct {
		MetadataSource func(childComplexity int) int
		Url            func(childComplexity int) int
	}

	GenreAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	HealthCheck struct {
		Error     func(childComplexity int) int
		Key       func(childComplexity int) int
		Status    func(childComplexity int) int
		Timestamp func(childComplexity int) int
	}

	HealthQuery struct {
		Checks func(childComplexity int) int
		Status func(childComplexity int) int
	}

	LanguageAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	LanguageInfo struct {
		Id   func(childComplexity int) int
		Name func(childComplexity int) int
	}

	MetadataSource struct {
		Key  func(childComplexity int) int
		Name func(childComplexity int) int
	}

	Mutation struct {
		Queue   func(childComplexity int) int
		Torrent func(childComplexity int) int
	}

	Query struct {
		Health         func(childComplexity int) int
		Queue          func(childComplexity int) int
		Torrent        func(childComplexity int) int
		TorrentContent func(childComplexity int) int
		Version        func(childComplexity int) int
		Workers        func(childComplexity int) int
	}

	QueueJob struct {
		CreatedAt  func(childComplexity int) int
		Error      func(childComplexity int) int
		ID         func(childComplexity int) int
		MaxRetries func(childComplexity int) int
		Payload    func(childComplexity int) int
		Priority   func(childComplexity int) int
		Queue      func(childComplexity int) int
		RanAt      func(childComplexity int) int
		Retries    func(childComplexity int) int
		RunAfter   func(childComplexity int) int
		Status     func(childComplexity int) int
	}

	QueueJobQueueAgg struct {
		Count func(childComplexity int) int
		Label func(childComplexity int) int
		Value func(childComplexity int) int
	}

	QueueJobStatusAgg struct {
		Count func(childComplexity int) int
		Label func(childComplexity int) int
		Value func(childComplexity int) int
	}

	QueueJobsAggregations struct {
		Queue  func(childComplexity int) int
		Status func(childComplexity int) int
	}

	QueueJobsQueryResult struct {
		Aggregations func(childComplexity int) int
		HasNextPage  func(childComplexity int) int
		Items        func(childComplexity int) int
		TotalCount   func(childComplexity int) int
	}

	QueueMetricsBucket struct {
		Count           func(childComplexity int) int
		CreatedAtBucket func(childComplexity int) int
		Latency         func(childComplexity int) int
		Queue           func(childComplexity int) int
		RanAtBucket     func(childComplexity int) int
		Status          func(childComplexity int) int
	}

	QueueMetricsQueryResult struct {
		Buckets func(childComplexity int) int
	}

	QueueMutation struct {
		EnqueueReprocessTorrentsBatch func(childComplexity int, input manager.EnqueueReprocessTorrentsBatchRequest) int
		PurgeJobs                     func(childComplexity int, input manager.PurgeJobsRequest) int
	}

	QueueQuery struct {
		Jobs    func(childComplexity int, input gqlmodel.QueueJobsQueryInput) int
		Metrics func(childComplexity int, input gen.QueueMetricsQueryInput) int
	}

	ReleaseYearAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	Season struct {
		Episodes func(childComplexity int) int
		Season   func(childComplexity int) int
	}

	SuggestedTag struct {
		Count func(childComplexity int) int
		Name  func(childComplexity int) int
	}

	Torrent struct {
		CreatedAt    func(childComplexity int) int
		Extension    func(childComplexity int) int
		FileType     func(childComplexity int) int
		FileTypes    func(childComplexity int) int
		Files        func(childComplexity int) int
		FilesCount   func(childComplexity int) int
		FilesStatus  func(childComplexity int) int
		HasFilesInfo func(childComplexity int) int
		InfoHash     func(childComplexity int) int
		Leechers     func(childComplexity int) int
		MagnetUri    func(childComplexity int) int
		Name         func(childComplexity int) int
		Seeders      func(childComplexity int) int
		SingleFile   func(childComplexity int) int
		Size         func(childComplexity int) int
		Sources      func(childComplexity int) int
		TagNames     func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
	}

	TorrentContent struct {
		Content         func(childComplexity int) int
		ContentID       func(childComplexity int) int
		ContentSource   func(childComplexity int) int
		ContentType     func(childComplexity int) int
		CreatedAt       func(childComplexity int) int
		Episodes        func(childComplexity int) int
		ID              func(childComplexity int) int
		InfoHash        func(childComplexity int) int
		Languages       func(childComplexity int) int
		Leechers        func(childComplexity int) int
		PublishedAt     func(childComplexity int) int
		ReleaseGroup    func(childComplexity int) int
		Seeders         func(childComplexity int) int
		Title           func(childComplexity int) int
		Torrent         func(childComplexity int) int
		UpdatedAt       func(childComplexity int) int
		Video3D         func(childComplexity int) int
		VideoCodec      func(childComplexity int) int
		VideoModifier   func(childComplexity int) int
		VideoResolution func(childComplexity int) int
		VideoSource     func(childComplexity int) int
	}

	TorrentContentAggregations struct {
		ContentType     func(childComplexity int) int
		Genre           func(childComplexity int) int
		Language        func(childComplexity int) int
		ReleaseYear     func(childComplexity int) int
		TorrentFileType func(childComplexity int) int
		TorrentSource   func(childComplexity int) int
		TorrentTag      func(childComplexity int) int
		VideoResolution func(childComplexity int) int
		VideoSource     func(childComplexity int) int
	}

	TorrentContentQuery struct {
		Search func(childComplexity int, input gqlmodel.TorrentContentSearchQueryInput) int
	}

	TorrentContentSearchResult struct {
		Aggregations         func(childComplexity int) int
		HasNextPage          func(childComplexity int) int
		Items                func(childComplexity int) int
		TotalCount           func(childComplexity int) int
		TotalCountIsEstimate func(childComplexity int) int
	}

	TorrentFile struct {
		CreatedAt func(childComplexity int) int
		Extension func(childComplexity int) int
		FileType  func(childComplexity int) int
		Index     func(childComplexity int) int
		InfoHash  func(childComplexity int) int
		Path      func(childComplexity int) int
		Size      func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
	}

	TorrentFileTypeAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	TorrentFilesQueryResult struct {
		HasNextPage func(childComplexity int) int
		Items       func(childComplexity int) int
		TotalCount  func(childComplexity int) int
	}

	TorrentListSourcesResult struct {
		Sources func(childComplexity int) int
	}

	TorrentMetricsBucket struct {
		Bucket  func(childComplexity int) int
		Count   func(childComplexity int) int
		Source  func(childComplexity int) int
		Updated func(childComplexity int) int
	}

	TorrentMetricsQueryResult struct {
		Buckets func(childComplexity int) int
	}

	TorrentMutation struct {
		Delete     func(childComplexity int, infoHashes []protocol.ID) int
		DeleteTags func(childComplexity int, infoHashes []protocol.ID, tagNames []string) int
		PutTags    func(childComplexity int, infoHashes []protocol.ID, tagNames []string) int
		SetTags    func(childComplexity int, infoHashes []protocol.ID, tagNames []string) int
	}

	TorrentQuery struct {
		Files       func(childComplexity int, input gqlmodel.TorrentFilesQueryInput) int
		ListSources func(childComplexity int) int
		Metrics     func(childComplexity int, input gen.TorrentMetricsQueryInput) int
		SuggestTags func(childComplexity int, input *gen.SuggestTagsQueryInput) int
	}

	TorrentSource struct {
		Key  func(childComplexity int) int
		Name func(childComplexity int) int
	}

	TorrentSourceAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	TorrentSourceInfo struct {
		ImportID func(childComplexity int) int
		Key      func(childComplexity int) int
		Leechers func(childComplexity int) int
		Name     func(childComplexity int) int
		Seeders  func(childComplexity int) int
	}

	TorrentSuggestTagsResult struct {
		Suggestions func(childComplexity int) int
	}

	TorrentTagAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	VideoResolutionAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	VideoSourceAgg struct {
		Count      func(childComplexity int) int
		IsEstimate func(childComplexity int) int
		Label      func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	Worker struct {
		Key     func(childComplexity int) int
		Started func(childComplexity int) int
	}

	WorkersListAllQueryResult struct {
		Workers func(childComplexity int) int
	}

	WorkersQuery struct {
		ListAll func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type ContentResolver

type ContentResolver interface {
	OriginalLanguage(ctx context.Context, obj *model.Content) (*model.Language, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	Torrent(ctx context.Context) (gqlmodel.TorrentMutation, error)
	Queue(ctx context.Context) (gqlmodel.QueueMutation, error)
}

type QueryResolver

type QueryResolver interface {
	Version(ctx context.Context) (string, error)
	Workers(ctx context.Context) (gen.WorkersQuery, error)
	Health(ctx context.Context) (gen.HealthQuery, error)
	Queue(ctx context.Context) (gqlmodel.QueueQuery, error)
	Torrent(ctx context.Context) (gqlmodel.TorrentQuery, error)
	TorrentContent(ctx context.Context) (gqlmodel.TorrentContentQuery, error)
}

type QueueEnqueueReprocessTorrentsBatchInputResolver

type QueueEnqueueReprocessTorrentsBatchInputResolver interface {
	ClassifierRematch(ctx context.Context, obj *manager.EnqueueReprocessTorrentsBatchRequest, data *bool) error
}

type QueueJobResolver

type QueueJobResolver interface {
	RanAt(ctx context.Context, obj *model.QueueJob) (*time.Time, error)
}

type QueueQueryResolver

type QueueQueryResolver interface {
	Jobs(ctx context.Context, obj *gqlmodel.QueueQuery, input gqlmodel.QueueJobsQueryInput) (gqlmodel.QueueJobsQueryResult, error)
}

type ResolverRoot

type ResolverRoot interface {
	Content() ContentResolver
	Mutation() MutationResolver
	Query() QueryResolver
	QueueJob() QueueJobResolver
	QueueQuery() QueueQueryResolver
	Torrent() TorrentResolver
	TorrentMutation() TorrentMutationResolver
	TorrentQuery() TorrentQueryResolver
	QueueEnqueueReprocessTorrentsBatchInput() QueueEnqueueReprocessTorrentsBatchInputResolver
}

type TorrentMutationResolver added in v0.3.0

type TorrentMutationResolver interface {
	Delete(ctx context.Context, obj *gqlmodel.TorrentMutation, infoHashes []protocol.ID) (*string, error)
	PutTags(ctx context.Context, obj *gqlmodel.TorrentMutation, infoHashes []protocol.ID, tagNames []string) (*string, error)
	SetTags(ctx context.Context, obj *gqlmodel.TorrentMutation, infoHashes []protocol.ID, tagNames []string) (*string, error)
	DeleteTags(ctx context.Context, obj *gqlmodel.TorrentMutation, infoHashes []protocol.ID, tagNames []string) (*string, error)
}

type TorrentQueryResolver

type TorrentQueryResolver interface {
	Files(ctx context.Context, obj *gqlmodel.TorrentQuery, input gqlmodel.TorrentFilesQueryInput) (query.GenericResult[model.TorrentFile], error)
}

type TorrentResolver

type TorrentResolver interface {
	Sources(ctx context.Context, obj *model.Torrent) ([]gqlmodel.TorrentSourceInfo, error)
}

Directories

Path Synopsis
gen
gen

Jump to

Keyboard shortcuts

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