Documentation
¶
Index ¶
- Constants
- Variables
- func GetDefaultBucketSlug() string
- func GetDefaultMirrorBucketSlug() string
- func NewClient(store db.Store, kc keychain.Keychain, hubAuth hub.HubAuth, uc UsersClient, ...) *textileClient
- func NewListener(client Client, bucketSlug string, handlers []EventHandler) *listener
- func NotFound(slug string) error
- type Buckd
- type Bucket
- type BucketRoot
- type Client
- type EventHandler
- type GetBucketForRemoteFileInput
- type GrpcMailboxNotifier
- type Listener
- type Mailbox
- type SecureBucketClient
- func (s *SecureBucketClient) ListIpfsPath(ctx context.Context, pth path.Path) (*bucketspb.ListIpfsPathResponse, error)
- func (s *SecureBucketClient) ListPath(ctx context.Context, key, path string) (*bucketspb.ListPathResponse, error)
- func (s *SecureBucketClient) PullPath(ctx context.Context, key, path string, writer io.Writer, opts ...bc.Option) error
- func (s *SecureBucketClient) PullPathAccessRoles(ctx context.Context, key, path string) (map[string]buckets.Role, error)
- func (s *SecureBucketClient) PushPath(ctx context.Context, key, path string, reader io.Reader, opts ...bc.Option) (result path.Resolved, root path.Resolved, err error)
- func (s *SecureBucketClient) PushPathAccessRoles(ctx context.Context, key, path string, roles map[string]buckets.Role) error
- func (s *SecureBucketClient) RemovePath(ctx context.Context, key, path string, opts ...bc.Option) (path.Resolved, error)
- type TextileBuckd
- type UsersClient
Constants ¶
View Source
const FileCachePrefix = "file_cache"
Variables ¶
View Source
var HealthcheckMaxRetriesReachedErr = errors.New(fmt.Sprintf("textile client not initialized after %d attempts", healthcheckFailuresBeforeUnhealthy))
View Source
var IpfsAddr string
View Source
var MaxThreadsConn int
View Source
var MinThreadsConn int
Functions ¶
func GetDefaultBucketSlug ¶ added in v0.0.14
func GetDefaultBucketSlug() string
func GetDefaultMirrorBucketSlug ¶ added in v0.0.14
func GetDefaultMirrorBucketSlug() string
func NewClient ¶
func NewClient( store db.Store, kc keychain.Keychain, hubAuth hub.HubAuth, uc UsersClient, mb Mailbox, search search.FilesSearchEngine, ) *textileClient
Creates a new Textile Client
func NewListener ¶
func NewListener(client Client, bucketSlug string, handlers []EventHandler) *listener
Types ¶
type Bucket ¶
type Bucket interface { bucket.BucketInterface }
type BucketRoot ¶
type BucketRoot buckets_pb.Root
type Client ¶
type Client interface { IsRunning() bool IsInitialized() bool IsHealthy() bool GetDefaultBucket(ctx context.Context) (Bucket, error) GetBucket(ctx context.Context, slug string, remoteFile *GetBucketForRemoteFileInput) (Bucket, error) GetThreadsConnection() (*threadsClient.Client, error) GetModel() model.Model ListBuckets(ctx context.Context) ([]Bucket, error) JoinBucket(ctx context.Context, slug string, ti *domain.ThreadInfo) (bool, error) CreateBucket(ctx context.Context, bucketSlug string) (Bucket, error) ToggleBucketBackup(ctx context.Context, bucketSlug string, bucketBackup bool) (bool, error) BucketBackupRestore(ctx context.Context, bucketSlug string) error SendMessage(ctx context.Context, recipient crypto.PubKey, body []byte) (*client.Message, error) Shutdown() error WaitForReady() chan bool WaitForHealthy() chan error WaitForInitialized() chan bool Start(ctx context.Context, cfg config.Config) error GetMailAsNotifications(ctx context.Context, seek string, limit int) ([]*domain.Notification, error) ctx context.Context, cidHash, password, filename, fileSize string, ) (*domain.SharedDirEntry, error) RemoveKeys(ctx context.Context) error AttachMailboxNotifier(notif GrpcMailboxNotifier) AttachSynchronizerNotifier(notif sync.EventNotifier) GetReceivedFiles(ctx context.Context, accepted bool, seek string, limit int) ([]*domain.SharedDirEntry, string, error) GetPublicReceivedFile(ctx context.Context, cidHash string, accepted bool) (*domain.SharedDirEntry, string, error) GetSentFiles(ctx context.Context, seek string, limit int) ([]*domain.SharedDirEntry, string, error) GetPathAccessRoles(ctx context.Context, b Bucket, path string) ([]domain.Member, error) DownloadPublicGatewayItem(ctx context.Context, cid cid.Cid) (io.ReadCloser, error) GetFailedHealthchecks() int DeleteAccount(ctx context.Context) error Listen(ctx context.Context, dbID, threadName string) (<-chan threadsClient.ListenEvent, error) RestoreDB(ctx context.Context) error DisableSync() }
type EventHandler ¶
type EventHandler interface { OnCreate(bucketData *bucket.BucketData, listenEvent *tc.ListenEvent) OnRemove(bucketData *bucket.BucketData, listenEvent *tc.ListenEvent) OnSave(bucketData *bucket.BucketData, listenEvent *tc.ListenEvent) }
EventHandler
type GetBucketForRemoteFileInput ¶ added in v0.0.14
type GrpcMailboxNotifier ¶ added in v0.0.13
type GrpcMailboxNotifier interface {
SendNotificationEvent(notif *domain.Notification)
}
type Mailbox ¶ added in v0.0.13
type Mailbox interface { ListInboxMessages(ctx context.Context, opts ...client.ListOption) ([]client.Message, error) SendMessage(ctx context.Context, to thread.PubKey, body []byte) (msg client.Message, err error) WatchInbox(ctx context.Context, mevents chan<- mail.MailboxEvent, offline bool) (<-chan cmd.WatchState, error) Identity() thread.Identity }
type SecureBucketClient ¶ added in v0.0.13
type SecureBucketClient struct {
// contains filtered or unexported fields
}
SecureBucketClient implements the BucketsClient Interface It encrypts data being pushed to the underlying textile client and also decrypts response from the underlying textile client
func NewSecureBucketsClient ¶ added in v0.0.13
func NewSecureBucketsClient( client *bucketsClient.Client, kc keychain.Keychain, st store.Store, threads *threadsClient.Client, ipfsClient iface.CoreAPI, isRemote bool, ) *SecureBucketClient
func (*SecureBucketClient) ListIpfsPath ¶ added in v0.0.19
func (s *SecureBucketClient) ListIpfsPath(ctx context.Context, pth path.Path) (*bucketspb.ListIpfsPathResponse, error)
func (*SecureBucketClient) ListPath ¶ added in v0.0.13
func (s *SecureBucketClient) ListPath(ctx context.Context, key, path string) (*bucketspb.ListPathResponse, error)
func (*SecureBucketClient) PullPathAccessRoles ¶ added in v0.0.14
func (*SecureBucketClient) PushPathAccessRoles ¶ added in v0.0.14
type TextileBuckd ¶
type TextileBuckd struct { IsRunning bool Ready chan bool // contains filtered or unexported fields }
func NewBuckd ¶
func NewBuckd(cfg config.Config) *TextileBuckd
func (*TextileBuckd) Shutdown ¶
func (tb *TextileBuckd) Shutdown() error
func (*TextileBuckd) Stop ¶
func (tb *TextileBuckd) Stop() error
func (*TextileBuckd) WaitForReady ¶ added in v0.0.11
func (tb *TextileBuckd) WaitForReady() chan bool
type UsersClient ¶ added in v0.0.13
type UsersClient interface { ListInboxMessages(ctx context.Context, opts ...client.ListOption) ([]client.Message, error) SendMessage(ctx context.Context, from thread.Identity, to thread.PubKey, body []byte) (msg client.Message, err error) SetupMailbox(ctx context.Context) (mailbox thread.ID, err error) }
func CreateUserClient ¶ added in v0.0.13
func CreateUserClient(host string) UsersClient
Source Files
¶
Click to show internal directories.
Click to hide internal directories.