github.com/altoros/juju-vmware@v0.0.0-20150312064031-f19ae857ccca/apiserver/backups/info.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package backups 5 6 import ( 7 "github.com/juju/errors" 8 9 "github.com/juju/juju/apiserver/params" 10 ) 11 12 // Info provides the implementation of the API method. 13 func (a *API) Info(args params.BackupsInfoArgs) (params.BackupsMetadataResult, error) { 14 backups, closer := newBackups(a.st) 15 defer closer.Close() 16 17 meta, _, err := backups.Get(args.ID) // Ignore the archive file. 18 if err != nil { 19 return params.BackupsMetadataResult{}, errors.Trace(err) 20 } 21 22 return ResultFromMetadata(meta), nil 23 }