本文整理汇总了Golang中github.com/juju/juju/apiserver/params.BackupsMetadataResult.Series方法的典型用法代码示例。如果您正苦于以下问题:Golang BackupsMetadataResult.Series方法的具体用法?Golang BackupsMetadataResult.Series怎么用?Golang BackupsMetadataResult.Series使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/juju/juju/apiserver/params.BackupsMetadataResult
的用法示例。
在下文中一共展示了BackupsMetadataResult.Series方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: ResultFromMetadata
// ResultFromMetadata updates the result with the information in the
// metadata value.
func ResultFromMetadata(meta *backups.Metadata) params.BackupsMetadataResult {
var result params.BackupsMetadataResult
result.ID = meta.ID()
result.Checksum = meta.Checksum()
result.ChecksumFormat = meta.ChecksumFormat()
result.Size = meta.Size()
if meta.Stored() != nil {
result.Stored = *(meta.Stored())
}
result.Started = meta.Started
if meta.Finished != nil {
result.Finished = *meta.Finished
}
result.Notes = meta.Notes
result.Model = meta.Origin.Model
result.Machine = meta.Origin.Machine
result.Hostname = meta.Origin.Hostname
result.Version = meta.Origin.Version
result.Series = meta.Origin.Series
// TODO(wallyworld) - remove these ASAP
// These are only used by the restore CLI when re-bootstrapping.
// We will use a better solution but the way restore currently
// works, we need them and they are no longer available via
// bootstrap config. We will need to ifx how re-bootstrap deals
// with these keys to address the issue.
result.CACert = meta.CACert
result.CAPrivateKey = meta.CAPrivateKey
return result
}