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"
|
2020-02-02 00:29:42 +01:00
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
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-02-09 15:26:59 +01:00
|
|
|
type Filter struct {
|
|
|
|
OrderBy *string `json:"order_by"`
|
|
|
|
OrderDirection *OrderDirection `json:"order_direction"`
|
|
|
|
Limit *int `json:"limit"`
|
|
|
|
Offset *int `json:"offset"`
|
|
|
|
}
|
|
|
|
|
2020-02-02 00:29:42 +01:00
|
|
|
// EXIF metadata from the camera
|
|
|
|
type PhotoExif struct {
|
|
|
|
Photo *Photo `json:"photo"`
|
|
|
|
// The model name of the camera
|
|
|
|
Camera *string `json:"camera"`
|
|
|
|
// The maker of the camera
|
|
|
|
Maker *string `json:"maker"`
|
|
|
|
// The name of the lens
|
|
|
|
Lens *string `json:"lens"`
|
|
|
|
DateShot *time.Time `json:"dateShot"`
|
|
|
|
// The formatted filesize of the image
|
|
|
|
FileSize *string `json:"fileSize"`
|
|
|
|
// The exposure time of the image
|
|
|
|
Exposure *string `json:"exposure"`
|
|
|
|
// The aperature stops of the image
|
|
|
|
Aperture *float64 `json:"aperture"`
|
|
|
|
// The ISO setting of the image
|
|
|
|
Iso *int `json:"iso"`
|
|
|
|
// The focal length of the lens, when the image was taken
|
|
|
|
FocalLength *string `json:"focalLength"`
|
|
|
|
// A formatted description of the flash settings, when the image was taken
|
|
|
|
Flash *string `json:"flash"`
|
2020-02-01 14:52:27 +01:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
|
// General public information about the site
|
|
|
|
type SiteInfo struct {
|
|
|
|
InitialSetup bool `json:"initialSetup"`
|
|
|
|
}
|
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()))
|
|
|
|
}
|