Documentation ¶
Index ¶
- Constants
- func JujuXDGDataHome() string
- func JujuXDGDataHomeDir() string
- func JujuXDGDataHomePath(names ...string) string
- func NewListTermsCommand() cmd.Command
- func NewPushTermCommand() cmd.Command
- func NewReleaseTermCommand() cmd.Command
- func NewShowTermCommand() cmd.Command
- func SetJujuXDGDataHome(newJujuXDGDataHomeHome string) string
- type IDMClient
- type TermsId
Constants ¶
const ( // JujuXDGDataHomeEnvKey is used to override the default // XDG Data Home location. JujuXDGDataHomeEnvKey = "JUJU_DATA" // XDGDataHome is a path where data for the running user // should be stored according to the xdg standard. XDGDataHome = "XDG_DATA_HOME" )
Variables ¶
This section is empty.
Functions ¶
func JujuXDGDataHomeDir ¶
func JujuXDGDataHomeDir() string
JujuXDGDataHomeDir returns the directory where juju should store application-specific files
func JujuXDGDataHomePath ¶
JujuXDGDataHomePath returns the path to a file in the current juju home.
func NewListTermsCommand ¶
func NewListTermsCommand() cmd.Command
NewListTermsCommand returns a new command that can be used to list owned Terms and Conditions documents.
func NewPushTermCommand ¶
func NewPushTermCommand() cmd.Command
NewPushTermCommand returns a new command that can be used to create new (revisions) of Terms and Conditions documents.
func NewReleaseTermCommand ¶
func NewReleaseTermCommand() cmd.Command
NewReleaseTermCommand returns a new command that can be used to publish existing owner terms Conditions documents.
func NewShowTermCommand ¶
func NewShowTermCommand() cmd.Command
NewShowTermCommand returns a new command that can be used to shows Terms and Conditions document.
func SetJujuXDGDataHome ¶
SetJujuXDGDataHome sets the value of juju home and returns the current one.
Types ¶
type IDMClient ¶
type IDMClient interface { // WhoAmI returns the user's username as declared by the identity managed. WhoAmI() (string, error) // Groups returns public grous the specified user belongs to. Groups(username string) ([]string, error) }
IDMClient defines the interface of an identity client used by the list-terms command.
type TermsId ¶
TermsId represents a single term id. The term can either be owned or "public" (meaning there is no owner). The Revision starts at 1. Therefore a value of 0 means the revision is unset.
func ParseTerm ¶
ParseTerm takes a termID as a string and parses it into a Term. A complete term is in the form: tenant:owner/name/revision This function accepts partially specified identifiers typically in one of the following forms: name owner/name owner/name/27 # Revision 27 name/283 # Revision 283 cs:owner/name # Tenant cs