exportfs

package module
v0.0.0-...-9a5c6c5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2015 License: MIT Imports: 6 Imported by: 0

README

exportfs

Circle CI

GoDoc

Go package to handle exports(e.g. /etc/exports) files for NFS servers.

License

exportfs is MIT licensed, details can be found here.

Documentation

Overview

Package exportfs provides the ability to manipulate exports files. Reference: http://linux.die.net/man/5/exports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportsLiteral

func ExportsLiteral(exports []*Export) string

ExportsLiteral returns the literal format for a list of exports that belong to the same path.

func Parse

func Parse(input io.Reader) (map[string][]*Export, error)

Parse parses the exports content from the given reader, and returns a map with the path as the key, and the value being a list of machine exports for the path.

Types

type Export

type Export struct {
	Path    string
	Machine string
	Options []*Option
}

Export describes an export for a path and the machine able to access it with a number of options.

func (*Export) String

func (ex *Export) String() string

String implements Stringer providing the output as the literal format the export is parsed as.

type Option

type Option struct {
	Key   string
	Value string
}

Option is a single options key and optional value

func (*Option) String

func (opt *Option) String() string

String implements Stringer returning the literal format for an option.

Jump to

Keyboard shortcuts

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