Documentation ¶
Index ¶
Constants ¶
View Source
const (
RootNamespaceID = "root"
)
Variables ¶
View Source
var ( ErrNoNamespace error = errors.New("no namespace") RootNamespace *Namespace = &Namespace{ ID: RootNamespaceID, Path: "", CustomMetadata: make(map[string]string), } )
Functions ¶
func Canonicalize ¶
Canonicalize trims any prefix '/' and adds a trailing '/' to the provided string
func ContextWithNamespace ¶
func SplitIDFromString ¶ added in v0.11.2
Types ¶
type MountPathDetails ¶ added in v1.10.0
MountPathDetails contains the details of a mount's location, consisting of the namespace of the mount and the path of the mount within the namespace
func (*MountPathDetails) GetFullPath ¶ added in v1.10.0
func (mpd *MountPathDetails) GetFullPath() string
func (*MountPathDetails) GetRelativePath ¶ added in v1.10.0
func (mpd *MountPathDetails) GetRelativePath(currNs *Namespace) string
type Namespace ¶
type Namespace struct { ID string `json:"id" mapstructure:"id"` Path string `json:"path" mapstructure:"path"` CustomMetadata map[string]string `json:"custom_metadata" mapstructure:"custom_metadata"` }
func FromContext ¶
FromContext retrieves the namespace from a context, or an error if there is no namespace in the context.
func (*Namespace) TrimmedPath ¶
Click to show internal directories.
Click to hide internal directories.