github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/apiserver/params/annotations.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package params
     5  
     6  // AnnotationsGetResult holds entity annotations or retrieval error.
     7  type AnnotationsGetResult struct {
     8  	EntityTag   string            `json:"entity"`
     9  	Annotations map[string]string `json:"annotations"`
    10  	Error       ErrorResult       `json:"error,omitempty"`
    11  }
    12  
    13  // AnnotationsGetResults holds annotations associated with entities.
    14  type AnnotationsGetResults struct {
    15  	Results []AnnotationsGetResult `json:"results"`
    16  }
    17  
    18  // AnnotationsSet stores parameters for making Set call on Annotations client.
    19  type AnnotationsSet struct {
    20  	Annotations []EntityAnnotations `json:"annotations"`
    21  }
    22  
    23  // EntityAnnotations stores annotations for an entity.
    24  type EntityAnnotations struct {
    25  	EntityTag   string            `json:"entity"`
    26  	Annotations map[string]string `json:"annotations"`
    27  }