spaces

package
v3.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeSpaceID

func DecodeSpaceID(spaceId string) (string, error)

func DecodeStorageSpaceIDToPath added in v3.6.1

func DecodeStorageSpaceIDToPath(raw string) (storageID, path string, ok bool)

DecodeStorageSpaceID returns the components of the storage + space ID. This ID is expected to be in the format <storage_id>$base32(<path>).

func DecodeToResourceID added in v3.6.1

func DecodeToResourceID(raw string) (storageID, spacePath, itemID string, ok bool)

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 EncodeOCMShareID added in v3.2.0

func EncodeOCMShareID(ShareID string) string

TODO(lopresti) drop this in favor of having OCM received shares live in their space (however it is named)

func EncodeSpaceID

func EncodeSpaceID(spacePath string) string

func EncodeStorageSpaceID

func EncodeStorageSpaceID(storageID, spaceID string) string

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>$<space_id>, where base32(<path>) is the space ID.

func EncodeToStringifiedResourceID added in v3.6.1

func EncodeToStringifiedResourceID(r *provider.ResourceId) string

EncodeToStringifiedResourceID 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 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 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 (ListStorageSpaceFilter) ByOwner

func (ListStorageSpaceFilter) ByPath

func (ListStorageSpaceFilter) BySpaceType

func (f ListStorageSpaceFilter) BySpaceType(spaceType SpaceType) ListStorageSpaceFilter

func (ListStorageSpaceFilter) ByUser

func (ListStorageSpaceFilter) List

type SpaceType

type SpaceType string
const (
	SpaceTypeHome    SpaceType = "personal"
	SpaceTypeProject SpaceType = "project"
	SpaceTypePublic  SpaceType = "explorer"
)

func (SpaceType) AsString

func (t SpaceType) AsString() string

Jump to

Keyboard shortcuts

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