Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConformYAML ¶
func ConformYAML(input interface{}) (interface{}, error)
ConformYAML ensures all keys of any nested maps are strings. This is necessary because YAML unmarshals map[interface{}]interface{} in nested maps, which cannot be serialized by bson. Also, handle []interface{}. cf. gopkg.in/juju/charm.v4/actions.go cleanse
func FormatTime ¶
FormatTime returns a string with the local time formatted in an arbitrary format used for status or and localized tz or in UTC timezone and format RFC3339 if u is specified.
func SortStringsNaturally ¶
SortStringsNaturally sorts strings according to their natural sort order.
Types ¶
type ConstraintsAPI ¶
type ConstraintsAPI interface { Close() error GetEnvironmentConstraints() (constraints.Value, error) GetServiceConstraints(string) (constraints.Value, error) SetEnvironmentConstraints(constraints.Value) error SetServiceConstraints(string, constraints.Value) error }
Constraints API defines methods on the client API that the get-constraints and set-constraints commands call
type GetConstraintsCommand ¶
type GetConstraintsCommand struct { envcmd.EnvCommandBase ServiceName string // contains filtered or unexported fields }
GetConstraintsCommand shows the constraints for a service or environment.
func (*GetConstraintsCommand) Info ¶
func (c *GetConstraintsCommand) Info() *cmd.Info
func (*GetConstraintsCommand) Init ¶
func (c *GetConstraintsCommand) Init(args []string) error
func (*GetConstraintsCommand) SetFlags ¶
func (c *GetConstraintsCommand) SetFlags(f *gnuflag.FlagSet)
type SetConstraintsCommand ¶
type SetConstraintsCommand struct { envcmd.EnvCommandBase ServiceName string Constraints constraints.Value // contains filtered or unexported fields }
SetConstraintsCommand shows the constraints for a service or environment.
func (*SetConstraintsCommand) Info ¶
func (c *SetConstraintsCommand) Info() *cmd.Info
func (*SetConstraintsCommand) Init ¶
func (c *SetConstraintsCommand) Init(args []string) (err error)
func (*SetConstraintsCommand) SetFlags ¶
func (c *SetConstraintsCommand) SetFlags(f *gnuflag.FlagSet)