model

package
v0.0.0-...-adb56df Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const OauthClientName = "OauthClient"
View Source
const PhotoExifName = "PhotoExif"
View Source
const PhotoFileName = "PhotoFile"
View Source
const PhotoName = "Photo"
View Source
const UserName = "User"
View Source
const UserPasswordName = "UserPassword"

Variables

Functions

This section is empty.

Types

type Connection

type Connection interface {
	IsConnection()
	GetPageInfo() *PageInfo
	GetEdges() []Edge
	GetNodes() []Node
}

type CreateOauthClientInput

type CreateOauthClientInput struct {
	ClientID     string           `json:"clientId"`
	Name         string           `json:"name"`
	Scope        OauthClientScope `json:"scope"`
	ClientType   OauthClientType  `json:"clientType"`
	RedirectUrls []string         `json:"redirectUrls"`
}

type CreateUserInput

type CreateUserInput struct {
	UserID   string `json:"userId"`
	Name     string `json:"name"`
	Password string `json:"password"`
}

type DateAggregationItem

type DateAggregationItem struct {
	Year  int `json:"year"`
	Month int `json:"month"`
	Date  int `json:"date"`
	Num   int `json:"num"`
}

func NewDateTimeAggregation

func NewDateTimeAggregation(aggregation entities.PhotoDateTimeAggregation) []*DateAggregationItem

type Edge

type Edge interface {
	IsEdge()
	GetCursor() string
	GetNode() Node
}

type GqlStatus

type GqlStatus struct {
	Status string `json:"status"`
}

type Group

type Group struct {
	ID      string `json:"id"`
	GroupID string `json:"groupId"`
	Name    string `json:"name"`
}

func (Group) GetID

func (m Group) GetID() string

func (Group) IsNode

func (Group) IsNode()

type IndexingPhotosInput

type IndexingPhotosInput struct {
	Fast bool `json:"fast"`
}

type Mutation

type Mutation struct {
}

type Node

type Node interface {
	IsNode()
	GetID() string
}

type OauthClient

type OauthClient struct {
	ID           string           `json:"id"`
	ClientID     string           `json:"clientId"`
	Name         string           `json:"name"`
	Scope        OauthClientScope `json:"scope"`
	ClientType   OauthClientType  `json:"clientType"`
	ClientSecret *string          `json:"clientSecret"`
}

func NewOauthClientWithSecret

func NewOauthClientWithSecret(oauth *entities.OauthClient, secret string) *OauthClient

func (OauthClient) GetID

func (m OauthClient) GetID() string

func (OauthClient) IsNode

func (OauthClient) IsNode()

type OauthClientScope

type OauthClientScope string
const (
	OauthClientScopeGeneral OauthClientScope = "general"
	OauthClientScopeAdmin   OauthClientScope = "admin"
)

func (OauthClientScope) IsValid

func (e OauthClientScope) IsValid() bool

func (OauthClientScope) MarshalGQL

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

func (OauthClientScope) String

func (e OauthClientScope) String() string

func (OauthClientScope) ToEntity

func (e OauthClientScope) ToEntity() entities.OauthScope

func (*OauthClientScope) UnmarshalGQL

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

type OauthClientType

type OauthClientType string
const (
	OauthClientTypeUserClient       OauthClientType = "UserClient"
	OauthClientTypeClientCredential OauthClientType = "ClientCredential"
)

func (OauthClientType) IsValid

func (e OauthClientType) IsValid() bool

func (OauthClientType) MarshalGQL

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

func (OauthClientType) String

func (e OauthClientType) String() string

func (OauthClientType) ToEntity

func (*OauthClientType) UnmarshalGQL

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

type PageInfo

type PageInfo struct {
	HasNextPage     bool    `json:"hasNextPage"`
	HasPreviousPage bool    `json:"hasPreviousPage"`
	StartCursor     *string `json:"startCursor,omitempty"`
	EndCursor       *string `json:"endCursor,omitempty"`
}

type Pagination

type Pagination interface {
	IsPagination()
	GetPageInfo() *PaginationInfo
	GetNodes() []Node
}

type PaginationInfo

type PaginationInfo struct {
	Offset           int  `json:"offset"`
	Limit            int  `json:"limit"`
	Page             int  `json:"page"`
	PaginationLength int  `json:"paginationLength"`
	HasNextPage      bool `json:"hasNextPage"`
	HasPreviousPage  bool `json:"hasPreviousPage"`
	Count            int  `json:"count"`
	TotalCount       int  `json:"totalCount"`
}

type Photo

type Photo struct {
	ID               string   `json:"id"`
	Name             string   `json:"name"`
	ImportedAt       string   `json:"importedAt"`
	DateTimeOriginal string   `json:"dateTimeOriginal"`
	PreviewURL       string   `json:"previewUrl"`
	ThumbnailURL     string   `json:"thumbnailUrl"`
	FileTypes        []string `json:"fileTypes"`
}

func NewPhoto

func NewPhoto(p *entities.PhotoSearchResultItem) *Photo

func (Photo) GetID

func (m Photo) GetID() string

func (Photo) IsNode

func (Photo) IsNode()

type PhotoExif

type PhotoExif struct {
	ID          string `json:"id"`
	TagID       int    `json:"tagId"`
	TagType     string `json:"tagType"`
	ValueString string `json:"valueString"`
}

func NewPhotoExifData

func NewPhotoExifData(data entities.PhotoMeta) []*PhotoExif

func (PhotoExif) GetID

func (this PhotoExif) GetID() string

func (PhotoExif) IsNode

func (PhotoExif) IsNode()

type PhotoFile

type PhotoFile struct {
	ID         string `json:"id"`
	PhotoID    string `json:"photoId"`
	FileType   string `json:"fileType"`
	ImportedAt string `json:"importedAt"`
	FileHash   string `json:"fileHash"`
	FileName   string `json:"fileName"`
}

func NewPhotoFile

func NewPhotoFile(e *entities.PhotoFile) *PhotoFile

func NewPhotoFiles

func NewPhotoFiles(l entities.PhotoFileList) []*PhotoFile

func (PhotoFile) GetID

func (m PhotoFile) GetID() string

func (PhotoFile) IsNode

func (PhotoFile) IsNode()

type PhotoPagination

type PhotoPagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Nodes    []*Photo        `json:"nodes"`
}

func NewPhotoPagination

func NewPhotoPagination(result *entities.PhotoSearchResult, limit, offset int) *PhotoPagination

func (PhotoPagination) GetNodes

func (this PhotoPagination) GetNodes() []Node

func (PhotoPagination) GetPageInfo

func (this PhotoPagination) GetPageInfo() *PaginationInfo

func (PhotoPagination) IsPagination

func (PhotoPagination) IsPagination()

type PhotoUploadInfo

type PhotoUploadInfo struct {
	UploadURL string `json:"uploadUrl"`
	ExpireAt  int    `json:"expireAt"`
}

func NewPhotoUploadInfo

func NewPhotoUploadInfo(sign *entities.PhotoUploadSign) *PhotoUploadInfo

type Query

type Query struct {
}

type UpdateMeInput

type UpdateMeInput struct {
	Name string `json:"name"`
}

type User

type User struct {
	ID     string     `json:"id"`
	UserID string     `json:"userId"`
	Name   string     `json:"name"`
	Status UserStatus `json:"status"`
}

func NewUser

func NewUser(u *entities.User) *User

func (User) GetID

func (m User) GetID() string

func (User) IsNode

func (User) IsNode()

type UserEdge

type UserEdge struct {
	Cursor string `json:"cursor"`
	Node   *User  `json:"node"`
}

func (UserEdge) GetCursor

func (this UserEdge) GetCursor() string

func (UserEdge) GetNode

func (this UserEdge) GetNode() Node

func (UserEdge) IsEdge

func (UserEdge) IsEdge()

type UserPagination

type UserPagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Nodes    []*User         `json:"nodes"`
}

func NewUserPagination

func NewUserPagination(users entities.UserList, total, limit, offset int) *UserPagination

func (UserPagination) GetNodes

func (this UserPagination) GetNodes() []Node

func (UserPagination) GetPageInfo

func (this UserPagination) GetPageInfo() *PaginationInfo

func (UserPagination) IsPagination

func (UserPagination) IsPagination()

type UserPassword

type UserPassword struct {
	ID            string `json:"id"`
	LastModified  string `json:"lastModified"`
	IsInitialized bool   `json:"isInitialized"`
}

func NewUserPassword

func NewUserPassword(p *entities.UserPassword) *UserPassword

func (UserPassword) GetID

func (this UserPassword) GetID() string

func (UserPassword) IsNode

func (UserPassword) IsNode()

type UserStatus

type UserStatus string
const (
	UserStatusActive     UserStatus = "Active"
	UserStatusWithdrawal UserStatus = "Withdrawal"
)

func (UserStatus) IsValid

func (e UserStatus) IsValid() bool

func (UserStatus) MarshalGQL

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

func (UserStatus) String

func (e UserStatus) String() string

func (*UserStatus) UnmarshalGQL

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

Jump to

Keyboard shortcuts

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