Ubuntu Pastebin

Paste from rog at Wed, 23 Mar 2016 14:54:01 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// MetaRequest returns a new MetaRequest that will
// obtain metadata from all the given ids.
func (c *Client) MetaRequest(ids ...*charm.URL) *MetaRequest

// Include requests that the given meta path should
// be included in the metadata results.
// The data parameter must be a pointer to a slice;
// the metadata result for each requested id will
// be unmarshaled into each element and on
// success, len(*data) will be equal to len(ids).
func (req *MetaRequest) Include(meta string, data interface{})

// IncludeOne is like Include but works for the special
// case that exactly one id was passed to MetaRequest.
// The data parameter must hold a pointer to the
// value that will be filled out from the single result.
//
// If there was not exactly one id passed to MetaRequest,
// Do will return an error.
func (req *MetaRequest) IncludeOne(meta string, data interface{})

// Do sends the meta request, unmarshaling all the
// results into result parameters passed into include.
// It returns all the fully resolved entity URLs,
// one for each id passed into MetaRequest.
//
// If an entity was not found, its corresponding URL
// will be nil.
func (req *MetaRequest) Do() ([]*charm.URL, error)
Download as text