services

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPathDir

func IsPathDir(path string) bool

func PathExists

func PathExists(path string) bool

func RemoveDuplicates

func RemoveDuplicates(elements []string) []string

Types

type AddFileWatchFunc added in v0.0.3

type AddFileWatchFunc = func(addFileInfo domain.AddWatchFile) error

type Space

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

Implementation for space.Service

func NewSpace

func NewSpace(st store.Store, tc textile.Client, syncer Syncer, cfg config.Config, env env.SpaceEnv, kc keychain.Keychain) *Space

func (*Space) AddItems

func (s *Space) AddItems(ctx context.Context, sourcePaths []string, targetPath string) (<-chan domain.AddItemResult, domain.AddItemsResponse, error)

func (*Space) CreateBucket added in v0.0.6

func (s *Space) CreateBucket(ctx context.Context, slug string) (textile.Bucket, error)

func (*Space) CreateFolder

func (s *Space) CreateFolder(ctx context.Context, path string) error

func (*Space) CreateIdentity added in v0.0.6

func (s *Space) CreateIdentity(ctx context.Context, username string) (*domain.Identity, error)

Creates an identity in Space cloud services. Returns the created identity or an error if any.

func (*Space) GenerateKeyPair

func (s *Space) GenerateKeyPair(ctx context.Context, useForce bool) (domain.KeyPair, error)

func (*Space) GetConfig

func (s *Space) GetConfig(ctx context.Context) domain.AppConfig

func (*Space) GetIdentityByUsername added in v0.0.6

func (s *Space) GetIdentityByUsername(ctx context.Context, username string) (*domain.Identity, error)

Gets an identity from Space cloud services given a username

func (*Space) ListDir

func (s *Space) ListDir(ctx context.Context, path string) ([]domain.FileInfo, error)

ListDir returns children entries at path in a bucket

func (*Space) ListDirs added in v0.0.4

func (s *Space) ListDirs(ctx context.Context, path string) ([]domain.FileInfo, error)

ListDirs lists all children entries at path in a bucket Unlike ListDir, it includes all subfolders children recursively

func (*Space) OpenFile

func (s *Space) OpenFile(ctx context.Context, path string) (domain.OpenFileInfo, error)

func (*Space) RegisterSyncer added in v0.0.4

func (s *Space) RegisterSyncer(sync Syncer)

type Syncer added in v0.0.4

type Syncer interface {
	AddFileWatch(addFileInfo domain.AddWatchFile) error
	GetOpenFilePath(bucketSlug string, bucketPath string) (string, bool)
}

Jump to

Keyboard shortcuts

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