api

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: AGPL-3.0 Imports: 75 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotImplemented is an error which means the given functionality isn't implemented by the API.
	ErrNotImplemented = errors.New("not implemented")

	// ErrNotSupported is returned whenever there's a test, which can be used to guard against the error,
	// but the given parameters aren't supported by the system.
	ErrNotSupported = errors.New("not supported")

	// ErrInput signifies errors where the input isn't valid for some reason. And no more specific error exists.
	ErrInput = errors.New("input error")
)
View Source
var (
	BaseURLCtxKey = &contextKey{"BaseURL"}
)
View Source
var ErrOverriddenConfig = errors.New("cannot set overridden value")

Functions

func BaseURLMiddleware

func BaseURLMiddleware(next http.Handler) http.Handler

func GetVersion

func GetVersion() (string, string, string)

func IsDevelop added in v0.19.0

func IsDevelop() bool

func SecurityHeadersMiddleware

func SecurityHeadersMiddleware(next http.Handler) http.Handler

func Start

func Start() error

Types

type CaptionFinder added in v0.17.0

type CaptionFinder interface {
	GetCaptions(ctx context.Context, fileID file.ID) ([]*models.VideoCaption, error)
}

type GallerySceneGetter added in v0.17.0

type GallerySceneGetter interface {
	GetSceneIDs(ctx context.Context, galleryID int) ([]int, error)
}

type GallerySceneUpdater added in v0.17.0

type GallerySceneUpdater interface {
	UpdateScenes(ctx context.Context, galleryID int, sceneIDs []int) error
}

type ImageFinder added in v0.17.0

type ImageFinder interface {
	Find(ctx context.Context, id int) (*models.Image, error)
	FindByChecksum(ctx context.Context, checksum string) ([]*models.Image, error)
}

type LatestRelease added in v0.19.0

type LatestRelease struct {
	Version   string
	Hash      string
	ShortHash string
	Date      string
	Url       string
}

func GetLatestRelease added in v0.19.0

func GetLatestRelease(ctx context.Context) (*LatestRelease, error)

GetLatestRelease gets latest release information from github API If running a build from the "master" branch, then the latest full release is used, otherwise it uses the release that is tagged with "latest_develop" which is the latest pre-release build.

type MovieFinder added in v0.17.0

type MovieFinder interface {
	GetFrontImage(ctx context.Context, movieID int) ([]byte, error)
	GetBackImage(ctx context.Context, movieID int) ([]byte, error)
	Find(ctx context.Context, id int) (*models.Movie, error)
}

type PerformerFinder added in v0.17.0

type PerformerFinder interface {
	Find(ctx context.Context, id int) (*models.Performer, error)
	GetImage(ctx context.Context, performerID int) ([]byte, error)
}

type Resolver

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

func (*Resolver) Gallery

func (r *Resolver) Gallery() GalleryResolver

func (*Resolver) GalleryChapter added in v0.20.0

func (r *Resolver) GalleryChapter() GalleryChapterResolver

func (*Resolver) Image

func (r *Resolver) Image() ImageResolver

func (*Resolver) Movie

func (r *Resolver) Movie() MovieResolver

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

func (*Resolver) Performer

func (r *Resolver) Performer() PerformerResolver

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

func (*Resolver) Scene

func (r *Resolver) Scene() SceneResolver

func (*Resolver) SceneMarker

func (r *Resolver) SceneMarker() SceneMarkerResolver

func (*Resolver) Studio

func (r *Resolver) Studio() StudioResolver

func (*Resolver) Subscription

func (r *Resolver) Subscription() SubscriptionResolver

func (*Resolver) Tag

func (r *Resolver) Tag() TagResolver

type SceneFinder added in v0.17.0

type SceneFinder interface {
	manager.SceneCoverGetter

	scene.IDFinder
	FindByChecksum(ctx context.Context, checksum string) ([]*models.Scene, error)
	FindByOSHash(ctx context.Context, oshash string) ([]*models.Scene, error)
}

type SceneMarkerFinder added in v0.17.0

type SceneMarkerFinder interface {
	Find(ctx context.Context, id int) (*models.SceneMarker, error)
	FindBySceneID(ctx context.Context, sceneID int) ([]*models.SceneMarker, error)
}

type StudioFinder added in v0.17.0

type StudioFinder interface {
	studio.Finder
	GetImage(ctx context.Context, studioID int) ([]byte, error)
}

type TagFinder added in v0.17.0

type TagFinder interface {
	tag.Finder
	GetImage(ctx context.Context, tagID int) ([]byte, error)
}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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