github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/resource/api/private/data.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package private 5 6 // TODO(ericsnow) Eliminate the apiserver dependencies, if possible. 7 8 import ( 9 "github.com/juju/juju/apiserver/params" 10 "github.com/juju/juju/resource/api" 11 ) 12 13 // ListResourcesArgs holds the arguments for an API request to list 14 // resources for an application. The application is implicit to the uniter- 15 // specific HTTP connection. 16 type ListResourcesArgs struct { 17 // ResourceNames holds the names of the application's resources for 18 // which information should be provided. 19 ResourceNames []string `json:"resource-names"` 20 } 21 22 // ResourcesResult holds the resource info for a list of requested 23 // resources. 24 type ResourcesResult struct { 25 params.ErrorResult 26 27 // Resources is the list of results for the requested resources, 28 // in the same order as requested. 29 Resources []ResourceResult `json:"resources"` 30 } 31 32 // ResourceResult is the result for a single requested resource. 33 type ResourceResult struct { 34 params.ErrorResult 35 36 // Resource is the info for the requested resource. 37 Resource api.Resource `json:"resource"` 38 }