Files
opentf/vendor/github.com/nesv/go-dynect/dynect/json.go
Paul Hinze 6fe2703665 Vendor all dependencies w/ Godep
* Remove `make updatedeps` from Travis build. We'll follow up with more
   specific plans around dependency updating in subsequent PRs.
 * Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to
   filter out `/vendor/` from `./...` where appropriate.
 * Temporarily remove `vet` from the `make test` target until we can
   figure out how to get it to not vet `vendor/`. (Initial
   experimentation failed to yield the proper incantation.)

Everything is pinned to current master, with the exception of:

 * Azure/azure-sdk-for-go which is pinned before the breaking change today
 * aws/aws-sdk-go which is pinned to the most recent tag

The documentation still needs to be updated, which we can do in a follow
up PR. The goal here is to unblock release.
2016-01-29 15:08:48 -06:00

59 lines
1.7 KiB
Go

package dynect
/*
This struct represents the request body that would be sent to the DynECT API
for logging in and getting a session token for future requests.
*/
type LoginBlock struct {
Username string `json:"user_name"`
Password string `json:"password"`
CustomerName string `json:"customer_name"`
}
// Type ResponseBlock holds the "header" information returned by any call to
// the DynECT API.
//
// All response-type structs should include this as an anonymous/embedded field.
type ResponseBlock struct {
Status string `json:"string"`
JobId int `json:"job_id,omitempty"`
Messages []MessageBlock `json:"msgs,omitempty"`
}
// Type MessageBlock holds the message information from the server, and is
// nested within the ResponseBlock type.
type MessageBlock struct {
Info string `json:"INFO"`
Source string `json:"SOURCE"`
ErrorCode string `json:"ERR_CD"`
Level string `json:"LVL"`
}
// Type LoginResponse holds the data returned by an HTTP POST call to
// https://api.dynect.net/REST/Session/.
type LoginResponse struct {
ResponseBlock
Data LoginDataBlock `json:"data"`
}
// Type LoginDataBlock holds the token and API version information from an HTTP
// POST call to https://api.dynect.net/REST/Session/.
//
// It is nested within the LoginResponse struct.
type LoginDataBlock struct {
Token string `json:"token"`
Version string `json:"version"`
}
// RecordRequest holds the request body for a record create/update
type RecordRequest struct {
RData DataBlock `json:"rdata"`
TTL string `json:"ttl,omitempty"`
}
// PublishZoneBlock holds the request body for a publish zone request
// https://help.dyn.com/update-zone-api/
type PublishZoneBlock struct {
Publish bool `json:"publish"`
}