model

package
v0.0.0-...-ac9c94f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AuthPayload

type AuthPayload struct {
	Token string `json:"token"`
	User  *User  `json:"user"`
}

type Photo

type Photo struct {
	ID          string        `json:"id"`
	Name        string        `json:"name"`
	URL         string        `json:"url"`
	Description *string       `json:"description"`
	Category    PhotoCategory `json:"category"`
	PostedBy    *User         `json:"postedBy"`
	TaggedUsers []*User       `json:"taggedUsers"`
	Created     string        `json:"created"`
}

type PhotoCategory

type PhotoCategory string
const (
	PhotoCategorySelfie    PhotoCategory = "SELFIE"
	PhotoCategoryPortrait  PhotoCategory = "PORTRAIT"
	PhotoCategoryAction    PhotoCategory = "ACTION"
	PhotoCategoryLandscape PhotoCategory = "LANDSCAPE"
	PhotoCategoryGraphic   PhotoCategory = "GRAPHIC"
)

func (PhotoCategory) IsValid

func (e PhotoCategory) IsValid() bool

func (PhotoCategory) MarshalGQL

func (e PhotoCategory) MarshalGQL(w io.Writer)

func (PhotoCategory) String

func (e PhotoCategory) String() string

func (*PhotoCategory) UnmarshalGQL

func (e *PhotoCategory) UnmarshalGQL(v interface{}) error

type PostPhotoInput

type PostPhotoInput struct {
	Name        string         `json:"name"`
	Category    *PhotoCategory `json:"category"`
	Description *string        `json:"description"`
	File        graphql.Upload `json:"file"`
}

type User

type User struct {
	GithubLogin  string   `json:"githubLogin"`
	Name         *string  `json:"name"`
	Avatar       *string  `json:"avatar"`
	PostedPhotos []*Photo `json:"postedPhotos"`
	InPhotos     []*Photo `json:"inPhotos"`
}

Jump to

Keyboard shortcuts

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