api

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: AGPL-3.0 Imports: 71 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 ErrNoVersion = errors.New("no stash version")

ErrNoVersion indicates that no version information has been embedded in the stash binary

View Source
var ErrOverriddenConfig = errors.New("cannot set overridden value")

Functions

func BaseURLMiddleware

func BaseURLMiddleware(next http.Handler) http.Handler

func GetLatestVersion

func GetLatestVersion(ctx context.Context, shortHash bool) (latestVersion string, latestRelease string, err error)

GetLatestVersion gets latest version (git commit hash) 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.

func GetVersion

func GetVersion() (string, string, string)

func ImageCtx

func ImageCtx(next http.Handler) http.Handler

func MovieCtx

func MovieCtx(next http.Handler) http.Handler

func PerformerCtx

func PerformerCtx(next http.Handler) http.Handler

func SceneCtx

func SceneCtx(next http.Handler) http.Handler

func SecurityHeadersMiddleware

func SecurityHeadersMiddleware(next http.Handler) http.Handler

func Start

func Start() error

func StudioCtx

func StudioCtx(next http.Handler) http.Handler

func TagCtx

func TagCtx(next http.Handler) http.Handler

Types

type Resolver

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

func (*Resolver) Gallery

func (r *Resolver) Gallery() models.GalleryResolver

func (*Resolver) Image

func (r *Resolver) Image() models.ImageResolver

func (*Resolver) Movie

func (r *Resolver) Movie() models.MovieResolver

func (*Resolver) Mutation

func (r *Resolver) Mutation() models.MutationResolver

func (*Resolver) Performer

func (r *Resolver) Performer() models.PerformerResolver

func (*Resolver) Query

func (r *Resolver) Query() models.QueryResolver

func (*Resolver) Scene

func (r *Resolver) Scene() models.SceneResolver

func (*Resolver) SceneMarker

func (r *Resolver) SceneMarker() models.SceneMarkerResolver

func (*Resolver) Studio

func (r *Resolver) Studio() models.StudioResolver

func (*Resolver) Subscription

func (r *Resolver) Subscription() models.SubscriptionResolver

func (*Resolver) Tag

func (r *Resolver) Tag() models.TagResolver

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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