client

package
v0.0.0-...-308df95 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: BSD-2-Clause, BSD-3-Clause, LGPL-2.1, + 2 more Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const DEFAULT_CONFIG_SOCKET = "/var/run/vyatta/configd/main.sock"

Variables

This section is empty.

Functions

func CallRpc

func CallRpc(namespace, name, args, encoding string) (string, error)

func GetFuncName

func GetFuncName() string

GetFuncName() returns the unqualified name of the caller

Types

type Client

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

func Connect

func Connect(opts ...ConnectOption) (*Client, error)

func Dial

func Dial(network, address, sid string) (*Client, error)

func (*Client) AuthAuthorize

func (c *Client) AuthAuthorize(path string, perm int) (bool, error)

func (*Client) AuthGetPerms

func (c *Client) AuthGetPerms() (map[string]string, error)

func (*Client) CallRpc

func (c *Client) CallRpc(namespace, name, args, encoding string) (string, error)

func (*Client) CallRpcXml

func (c *Client) CallRpcXml(namespace, name, args string) (string, error)

TODO: Eventually remove this

func (*Client) CancelCommit

func (c *Client) CancelCommit(comment, persistid string, force, debug bool) (string, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Comment

func (c *Client) Comment(path string) error

func (*Client) Commit

func (c *Client) Commit(message string, debug bool) (string, error)

func (*Client) CommitConfirm

func (c *Client) CommitConfirm(
	message string,
	debug bool,
	mins int,
) (string, error)

func (*Client) Compare

func (c *Client) Compare(old, new, spath string, ctxdiff bool) (string, error)

func (*Client) CompareConfigRevisions

func (c *Client) CompareConfigRevisions(revOne string, revTwo string) (string, error)

func (*Client) CompareSessionChanges

func (c *Client) CompareSessionChanges() (string, error)

func (*Client) Confirm

func (c *Client) Confirm() (string, error)

func (*Client) ConfirmPersistId

func (c *Client) ConfirmPersistId(persistid string) (string, error)

func (*Client) ConfirmSilent

func (c *Client) ConfirmSilent() (string, error)

func (*Client) Copy

func (c *Client) Copy(fpath, tpath string) error

func (*Client) Delete

func (c *Client) Delete(path string) error

func (*Client) Discard

func (c *Client) Discard() error

func (*Client) Exists

func (c *Client) Exists(db rpc.DB, path string) (bool, error)

func (*Client) Expand

func (c *Client) Expand(path string) (string, error)

func (*Client) ExpandWithPrefix

func (c *Client) ExpandWithPrefix(
	path, prefix string,
	pos int,
) (string, error)

func (*Client) ExtractArchive

func (c *Client) ExtractArchive(file, destination string) (string, error)

func (*Client) Get

func (c *Client) Get(db rpc.DB, path string) ([]string, error)

func (*Client) GetCommitLog

func (c *Client) GetCommitLog() (map[string]string, error)

func (*Client) GetCompletions

func (c *Client) GetCompletions(schema bool, path string) (map[string]string, error)

func (*Client) GetConfigSystemFeatures

func (c *Client) GetConfigSystemFeatures() (map[string]struct{}, error)

func (*Client) GetDeviations

func (c *Client) GetDeviations() (map[string]string, error)

func (*Client) GetFeatures

func (c *Client) GetFeatures() (map[string]string, error)

func (*Client) GetHelp

func (c *Client) GetHelp(schema bool, path string) (map[string]string, error)

func (*Client) GetModuleSchemas

func (c *Client) GetModuleSchemas() (string, error)

func (*Client) GetSchemas

func (c *Client) GetSchemas() (string, error)

func (*Client) Load

func (c *Client) Load(file string) error

func (*Client) LoadFrom

func (c *Client) LoadFrom(source string, routingInstance string) error

func (*Client) LoadKeys

func (c *Client) LoadKeys(user, source, routingInstance string) (string, error)

func (*Client) LoadReportWarnings

func (c *Client) LoadReportWarnings(file string) (bool, error)

func (*Client) Merge

func (c *Client) Merge(file string) error

func (*Client) MergeReportWarnings

func (c *Client) MergeReportWarnings(file string) (bool, error)

func (*Client) MigrateConfigFile

func (c *Client) MigrateConfigFile(filename string) (string, error)

func (*Client) NodeGetStatus

func (c *Client) NodeGetStatus(db rpc.DB, path string) (int, error)

func (*Client) NodeGetType

func (c *Client) NodeGetType(path string) (rpc.NodeType, error)

func (*Client) ReadConfigFile

func (c *Client) ReadConfigFile(filename string) (string, error)

func (*Client) ReadConfigFileRaw

func (c *Client) ReadConfigFileRaw(filename string) (string, error)

func (*Client) Rename

func (c *Client) Rename(fpath, tpath string) error

func (*Client) Rollback

func (c *Client) Rollback(revision, comment string, debug bool) (string, error)

func (*Client) Save

func (c *Client) Save(file string) error

func (*Client) SaveTo

func (c *Client) SaveTo(dest, routingInstance string) error

func (*Client) SchemaGet

func (c *Client) SchemaGet(module string, format string) (string, error)

func (*Client) SessionChanged

func (c *Client) SessionChanged() (bool, error)

func (*Client) SessionExists

func (c *Client) SessionExists() (bool, error)

func (*Client) SessionGetEnv

func (c *Client) SessionGetEnv() (map[string]interface{}, error)

func (*Client) SessionMarkSaved

func (c *Client) SessionMarkSaved() error

func (*Client) SessionMarkUnsaved

func (c *Client) SessionMarkUnsaved() error

func (*Client) SessionSaved

func (c *Client) SessionSaved() (bool, error)

func (*Client) SessionSetup

func (c *Client) SessionSetup() error

func (*Client) SessionSetupShared

func (c *Client) SessionSetupShared() error

func (*Client) SessionTeardown

func (c *Client) SessionTeardown() error

func (*Client) Set

func (c *Client) Set(path string) (string, error)

func (*Client) SetConfigDebug

func (c *Client) SetConfigDebug(dbgType, level string) (string, error)

func (*Client) Show

func (c *Client) Show(db rpc.DB, path string) (string, error)

func (*Client) ShowConfigWithContextDiffs

func (c *Client) ShowConfigWithContextDiffs(path string, showDefaults bool) (string, error)

func (*Client) TmplGet

func (c *Client) TmplGet(path string) (map[string]string, error)

func (*Client) TmplGetAllowed

func (c *Client) TmplGetAllowed(path string) ([]string, error)

func (*Client) TmplGetChildren

func (c *Client) TmplGetChildren(path string) ([]string, error)

func (*Client) TmplValidatePath

func (c *Client) TmplValidatePath(path string) (bool, error)

func (*Client) TmplValidateValues

func (c *Client) TmplValidateValues(path string) (bool, error)

func (*Client) TreeGet

func (c *Client) TreeGet(db rpc.DB, path, encoding string) (string, error)

func (*Client) TreeGetFull

func (c *Client) TreeGetFull(db rpc.DB, path, encoding string) (string, error)

func (*Client) Validate

func (c *Client) Validate() (string, error)

func (*Client) ValidatePath

func (c *Client) ValidatePath(path string) (string, error)

type ConnectOption

type ConnectOption func(*connectOptions)

func Address

func Address(addr string) ConnectOption

func Network

func Network(network string) ConnectOption

func SessionID

func SessionID(sid string) ConnectOption

Jump to

Keyboard shortcuts

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