From bcbc2ac6fc02cc7cd14d3a2ac71de5b61122fc5e Mon Sep 17 00:00:00 2001 From: Chris Green <34572557+cgreen12@users.noreply.github.com> Date: Wed, 21 Aug 2019 04:53:01 -0400 Subject: [PATCH] :trollface: re-ran swagger Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com> --- pkg/models/dns_result.go | 46 +++++++++++++++++++++++++++++++++++++++ pkg/models/dns_results.go | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 pkg/models/dns_result.go create mode 100644 pkg/models/dns_results.go diff --git a/pkg/models/dns_result.go b/pkg/models/dns_result.go new file mode 100644 index 0000000..8ab2c46 --- /dev/null +++ b/pkg/models/dns_result.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// DNSResult Dns result +// swagger:model DnsResult +type DNSResult struct { + + // error + Error string `json:"error,omitempty"` + + // response time ms + ResponseTimeMs int64 `json:"response-time-ms,omitempty"` +} + +// Validate validates this Dns result +func (m *DNSResult) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DNSResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DNSResult) UnmarshalBinary(b []byte) error { + var res DNSResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/models/dns_results.go b/pkg/models/dns_results.go new file mode 100644 index 0000000..e1a0e8b --- /dev/null +++ b/pkg/models/dns_results.go @@ -0,0 +1,40 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// DNSResults Dns results +// swagger:model DnsResults +type DNSResults map[string]DNSResult + +// Validate validates this Dns results +func (m DNSResults) Validate(formats strfmt.Registry) error { + var res []error + + for k := range m { + + if err := validate.Required(k, "body", m[k]); err != nil { + return err + } + if val, ok := m[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +}