Documentation ¶
Index ¶
- Constants
- Variables
- type CacheImpl
- type Config
- type Drive
- type FolderCache
- type Fs
- type Node
- type Nodes
- type Personal
- type Space
- type Teambition
- func (teambition *Teambition) Copy(ctx context.Context, node *Node, parent *Node) error
- func (teambition *Teambition) CreateFile(ctx context.Context, path string, size int64, in io.Reader, overwrite bool) (*Node, error)
- func (teambition *Teambition) CreateFileIn(ctx context.Context, parent *Node, name string, size int64, in io.Reader, ...) (*Node, error)
- func (teambition *Teambition) CreateFolder(ctx context.Context, path string) (*Node, error)
- func (teambition *Teambition) CreateFolderIn(ctx context.Context, parent *Node, name string) (*Node, error)
- func (teambition *Teambition) Delete(ctx context.Context, node *Node) error
- func (teambition *Teambition) Get(ctx context.Context, path string, kind string) (*Node, error)
- func (teambition *Teambition) GetIn(ctx context.Context, parent *Node, name string, kind string) (*Node, error)
- func (teambition *Teambition) GetbyNodeId(ctx context.Context, nodeId string) (*Node, error)
- func (teambition *Teambition) List(ctx context.Context, path string) ([]Node, error)
- func (teambition *Teambition) Move(ctx context.Context, node *Node, parent *Node) error
- func (teambition *Teambition) Open(ctx context.Context, node *Node, headers map[string]string) (io.ReadCloser, error)
- func (teambition *Teambition) Remove(ctx context.Context, node *Node) error
- func (teambition *Teambition) Rename(ctx context.Context, node *Node, newName string) error
- func (teambition *Teambition) String() string
- type UploadResult
Constants ¶
View Source
const AnyKind = "any"
View Source
const FileKind = "file"
View Source
const FolderKind = "folder"
Variables ¶
View Source
var BaseUrl = "https://pan.teambition.com"
Functions ¶
This section is empty.
Types ¶
type FolderCache ¶
func NewCache ¶
func NewCache(size int) (FolderCache, error)
type Fs ¶
type Fs interface { Get(ctx context.Context, path string, kind string) (*Node, error) GetbyNodeId(ctx context.Context, nodeId string) (*Node, error) GetIn(ctx context.Context, parent *Node, name string, kind string) (*Node, error) List(ctx context.Context, path string) ([]Node, error) CreateFolder(ctx context.Context, path string) (*Node, error) CreateFolderIn(ctx context.Context, parent *Node, name string) (*Node, error) Rename(ctx context.Context, node *Node, newName string) error Move(ctx context.Context, node *Node, parent *Node) error Remove(ctx context.Context, node *Node) error Open(ctx context.Context, node *Node, headers map[string]string) (io.ReadCloser, error) CreateFile(ctx context.Context, path string, size int64, in io.Reader, overwrite bool) (*Node, error) CreateFileIn(ctx context.Context, parent *Node, name string, size int64, in io.Reader, overwrite bool) (*Node, error) Delete(ctx context.Context, node *Node) error Copy(ctx context.Context, node *Node, parent *Node) error }
type Node ¶
type Node struct { DownloadUrl string `json:"downloadUrl,omitempty"` Kind string `json:"kind"` Name string `json:"name"` NodeId string `json:"nodeId"` ParentId string `json:"parentId,omitempty"` Size int64 `json:"size,omitempty"` Updated string `json:"updated"` }
func (*Node) IsDirectory ¶
type Teambition ¶
type Teambition struct { ApiBaseUrl string // contains filtered or unexported fields }
func (*Teambition) CreateFile ¶
func (*Teambition) CreateFileIn ¶
func (*Teambition) CreateFolder ¶
func (*Teambition) CreateFolderIn ¶
func (*Teambition) Delete ¶
func (teambition *Teambition) Delete(ctx context.Context, node *Node) error
func (*Teambition) GetbyNodeId ¶
func (*Teambition) Open ¶
func (teambition *Teambition) Open(ctx context.Context, node *Node, headers map[string]string) (io.ReadCloser, error)
func (*Teambition) Remove ¶
func (teambition *Teambition) Remove(ctx context.Context, node *Node) error
func (*Teambition) String ¶
func (teambition *Teambition) String() string
Click to show internal directories.
Click to hide internal directories.