teambition

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: AGPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBetweenStr

func GetBetweenStr(str, start, end string) string

func New

func New() driver.Driver

Types

type Addition

type Addition struct {
	Region    string `json:"region" type:"select" options:"china,international" required:"true"`
	Cookie    string `json:"cookie" required:"true"`
	ProjectID string `json:"project_id" required:"true"`
	driver.RootID
	OrderBy        string `json:"order_by" type:"select" options:"fileName,fileSize,updated,created" default:"fileName"`
	OrderDirection string `json:"order_direction" type:"select" options:"Asc,Desc" default:"Asc"`
}

type ChunkUpload

type ChunkUpload struct {
	FileUpload
	Storage        string        `json:"storage"`
	MimeType       string        `json:"mimeType"`
	Chunks         int           `json:"chunks"`
	ChunkSize      int           `json:"chunkSize"`
	Created        time.Time     `json:"created"`
	FileMD5        string        `json:"fileMD5"`
	LastUpdated    time.Time     `json:"lastUpdated"`
	UploadedChunks []interface{} `json:"uploadedChunks"`
	Token          struct {
		AppID          string    `json:"AppID"`
		OrganizationID string    `json:"OrganizationID"`
		UserID         string    `json:"UserID"`
		Exp            time.Time `json:"Exp"`
		Storage        string    `json:"Storage"`
		Resource       string    `json:"Resource"`
		Speed          int       `json:"Speed"`
	} `json:"token"`
	DownloadUrl    string      `json:"downloadUrl"`
	ThumbnailUrl   string      `json:"thumbnailUrl"`
	PreviewUrl     string      `json:"previewUrl"`
	ImmPreviewUrl  string      `json:"immPreviewUrl"`
	PreviewExt     string      `json:"previewExt"`
	LastUploadTime interface{} `json:"lastUploadTime"`
}

type Collection

type Collection struct {
	ID      string    `json:"_id"`
	Title   string    `json:"title"`
	Updated time.Time `json:"updated"`
}

type ErrResp

type ErrResp struct {
	Name    string `json:"name"`
	Message string `json:"message"`
}

type FileUpload

type FileUpload struct {
	FileKey        string        `json:"fileKey"`
	FileName       string        `json:"fileName"`
	FileType       string        `json:"fileType"`
	FileSize       int           `json:"fileSize"`
	FileCategory   string        `json:"fileCategory"`
	ImageWidth     int           `json:"imageWidth"`
	ImageHeight    int           `json:"imageHeight"`
	InvolveMembers []interface{} `json:"involveMembers"`
	Source         string        `json:"source"`
	Visible        string        `json:"visible"`
	ParentId       string        `json:"_parentId"`
}

type Teambition

type Teambition struct {
	model.Storage
	Addition
}

func (*Teambition) Config

func (d *Teambition) Config() driver.Config

func (*Teambition) Copy

func (d *Teambition) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Teambition) Drop

func (d *Teambition) Drop(ctx context.Context) error

func (*Teambition) GetAddition

func (d *Teambition) GetAddition() driver.Additional

func (*Teambition) Init

func (d *Teambition) Init(ctx context.Context, storage model.Storage) error
func (d *Teambition) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Teambition) List

func (d *Teambition) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*Teambition) MakeDir

func (d *Teambition) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*Teambition) Move

func (d *Teambition) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Teambition) Put

func (d *Teambition) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*Teambition) Remove

func (d *Teambition) Remove(ctx context.Context, obj model.Obj) error

func (*Teambition) Rename

func (d *Teambition) Rename(ctx context.Context, srcObj model.Obj, newName string) error

type Work

type Work struct {
	ID           string    `json:"_id"`
	FileName     string    `json:"fileName"`
	FileSize     int64     `json:"fileSize"`
	FileKey      string    `json:"fileKey"`
	FileCategory string    `json:"fileCategory"`
	DownloadURL  string    `json:"downloadUrl"`
	ThumbnailURL string    `json:"thumbnailUrl"`
	Thumbnail    string    `json:"thumbnail"`
	Updated      time.Time `json:"updated"`
	PreviewURL   string    `json:"previewUrl"`
}

Jump to

Keyboard shortcuts

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