Documentation ¶
Index ¶
- Variables
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type Dir
- type DirResolver
- type DirectiveRoot
- type Encoding
- type FS
- type File
- type FileContents
- type FileMode
- type FileOpen
- type FileResult
- type FileResultResolver
- type FileType
- type Int64
- type Internal_OtherFile
- type Internal_OtherFileResolver
- type MutationResolver
- type OKResult
- type QueryResolver
- type RegularFile
- type RegularFileResolver
- type Resolver
- type ResolverRoot
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidEncoding = errors.New("Invalid encoding")
ErrInvalidEncoding is returned if the Encoding is not valid.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Dir struct { Id func(childComplexity int) int Name func(childComplexity int) int Path func(childComplexity int) int Size func(childComplexity int) int Mode func(childComplexity int) int ModTime func(childComplexity int) int Parent func(childComplexity int) int Children func(childComplexity int, first int) int File func(childComplexity int, path string) int } FileContents struct { Data func(childComplexity int) int Next func(childComplexity int) int Encoding func(childComplexity int) int Warning func(childComplexity int) int } FileMode struct { Type func(childComplexity int) int Perm func(childComplexity int) int Sticky func(childComplexity int) int } FileResult struct { S func(childComplexity int) int Warning func(childComplexity int) int File func(childComplexity int) int } InternalOtherFile struct { Id func(childComplexity int) int Name func(childComplexity int) int Path func(childComplexity int) int Size func(childComplexity int) int Mode func(childComplexity int) int ModTime func(childComplexity int) int Parent func(childComplexity int) int } Mutation struct { Remove func(childComplexity int, path string) int Rename func(childComplexity int, path string, newName string) int Chmod func(childComplexity int, path string, mode int) int Write func(childComplexity int, path string, contents string, open []FileOpen, encoding Encoding) int Mkdir func(childComplexity int, path string) int MkdirAll func(childComplexity int, path string) int } Okresult struct { S func(childComplexity int) int Warning func(childComplexity int) int } Query struct { Root func(childComplexity int) int Cd func(childComplexity int, path string) int File func(childComplexity int, path string) int } RegularFile struct { Id func(childComplexity int) int Name func(childComplexity int) int Path func(childComplexity int) int Size func(childComplexity int) int Mode func(childComplexity int) int ModTime func(childComplexity int) int Parent func(childComplexity int) int Contents func(childComplexity int, encoding Encoding, maxReadBytes Int64, seek Int64) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirResolver ¶
type DirectiveRoot ¶
type Encoding ¶
type Encoding string
file contents (read) or write encoding
func (Encoding) MarshalGQL ¶
func (*Encoding) UnmarshalGQL ¶
type FileContents ¶
type FileContents struct { Data string `json:"data"` Next *Int64 `json:"next"` Encoding Encoding `json:"encoding"` Warning *string `json:"warning"` }
the contents of a file
type FileMode ¶
type FileMode struct { Type FileType `json:"type"` Perm int `json:"perm"` Sticky bool `json:"sticky"` }
a representation of the file's mode
type FileOpen ¶
type FileOpen string
specifies how a file is to be opened
func (FileOpen) MarshalGQL ¶
func (*FileOpen) UnmarshalGQL ¶
type FileResult ¶
type FileResult struct { S string `json:"s"` Warning *string `json:"warning"` // contains filtered or unexported fields }
func (FileResult) IsResult ¶
func (FileResult) IsResult()
type FileResultResolver ¶
type FileResultResolver interface {
File(ctx context.Context, obj *FileResult) (File, error)
}
type FileType ¶
type FileType string
const ( FileTypeRegular FileType = "regular" FileTypeDir FileType = "dir" FileTypeSymlink FileType = "symlink" FileTypeNamedPipe FileType = "namedPipe" FileTypeSocket FileType = "socket" FileTypeDevice FileType = "device" FileTypeCharDevice FileType = "charDevice" FileTypeIrregular FileType = "irregular" )
func (FileType) MarshalGQL ¶
func (*FileType) UnmarshalGQL ¶
type Internal_OtherFile ¶
type Internal_OtherFile struct {
// contains filtered or unexported fields
}
type Internal_OtherFileResolver ¶
type Internal_OtherFileResolver interface {
Parent(ctx context.Context, obj *Internal_OtherFile) (File, error)
}
type MutationResolver ¶
type MutationResolver interface { Remove(ctx context.Context, path string) (OKResult, error) Rename(ctx context.Context, path string, newName string) (FileResult, error) Chmod(ctx context.Context, path string, mode int) (FileResult, error) Write(ctx context.Context, path string, contents string, open []FileOpen, encoding Encoding) (FileResult, error) Mkdir(ctx context.Context, path string) (FileResult, error) MkdirAll(ctx context.Context, path string) (FileResult, error) }
type QueryResolver ¶
type RegularFile ¶
type RegularFile struct {
// contains filtered or unexported fields
}
type RegularFileResolver ¶
type RegularFileResolver interface { Parent(ctx context.Context, obj *RegularFile) (File, error) Contents(ctx context.Context, obj *RegularFile, encoding Encoding, maxReadBytes Int64, seek Int64) (FileContents, error) }
type Resolver ¶
type Resolver struct {
RootFS FS
}
func (*Resolver) Dir ¶
func (r *Resolver) Dir() DirResolver
func (*Resolver) FileResult ¶
func (r *Resolver) FileResult() FileResultResolver
func (*Resolver) Internal_OtherFile ¶
func (r *Resolver) Internal_OtherFile() Internal_OtherFileResolver
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
func (*Resolver) RegularFile ¶
func (r *Resolver) RegularFile() RegularFileResolver
type ResolverRoot ¶
type ResolverRoot interface { Dir() DirResolver FileResult() FileResultResolver Internal_OtherFile() Internal_OtherFileResolver Mutation() MutationResolver Query() QueryResolver RegularFile() RegularFileResolver }
Click to show internal directories.
Click to hide internal directories.