client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetBaseThreadsContext(ctx context.Context) (context.Context, error)
	GetBucketContext(ctx context.Context, bucketSlug string) (context.Context, *thread.ID, error)
	GetThreadsConnection() (*threadsClient.Client, error)
	ListBuckets(ctx context.Context) ([]*TextileBucketRoot, error)
	CreateBucket(ctx context.Context, bucketSlug string) (*TextileBucketRoot, error)
	Start(cfg config.Config) error
	Stop() error
	WaitForReady() chan bool
	StartAndBootstrap(ctx context.Context, cfg config.Config) error
	FolderExists(ctx context.Context, key string, path string) (bool, error)
	FileExists(ctx context.Context, key string, path string, r io.Reader) (bool, error)
	UploadFile(
		ctx context.Context,
		bucketKey string,
		path string,
		reader io.Reader,
	) (result path.Resolved, root path.Path, err error)
	GetFile(
		ctx context.Context,
		bucketKey string,
		path string,
		w io.Writer,
	) error
	CreateDirectory(
		ctx context.Context,
		bucketKey string,
		path string,
	) (result path.Resolved, root path.Path, err error)
	ListDirectory(
		ctx context.Context,
		bucketKey string,
		path string,
	) (*TextileDirEntries, error)
	DeleteDirOrFile(
		ctx context.Context,
		bucketKey string,
		path string,
	) (path.Resolved, error)
}

func New

func New(store db.Store) Client

Creates a new Textile Client

type TextileBucketRoot

type TextileBucketRoot buckets_pb.Root

type TextileDirEntries

type TextileDirEntries buckets_pb.ListPathReply

Jump to

Keyboard shortcuts

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