Documentation ¶
Index ¶
- Constants
- Variables
- type CreateFileRequest
- type CreateFolderRequest
- type CreatePersonRequest
- type File
- type FileInput
- type FileResolver
- type Folder
- type FolderInput
- type FolderResolver
- type FriendsRequest
- type GqlResolver
- type GqlServer
- type Person
- type PersonInput
- type PersonRequest
- type PersonResolver
- type SearchRequest
- type SearchResultResolver
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" Post = "POST" Get = "GET" )
Variables ¶
View Source
var Schema = `` /* 698-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type CreateFileRequest ¶
type CreateFolderRequest ¶
type CreateFolderRequest struct {
Folder FolderInput
}
type CreatePersonRequest ¶
type CreatePersonRequest struct {
Person PersonInput
}
type FileResolver ¶
type FileResolver struct {
R *File
}
func (FileResolver) Folder ¶
func (r FileResolver) Folder() FolderResolver
func (FileResolver) ID ¶
func (r FileResolver) ID() graphql.ID
func (FileResolver) Name ¶
func (r FileResolver) Name() string
type FolderInput ¶
type FolderResolver ¶
type FolderResolver struct {
R *Folder
}
func (FolderResolver) Files ¶
func (r FolderResolver) Files() []*FileResolver
func (FolderResolver) ID ¶
func (r FolderResolver) ID() graphql.ID
func (FolderResolver) Name ¶
func (r FolderResolver) Name() string
type FriendsRequest ¶
type GqlResolver ¶
type GqlResolver interface { CreatePerson(CreatePersonRequest) PersonResolver CreateFolder(CreateFolderRequest) FolderResolver CreateFile(CreateFileRequest) FileResolver Person(PersonRequest) PersonResolver Search(SearchRequest) []*SearchResultResolver }
type GqlServer ¶
type GqlServer struct { Schema *graphql.Schema Port string Request gqlRequest CorsOptions *cors.Options }
func NewGqlServer ¶
func NewGqlServer(res GqlResolver, port string, corsOptions *cors.Options) *GqlServer
type PersonInput ¶
type PersonRequest ¶
type PersonRequest struct {
ID string
}
type PersonResolver ¶
type PersonResolver struct {
R *Person
}
func (PersonResolver) Email ¶
func (r PersonResolver) Email() string
func (PersonResolver) Friends ¶
func (r PersonResolver) Friends(args FriendsRequest) []*PersonResolver
func (PersonResolver) ID ¶
func (r PersonResolver) ID() graphql.ID
func (PersonResolver) Name ¶
func (r PersonResolver) Name() string
type SearchRequest ¶
type SearchRequest struct {
Text string
}
type SearchResultResolver ¶
type SearchResultResolver struct {
Result interface{}
}
func (*SearchResultResolver) ToFile ¶
func (r *SearchResultResolver) ToFile() (*FileResolver, bool)
func (*SearchResultResolver) ToFolder ¶
func (r *SearchResultResolver) ToFolder() (*FolderResolver, bool)
Click to show internal directories.
Click to hide internal directories.