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 {
|
|
|
|
Success bool `json:"success"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Token *string `json:"token"`
|
|
|
|
}
|
2020-02-01 14:52:27 +01:00
|
|
|
|
2020-07-10 14:26:19 +02:00
|
|
|
type MediaDownload struct {
|
2020-08-11 22:34:42 +02:00
|
|
|
Title string `json:"title"`
|
|
|
|
MediaURL *MediaURL `json:"mediaUrl"`
|
2020-07-10 14:26:19 +02:00
|
|
|
}
|
|
|
|
|
2020-02-21 16:50:50 +01:00
|
|
|
type Notification struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
Type NotificationType `json:"type"`
|
|
|
|
Header string `json:"header"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
Progress *float64 `json:"progress"`
|
|
|
|
Positive bool `json:"positive"`
|
|
|
|
Negative bool `json:"negative"`
|
2020-02-26 19:44:47 +01:00
|
|
|
// Time in milliseconds before the notification will close
|
|
|
|
Timeout *int `json:"timeout"`
|
2020-02-21 16:50:50 +01:00
|
|
|
}
|
|
|
|
|
2021-02-13 15:08:05 +01:00
|
|
|
type Ordering struct {
|
|
|
|
OrderBy *string `json:"order_by"`
|
|
|
|
OrderDirection *OrderDirection `json:"order_direction"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Pagination struct {
|
|
|
|
Limit *int `json:"limit"`
|
|
|
|
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 {
|
|
|
|
Query string `json:"query"`
|
|
|
|
Albums []*Album `json:"albums"`
|
2020-07-10 14:26:19 +02:00
|
|
|
Media []*Media `json:"media"`
|
2020-03-05 11:53:42 +01:00
|
|
|
}
|
|
|
|
|
2021-03-03 15:55:55 +01:00
|
|
|
// Credentials used to identify and authenticate a share token
|
|
|
|
type ShareTokenCredentials struct {
|
|
|
|
Token string `json:"token"`
|
|
|
|
Password *string `json:"password"`
|
|
|
|
}
|
|
|
|
|
2021-02-04 19:02:51 +01:00
|
|
|
type TimelineGroup struct {
|
|
|
|
Album *Album `json:"album"`
|
|
|
|
Media []*Media `json:"media"`
|
|
|
|
MediaTotal int `json:"mediaTotal"`
|
|
|
|
Date time.Time `json:"date"`
|
|
|
|
}
|
|
|
|
|
2021-04-11 22:31:42 +02:00
|
|
|
type LanguageTranslation string
|
|
|
|
|
|
|
|
const (
|
|
|
|
LanguageTranslationEn LanguageTranslation = "en"
|
|
|
|
LanguageTranslationDa LanguageTranslation = "da"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllLanguageTranslation = []LanguageTranslation{
|
|
|
|
LanguageTranslationEn,
|
|
|
|
LanguageTranslationDa,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e LanguageTranslation) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case LanguageTranslationEn, LanguageTranslationDa:
|
|
|
|
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()))
|
|
|
|
}
|
|
|
|
|
2020-07-11 14:21:10 +02:00
|
|
|
type MediaType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
MediaTypePhoto MediaType = "photo"
|
|
|
|
MediaTypeVideo MediaType = "video"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllMediaType = []MediaType{
|
|
|
|
MediaTypePhoto,
|
|
|
|
MediaTypeVideo,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MediaType) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case MediaTypePhoto, MediaTypeVideo:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MediaType) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *MediaType) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = MediaType(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid MediaType", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MediaType) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2020-02-21 16:50:50 +01:00
|
|
|
type NotificationType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
NotificationTypeMessage NotificationType = "Message"
|
|
|
|
NotificationTypeProgress NotificationType = "Progress"
|
2020-02-26 19:44:47 +01:00
|
|
|
// Close a notification with a given key
|
|
|
|
NotificationTypeClose NotificationType = "Close"
|
2020-02-21 16:50:50 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var AllNotificationType = []NotificationType{
|
|
|
|
NotificationTypeMessage,
|
|
|
|
NotificationTypeProgress,
|
2020-02-26 19:44:47 +01:00
|
|
|
NotificationTypeClose,
|
2020-02-21 16:50:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e NotificationType) IsValid() bool {
|
|
|
|
switch e {
|
2020-02-26 19:44:47 +01:00
|
|
|
case NotificationTypeMessage, NotificationTypeProgress, NotificationTypeClose:
|
2020-02-21 16:50:50 +01:00
|
|
|
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()))
|
|
|
|
}
|
|
|
|
|
2020-02-09 15:26:59 +01:00
|
|
|
type OrderDirection string
|
|
|
|
|
|
|
|
const (
|
|
|
|
OrderDirectionAsc OrderDirection = "ASC"
|
|
|
|
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()))
|
|
|
|
}
|