mount

package
v0.0.0-...-2bbe97e Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BucketKey is the name of the bucket where mounts are stored
	BucketKey = "mounts"
	// EntryKey is the name of the entry where the list of mounts are stored
	EntryKey = "mounts"
)

Functions

This section is empty.

Types

type Mounts

type Mounts struct {
	config.Database
}

Mounts is a struct that can be used to access the mounts on this system

func New

func New(db config.Database) Mounts

New will create a new Mounts struct based on the given bolt database. It offers methods to add/remove and list all mounts registered with Sledgehammer

func (*Mounts) Add

func (m *Mounts) Add(mount ...string) error

Add will add the given path as a mount to Sledgehammer. Tools will then be able to access files under this path while they are running

func (*Mounts) List

func (m *Mounts) List() ([]string, error)

List will return the current mounts.

func (*Mounts) Remove

func (m *Mounts) Remove(mount string) error

Remove will remove the given mounts from Sledgehammer if possible. It requires an exact match for the mount

Jump to

Keyboard shortcuts

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