mediatrack

package
v3.37.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: AGPL-3.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	AccessToken string `json:"access_token" required:"true"`
	ProjectID   string `json:"project_id"`
	driver.RootID
	OrderBy   string `json:"order_by" type:"select" options:"updated_at,title,size" default:"title"`
	OrderDesc bool   `json:"order_desc"`
}

type BaseResp

type BaseResp struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type ChildrenResp

type ChildrenResp struct {
	Status string `json:"status"`
	Data   struct {
		Total  int    `json:"total"`
		Assets []File `json:"assets"`
	} `json:"data"`
	Path      string `json:"path"`
	TraceID   string `json:"trace_id"`
	RequestID string `json:"requestId"`
}

type File

type File struct {
	Category     int           `json:"category"`
	ChildAssets  []interface{} `json:"childAssets"`
	CommentCount int           `json:"comment_count"`
	CoverAsset   interface{}   `json:"cover_asset"`
	CoverAssetID string        `json:"cover_asset_id"`
	CreatedAt    time.Time     `json:"created_at"`
	DeletedAt    string        `json:"deleted_at"`
	Description  string        `json:"description"`
	File         *struct {
		Cover string `json:"cover"`
		Src   string `json:"src"`
	} `json:"file"`
	//FileID string `json:"file_id"`
	ID string `json:"id"`

	Size       string        `json:"size"`
	Thumbnails []interface{} `json:"thumbnails"`
	Title      string        `json:"title"`
	UpdatedAt  time.Time     `json:"updated_at"`
}

type MediaTrack

type MediaTrack struct {
	model.Storage
	Addition
}

func (*MediaTrack) Config

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

func (*MediaTrack) Copy

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

func (*MediaTrack) Drop

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

func (*MediaTrack) GetAddition

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

func (*MediaTrack) Init

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

func (*MediaTrack) List

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

func (*MediaTrack) MakeDir

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

func (*MediaTrack) Move

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

func (*MediaTrack) Put

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

func (*MediaTrack) Remove

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

func (*MediaTrack) Rename

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

type Object added in v3.7.1

type Object struct {
	model.Object
	model.Thumbnail
	ParentID string
}

type UploadResp

type UploadResp struct {
	Status string `json:"status"`
	Data   struct {
		Credentials struct {
			TmpSecretID  string    `json:"TmpSecretId"`
			TmpSecretKey string    `json:"TmpSecretKey"`
			Token        string    `json:"Token"`
			ExpiredTime  int       `json:"ExpiredTime"`
			Expiration   time.Time `json:"Expiration"`
			StartTime    int       `json:"StartTime"`
		} `json:"credentials"`
		Object string `json:"object"`
		Bucket string `json:"bucket"`
		Region string `json:"region"`
		URL    string `json:"url"`
		Size   string `json:"size"`
	} `json:"data"`
	Path      string `json:"path"`
	TraceID   string `json:"trace_id"`
	RequestID string `json:"requestId"`
}

Jump to

Keyboard shortcuts

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