Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonschema

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareJSON

func CompareJSON(a interface{}, b interface{}) bool

func SaveGalleryFile

func SaveGalleryFile(filePath string, gallery *Gallery) error

func SaveImageFile

func SaveImageFile(filePath string, image *Image) error

func SaveMappingsFile

func SaveMappingsFile(filePath string, mappings *Mappings) error

func SaveMovieFile

func SaveMovieFile(filePath string, movie *Movie) error

func SavePerformerFile

func SavePerformerFile(filePath string, performer *Performer) error

func SaveSceneFile

func SaveSceneFile(filePath string, scene *Scene) error

func SaveScrapedFile

func SaveScrapedFile(filePath string, scrapedItems []ScrapedItem) error

func SaveStudioFile

func SaveStudioFile(filePath string, studio *Studio) error

func SaveTagFile

func SaveTagFile(filePath string, tag *Tag) error

Types

type Gallery struct {
	Path        string        `json:"path,omitempty"`
	Checksum    string        `json:"checksum,omitempty"`
	Zip         bool          `json:"zip,omitempty"`
	Title       string        `json:"title,omitempty"`
	URL         string        `json:"url,omitempty"`
	Date        string        `json:"date,omitempty"`
	Details     string        `json:"details,omitempty"`
	Rating      int           `json:"rating,omitempty"`
	Organized   bool          `json:"organized,omitempty"`
	Studio      string        `json:"studio,omitempty"`
	Performers  []string      `json:"performers,omitempty"`
	Tags        []string      `json:"tags,omitempty"`
	FileModTime json.JSONTime `json:"file_mod_time,omitempty"`
	CreatedAt   json.JSONTime `json:"created_at,omitempty"`
	UpdatedAt   json.JSONTime `json:"updated_at,omitempty"`
}

func LoadGalleryFile

func LoadGalleryFile(filePath string) (*Gallery, error)

type Image

type Image struct {
	Title      string        `json:"title,omitempty"`
	Checksum   string        `json:"checksum,omitempty"`
	Studio     string        `json:"studio,omitempty"`
	Rating     int           `json:"rating,omitempty"`
	Organized  bool          `json:"organized,omitempty"`
	OCounter   int           `json:"o_counter,omitempty"`
	Galleries  []string      `json:"galleries,omitempty"`
	Performers []string      `json:"performers,omitempty"`
	Tags       []string      `json:"tags,omitempty"`
	File       *ImageFile    `json:"file,omitempty"`
	CreatedAt  json.JSONTime `json:"created_at,omitempty"`
	UpdatedAt  json.JSONTime `json:"updated_at,omitempty"`
}

func LoadImageFile

func LoadImageFile(filePath string) (*Image, error)

type ImageFile

type ImageFile struct {
	ModTime json.JSONTime `json:"mod_time,omitempty"`
	Size    int           `json:"size"`
	Width   int           `json:"width"`
	Height  int           `json:"height"`
}

type Mappings

type Mappings struct {
	Tags       []PathNameMapping `json:"tags"`
	Performers []PathNameMapping `json:"performers"`
	Studios    []PathNameMapping `json:"studios"`
	Movies     []PathNameMapping `json:"movies"`
	Galleries  []PathNameMapping `json:"galleries"`
	Scenes     []PathNameMapping `json:"scenes"`
	Images     []PathNameMapping `json:"images"`
}

func LoadMappingsFile

func LoadMappingsFile(filePath string) (*Mappings, error)

type Movie

type Movie struct {
	Name       string        `json:"name,omitempty"`
	Aliases    string        `json:"aliases,omitempty"`
	Duration   int           `json:"duration,omitempty"`
	Date       string        `json:"date,omitempty"`
	Rating     int           `json:"rating,omitempty"`
	Director   string        `json:"director,omitempty"`
	Synopsis   string        `json:"synopsis,omitempty"`
	FrontImage string        `json:"front_image,omitempty"`
	BackImage  string        `json:"back_image,omitempty"`
	URL        string        `json:"url,omitempty"`
	Studio     string        `json:"studio,omitempty"`
	CreatedAt  json.JSONTime `json:"created_at,omitempty"`
	UpdatedAt  json.JSONTime `json:"updated_at,omitempty"`
}

func LoadMovieFile

func LoadMovieFile(filePath string) (*Movie, error)

type MovieSynopsisBC added in v0.16.0

type MovieSynopsisBC struct {
	Synopsis string `json:"sypnopsis,omitempty"`
}

Backwards Compatible synopsis for the movie

type PathNameMapping

type PathNameMapping struct {
	Path     string `json:"path,omitempty"`
	Name     string `json:"name,omitempty"`
	Checksum string `json:"checksum"`
}

type Performer

type Performer struct {
	Name          string           `json:"name,omitempty"`
	Gender        string           `json:"gender,omitempty"`
	URL           string           `json:"url,omitempty"`
	Twitter       string           `json:"twitter,omitempty"`
	Instagram     string           `json:"instagram,omitempty"`
	Birthdate     string           `json:"birthdate,omitempty"`
	Ethnicity     string           `json:"ethnicity,omitempty"`
	Country       string           `json:"country,omitempty"`
	EyeColor      string           `json:"eye_color,omitempty"`
	Height        string           `json:"height,omitempty"`
	Measurements  string           `json:"measurements,omitempty"`
	FakeTits      string           `json:"fake_tits,omitempty"`
	CareerLength  string           `json:"career_length,omitempty"`
	Tattoos       string           `json:"tattoos,omitempty"`
	Piercings     string           `json:"piercings,omitempty"`
	Aliases       string           `json:"aliases,omitempty"`
	Favorite      bool             `json:"favorite,omitempty"`
	Tags          []string         `json:"tags,omitempty"`
	Image         string           `json:"image,omitempty"`
	CreatedAt     json.JSONTime    `json:"created_at,omitempty"`
	UpdatedAt     json.JSONTime    `json:"updated_at,omitempty"`
	Rating        int              `json:"rating,omitempty"`
	Details       string           `json:"details,omitempty"`
	DeathDate     string           `json:"death_date,omitempty"`
	HairColor     string           `json:"hair_color,omitempty"`
	Weight        int              `json:"weight,omitempty"`
	StashIDs      []models.StashID `json:"stash_ids,omitempty"`
	IgnoreAutoTag bool             `json:"ignore_auto_tag,omitempty"`
}

func LoadPerformerFile

func LoadPerformerFile(filePath string) (*Performer, error)

type Scene

type Scene struct {
	Title      string           `json:"title,omitempty"`
	Checksum   string           `json:"checksum,omitempty"`
	OSHash     string           `json:"oshash,omitempty"`
	Phash      string           `json:"phash,omitempty"`
	Studio     string           `json:"studio,omitempty"`
	URL        string           `json:"url,omitempty"`
	Date       string           `json:"date,omitempty"`
	Rating     int              `json:"rating,omitempty"`
	Organized  bool             `json:"organized,omitempty"`
	OCounter   int              `json:"o_counter,omitempty"`
	Details    string           `json:"details,omitempty"`
	Galleries  []string         `json:"galleries,omitempty"`
	Performers []string         `json:"performers,omitempty"`
	Movies     []SceneMovie     `json:"movies,omitempty"`
	Tags       []string         `json:"tags,omitempty"`
	Markers    []SceneMarker    `json:"markers,omitempty"`
	File       *SceneFile       `json:"file,omitempty"`
	Cover      string           `json:"cover,omitempty"`
	CreatedAt  json.JSONTime    `json:"created_at,omitempty"`
	UpdatedAt  json.JSONTime    `json:"updated_at,omitempty"`
	StashIDs   []models.StashID `json:"stash_ids,omitempty"`
}

func LoadSceneFile

func LoadSceneFile(filePath string) (*Scene, error)

type SceneFile

type SceneFile struct {
	ModTime    json.JSONTime `json:"mod_time,omitempty"`
	Size       string        `json:"size"`
	Duration   string        `json:"duration"`
	VideoCodec string        `json:"video_codec"`
	AudioCodec string        `json:"audio_codec"`
	Format     string        `json:"format"`
	Width      int           `json:"width"`
	Height     int           `json:"height"`
	Framerate  string        `json:"framerate"`
	Bitrate    int           `json:"bitrate"`
}

type SceneMarker

type SceneMarker struct {
	Title      string        `json:"title,omitempty"`
	Seconds    string        `json:"seconds,omitempty"`
	PrimaryTag string        `json:"primary_tag,omitempty"`
	Tags       []string      `json:"tags,omitempty"`
	CreatedAt  json.JSONTime `json:"created_at,omitempty"`
	UpdatedAt  json.JSONTime `json:"updated_at,omitempty"`
}

type SceneMovie

type SceneMovie struct {
	MovieName  string `json:"movieName,omitempty"`
	SceneIndex int    `json:"scene_index,omitempty"`
}

type ScrapedItem

type ScrapedItem struct {
	Title           string        `json:"title,omitempty"`
	Description     string        `json:"description,omitempty"`
	URL             string        `json:"url,omitempty"`
	Date            string        `json:"date,omitempty"`
	Rating          string        `json:"rating,omitempty"`
	Tags            string        `json:"tags,omitempty"`
	Models          string        `json:"models,omitempty"`
	Episode         int           `json:"episode,omitempty"`
	GalleryFilename string        `json:"gallery_filename,omitempty"`
	GalleryURL      string        `json:"gallery_url,omitempty"`
	VideoFilename   string        `json:"video_filename,omitempty"`
	VideoURL        string        `json:"video_url,omitempty"`
	Studio          string        `json:"studio,omitempty"`
	UpdatedAt       json.JSONTime `json:"updated_at,omitempty"`
}

func LoadScrapedFile

func LoadScrapedFile(filePath string) ([]ScrapedItem, error)

type Studio

type Studio struct {
	Name          string           `json:"name,omitempty"`
	URL           string           `json:"url,omitempty"`
	ParentStudio  string           `json:"parent_studio,omitempty"`
	Image         string           `json:"image,omitempty"`
	CreatedAt     json.JSONTime    `json:"created_at,omitempty"`
	UpdatedAt     json.JSONTime    `json:"updated_at,omitempty"`
	Rating        int              `json:"rating,omitempty"`
	Details       string           `json:"details,omitempty"`
	Aliases       []string         `json:"aliases,omitempty"`
	StashIDs      []models.StashID `json:"stash_ids,omitempty"`
	IgnoreAutoTag bool             `json:"ignore_auto_tag,omitempty"`
}

func LoadStudioFile

func LoadStudioFile(filePath string) (*Studio, error)

type Tag

type Tag struct {
	Name          string        `json:"name,omitempty"`
	Aliases       []string      `json:"aliases,omitempty"`
	Image         string        `json:"image,omitempty"`
	Parents       []string      `json:"parents,omitempty"`
	IgnoreAutoTag bool          `json:"ignore_auto_tag,omitempty"`
	CreatedAt     json.JSONTime `json:"created_at,omitempty"`
	UpdatedAt     json.JSONTime `json:"updated_at,omitempty"`
}

func LoadTagFile

func LoadTagFile(filePath string) (*Tag, error)

Jump to

Keyboard shortcuts

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