github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/apiserver/params/resources_unit.go (about)

     1  // Copyright 2017 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package params
     5  
     6  // ListResourcesArgs holds the arguments for an API request to list
     7  // resources for an application. The application is implicit to the uniter-
     8  // specific HTTP connection.
     9  type ListUnitResourcesArgs struct {
    10  	// ResourceNames holds the names of the application's resources for
    11  	// which information should be provided.
    12  	ResourceNames []string `json:"resource-names"`
    13  }
    14  
    15  // UnitResourcesResult holds the resource info for a list of requested
    16  // resources.
    17  type UnitResourcesResult struct {
    18  	ErrorResult
    19  
    20  	// Resources is the list of results for the requested resources,
    21  	// in the same order as requested.
    22  	Resources []UnitResourceResult `json:"resources"`
    23  }
    24  
    25  // UnitResourceResult is the result for a single requested resource.
    26  type UnitResourceResult struct {
    27  	ErrorResult
    28  
    29  	// Resource is the info for the requested resource.
    30  	Resource Resource `json:"resource"`
    31  }