github.com/go-chef/chef@v0.30.1/key.go (about)

     1  package chef
     2  
     3  import ()
     4  
     5  //For all API date inputs and outputs, we will be strictly using ISO8601 in
     6  //UTC format, which looks like `YYYY-MM-DDThh:mm:ssZ` where `T` is the character
     7  //`T` that separates years, months, days from hours, minutes, seconds and `Z`
     8  //is the character `Z` to denote UTC time as is standard in ISO8601. We should
     9  //strictly validate all date inputs to webmachine / our API to match the above format, and
    10  //all dates should be outputted in said format.
    11  // The exception to this is that "infinity" is a valid date input and can be parsed by all base functions
    12  // and properly inserted into the database with a little massaging (also in base modules).
    13  
    14  type ChefKey struct {
    15  	Name           string `json:"name"`
    16  	PublicKey      string `json:"public_key"`
    17  	ExpirationDate string `json:"expiration_date"`
    18  	Uri            string `json:"uri,omitempty"`
    19  	PrivateKey     string `json:"private_key"`
    20  }
    21  
    22  type AccessKey struct {
    23  	Name           string `json:"name,omitempty"`
    24  	PublicKey      string `json:"public_key,omitempty"`
    25  	ExpirationDate string `json:"expiration_date,omitempty"`
    26  }
    27  
    28  type KeyItem struct {
    29  	Name    string `json:"name,omitempty"`
    30  	Uri     string `json:"uri,omitempty"`
    31  	Expired bool   `json:"expired,omitempty"`
    32  }