// Info sends an info request to the remote CFSSL server, receiving a
// response or an error in response.
// It takes the serialized JSON request to send.
353709
func (srv *server) Info(jsonData []byte) (*info.Resp, error) {
	res, err := srv.getResultMap(jsonData, "info")
	if err != nil {
		return nil, err
	}

	info := new(info.Resp)

	if val, ok := res["certificate"]; ok {
		info.Certificate = val.(string)
	}
	var usages []interface{}
	if val, ok := res["usages"]; ok && val != nil {
		usages = val.([]interface{})
	}
	if val, ok := res["expiry"]; ok && val != nil {
		info.ExpiryString = val.(string)
	}

	info.Usage = make([]string, len(usages))
	for i, s := range usages {
		info.Usage[i] = s.(string)
	}

	return info, nil
}
1258899
func (c *setFirewallRuleCommand) Info() *cmd.Info {
	supportedRules := []string{
		" -" + string(params.SSHRule),
		" -" + string(params.JujuControllerRule),
		" -" + string(params.JujuApplicationOfferRule),
	}
	return jujucmd.Info(&cmd.Info{
		Name:    "set-firewall-rule",
		Args:    "<service-name>, --whitelist <cidr>[,<cidr>...]",
		Purpose: setRuleHelpSummary,
		Doc:     fmt.Sprintf(setRuleHelpDetails, strings.Join(supportedRules, "\n")),
	})
}
925785
func (c *Client) GetInfo() (*Info, error) {
	r := c.NewRequest("GET", "/v2/info")
	resp, err := c.DoRequest(r)
	if err != nil {
		return nil, errors.Wrap(err, "Error requesting info")
	}
	defer resp.Body.Close()
	var i Info
	err = json.NewDecoder(resp.Body).Decode(&i)
	if err != nil {
		return nil, errors.Wrap(err, "Error unmarshalling info")
	}
	return &i, nil
}
1167704
func (s *ChannelsService) Info(channel string) *ChannelsInfoCall {
	var call ChannelsInfoCall
	call.service = s
	call.channel = channel
	return &call
}
639510
func (b *Bucket) Info() (BucketInfo, error) {
	params := make(url.Values)
	params.Set("bucketInfo", "")
	r, err := b.GetWithParams("/", params)

	if err != nil {
		return BucketInfo{}, err
	}

	// Parse the XML response.
	var resp GetBucketInfoResp
	if err = xml.Unmarshal(r, &resp); err != nil {
		return BucketInfo{}, err
	}

	return resp.Bucket, nil
}
8140
func (l *Logger) Info(msg string, fields map[string]interface{}) error {
	return l.Log(LvInfo, msg, fields)
}
420524
func (s *BotsService) Info(bot string) *BotsInfoCall {
	var call BotsInfoCall
	call.service = s
	call.bot = bot
	return &call
}
427644
func (l *Logger) Info(format string, a ...interface{}) {
	l.Log(LevelInfo, format, a...)
}
37034
func (n *Namespaces) Info(name string, q *QueryOptions) (*Namespace, *QueryMeta, error) {
	var resp Namespace
	qm, err := n.client.query("/v1/namespace/"+name, &resp, q)
	if err != nil {
		return nil, nil, err
	}
	return &resp, qm, nil
}
430661
func Info(msg string, ctx ...interface{}) {
	root.write(msg, LvlInfo, ctx, skipLevel)
}
74336
func (c *HyperClient) Info() (*types.InfoResponse, error) {
	info, err := c.client.Info(
		c.ctx,
		&types.InfoRequest{},
	)

	if err != nil {
		return nil, err
	}

	return info, nil
}
806877
func Info(v ...interface{}) {
	if std.Level >= InfoLevel {
		std.Logger.Print(InfoLevel.String() + fmt.Sprint(v...))
	}
}
902546
func (l *Logger) Info(msg string) error {
	return l.logMsg(nil, LEVEL_INFO, msg)
}
63183
func (c *modelCredentialCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "set-credential",
		Args:    "<cloud name> <credential name>",
		Purpose: "Relates a remote credential to a model.",
		Doc:     modelCredentialDoc,
	})
}
160325
func (s *GroupsService) Info(channel string) *GroupsInfoCall {
	var call GroupsInfoCall
	call.service = s
	call.channel = channel
	return &call
}
1304914
func (client *Client) Info() (APIInformation, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetInfoRequest,
	})
	if err != nil {
		return APIInformation{}, nil, err
	}

	var info APIInformation
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &info,
	}

	err = client.connection.Make(request, &response)
	if unknownSourceErr, ok := err.(ccerror.UnknownHTTPSourceError); ok && unknownSourceErr.StatusCode == http.StatusNotFound {
		return APIInformation{}, nil, ccerror.APINotFoundError{URL: client.cloudControllerURL}
	}
	return info, response.Warnings, err
}
1353514
func (c *updateCredentialCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "update-credential",
		Args:    "<cloud-name> <credential-name>",
		Purpose: usageUpdateCredentialSummary,
		Doc:     usageUpdateCredentialDetails,
	})
}