space

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	RegisterSyncer(sync services.Syncer)
	OpenFile(ctx context.Context, path string, bucketName string) (domain.OpenFileInfo, error)
	GetConfig(ctx context.Context) domain.AppConfig
	ListDirs(ctx context.Context, path string, bucketName string) ([]domain.FileInfo, error)
	ListDir(ctx context.Context, path string, bucketName string) ([]domain.FileInfo, error)
	GenerateKeyPair(ctx context.Context, useForce bool) (domain.KeyPair, error)
	CreateFolder(ctx context.Context, path string, bucketName string) error
	CreateBucket(ctx context.Context, slug string) (textile.Bucket, error)
	ListBuckets(ctx context.Context) ([]textile.Bucket, error)
	AddItems(ctx context.Context, sourcePaths []string, targetPath string, bucketName string) (<-chan domain.AddItemResult, domain.AddItemsResponse, error)
	CreateIdentity(ctx context.Context, username string) (*domain.Identity, error)
	GetIdentityByUsername(ctx context.Context, username string) (*domain.Identity, error)
	GenerateFileSharingLink(ctx context.Context, path string, bucketName string) (domain.FileSharingInfo, error)
	OpenSharedFile(ctx context.Context, cid, key, filename string) (domain.OpenFileInfo, error)
	ShareBucket(ctx context.Context, slug string) (*domain.ThreadInfo, error)
	JoinBucket(ctx context.Context, slug string, threadinfo *domain.ThreadInfo) (bool, error)
}

Service Layer should not depend on gRPC dependencies

func NewService

func NewService(
	store store.Store,
	tc textile.Client,
	sync services.Syncer,
	cfg config.Config,
	kc keychain.Keychain,
	opts ...ServiceOption,
) (Service, error)

type ServiceOption

type ServiceOption func(o *serviceOptions)

func WithEnv

func WithEnv(env env.SpaceEnv) ServiceOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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