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

     1  // Copyright 2017 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package params
     5  
     6  // PayloadListArgs are the arguments for the Payloads.List endpoint.
     7  type PayloadListArgs struct {
     8  	// Patterns is the list of patterns against which to filter.
     9  	Patterns []string `json:"patterns"`
    10  }
    11  
    12  // PayloadListResults returns the result of the Payload.List endpoint.
    13  type PayloadListResults struct {
    14  	// Results is the list of payload results.
    15  	Results []Payload `json:"results"`
    16  }
    17  
    18  // Payload contains full information about a payload.
    19  type Payload struct {
    20  	// Class is the name of the payload class.
    21  	Class string `json:"class"`
    22  
    23  	// Type is the name of the payload type.
    24  	Type string `json:"type"`
    25  
    26  	// ID is a unique string identifying the payload to
    27  	// the underlying technology.
    28  	ID string `json:"id"`
    29  
    30  	// Status is the Juju-level status for the payload.
    31  	Status string `json:"status"`
    32  
    33  	// Labels are labels associated with the payload.
    34  	Labels []string `json:"labels"`
    35  
    36  	// Unit identifies the unit tag associated with the payload.
    37  	Unit string `json:"unit"`
    38  
    39  	// Machine identifies the machine tag associated with the payload.
    40  	Machine string `json:"machine"`
    41  }