Documentation
¶
Index ¶
- Variables
- func CleanPath(path string) string
- func IsOwner(path string, user string) bool
- func IsValidPath(path string) bool
- func NormPath(path string) string
- type Workspace
- func (w *Workspace) DatasiteAbsPath(relPath string) string
- func (w *Workspace) DatasiteRelPath(absPath string) (string, error)
- func (w *Workspace) IsValidPath(path string) bool
- func (w *Workspace) Lock() error
- func (w *Workspace) PathOwner(path string) string
- func (w *Workspace) Setup() error
- func (w *Workspace) Unlock() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrWorkspaceLocked = errors.New("workspace locked by another process")
)
View Source
var (
PathSep = string(filepath.Separator)
)
Functions ¶
func IsOwner ¶ added in v0.7.0
IsOwner checks if the user is the owner of the path The underlying assumption here is that owner is the prefix of the path
func IsValidPath ¶ added in v0.7.0
IsValidPath checks if the path is a valid datasite path i.e. must start with a datasite email followed by a slash
Types ¶
type Workspace ¶
type Workspace struct {
Owner string
Root string
AppsDir string
DatasitesDir string
MetadataDir string
LogsDir string
UserDir string
UserPublicDir string
// contains filtered or unexported fields
}
func (*Workspace) DatasiteAbsPath ¶
DatasiteAbsPath returns the absolute path to the datasite directory
func (*Workspace) DatasiteRelPath ¶
DatasiteRelPath returns the relative path of a datasite from the workspace's datasites directory
func (*Workspace) IsValidPath ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.