config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DpRestURL  *string
	DpSomaURL  *string
	DpUsername *string
	DpPassword *string
	DpDomain   *string
	Proxy      *string
)

DataPower configuration from command flags.

View Source
var Conf = Config{Cmd: Command{Viewer: "less", Editor: "vi"}, Log: Log{MaxEntrySize: logging.MaxEntrySize}, Sync: Sync{Seconds: 4}}

var Cmd = Command{Viewer: "less", Editor: "vi"}

View Source
var DebugLogFile *bool

DebugLogFile enables writing of debug messages to dpcmder.log file in current folder.

View Source
var LocalFolderPath *string

LocalFolderPath is a folder where dpcmder start showing files - set by command flag.

Functions

func DpUseRest

func DpUseRest() bool

DpUseRest returns true if we configured dpcmder to use DataPower REST Management interface.

func DpUseSoma

func DpUseSoma() bool

DpUseSoma returns true if we configured dpcmder to use DataPower SOMA Management interface.

func Init

func Init()

Init intializes configuration: parses command line flags and creates config directory.

func PrintConfig

func PrintConfig()

PrintConfig prints configuration values to console.

Types

type Command

type Command struct {
	Viewer string
	Editor string
}

type Config

type Config struct {
	Cmd  Command
	Log  Log
	Sync Sync
}

type Log

type Log struct {
	MaxEntrySize int
}

type Sync

type Sync struct {
	Seconds int
}

Jump to

Keyboard shortcuts

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