1
Fork 0
photoview/api/graphql/models/generated.go

304 lines
8.8 KiB
Go
Raw Normal View History

2020-01-30 14:28:14 +01:00
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2020-02-01 00:08:23 +01:00
package models
2020-01-30 14:28:14 +01:00
2020-02-02 00:29:42 +01:00
import (
2020-02-09 15:26:59 +01:00
"fmt"
"io"
"strconv"
2021-02-04 19:02:51 +01:00
"time"
2020-02-02 00:29:42 +01:00
)
2020-01-30 14:28:14 +01:00
type AuthorizeResult struct {
2022-02-05 01:21:00 +01:00
Success bool `json:"success"`
// A textual status message describing the result, can be used to show an error message when `success` is false
Status string `json:"status"`
// An access token used to authenticate new API requests as the newly authorized user. Is present when success is true
Token *string `json:"token"`
2020-01-30 14:28:14 +01:00
}
2020-02-01 14:52:27 +01:00
type Coordinates struct {
// GPS latitude in degrees
Latitude float64 `json:"latitude"`
// GPS longitude in degrees
Longitude float64 `json:"longitude"`
}
type MediaDownload struct {
2022-02-05 01:21:00 +01:00
// A description of the role of the media file
Title string `json:"title"`
MediaURL *MediaURL `json:"mediaUrl"`
}
type Notification struct {
2022-02-05 01:21:00 +01:00
// A key used to identify the notification, new notification updates with the same key, should replace the old notifications
Key string `json:"key"`
Type NotificationType `json:"type"`
// The text for the title of the notification
Header string `json:"header"`
// The text for the body of the notification
Content string `json:"content"`
// A value between 0 and 1 when the notification type is `Progress`
Progress *float64 `json:"progress"`
// Whether or not the message of the notification is positive, the UI might reflect this with a green color
Positive bool `json:"positive"`
// Whether or not the message of the notification is negative, the UI might reflect this with a red color
Negative bool `json:"negative"`
// Time in milliseconds before the notification should close
2020-02-26 19:44:47 +01:00
Timeout *int `json:"timeout"`
}
2022-02-05 01:21:00 +01:00
// Used to specify how to sort items
type Ordering struct {
2022-02-05 01:21:00 +01:00
// A column in the database to order by
OrderBy *string `json:"order_by"`
OrderDirection *OrderDirection `json:"order_direction"`
}
2022-02-05 01:21:00 +01:00
// Used to specify pagination on a list of items
type Pagination struct {
2022-02-05 01:21:00 +01:00
// How many items to maximally fetch
Limit *int `json:"limit"`
// How many items to skip from the beginning of the query, specified by the `Ordering`
Offset *int `json:"offset"`
}
2020-02-01 17:58:45 +01:00
type ScannerResult struct {
Finished bool `json:"finished"`
Success bool `json:"success"`
Progress *float64 `json:"progress"`
Message *string `json:"message"`
}
2020-02-05 16:49:51 +01:00
2020-03-05 11:53:42 +01:00
type SearchResult struct {
2022-02-05 01:21:00 +01:00
// The string that was searched for
Query string `json:"query"`
// A list of albums that matched the query
2020-03-05 11:53:42 +01:00
Albums []*Album `json:"albums"`
2022-02-05 01:21:00 +01:00
// A list of media that matched the query
Media []*Media `json:"media"`
2020-03-05 11:53:42 +01:00
}
// Credentials used to identify and authenticate a share token
type ShareTokenCredentials struct {
Token string `json:"token"`
Password *string `json:"password"`
}
2022-02-05 01:21:00 +01:00
// A group of media from the same album and the same day, that is grouped together in a timeline view
2021-02-04 19:02:51 +01:00
type TimelineGroup struct {
2022-02-05 01:21:00 +01:00
// The full album containing the media in this timeline group
Album *Album `json:"album"`
// The media contained in this timeline group
Media []*Media `json:"media"`
// The total amount of media in this timeline group
MediaTotal int `json:"mediaTotal"`
// The day shared for all media in this timeline group
Date time.Time `json:"date"`
2021-02-04 19:02:51 +01:00
}
2022-02-05 01:21:00 +01:00
// Supported language translations of the user interface
type LanguageTranslation string
const (
LanguageTranslationEnglish LanguageTranslation = "English"
LanguageTranslationFrench LanguageTranslation = "French"
LanguageTranslationItalian LanguageTranslation = "Italian"
LanguageTranslationSwedish LanguageTranslation = "Swedish"
LanguageTranslationDanish LanguageTranslation = "Danish"
LanguageTranslationSpanish LanguageTranslation = "Spanish"
LanguageTranslationPolish LanguageTranslation = "Polish"
LanguageTranslationGerman LanguageTranslation = "German"
LanguageTranslationRussian LanguageTranslation = "Russian"
LanguageTranslationTraditionalChinese LanguageTranslation = "TraditionalChinese"
2021-08-30 12:17:39 +02:00
LanguageTranslationSimplifiedChinese LanguageTranslation = "SimplifiedChinese"
LanguageTranslationPortuguese LanguageTranslation = "Portuguese"
LanguageTranslationBasque LanguageTranslation = "Basque"
)
var AllLanguageTranslation = []LanguageTranslation{
2021-04-12 00:14:27 +02:00
LanguageTranslationEnglish,
2021-04-14 12:36:16 +02:00
LanguageTranslationFrench,
LanguageTranslationItalian,
2021-04-15 11:59:49 +02:00
LanguageTranslationSwedish,
2021-04-12 00:14:27 +02:00
LanguageTranslationDanish,
2021-04-19 13:23:21 +02:00
LanguageTranslationSpanish,
2021-04-19 19:09:40 +02:00
LanguageTranslationPolish,
2021-04-20 01:16:39 +02:00
LanguageTranslationGerman,
2021-07-22 13:56:29 +02:00
LanguageTranslationRussian,
LanguageTranslationTraditionalChinese,
2021-08-30 12:17:39 +02:00
LanguageTranslationSimplifiedChinese,
LanguageTranslationPortuguese,
LanguageTranslationBasque,
}
func (e LanguageTranslation) IsValid() bool {
switch e {
case LanguageTranslationEnglish, LanguageTranslationFrench, LanguageTranslationItalian, LanguageTranslationSwedish, LanguageTranslationDanish, LanguageTranslationSpanish, LanguageTranslationPolish, LanguageTranslationGerman, LanguageTranslationRussian, LanguageTranslationTraditionalChinese, LanguageTranslationSimplifiedChinese, LanguageTranslationPortuguese, LanguageTranslationBasque:
return true
}
return false
}
func (e LanguageTranslation) String() string {
return string(e)
}
func (e *LanguageTranslation) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = LanguageTranslation(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid LanguageTranslation", str)
}
return nil
}
func (e LanguageTranslation) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
2022-02-05 01:21:00 +01:00
// Specified the type a particular notification is of
type NotificationType string
const (
2022-02-05 01:21:00 +01:00
// A regular message with no special additions
NotificationTypeMessage NotificationType = "Message"
// A notification with an attached progress indicator
NotificationTypeProgress NotificationType = "Progress"
2020-02-26 19:44:47 +01:00
// Close a notification with a given key
NotificationTypeClose NotificationType = "Close"
)
var AllNotificationType = []NotificationType{
NotificationTypeMessage,
NotificationTypeProgress,
2020-02-26 19:44:47 +01:00
NotificationTypeClose,
}
func (e NotificationType) IsValid() bool {
switch e {
2020-02-26 19:44:47 +01:00
case NotificationTypeMessage, NotificationTypeProgress, NotificationTypeClose:
return true
}
return false
}
func (e NotificationType) String() string {
return string(e)
}
func (e *NotificationType) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = NotificationType(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid NotificationType", str)
}
return nil
}
func (e NotificationType) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
2022-02-05 01:21:00 +01:00
// Used to specify which order to sort items in
2020-02-09 15:26:59 +01:00
type OrderDirection string
const (
2022-02-05 01:21:00 +01:00
// Sort accending A-Z
OrderDirectionAsc OrderDirection = "ASC"
// Sort decending Z-A
2020-02-09 15:26:59 +01:00
OrderDirectionDesc OrderDirection = "DESC"
)
var AllOrderDirection = []OrderDirection{
OrderDirectionAsc,
OrderDirectionDesc,
}
func (e OrderDirection) IsValid() bool {
switch e {
case OrderDirectionAsc, OrderDirectionDesc:
return true
}
return false
}
func (e OrderDirection) String() string {
return string(e)
}
func (e *OrderDirection) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = OrderDirection(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid OrderDirection", str)
}
return nil
}
func (e OrderDirection) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
// Supported downsampling filters for thumbnail generation
type ThumbnailFilter string
const (
ThumbnailFilterNearestNeighbor ThumbnailFilter = "NearestNeighbor"
ThumbnailFilterBox ThumbnailFilter = "Box"
ThumbnailFilterLinear ThumbnailFilter = "Linear"
ThumbnailFilterMitchellNetravali ThumbnailFilter = "MitchellNetravali"
ThumbnailFilterCatmullRom ThumbnailFilter = "CatmullRom"
ThumbnailFilterLanczos ThumbnailFilter = "Lanczos"
)
var AllThumbnailFilter = []ThumbnailFilter{
ThumbnailFilterNearestNeighbor,
ThumbnailFilterBox,
ThumbnailFilterLinear,
ThumbnailFilterMitchellNetravali,
ThumbnailFilterCatmullRom,
ThumbnailFilterLanczos,
}
func (e ThumbnailFilter) IsValid() bool {
switch e {
case ThumbnailFilterNearestNeighbor, ThumbnailFilterBox, ThumbnailFilterLinear, ThumbnailFilterMitchellNetravali, ThumbnailFilterCatmullRom, ThumbnailFilterLanczos:
return true
}
return false
}
func (e ThumbnailFilter) String() string {
return string(e)
}
func (e *ThumbnailFilter) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = ThumbnailFilter(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid ThumbnailFilter", str)
}
return nil
}
func (e ThumbnailFilter) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}