Documentation
¶
Index ¶
Constants ¶
View Source
const ( MountPointStatusMounted = "mounted" MountPointStatusUnmounted = "unmounted" MountPointStatusLost = "lost" MountPointStatusError = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BaseDir string `yaml:"-"`
Path string `yaml:"-"`
OpenBoltTimeout time.Duration `yaml:"openBoltTimeout"`
Fs *FilesystemConfig `yaml:"fs"`
Auths Auths `yaml:"auths"`
}
func LoadConfig ¶
type FilesystemConfig ¶
type FilesystemMounter ¶
type FilesystemMounter interface {
Mount(mp *MountPoint) error
}
type MountPoint ¶
type MountPoint struct {
Repo *Repository `json:"repo"`
Path string `json:"path"`
LogPath string `json:"logPath"`
CreateTime int64 `json:"createTime"`
}
func NewMountPoint ¶
func NewMountPoint(repo *Repository, path, logDir string) (*MountPoint, error)
func (*MountPoint) Display ¶
func (mp *MountPoint) Display() *MountPointDisplay
func (*MountPoint) GetStatus ¶
func (mp *MountPoint) GetStatus() (MountPointStatus, string)
func (*MountPoint) Mount ¶
func (mp *MountPoint) Mount(fsMounter FilesystemMounter) error
func (*MountPoint) Unmount ¶
func (mp *MountPoint) Unmount() error
func (*MountPoint) Validate ¶
func (mp *MountPoint) Validate() error
type MountPointDisplay ¶
type MountPointDisplay struct {
MountPoint
Status MountPointStatus `json:"status,omitempty"`
ErrorMessage string `json:"errMsg,omitempty"`
}
type MountPointMetadata ¶
type MountPointMetadata interface {
Put(mp *MountPoint) error
Get(repo *Repository) (*MountPoint, error)
List() ([]*MountPoint, error)
Remove(mp *MountPoint) error
Close() error
}
type MountPointStatus ¶
type MountPointStatus string
func (MountPointStatus) Color ¶
func (s MountPointStatus) Color() string
type Repository ¶
type Repository struct {
Domain string `json:"domain"`
Owner string `json:"owner"`
Name string `json:"name"`
Ref string `json:"ref"`
}
func ParseRepository ¶
func ParseRepository(url string) (*Repository, error)
func (*Repository) IsGithub ¶
func (r *Repository) IsGithub() bool
func (*Repository) Path ¶
func (r *Repository) Path() string
func (*Repository) String ¶
func (r *Repository) String() string
func (*Repository) Validate ¶
func (r *Repository) Validate() error
Click to show internal directories.
Click to hide internal directories.