api

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LaunchAPI

func LaunchAPI()

LaunchAPI starts handling API requests.

Types

type Credentials

type Credentials struct {
	Username    string  `json:"username"`
	Password    string  `json:"password"`
	Passphrase  string  `json:"passphrase"`
	Role        *string `json:"role"`
	ExpiresIn   *int64  `json:"expires_in"`
	SessionName *string `json:"session_name"`
}

type CustomClaims

type CustomClaims struct {
	jwt.RegisteredClaims
	ID      string
	Subject string
	Name    string
	Roles   *int32
}

type GalleryResult

type GalleryResult struct {
	Meta  MetadataResult
	Files []string
	Count int
}

type GenericStringResult

type GenericStringResult struct {
	Data  []string
	Count int
}

type LoginResponse added in v0.7.0

type LoginResponse struct {
	UUID      *string
	Role      *int32
	ExpiresIn *int64
}

type MetadataResult

type MetadataResult struct {
	Hidden      bool   `json:",omitempty"`
	ArchivePath string `json:",omitempty"`
	LibraryID   string `json:",omitempty"`
	model.Gallery

	Tags map[string][]string

	Reference struct {
		ExhToken *string
		ExhGid   *int32
		Urls     *string
	} `alias:"reference.*"`

	GalleryPref *struct {
		FavoriteGroup *string
		Progress      int32
		UpdatedAt     string
	} `alias:"gallery_pref.*"`

	Library model.Library `json:"-"`
}

type UpdateGalleryForm added in v0.2.0

type UpdateGalleryForm struct {
	Title           string
	TitleNative     string
	TitleTranslated string
	Released        string
	Series          string
	Category        string
	Language        string
	Translated      bool
	Nsfw            bool
	Hidden          bool
	ExhToken        string
	ExhGid          int32
	AnilistID       int32
	Urls            string
	Tags            map[string][]string
}

Jump to

Keyboard shortcuts

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