func NewSimple(opts SimpleConfig, dialOptions ...api.DialOption) (*SimpleConnector, error) {
	info := api.Info{
		Addrs:    opts.ControllerAddresses,
		CACert:   opts.CACert,
		ModelTag: names.NewModelTag(opts.ModelUUID),

		Tag:       names.NewUserTag(opts.Username),
		Password:  opts.Password,
		Macaroons: opts.Macaroons,
	}
	if err := info.Validate(); err != nil {
		return nil, err
	}
	conn := &SimpleConnector{
		info:            info,
		defaultDialOpts: api.DefaultDialOpts(),
	}
	for _, f := range dialOptions {
		f(&conn.defaultDialOpts)
	}
	return conn, nil
}
// NewSimple returns an instance of *SimpleConnector configured to
// connect according to the specified options.  If some options are invalid an
// error is returned.
NewSimple returns an instance of *SimpleConnector configured to
connect according to the specified options.  If some options are invalid an
error is returned.
// NewSimple returns an instance of * SimpleConnector configured to // connect according to the specified options . If some options are invalid an // error is returned .
func NewSimple(opts SimpleConfig, dialOptions ...api.DialOption) (*SimpleConnector, error) {
	info := api.Info{
		Addrs:    opts.ControllerAddresses,
		CACert:   opts.CACert,
		ModelTag: names.NewModelTag(opts.ModelUUID),
		Tag:       names.NewUserTag(opts.Username),
		Password:  opts.Password,
		Macaroons: opts.Macaroons,
	}
	if err := info.Validate(); err != nil {
		return nil, err
	}
	conn := &SimpleConnector{
		info:            info,
		defaultDialOpts: api.DefaultDialOpts(),
	}
	for _, f := range dialOptions {
		f(&conn.defaultDialOpts)
	}
	return conn, nil
}
func NewSimple ( opts SimpleConfig , dialOptions ... api . DialOption ) ( * SimpleConnector , error ) { info := api . Info { Addrs : opts . ControllerAddresses , CACert : opts . CACert , ModelTag : names . NewModelTag ( opts . ModelUUID ) , Tag : names . NewUserTag ( opts . Username ) , Password : opts . Password , Macaroons : opts . Macaroons , } if err := info . Validate ( ) ; err != nil { return nil , err } conn := & SimpleConnector { info : info , defaultDialOpts : api . DefaultDialOpts ( ) , } for _ , f := range dialOptions { f ( & conn . defaultDialOpts ) } return conn , nil }
NewSimple returns an instance of *SimpleConnector configured to
connect according to the specified options.
NewSimple returns an instance of * SimpleConnector configured to connect according to the specified options .