本文整理匯總了Golang中github.com/juju/juju/apiserver/params.StringResult類的典型用法代碼示例。如果您正苦於以下問題:Golang StringResult類的具體用法?Golang StringResult怎麽用?Golang StringResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了StringResult類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: CurrentEnvironUUID
// CurrentEnvironUUID returns the UUID for the current juju environment.
func (u *UniterAPI) CurrentEnvironUUID() (params.StringResult, error) {
result := params.StringResult{}
env, err := u.st.Environment()
if err == nil {
result.Result = env.UUID()
}
return result, err
}
示例2: ProviderType
// ProviderType returns the provider type used by the current juju
// model.
//
// TODO(dimitern): Refactor the uniter to call this instead of calling
// ModelConfig() just to get the provider type. Once we have machine
// addresses, this might be completely unnecessary though.
func (u *UniterAPIV3) ProviderType() (params.StringResult, error) {
result := params.StringResult{}
cfg, err := u.st.ModelConfig()
if err == nil {
result.Result = cfg.Type()
}
return result, err
}
示例3: ProviderType
// ProviderType returns the provider type used by the current juju
// environment.
//
// TODO(dimitern): Refactor the uniter to call this instead of calling
// EnvironConfig() just to get the provider type. Once we have machine
// addresses, this might be completely unnecessary though.
func (u *uniterBaseAPI) ProviderType() (params.StringResult, error) {
result := params.StringResult{}
cfg, err := u.st.EnvironConfig()
if err == nil {
result.Result = cfg.Type()
}
return result, err
}