utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVERSION = "1.17"
)

Variables

View Source
var (
	GITCOMMIT string = "0"
	VERSION   string

	IAMSTATIC string = "true"
	INITSHA1  string = ""
	INITPATH  string = ""

	HYPER_ROOT   string
	HYPER_FILE   string
	HYPER_DAEMON interface{}
)
View Source
var (
	MS_BIND uintptr = syscall.MS_BIND
)

Functions

func FormatMountLabel

func FormatMountLabel(src, mountLabel string) string

FormatMountLabel returns a string to be used by the mount command. The format of this string will be used to alter the labeling of the mountpoint. The string returned is suitable to be used as the options field of the mount command. If you need to have additional mount point options, you can pass them in as the first parameter. Second parameter is the label that you wish to apply to all content in the mount point.

func GetHostIP added in v0.5.0

func GetHostIP() string

func JSONMarshal added in v0.5.0

func JSONMarshal(v interface{}, safeEncoding bool) ([]byte, error)

func MatchesContentType

func MatchesContentType(contentType, expectedType string) bool

func Mount added in v0.5.0

func Mount(source string, target string, fstype string, flags uintptr, data string) error

func PermInt added in v0.5.0

func PermInt(str string) int

func RandStr added in v0.5.0

func RandStr(strSize int, randType string) string

func SetDaemon added in v0.5.0

func SetDaemon(d interface{})

func UidInt added in v0.5.0

func UidInt(str string) int

func UriReader added in v0.5.0

func UriReader(uri string) (io.ReadCloser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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