Documentation ¶
Index ¶
- type Client
- func (c Client) FindStashBoxPerformerByID(ctx context.Context, id string) (*models.ScrapedPerformer, error)
- func (c Client) FindStashBoxPerformerByName(ctx context.Context, name string) (*models.ScrapedPerformer, error)
- func (c Client) FindStashBoxPerformersByNames(ctx context.Context, performerIDs []string) ([]*StashBoxPerformerQueryResult, error)
- func (c Client) FindStashBoxPerformersByPerformerNames(ctx context.Context, performerIDs []string) ([][]*models.ScrapedPerformer, error)
- func (c Client) FindStashBoxSceneByFingerprints(ctx context.Context, sceneID int) ([]*scraper.ScrapedScene, error)
- func (c Client) FindStashBoxScenesByFingerprints(ctx context.Context, ids []int) ([][]*scraper.ScrapedScene, error)
- func (c Client) FindStashBoxStudio(ctx context.Context, query string) (*models.ScrapedStudio, error)
- func (c Client) GetUser(ctx context.Context) (*graphql.Me, error)
- func (c Client) QueryStashBoxPerformer(ctx context.Context, queryStr string) ([]*StashBoxPerformerQueryResult, error)
- func (c Client) QueryStashBoxScene(ctx context.Context, queryStr string) ([]*scraper.ScrapedScene, error)
- func (c Client) SubmitPerformerDraft(ctx context.Context, performer *models.Performer, endpoint string) (*string, error)
- func (c Client) SubmitSceneDraft(ctx context.Context, scene *models.Scene, endpoint string, cover []byte) (*string, error)
- func (c Client) SubmitStashBoxFingerprints(ctx context.Context, sceneIDs []string, endpoint string) (bool, error)
- type PerformerReader
- type Repository
- type SceneReader
- type StashBoxPerformerQueryResult
- type StashBoxStudioQueryResult
- type StudioReader
- type TagFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the client interface to a stash-box server instance.
func NewClient ¶
func NewClient(box models.StashBox, repo Repository) *Client
NewClient returns a new instance of a stash-box client.
func (Client) FindStashBoxPerformerByID ¶ added in v0.7.0
func (Client) FindStashBoxPerformerByName ¶ added in v0.7.0
func (Client) FindStashBoxPerformersByNames ¶ added in v0.7.0
func (c Client) FindStashBoxPerformersByNames(ctx context.Context, performerIDs []string) ([]*StashBoxPerformerQueryResult, error)
FindStashBoxPerformersByNames queries stash-box for performers by name
func (Client) FindStashBoxPerformersByPerformerNames ¶ added in v0.10.0
func (Client) FindStashBoxSceneByFingerprints ¶ added in v0.16.0
func (c Client) FindStashBoxSceneByFingerprints(ctx context.Context, sceneID int) ([]*scraper.ScrapedScene, error)
FindStashBoxScenesByFingerprints queries stash-box for a scene using the scene's MD5/OSHASH checksum, or PHash.
func (Client) FindStashBoxScenesByFingerprints ¶
func (c Client) FindStashBoxScenesByFingerprints(ctx context.Context, ids []int) ([][]*scraper.ScrapedScene, error)
FindStashBoxScenesByFingerprints queries stash-box for scenes using every scene's MD5/OSHASH checksum, or PHash, and returns results in the same order as the input slice.
func (Client) FindStashBoxStudio ¶ added in v0.22.0
func (Client) QueryStashBoxPerformer ¶ added in v0.7.0
func (c Client) QueryStashBoxPerformer(ctx context.Context, queryStr string) ([]*StashBoxPerformerQueryResult, error)
QueryStashBoxPerformer queries stash-box for performers using a query string.
func (Client) QueryStashBoxScene ¶
func (c Client) QueryStashBoxScene(ctx context.Context, queryStr string) ([]*scraper.ScrapedScene, error)
QueryStashBoxScene queries stash-box for scenes using a query string.
func (Client) SubmitPerformerDraft ¶ added in v0.13.0
func (Client) SubmitSceneDraft ¶ added in v0.13.0
type PerformerReader ¶ added in v0.17.0
type PerformerReader interface { models.PerformerGetter match.PerformerFinder models.AliasLoader models.StashIDLoader FindBySceneID(ctx context.Context, sceneID int) ([]*models.Performer, error) GetImage(ctx context.Context, performerID int) ([]byte, error) }
type Repository ¶ added in v0.17.0
type Repository struct { TxnManager models.TxnManager Scene SceneReader Performer PerformerReader Tag TagFinder Studio StudioReader }
func NewRepository ¶ added in v0.24.0
func NewRepository(repo models.Repository) Repository
func (*Repository) WithReadTxn ¶ added in v0.24.0
type SceneReader ¶ added in v0.17.0
type SceneReader interface { models.SceneGetter models.StashIDLoader models.VideoFileLoader }
type StashBoxPerformerQueryResult ¶ added in v0.17.0
type StashBoxPerformerQueryResult struct { Query string `json:"query"` Results []*models.ScrapedPerformer `json:"results"` }
type StashBoxStudioQueryResult ¶ added in v0.22.0
type StashBoxStudioQueryResult struct { Query string `json:"query"` Results []*models.ScrapedStudio `json:"results"` }
type StudioReader ¶ added in v0.17.0
type StudioReader interface { models.StudioGetter match.StudioFinder models.StashIDLoader }