Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CollectionName is the name of the threaddb collection used for buckets. CollectionName = "buckets" // SeedName is the file name reserved for a random bucket seed. SeedName = ".textileseed" )
Variables ¶
View Source
var ( // ErrNonFastForward is returned when an update in non-fast-forward. ErrNonFastForward = fmt.Errorf("update is non-fast-forward") // ErrNoCurrentArchive is returned when not status about the last archive // can be retrieved, since the bucket was never archived. ErrNoCurrentArchive = fmt.Errorf("the bucket was never archived") // ErrZeroBalance is returned when archiving a bucket which // underlying Account Powergate user balance is zero. ErrZeroBalance = errors.New("wallet FIL balance is zero, if recently created wait 30s") )
Functions ¶
func NewBucketOwnerContext ¶ added in v2.1.4
func NewBucketOwnerContext(ctx context.Context, owner *BucketOwner) context.Context
func RolesFromPb ¶
RolesFromPb maps protobuf type roles to native type roles.
Types ¶
type BucketOwner ¶ added in v2.1.4
BucketOwner provides owner context to the bucket service.
func BucketOwnerFromContext ¶ added in v2.1.4
func BucketOwnerFromContext(ctx context.Context) (*BucketOwner, bool)
type Role ¶
type Role int
Role describes an access role for a bucket item.
func NewRoleFromString ¶
NewRoleFromString returns the role associated with the given string.
Click to show internal directories.
Click to hide internal directories.