cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Version variable is set at build time.

Functions

func Execute

func Execute() error

Execute run root command (main entrypoint).

func ExecuteDecrypt

func ExecuteDecrypt() error

ExecuteDecrypt runs decrypt cmd.

Example
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()
Output:

test

func ExecuteDiffFiles added in v0.0.5

func ExecuteDiffFiles() error

ExecuteDiffFiles runs diff files cmd.

func ExecuteDiffValues added in v0.0.5

func ExecuteDiffValues() error

ExecuteDiffValues runs diff values cmd.

func ExecuteEncrypt

func ExecuteEncrypt() error

ExecuteEncrypt runs encrypt cmd.

Example
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()
Output:

test

func ExecuteGetFiles

func ExecuteGetFiles() error

ExecuteGetFiles runs get files cmd.

func ExecuteGetValues

func ExecuteGetValues() 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