github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/client/controller/api/keys.go (about)

     1  package api
     2  
     3  // Key is the definition of the key object.
     4  type Key struct {
     5  	Created string `json:"created"`
     6  	ID      string `json:"id"`
     7  	Owner   string `json:"owner"`
     8  	Public  string `json:"public"`
     9  	Updated string `json:"updated"`
    10  	UUID    string `json:"uuid"`
    11  }
    12  
    13  type Keys []Key
    14  
    15  func (k Keys) Len() int           { return len(k) }
    16  func (k Keys) Swap(i, j int)      { k[i], k[j] = k[j], k[i] }
    17  func (k Keys) Less(i, j int) bool { return k[i].ID < k[j].ID }
    18  
    19  // KeyCreateRequest is the definition of POST /v1/keys/.
    20  type KeyCreateRequest struct {
    21  	ID     string `json:"id"`
    22  	Public string `json:"public"`
    23  	Name   string `json:"name,omitempty"`
    24  }