bucketsd

package
v2.6.20 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrArchivingFeatureDisabled indicates an archive was requested with archiving disabled.
	ErrArchivingFeatureDisabled = errors.New("archiving feature is disabled")

	// ErrStorageQuotaExhausted indicates the requested operation exceeds the storage allowance.
	ErrStorageQuotaExhausted = errors.New("storage quota exhausted")
)

Functions

This section is empty.

Types

type Service

type Service struct {
	Collections               *mdb.Collections
	Buckets                   *tdb.Buckets
	GatewayURL                string
	GatewayBucketsHost        string
	IPFSClient                iface.CoreAPI
	IPNSManager               *ipns.Manager
	PowergateClient           *pow.Client
	PowergateAdminToken       string
	ArchiveTracker            *tracker.Tracker
	FilRetrieval              *retrieval.FilRetrieval
	Semaphores                *nutil.SemaphorePool
	MaxBucketArchiveSize      int64
	MinBucketArchiveSize      int64
	MaxBucketArchiveRepFactor int
}

Service is a gRPC service for buckets.

func (*Service) Archive

func (s *Service) Archive(ctx context.Context, req *pb.ArchiveRequest) (*pb.ArchiveResponse, error)

func (*Service) ArchiveWatch

func (s *Service) ArchiveWatch(req *pb.ArchiveWatchRequest, server pb.APIService_ArchiveWatchServer) error

func (*Service) Archives added in v2.2.0

func (s *Service) Archives(ctx context.Context, req *pb.ArchivesRequest) (*pb.ArchivesResponse, error)

func (*Service) Create

func (s *Service) Create(ctx context.Context, req *pb.CreateRequest) (*pb.CreateResponse, error)

func (*Service) CreateBucket added in v2.6.0

func (s *Service) CreateBucket(ctx context.Context,
	threadID thread.ID,
	threadToken thread.Token,
	buckName string,
	buckPrivate bool,
	dataCid cid.Cid) error

CreateBucket is a wrapper to enable creating a bucket from an internal method. TODO(**): We should consider refactor createBucket code (and other related stuff) out of `Service`, since this logic is useful for other cases than serving APIs.

func (*Service) DefaultArchiveConfig

func (s *Service) DefaultArchiveConfig(
	ctx context.Context,
	req *pb.DefaultArchiveConfigRequest,
) (*pb.DefaultArchiveConfigResponse, error)
func (s *Service) Links(ctx context.Context, req *pb.LinksRequest) (*pb.LinksResponse, error)

func (*Service) List

func (s *Service) List(ctx context.Context, _ *pb.ListRequest) (*pb.ListResponse, error)

func (*Service) ListIpfsPath

func (s *Service) ListIpfsPath(ctx context.Context, req *pb.ListIpfsPathRequest) (*pb.ListIpfsPathResponse, error)

func (*Service) ListPath

func (s *Service) ListPath(ctx context.Context, req *pb.ListPathRequest) (*pb.ListPathResponse, error)

func (*Service) MovePath added in v2.6.4

func (s *Service) MovePath(ctx context.Context, req *pb.MovePathRequest) (res *pb.MovePathResponse, err error)

MovePath moves source path to destination path and cleans up afterward

func (*Service) PullIpfsPath

func (s *Service) PullIpfsPath(req *pb.PullIpfsPathRequest, server pb.APIService_PullIpfsPathServer) error

func (*Service) PullPath

func (s *Service) PullPath(req *pb.PullPathRequest, server pb.APIService_PullPathServer) error

func (*Service) PullPathAccessRoles

func (s *Service) PullPathAccessRoles(
	ctx context.Context,
	req *pb.PullPathAccessRolesRequest,
) (*pb.PullPathAccessRolesResponse, error)

func (*Service) PushPath

func (s *Service) PushPath(server pb.APIService_PushPathServer) (err error)

func (*Service) PushPathAccessRoles

func (s *Service) PushPathAccessRoles(
	ctx context.Context,
	req *pb.PushPathAccessRolesRequest,
) (res *pb.PushPathAccessRolesResponse, err error)

func (*Service) PushPaths added in v2.6.0

func (s *Service) PushPaths(server pb.APIService_PushPathsServer) error

func (*Service) Remove

func (s *Service) Remove(ctx context.Context, req *pb.RemoveRequest) (*pb.RemoveResponse, error)

func (*Service) RemovePath

func (s *Service) RemovePath(ctx context.Context, req *pb.RemovePathRequest) (res *pb.RemovePathResponse, err error)

func (*Service) Root

func (s *Service) Root(ctx context.Context, req *pb.RootRequest) (*pb.RootResponse, error)

func (*Service) SetDefaultArchiveConfig

func (s *Service) SetDefaultArchiveConfig(
	ctx context.Context,
	req *pb.SetDefaultArchiveConfigRequest,
) (*pb.SetDefaultArchiveConfigResponse, error)

func (*Service) SetPath

func (s *Service) SetPath(ctx context.Context, req *pb.SetPathRequest) (res *pb.SetPathResponse, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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