dataset

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanRemoteObjectPrefix

func CleanRemoteObjectPrefix(raw string) string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(options Options) *Client

func NewFromConfig

func NewFromConfig(cfg config.Config) *Client

func (*Client) DownloadDir

func (c *Client) DownloadDir(
	ctx context.Context,
	where generated.DataStorageWhereUniqueInput,
	data DownloadDirInput,
	fileCountChan chan<- int,
	resultChan chan<- interface{},
	options *DownloadDirOptions) error

func (*Client) DownloadFile

func (*Client) List

func (c *Client) List(ctx context.Context, whereAccount generated.AccountWhereUniqueInput, whereDataStorage *generated.DataStorageWhereInput) (dataStorages []generated.DataStorageFragment, err error)

func (*Client) NewListObjectsPager added in v0.0.6

func (c *Client) NewListObjectsPager(ctx context.Context, where generated.DataStorageWhereUniqueInput, input *ListObjectsInput) (pager implementable.ListObjectsPager, err error)

func (*Client) UploadDir

func (c *Client) UploadDir(
	ctx context.Context,
	where generated.DataStorageWhereUniqueInput,
	data UploadDirInput,
	fileCountChan chan<- int,
	resultChan chan<- interface{},
	options *UploadDirOptions) error

UploadDir uploads a local directory to a remote directory in the data storage container. This function is meant to be used as a goroutine.

func (*Client) UploadFile

type DownloadDirInput

type DownloadDirInput struct {
	RemoteObjectPrefix string
	DestAbsPath        string
}

type DownloadDirOptions

type DownloadDirOptions struct {
	// Concurrency is the number of workers to execute.
	// Default is number of CPUs available.
	Concurrency *int
}

type DownloadFileInput

type DownloadFileInput struct {
	RemoteObjectKey string
	DestAbsPath     string
}

type ListObjectsInput added in v0.0.6

type ListObjectsInput = implementable.ListObjectsInput

type Options

type Options struct {
	Credentials credentials.Provider
	API         api.Provider
}

type UploadDirInput

type UploadDirInput struct {
	SrcAbsPath         string
	RemoteObjectPrefix string
}

type UploadDirOptions

type UploadDirOptions struct {
	// Concurrency is the number of workers to execute.
	// Default is number of CPUs available.
	Concurrency *int
}

type UploadFileInput

type UploadFileInput struct {
	SrcAbspath      string
	RemoteObjectKey string
}

Jump to

Keyboard shortcuts

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