Documentation
¶
Index ¶
- func ConcatStorageSpaceID(storageID, spaceID string) string
- func DecodeResourceID(raw string) (storageID, path, itemID string, ok bool)
- func DecodeSpaceID(spaceId string) (string, error)
- func DecodeStorageSpaceID(raw string) (storageID, path string, ok bool)
- func EncodeResourceID(r *provider.ResourceId) string
- func EncodeResourceInfo(info *provider.ResourceInfo) (spaceId string, err error)
- func EncodeSpaceID(spacePath string) string
- func EncodeStorageSpaceID(storageID, path string) string
- func ParseResourceID(raw string) (*provider.ResourceId, bool)
- func PathRelativeToSpaceRoot(info *provider.ResourceInfo) (relativePath string, err error)
- func PathToSpaceID(path string) string
- func ResourceIdFromString(s string) (*provider.ResourceId, error)
- func ResourceIdToString(id *provider.ResourceId) string
- type ListStorageSpaceFilter
- func (f ListStorageSpaceFilter) ByID(id *providerpb.StorageSpaceId) ListStorageSpaceFilter
- func (f ListStorageSpaceFilter) ByOwner(owner *userpb.UserId) ListStorageSpaceFilter
- func (f ListStorageSpaceFilter) ByPath(path string) ListStorageSpaceFilter
- func (f ListStorageSpaceFilter) BySpaceType(spaceType SpaceType) ListStorageSpaceFilter
- func (f ListStorageSpaceFilter) ByUser(user *userpb.UserId) ListStorageSpaceFilter
- func (f ListStorageSpaceFilter) List() []*providerpb.ListStorageSpacesRequest_Filter
- type SpaceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatStorageSpaceID ¶
func DecodeResourceID ¶
Decode resourceID returns the components of the space ID. The resource ID is expected to be in the form of <storage_id>$base32(<path>)!<item_id>.
func DecodeSpaceID ¶
func DecodeStorageSpaceID ¶
DecodeStorageSpaceID returns the components of the storage + space ID. This ID is expected to be in the format <storage_id>$base32(<path>).
func EncodeResourceID ¶
func EncodeResourceID(r *provider.ResourceId) string
EncodeResourceID encodes the provided resource ID as a string, in the format <storage_id>$<space_id>!<item_id>. If space_id or opaque_id is not set on the ResourceId, then this part will not be encoded
func EncodeResourceInfo ¶
func EncodeResourceInfo(info *provider.ResourceInfo) (spaceId string, err error)
EncodeResourceInfo encodes the provided resource ID as a string, in the format <storage_id>$<space_id>!<item_id>. If space_id is not set, it will be calculated from the path. If no path or space_id is set, an error will be returned
func EncodeSpaceID ¶
func EncodeStorageSpaceID ¶
EncodeStorageSpaceID encodes storage ID and space ID. In case of empty space ID, the path is used to create an identifier in the format <storage_id>$base32(<path>), where base32(<path>) is the space ID.
func ParseResourceID ¶
func ParseResourceID(raw string) (*provider.ResourceId, bool)
ParseResourceID converts the encoded resource id in a CS3API ResourceId.
func PathRelativeToSpaceRoot ¶
func PathRelativeToSpaceRoot(info *provider.ResourceInfo) (relativePath string, err error)
Returns the path relative to the space root.
func PathToSpaceID ¶
If the path given is a subfolder of a space, then the ID of that space will be returned. If it is not a subfolder, then the space-encoding (base32) of this full path will be returned.
func ResourceIdFromString ¶
func ResourceIdFromString(s string) (*provider.ResourceId, error)
func ResourceIdToString ¶
func ResourceIdToString(id *provider.ResourceId) string
Types ¶
type ListStorageSpaceFilter ¶
type ListStorageSpaceFilter struct {
// contains filtered or unexported fields
}
func (ListStorageSpaceFilter) ByID ¶
func (f ListStorageSpaceFilter) ByID(id *providerpb.StorageSpaceId) ListStorageSpaceFilter
func (ListStorageSpaceFilter) ByOwner ¶
func (f ListStorageSpaceFilter) ByOwner(owner *userpb.UserId) ListStorageSpaceFilter
func (ListStorageSpaceFilter) ByPath ¶
func (f ListStorageSpaceFilter) ByPath(path string) ListStorageSpaceFilter
func (ListStorageSpaceFilter) BySpaceType ¶
func (f ListStorageSpaceFilter) BySpaceType(spaceType SpaceType) ListStorageSpaceFilter
func (ListStorageSpaceFilter) ByUser ¶
func (f ListStorageSpaceFilter) ByUser(user *userpb.UserId) ListStorageSpaceFilter
func (ListStorageSpaceFilter) List ¶
func (f ListStorageSpaceFilter) List() []*providerpb.ListStorageSpacesRequest_Filter