command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRulesString

func GetRulesString(rs []*ConfigRule) (string, error)

Convert a list of Rules to a JSON string

func ParseCheckConfig

func ParseCheckConfig(s string) (*consulapi.AgentServiceCheck, error)

Types

type ACLCloneCommand

type ACLCloneCommand struct {
	Meta
}

func (*ACLCloneCommand) Help

func (c *ACLCloneCommand) Help() string

func (*ACLCloneCommand) Run

func (c *ACLCloneCommand) Run(args []string) int

func (*ACLCloneCommand) Synopsis

func (c *ACLCloneCommand) Synopsis() string

type ACLCreateCommand

type ACLCreateCommand struct {
	Meta
	ConfigRules []*ConfigRule
}

func (*ACLCreateCommand) Help

func (c *ACLCreateCommand) Help() string

func (*ACLCreateCommand) Run

func (c *ACLCreateCommand) Run(args []string) int

func (*ACLCreateCommand) Synopsis

func (c *ACLCreateCommand) Synopsis() string

type ACLDestroyCommand

type ACLDestroyCommand struct {
	Meta
}

func (*ACLDestroyCommand) Help

func (c *ACLDestroyCommand) Help() string

func (*ACLDestroyCommand) Run

func (c *ACLDestroyCommand) Run(args []string) int

func (*ACLDestroyCommand) Synopsis

func (c *ACLDestroyCommand) Synopsis() string

type ACLInfoCommand

type ACLInfoCommand struct {
	Meta
}

func (*ACLInfoCommand) Help

func (c *ACLInfoCommand) Help() string

func (*ACLInfoCommand) Run

func (c *ACLInfoCommand) Run(args []string) int

func (*ACLInfoCommand) Synopsis

func (c *ACLInfoCommand) Synopsis() string

type ACLListCommand

type ACLListCommand struct {
	Meta
}

func (*ACLListCommand) Help

func (c *ACLListCommand) Help() string

func (*ACLListCommand) Run

func (c *ACLListCommand) Run(args []string) int

func (*ACLListCommand) Synopsis

func (c *ACLListCommand) Synopsis() string

type ACLUpdateCommand

type ACLUpdateCommand struct {
	Meta
	ConfigRules []*ConfigRule
}

func (*ACLUpdateCommand) Help

func (c *ACLUpdateCommand) Help() string

func (*ACLUpdateCommand) Run

func (c *ACLUpdateCommand) Run(args []string) int

func (*ACLUpdateCommand) Synopsis

func (c *ACLUpdateCommand) Synopsis() string

type AgentChecksCommand

type AgentChecksCommand struct {
	Meta
}

func (*AgentChecksCommand) Help

func (c *AgentChecksCommand) Help() string

func (*AgentChecksCommand) Run

func (c *AgentChecksCommand) Run(args []string) int

func (*AgentChecksCommand) Synopsis

func (c *AgentChecksCommand) Synopsis() string

type AgentForceLeaveCommand

type AgentForceLeaveCommand struct {
	Meta
}

func (*AgentForceLeaveCommand) Help

func (c *AgentForceLeaveCommand) Help() string

func (*AgentForceLeaveCommand) Run

func (c *AgentForceLeaveCommand) Run(args []string) int

func (*AgentForceLeaveCommand) Synopsis

func (c *AgentForceLeaveCommand) Synopsis() string

type AgentJoinCommand

type AgentJoinCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*AgentJoinCommand) Help

func (c *AgentJoinCommand) Help() string

func (*AgentJoinCommand) Run

func (c *AgentJoinCommand) Run(args []string) int

func (*AgentJoinCommand) Synopsis

func (c *AgentJoinCommand) Synopsis() string

type AgentMaintenanceCommand

type AgentMaintenanceCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*AgentMaintenanceCommand) Help

func (c *AgentMaintenanceCommand) Help() string

func (*AgentMaintenanceCommand) Run

func (c *AgentMaintenanceCommand) Run(args []string) int

func (*AgentMaintenanceCommand) Synopsis

func (c *AgentMaintenanceCommand) Synopsis() string

type AgentMembersCommand

type AgentMembersCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*AgentMembersCommand) Help

func (c *AgentMembersCommand) Help() string

func (*AgentMembersCommand) Run

func (c *AgentMembersCommand) Run(args []string) int

func (*AgentMembersCommand) Synopsis

func (c *AgentMembersCommand) Synopsis() string

type AgentSelfCommand

type AgentSelfCommand struct {
	Meta
}

func (*AgentSelfCommand) Help

func (c *AgentSelfCommand) Help() string

func (*AgentSelfCommand) Run

func (c *AgentSelfCommand) Run(args []string) int

func (*AgentSelfCommand) Synopsis

func (c *AgentSelfCommand) Synopsis() string

type AgentServicesCommand

type AgentServicesCommand struct {
	Meta
}

func (*AgentServicesCommand) Help

func (c *AgentServicesCommand) Help() string

func (*AgentServicesCommand) Run

func (c *AgentServicesCommand) Run(args []string) int

func (*AgentServicesCommand) Synopsis

func (c *AgentServicesCommand) Synopsis() string

type Auth

type Auth struct {
	Enabled  bool
	Username string
	Password string
}

Authentication var

func (*Auth) Set

func (a *Auth) Set(value string) error

func (*Auth) String

func (a *Auth) String() string

type CheckDeregisterCommand

type CheckDeregisterCommand struct {
	Meta
}

func (*CheckDeregisterCommand) Help

func (c *CheckDeregisterCommand) Help() string

func (*CheckDeregisterCommand) Run

func (c *CheckDeregisterCommand) Run(args []string) int

func (*CheckDeregisterCommand) Synopsis

func (c *CheckDeregisterCommand) Synopsis() string

type CheckFailCommand

type CheckFailCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*CheckFailCommand) Help

func (c *CheckFailCommand) Help() string

func (*CheckFailCommand) Run

func (c *CheckFailCommand) Run(args []string) int

func (*CheckFailCommand) Synopsis

func (c *CheckFailCommand) Synopsis() string

type CheckPassCommand

type CheckPassCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*CheckPassCommand) Help

func (c *CheckPassCommand) Help() string

func (*CheckPassCommand) Run

func (c *CheckPassCommand) Run(args []string) int

func (*CheckPassCommand) Synopsis

func (c *CheckPassCommand) Synopsis() string

type CheckRegisterCommand

type CheckRegisterCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*CheckRegisterCommand) Help

func (c *CheckRegisterCommand) Help() string

func (*CheckRegisterCommand) Run

func (c *CheckRegisterCommand) Run(args []string) int

func (*CheckRegisterCommand) Synopsis

func (c *CheckRegisterCommand) Synopsis() string

type CheckWarnCommand

type CheckWarnCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*CheckWarnCommand) Help

func (c *CheckWarnCommand) Help() string

func (*CheckWarnCommand) Run

func (c *CheckWarnCommand) Run(args []string) int

func (*CheckWarnCommand) Synopsis

func (c *CheckWarnCommand) Synopsis() string

type ConfigRule

type ConfigRule struct {
	PathType string
	Path     string
	Policy   string
}

func ParseRuleConfig

func ParseRuleConfig(s string) (*ConfigRule, error)

type HealthChecksCommand

type HealthChecksCommand struct {
	Meta
}

func (*HealthChecksCommand) Help

func (c *HealthChecksCommand) Help() string

func (*HealthChecksCommand) Run

func (c *HealthChecksCommand) Run(args []string) int

func (*HealthChecksCommand) Synopsis

func (c *HealthChecksCommand) Synopsis() string

type HealthNodeCommand

type HealthNodeCommand struct {
	Meta
}

func (*HealthNodeCommand) Help

func (c *HealthNodeCommand) Help() string

func (*HealthNodeCommand) Run

func (c *HealthNodeCommand) Run(args []string) int

func (*HealthNodeCommand) Synopsis

func (c *HealthNodeCommand) Synopsis() string

type HealthServiceCommand

type HealthServiceCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*HealthServiceCommand) Help

func (c *HealthServiceCommand) Help() string

func (*HealthServiceCommand) Run

func (c *HealthServiceCommand) Run(args []string) int

func (*HealthServiceCommand) Synopsis

func (c *HealthServiceCommand) Synopsis() string

type HealthStateCommand

type HealthStateCommand struct {
	Meta
}

func (*HealthStateCommand) Help

func (c *HealthStateCommand) Help() string

func (*HealthStateCommand) Run

func (c *HealthStateCommand) Run(args []string) int

func (*HealthStateCommand) Synopsis

func (c *HealthStateCommand) Synopsis() string

type KVDeleteCommand

type KVDeleteCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*KVDeleteCommand) Help

func (c *KVDeleteCommand) Help() string

func (*KVDeleteCommand) Run

func (c *KVDeleteCommand) Run(args []string) int

func (*KVDeleteCommand) Synopsis

func (c *KVDeleteCommand) Synopsis() string

type KVJson

type KVJson struct {
	Key         string
	CreateIndex uint64
	ModifyIndex uint64
	LockIndex   uint64
	Flags       uint64
	Value       string
	Session     string
}

Conveninece structure for JSON

type KVLockCommand

type KVLockCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*KVLockCommand) Help

func (c *KVLockCommand) Help() string

func (*KVLockCommand) Run

func (c *KVLockCommand) Run(args []string) int

func (*KVLockCommand) Synopsis

func (c *KVLockCommand) Synopsis() string

type KVOutput

type KVOutput struct {
	All         bool
	Key         bool
	CreateIndex bool
	ModifyIndex bool
	LockIndex   bool
	Flags       bool
	Value       bool
	Session     bool
	// contains filtered or unexported fields
}

Output structure

func NewKVOutput

func NewKVOutput(ui cli.Ui, fields string) *KVOutput

func (*KVOutput) Output

func (kvo *KVOutput) Output(kv *consulapi.KVPair, of OutputFormat) int

func (*KVOutput) OutputHeader

func (kvo *KVOutput) OutputHeader(of OutputFormat)

func (*KVOutput) OutputJSON

func (kvo *KVOutput) OutputJSON(kv *consulapi.KVPair, prettyFlag bool) int

func (*KVOutput) OutputJSONList

func (kvo *KVOutput) OutputJSONList(kvs *consulapi.KVPairs, prettyFlag bool) int

func (*KVOutput) OutputList

func (kvo *KVOutput) OutputList(kvs *consulapi.KVPairs, of OutputFormat) int

func (*KVOutput) OutputText

func (kvo *KVOutput) OutputText(kv *consulapi.KVPair, of OutputFormat) int

func (*KVOutput) OutputTextList

func (kvo *KVOutput) OutputTextList(kvs *consulapi.KVPairs, of OutputFormat) int

type KVReadCommand

type KVReadCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*KVReadCommand) Help

func (c *KVReadCommand) Help() string

func (*KVReadCommand) Run

func (c *KVReadCommand) Run(args []string) int

func (*KVReadCommand) Synopsis

func (c *KVReadCommand) Synopsis() string

type KVUnlockCommand

type KVUnlockCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*KVUnlockCommand) Help

func (c *KVUnlockCommand) Help() string

func (*KVUnlockCommand) Run

func (c *KVUnlockCommand) Run(args []string) int

func (*KVUnlockCommand) Synopsis

func (c *KVUnlockCommand) Synopsis() string

type KVWatchCommand

type KVWatchCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*KVWatchCommand) Help

func (c *KVWatchCommand) Help() string

func (*KVWatchCommand) Run

func (c *KVWatchCommand) Run(args []string) int

func (*KVWatchCommand) Synopsis

func (c *KVWatchCommand) Synopsis() string

type KVWriteCommand

type KVWriteCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*KVWriteCommand) Help

func (c *KVWriteCommand) Help() string

func (*KVWriteCommand) Run

func (c *KVWriteCommand) Run(args []string) int

func (*KVWriteCommand) Synopsis

func (c *KVWriteCommand) Synopsis() string

type Meta

type Meta struct {
	UI cli.Ui
	// contains filtered or unexported fields
}

func (*Meta) AddDataCenter

func (m *Meta) AddDataCenter()

func (*Meta) AddWait

func (m *Meta) AddWait()

func (*Meta) Client

func (m *Meta) Client() (*consulapi.Client, error)

func (*Meta) ConsulHelp

func (m *Meta) ConsulHelp() string

func (*Meta) FlagSet

func (m *Meta) FlagSet() *flag.FlagSet

func (*Meta) OutputJSON

func (m *Meta) OutputJSON(v interface{}, prettyFlag bool)

func (*Meta) QueryOptions

func (m *Meta) QueryOptions() *consulapi.QueryOptions

func (*Meta) WriteOptions

func (m *Meta) WriteOptions() *consulapi.WriteOptions

type OutputFormat

type OutputFormat struct {
	Type      string
	Delimiter string
	Header    bool
}

Output format structure

type ServiceDeregisterCommand

type ServiceDeregisterCommand struct {
	Meta
}

func (*ServiceDeregisterCommand) Help

func (c *ServiceDeregisterCommand) Help() string

func (*ServiceDeregisterCommand) Run

func (c *ServiceDeregisterCommand) Run(args []string) int

func (*ServiceDeregisterCommand) Synopsis

func (c *ServiceDeregisterCommand) Synopsis() string

type ServiceMaintenanceCommand

type ServiceMaintenanceCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*ServiceMaintenanceCommand) Help

func (*ServiceMaintenanceCommand) Run

func (c *ServiceMaintenanceCommand) Run(args []string) int

func (*ServiceMaintenanceCommand) Synopsis

func (c *ServiceMaintenanceCommand) Synopsis() string

type ServiceRegisterCommand

type ServiceRegisterCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*ServiceRegisterCommand) Help

func (c *ServiceRegisterCommand) Help() string

func (*ServiceRegisterCommand) Run

func (c *ServiceRegisterCommand) Run(args []string) int

func (*ServiceRegisterCommand) Synopsis

func (c *ServiceRegisterCommand) Synopsis() string

type SessionCreateCommand

type SessionCreateCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*SessionCreateCommand) Help

func (c *SessionCreateCommand) Help() string

func (*SessionCreateCommand) Run

func (c *SessionCreateCommand) Run(args []string) int

func (*SessionCreateCommand) Synopsis

func (c *SessionCreateCommand) Synopsis() string

type SessionDestroyCommand

type SessionDestroyCommand struct {
	Meta
}

func (*SessionDestroyCommand) Help

func (c *SessionDestroyCommand) Help() string

func (*SessionDestroyCommand) Run

func (c *SessionDestroyCommand) Run(args []string) int

func (*SessionDestroyCommand) Synopsis

func (c *SessionDestroyCommand) Synopsis() string

type SessionInfoCommand

type SessionInfoCommand struct {
	Meta
}

func (*SessionInfoCommand) Help

func (c *SessionInfoCommand) Help() string

func (*SessionInfoCommand) Run

func (c *SessionInfoCommand) Run(args []string) int

func (*SessionInfoCommand) Synopsis

func (c *SessionInfoCommand) Synopsis() string

type SessionListCommand

type SessionListCommand struct {
	Meta
}

func (*SessionListCommand) Help

func (c *SessionListCommand) Help() string

func (*SessionListCommand) Run

func (c *SessionListCommand) Run(args []string) int

func (*SessionListCommand) Synopsis

func (c *SessionListCommand) Synopsis() string

type SessionNodeCommand

type SessionNodeCommand struct {
	Meta
}

func (*SessionNodeCommand) Help

func (c *SessionNodeCommand) Help() string

func (*SessionNodeCommand) Run

func (c *SessionNodeCommand) Run(args []string) int

func (*SessionNodeCommand) Synopsis

func (c *SessionNodeCommand) Synopsis() string

type SessionRenewCommand

type SessionRenewCommand struct {
	Meta
}

func (*SessionRenewCommand) Help

func (c *SessionRenewCommand) Help() string

func (*SessionRenewCommand) Run

func (c *SessionRenewCommand) Run(args []string) int

func (*SessionRenewCommand) Synopsis

func (c *SessionRenewCommand) Synopsis() string

type StatusLeaderCommand

type StatusLeaderCommand struct {
	Meta
}

func (*StatusLeaderCommand) Help

func (c *StatusLeaderCommand) Help() string

func (*StatusLeaderCommand) Run

func (c *StatusLeaderCommand) Run(args []string) int

func (*StatusLeaderCommand) Synopsis

func (c *StatusLeaderCommand) Synopsis() string

type StatusPeersCommand

type StatusPeersCommand struct {
	Meta
}

func (*StatusPeersCommand) Help

func (c *StatusPeersCommand) Help() string

func (*StatusPeersCommand) Run

func (c *StatusPeersCommand) Run(args []string) int

func (*StatusPeersCommand) Synopsis

func (c *StatusPeersCommand) Synopsis() string

Jump to

Keyboard shortcuts

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