schema

package
v0.0.0-...-078f61a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

Error represents the schema of an error response.

type ErrorResponse

type ErrorResponse struct {
	Error Error `json:"error"`
}

ErrorResponse defines the schema of a response containing an error.

type Meta

type Meta struct {
	Pagination *MetaPagination `json:"pagination"`
}

Meta defines the schema of meta information which may be included in responses.

type MetaPagination

type MetaPagination struct {
	Page         int `json:"page"`
	PerPage      int `json:"per_page"`
	LastPage     int `json:"last_page"`
	TotalEntries int `json:"total_entries"`
}

MetaPagination defines the schema of pagination information.

type MetaResponse

type MetaResponse struct {
	Meta Meta `json:"meta"`
}

MetaResponse defines the schema of a response containing meta information.

type Record

type Record struct {
	Type     string    `json:"type"`
	ID       string    `json:"id"`
	Created  time.Time `json:"created"`
	Modified time.Time `json:"modified"`
	ZoneID   string    `json:"zone_id"`
	Name     string    `json:"name"`
	Value    string    `json:"value"`
	TTL      uint64    `json:"ttl"`
}

Record defines the schema of DNS record which may be included in responses.

type RecordCreateRequest

type RecordCreateRequest struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	TTL    uint64 `json:"ttl"`
	Value  string `json:"value"`
	ZoneID string `json:"zone_id"`
}

RecordCreateRequest defines the schema of the request to create a record.

type RecordCreateResponse

type RecordCreateResponse struct {
	Record Record `json:"record"`
}

RecordCreateResponse defines the schema of the response for record creation.

type RecordGetResponse

type RecordGetResponse struct {
	Record Record `json:"record"`
}

RecordGetResponse defines the schema of the response when retrieving a single record.

type RecordListResponse

type RecordListResponse struct {
	Records []Record `json:"records"`
}

RecordListResponse defines the schema of the response when listing all DNS records.

type RecordUpdateRequest

type RecordUpdateRequest struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	TTL    uint64 `json:"ttl"`
	Value  string `json:"value"`
	ZoneID string `json:"zone_id"`
}

RecordUpdateRequest defines the schema of the request to update a record.

type RecordUpdateResponse

type RecordUpdateResponse struct {
	Record Record `json:"record"`
}

RecordUpdateResponse defines the schema of the response for zone update.

type TxtVerification

type TxtVerification struct {
	Name  string `json:"name"`
	Token string `json:"token"`
}

TxtVerification defines the schema of TXT Verification object.

type TxtVerificationResponse

type TxtVerificationResponse struct {
	TxtVerification TxtVerification `json:"txt_verification"`
}

TxtVerificationResponse defines the schema of the response when retrieving TXT Verification object.

type Zone

type Zone struct {
	ID              string          `json:"id"`
	Created         time.Time       `json:"created"`
	Modified        time.Time       `json:"modified"`
	LegacyDNSHost   string          `json:"legacy_dns_host"`
	LegacyNs        []string        `json:"legacy_ns"`
	Name            string          `json:"name"`
	Ns              []string        `json:"ns"`
	Owner           string          `json:"owner"`
	Paused          bool            `json:"paused"`
	Permission      string          `json:"permission"`
	Project         string          `json:"project"`
	Registrar       string          `json:"registrar"`
	Status          string          `json:"status"`
	TTL             uint64          `json:"ttl"`
	Verified        time.Time       `json:"verified"`
	RecordsCount    uint64          `json:"records_count"`
	IsSecondaryDNS  bool            `json:"is_sedondary_dns"`
	TxtVerification TxtVerification `json:"txt_verification"`
}

Zone defines the schema of DNS zone information which may be included in responses.

type ZoneCreateRequest

type ZoneCreateRequest struct {
	Name string `json:"name"`
	TTL  uint64 `json:"ttl"`
}

ZoneCreateRequest defines the schema of the request to create a zone.

type ZoneCreateResponse

type ZoneCreateResponse struct {
	Zone Zone `json:"zone"`
}

ZoneCreateResponse defines the schema of the response for zone creation.

type ZoneGetResponse

type ZoneGetResponse struct {
	Zone Zone `json:"zone"`
}

ZoneGetResponse defines the schema of the response when retrieving a single zone.

type ZoneListResponse

type ZoneListResponse struct {
	Zones []Zone `json:"zones"`
}

ZoneListResponse defines the schema of the response when listing zones.

type ZoneUpdateRequest

type ZoneUpdateRequest struct {
	Name string `json:"name"`
	TTL  uint64 `json:"ttl"`
}

ZoneUpdateRequest defines the schema of the request to update a zone.

type ZoneUpdateResponse

type ZoneUpdateResponse struct {
	Zone Zone `json:"zone"`
}

ZoneUpdateResponse defines the schema of the response for zone update.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL