Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalAccounts ¶
MarshalAccounts encodes the given credentials information so that they are suitable for being used as the content of the Juju accounts.yaml file.
func MarshalControllers ¶
MarshalControllers encodes the given controller information so that it is suitable for being used as the content of the Juju controllers.yaml file.
Types ¶
type Credentials ¶
type Credentials struct { // Username and Password hold traditional Juju credentials for local users. Username string Password string // Macaroons, alternatively, maps cookie URLs to macaroons used for // authenticating as external users. An identity manager URL/token pair is // usually provided. Macaroons map[string]macaroon.Slice }
Credentials holds credentials for logging into a Juju controller.
type Info ¶
type Info struct { // User holds the name of the current local or external user. User string // ControllerName holds the name of the controller. ControllerName string // ControllerUUID holds the unique identifier for the Juju controller. ControllerUUID string // CACert is a security certificate for this controller. CACert string // Endpoints holds the addresses to use to connect to the Juju controller. Endpoints []string }
Info holds information about the Juju controller.
func Authenticate ¶
func Authenticate(addrs []string, creds *Credentials, cert string) (*Info, error)
Authenticate logs the current user into the Juju controller at the given addresses with the given credentials. It returns information about the Juju controller or an error.
Click to show internal directories.
Click to hide internal directories.