lark

package
v3.61.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: AGPL-3.0 Imports: 25 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 {
	// Usually one of two
	driver.RootPath
	// define other
	AppId                    string `json:"app_id" type:"text" help:"app id"`
	AppSecret                string `json:"app_secret" type:"text" help:"app secret"`
	UserAccessToken          string `json:"user_access_token" type:"text" help:"optional cached user access token for personal drive access"`
	RefreshToken             string `json:"refresh_token" type:"text" help:"optional refresh token for user access token auto refresh"`
	UserAccessTokenExpiresAt int64  `json:"user_access_token_expires_at" type:"number" help:"user access token expires at unix timestamp"`
	RefreshTokenExpiresAt    int64  `json:"refresh_token_expires_at" type:"number" help:"refresh token expires at unix timestamp"`
	ExternalMode             bool   `json:"external_mode" type:"bool" help:"external mode"`
	TenantUrlPrefix          string `json:"tenant_url_prefix" type:"text" help:"tenant url prefix"`
}

type Lark

type Lark struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*Lark) Config

func (c *Lark) Config() driver.Config

func (*Lark) Copy

func (c *Lark) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Lark) DownloadExportFile added in v3.61.0

func (c *Lark) DownloadExportFile(ctx context.Context, fileToken string) (io.Reader, string, error)

func (*Lark) Drop

func (c *Lark) Drop(ctx context.Context) error

func (*Lark) GetAddition

func (c *Lark) GetAddition() driver.Additional

func (*Lark) Init

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

func (*Lark) List

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

func (*Lark) MakeDir

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

func (*Lark) Move

func (c *Lark) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Lark) Other added in v3.61.0

func (c *Lark) Other(ctx context.Context, args model.OtherArgs) (interface{}, error)

func (*Lark) Put

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

func (*Lark) Remove

func (c *Lark) Remove(ctx context.Context, obj model.Obj) error

func (*Lark) Rename

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

type LarkExportCreateResp added in v3.61.0

type LarkExportCreateResp struct {
	Ticket string `json:"ticket"`
	Token  string `json:"token"`
	Type   string `json:"type"`
	Format string `json:"format"`
	SubID  string `json:"sub_id,omitempty"`
}

type LarkExportOption added in v3.61.0

type LarkExportOption struct {
	Value         string `json:"value"`
	Label         string `json:"label"`
	RequiresSubID bool   `json:"requires_sub_id"`
}

type LarkExportOptionsResp added in v3.61.0

type LarkExportOptionsResp struct {
	Type             string                  `json:"type"`
	Formats          []LarkExportOption      `json:"formats"`
	SubResources     []LarkExportSubResource `json:"sub_resources,omitempty"`
	SubResourceError string                  `json:"sub_resource_error,omitempty"`
}

type LarkExportStatusResp added in v3.61.0

type LarkExportStatusResp struct {
	Status       string `json:"status"`
	FileToken    string `json:"file_token,omitempty"`
	FileSize     int    `json:"file_size,omitempty"`
	JobStatus    int    `json:"job_status,omitempty"`
	ErrorMessage string `json:"error_message,omitempty"`
	ErrorDetail  string `json:"error_detail,omitempty"`
}

type LarkExportSubResource added in v3.61.0

type LarkExportSubResource struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type TokenCache

type TokenCache struct {
	cache.ICache[string]
}

func (*TokenCache) Get

func (t *TokenCache) Get(_ context.Context, key string) (string, error)

func (*TokenCache) Set

func (t *TokenCache) Set(_ context.Context, key string, value string, expireTime time.Duration) error

Jump to

Keyboard shortcuts

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