Documentation
¶
Index ¶
- Variables
- func FileExtension(t DocType) string
- func IsDirectory(t DocType) bool
- func IsReadOnly(t DocType) bool
- type BitableHandler
- func (h *BitableHandler) Create(_ context.Context, _ string, _ string, _ []byte) (string, error)
- func (h *BitableHandler) Delete(ctx context.Context, token string) error
- func (h *BitableHandler) Extension() string
- func (h *BitableHandler) IsDirectory() bool
- func (h *BitableHandler) List(ctx context.Context, token string) ([]Entry, error)
- func (h *BitableHandler) Read(ctx context.Context, token string) ([]byte, error)
- func (h *BitableHandler) Write(ctx context.Context, token string, data []byte) error
- type DocType
- type DocxHandler
- func (h *DocxHandler) Create(ctx context.Context, parentToken string, name string, data []byte) (string, error)
- func (h *DocxHandler) Delete(ctx context.Context, token string) error
- func (h *DocxHandler) Extension() string
- func (h *DocxHandler) IsDirectory() bool
- func (h *DocxHandler) List(_ context.Context, _ string) ([]Entry, error)
- func (h *DocxHandler) Read(ctx context.Context, token string) ([]byte, error)
- func (h *DocxHandler) Write(ctx context.Context, token string, data []byte) error
- type Entry
- type FileHandler
- func (h *FileHandler) Create(ctx context.Context, parentToken string, name string, data []byte) (string, error)
- func (h *FileHandler) Delete(ctx context.Context, token string) error
- func (h *FileHandler) Extension() string
- func (h *FileHandler) IsDirectory() bool
- func (h *FileHandler) List(_ context.Context, _ string) ([]Entry, error)
- func (h *FileHandler) Read(ctx context.Context, token string) ([]byte, error)
- func (h *FileHandler) Write(ctx context.Context, token string, data []byte) error
- type FolderHandler
- func (h *FolderHandler) Create(ctx context.Context, parentToken string, name string, _ []byte) (string, error)
- func (h *FolderHandler) Delete(ctx context.Context, token string) error
- func (h *FolderHandler) Extension() string
- func (h *FolderHandler) IsDirectory() bool
- func (h *FolderHandler) List(ctx context.Context, token string) ([]Entry, error)
- func (h *FolderHandler) Read(_ context.Context, _ string) ([]byte, error)
- func (h *FolderHandler) Write(_ context.Context, _ string, _ []byte) error
- type ReadonlyHandler
- func (h *ReadonlyHandler) Create(_ context.Context, _ string, _ string, _ []byte) (string, error)
- func (h *ReadonlyHandler) Delete(_ context.Context, _ string) error
- func (h *ReadonlyHandler) Extension() string
- func (h *ReadonlyHandler) IsDirectory() bool
- func (h *ReadonlyHandler) List(_ context.Context, _ string) ([]Entry, error)
- func (h *ReadonlyHandler) Read(ctx context.Context, token string) ([]byte, error)
- func (h *ReadonlyHandler) Write(_ context.Context, _ string, _ []byte) error
- type Registry
- type SheetHandler
- func (h *SheetHandler) Create(ctx context.Context, _ string, name string, _ []byte) (string, error)
- func (h *SheetHandler) Delete(ctx context.Context, token string) error
- func (h *SheetHandler) Extension() string
- func (h *SheetHandler) IsDirectory() bool
- func (h *SheetHandler) List(ctx context.Context, token string) ([]Entry, error)
- func (h *SheetHandler) Read(ctx context.Context, token string) ([]byte, error)
- func (h *SheetHandler) Write(ctx context.Context, token string, data []byte) error
- type TypeHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReadOnly = errors.New("read-only document type")
Functions ¶
func FileExtension ¶
func IsDirectory ¶
func IsReadOnly ¶
Types ¶
type BitableHandler ¶
type BitableHandler struct {
// contains filtered or unexported fields
}
func NewBitableHandler ¶
func NewBitableHandler(exec *cli.Executor) *BitableHandler
func (*BitableHandler) Delete ¶
func (h *BitableHandler) Delete(ctx context.Context, token string) error
func (*BitableHandler) Extension ¶
func (h *BitableHandler) Extension() string
func (*BitableHandler) IsDirectory ¶
func (h *BitableHandler) IsDirectory() bool
type DocxHandler ¶
type DocxHandler struct {
// contains filtered or unexported fields
}
func NewDocxHandler ¶
func NewDocxHandler(exec *cli.Executor) *DocxHandler
func (*DocxHandler) Extension ¶
func (h *DocxHandler) Extension() string
func (*DocxHandler) IsDirectory ¶
func (h *DocxHandler) IsDirectory() bool
type FileHandler ¶
type FileHandler struct {
// contains filtered or unexported fields
}
func NewFileHandler ¶
func NewFileHandler(exec *cli.Executor, cacheDir string) *FileHandler
func (*FileHandler) Extension ¶
func (h *FileHandler) Extension() string
func (*FileHandler) IsDirectory ¶
func (h *FileHandler) IsDirectory() bool
type FolderHandler ¶
type FolderHandler struct {
// contains filtered or unexported fields
}
func NewFolderHandler ¶
func NewFolderHandler(exec *cli.Executor) *FolderHandler
func (*FolderHandler) Delete ¶
func (h *FolderHandler) Delete(ctx context.Context, token string) error
func (*FolderHandler) Extension ¶
func (h *FolderHandler) Extension() string
func (*FolderHandler) IsDirectory ¶
func (h *FolderHandler) IsDirectory() bool
type ReadonlyHandler ¶
type ReadonlyHandler struct {
// contains filtered or unexported fields
}
func NewReadonlyHandler ¶
func NewReadonlyHandler(exec *cli.Executor, docType DocType) *ReadonlyHandler
func (*ReadonlyHandler) Delete ¶
func (h *ReadonlyHandler) Delete(_ context.Context, _ string) error
func (*ReadonlyHandler) Extension ¶
func (h *ReadonlyHandler) Extension() string
func (*ReadonlyHandler) IsDirectory ¶
func (h *ReadonlyHandler) IsDirectory() bool
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) Handler ¶
func (r *Registry) Handler(t DocType) TypeHandler
type SheetHandler ¶
type SheetHandler struct {
// contains filtered or unexported fields
}
func NewSheetHandler ¶
func NewSheetHandler(exec *cli.Executor) *SheetHandler
func (*SheetHandler) Delete ¶
func (h *SheetHandler) Delete(ctx context.Context, token string) error
func (*SheetHandler) Extension ¶
func (h *SheetHandler) Extension() string
func (*SheetHandler) IsDirectory ¶
func (h *SheetHandler) IsDirectory() bool
type TypeHandler ¶
type TypeHandler interface {
IsDirectory() bool
Extension() string
List(ctx context.Context, token string) ([]Entry, error)
Read(ctx context.Context, token string) ([]byte, error)
Write(ctx context.Context, token string, data []byte) error
Create(ctx context.Context, parentToken string, name string, data []byte) (string, error)
Delete(ctx context.Context, token string) error
}
Click to show internal directories.
Click to hide internal directories.