Documentation
¶
Overview ¶
Package drive implements the gro drive command and subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientFactory = func(ctx context.Context) (DriveClient, error) { return drive.NewClient(ctx) }
ClientFactory is the function used to create Drive clients. Override in tests to inject mocks.
Functions ¶
func NewCommand ¶
NewCommand returns the drive parent command with subcommands
Types ¶
type DriveClient ¶ added in v1.0.35
type DriveClient interface {
ListFiles(ctx context.Context, query string, pageSize int64) ([]*drive.File, error)
ListFilesWithScope(ctx context.Context, query string, pageSize int64, scope drive.DriveScope) ([]*drive.File, error)
GetFile(ctx context.Context, fileID string) (*drive.File, error)
DownloadFile(ctx context.Context, fileID string) ([]byte, error)
ExportFile(ctx context.Context, fileID string, mimeType string) ([]byte, error)
}
DriveClient defines the interface for Drive client operations used by drive commands.
Click to show internal directories.
Click to hide internal directories.