schema

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRecord

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

type Error

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

Error represents the schema of an error response.

func (*Error) UnmarshalJSON

func (e *Error) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON overrides default json unmarshalling.

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"`
	PreviousPage int `json:"previous_page"`
	NextPage     int `json:"next_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 {
	BaseRecord
	ID       string `json:"id"`
	Created  Time   `json:"created"`
	Modified Time   `json:"modified"`
}

type RecordAllResponse

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

type RecordBulkCreateRequest

type RecordBulkCreateRequest struct {
	Records []RecordCreateRequest `json:"records"`
}

type RecordBulkCreateResponse

type RecordBulkCreateResponse struct {
	InvalidRecords []BaseRecord `json:"invalid_records"`
	Records        []Record     `json:"records"`
	ValidRecords   []BaseRecord `json:"valid_records"`
}

type RecordBulkUpdateRequest

type RecordBulkUpdateRequest struct {
	Records []RecordUpdateRequest `json:"records"`
}

type RecordBulkUpdateResponse

type RecordBulkUpdateResponse struct {
	FailedRecords []BaseRecord `json:"failed_records"`
	Records       []Record     `json:"records"`
}

type RecordCreateRequest

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

type RecordCreateResponse

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

type RecordGetResponse

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

type RecordListResponse

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

type RecordUpdateRequest

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

type RecordUpdateResponse

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

type Time

type Time struct {
	time.Time
}

func (*Time) UnmarshalJSON

func (zt *Time) UnmarshalJSON(data []byte) error

type Zone

type Zone struct {
	ID              string              `json:"id"`
	Name            string              `json:"name"`
	TTL             int                 `json:"ttl"`
	Created         Time                `json:"created"`
	IsSecondaryDNS  bool                `json:"is_secondary_dns"`
	LegacyDNSHost   string              `json:"legacy_dns_host"`
	LegacyNS        []string            `json:"legacy_ns"`
	Modified        Time                `json:"modified"`
	NS              []string            `json:"ns"`
	Owner           string              `json:"owner"`
	Paused          bool                `json:"paused"`
	Permission      string              `json:"permission"`
	Project         string              `json:"project"`
	RecordsCount    int                 `json:"records_count"`
	Registrar       string              `json:"registrar"`
	Status          string              `json:"status"`
	TXTVerification ZoneTxtVerification `json:"txt_verification"`
	Verified        Time                `json:"verified"`
}

type ZoneAllResponse

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

type ZoneCreateRequest

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

type ZoneCreateResponse

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

type ZoneGetResponse

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

type ZoneTxtVerification

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

type ZoneUpdateRequest

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

type ZoneUpdateResponse

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

Jump to

Keyboard shortcuts

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