cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var Verbose bool

Verbose verbose logging turned on

Functions

func Execute

func Execute() error

Execute run root command (main entrypoint)

func ExecuteDecrypt

func ExecuteDecrypt(args []string) error

ExecuteDecrypt runs decrypt cmd

Example
var tp = struct {
	URI         string
	testContent string
}{
	"/decrypt",
	"test",
}

ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintln(w, tp.testContent)
}))
defer ts.Close()

dp.source = ts.URL
dp.value = tp.testContent
ExecuteDecrypt(nil)
Output:

test

func ExecuteEncrypt

func ExecuteEncrypt(args []string) error

ExecuteEncrypt runs encrypt cmd

Example
var tp = struct {
	URI         string
	testContent string
}{
	"/encrypt",
	"test",
}

ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintln(w, tp.testContent)
}))
defer ts.Close()

ep.source = ts.URL
ep.value = tp.testContent
ExecuteEncrypt(nil)
Output:

test

func ExecuteGetFiles

func ExecuteGetFiles(args []string) error

ExecuteGetFiles runs get files cmd

func ExecuteGetValues

func ExecuteGetValues(args []string) error

ExecuteGetValues runs get values cmd

Types

type FileMapping

type FileMapping struct {
	// contains filtered or unexported fields
}

FileMapping single file mapping source:dest

type FileMappings

type FileMappings struct {
	// contains filtered or unexported fields
}

FileMappings file mappings source:dest,source:dest...

func (*FileMappings) Destinations

func (m *FileMappings) Destinations() []string

Destinations all destinations

func (*FileMappings) Mappings

func (m *FileMappings) Mappings() []FileMapping

Mappings all mappings

func (*FileMappings) Set

func (m *FileMappings) Set(value string) error

Set parse mappings from string

func (*FileMappings) Sources

func (m *FileMappings) Sources() []string

Sources all sources

func (*FileMappings) String

func (m *FileMappings) String() string

func (*FileMappings) Type

func (m *FileMappings) Type() string

Type type name (for cobra)

Jump to

Keyboard shortcuts

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