cmd

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceUninitialized = errors.New("service not initialized, run 'hcadmin init'")

Functions

func Die

func Die(message string)

func ExecBinScript

func ExecBinScript(script string, args ...string) (err error)

func GetConfigExtensionList

func GetConfigExtensionList() (conExtList []string)

func GetCurrentDirectory

func GetCurrentDirectory() (dir string, err error)

func GetDuration_fromUnixTimestamp

func GetDuration_fromUnixTimestamp(timestamp int64) (duration time.Duration)

func GetFreePort

func GetFreePort() (port int, err error)

Ask the kernel for a free open port that is ready to use

func GetHolochain

func GetHolochain(name string, service *holo.Service, cmd string) (h *holo.Holochain, err error)

GetHolochain os a helper function to load a holochain from a directory or report an error based on a command name

func GetHolochainRoot

func GetHolochainRoot(root string) (string, error)

GetHolochainRoot returns either the path from the environment variable or the default

func GetService

func GetService(root string) (service *holo.Service, err error)

GetService is a helper function to load the holochain service from default locations or a given path

func GetTmpDir

func GetTmpDir(name string) (d string, err error)

func GetUnixTimestamp_secondsFromNow

func GetUnixTimestamp_secondsFromNow(seconds int) int64

func GolangHolochainDir

func GolangHolochainDir(subPath ...string) (path string, err error)

func IsAppDir

func IsAppDir(path string) (err error)

IsAppDir tests path to see if it's a properly set up holochain app returns nil on success or error describing the problem

func IsDir

func IsDir(pathParts ...string) bool

func IsFile

func IsFile(path ...string) bool

func IsFileFromString

func IsFileFromString(path string) bool

func MakeErr

func MakeErr(c *cli.Context, text string) error

func MakeErrFromErr

func MakeErrFromErr(c *cli.Context, err error) error

func MakeTmpDir

func MakeTmpDir(name string) (tmpHolochainCopyDir string, err error)

func OsExecPipes

func OsExecPipes(args ...string) *exec.Cmd

OsExecPipes executes a command as if we are in a shell, including user input

func OsExecPipes_noRun

func OsExecPipes_noRun(args ...string) *exec.Cmd

OsExecPipes executes a command as if we are in a shell, including user input

func OsExecSilent

func OsExecSilent(args ...string) error

func RunAppWithStdoutCapture

func RunAppWithStdoutCapture(app *cli.App, args []string, wait time.Duration) (out string, err error)

RunAppWithStdoutCapture runs a cli.App and captures the stdout

func UpackageAppPackage

func UpackageAppPackage(service *holo.Service, appPackagePath string, toPath string, appName string, encodingFormat string) (appPackage *holo.AppPackage, err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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