Documentation ¶
Index ¶
- type HdnsTime
- type Meta
- type MetaPagination
- type MetaResponse
- type PrimaryServer
- type PrimaryServerCreateRequest
- type PrimaryServerListResponse
- type PrimaryServerResponse
- type PrimaryServerUpdateRequest
- type Record
- type RecordBulkCreateRequest
- type RecordBulkCreateResponse
- type RecordBulkEntry
- type RecordBulkUpdateEntry
- type RecordBulkUpdateRequest
- type RecordBulkUpdateResponse
- type RecordCreateRequest
- type RecordListResponse
- type RecordResponse
- type RecordUpdateRequest
- type TxtVerification
- type ValidateZoneFileResponse
- type Zone
- type ZoneCreateRequest
- type ZoneListResponse
- type ZoneResponse
- type ZoneUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HdnsTime ¶ added in v0.1.1
HdnsTime defines a wrapper for time.Time, to handle the DateTime format(s) used in HCloud DNS API...
func (HdnsTime) MarshalJSON ¶ added in v0.1.1
MarshalJSON is an implementation of encoding/json.Marshaler
func (*HdnsTime) UnmarshalJSON ¶ added in v0.1.1
UnmarshalJSON is an implementation of encoding/json.Unmarshaler
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 { LastPage int `json:"last_page"` Page int `json:"page"` PerPage int `json:"per_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 PrimaryServer ¶
type PrimaryServer struct { ID string `json:"id"` Port int `json:"port"` Created HdnsTime `json:"created"` Modified HdnsTime `json:"modified"` ZoneID string `json:"zone_id"` Address string `json:"address"` }
PrimaryServer represents a primary server in the Hetzner DNS API.
type PrimaryServerCreateRequest ¶
type PrimaryServerCreateRequest struct { Address string `json:"address"` Port int `json:"port"` ZoneID string `json:"zone_id"` }
PrimaryServerCreateRequest defines a schema for the request to create a primary server.
type PrimaryServerListResponse ¶
type PrimaryServerListResponse struct {
PrimaryServers []PrimaryServer `json:"primary_servers"`
}
PrimaryServerListResponse defines the schema of the response when listing primary servers.
type PrimaryServerResponse ¶
type PrimaryServerResponse struct {
PrimaryServer PrimaryServer `json:"primary_server"`
}
PrimaryServerResponse defines the schema of the response when listing zones.
type PrimaryServerUpdateRequest ¶
type PrimaryServerUpdateRequest struct { Address string `json:"address"` Port int `json:"port"` ZoneID string `json:"zone_id"` }
PrimaryServerUpdateRequest defines a schema for the request to create a primary server.
type Record ¶
type Record struct { Type string `json:"type"` ID string `json:"id"` Created HdnsTime `json:"created"` Modified HdnsTime `json:"modified"` ZoneID string `json:"zone_id"` Name string `json:"name"` Value string `json:"value"` Ttl int `json:"ttl"` }
Record represents a record in Hetzner DNS.
type RecordBulkCreateRequest ¶
type RecordBulkCreateRequest struct {
Records []RecordCreateRequest `json:"records"`
}
RecordBulkCreateRequest defines a schema for the request to bulk create records.
type RecordBulkCreateResponse ¶
type RecordBulkCreateResponse struct { Records []Record `json:"record"` ValidRecords []RecordBulkEntry `json:"valid_records"` InvalidRecords []RecordBulkEntry `json:"invalid_records"` }
RecordResponse defines the schema of the response when listing zones.
type RecordBulkEntry ¶
type RecordBulkEntry struct { Name string `json:"name"` Ttl *int `json:"ttl"` Type string `json:"type"` Value string `json:"value"` ZoneID string `json:"zone_id"` }
RecordBulkEntry defines a schema for an entry for the request to bulk create records and is used in responses.
type RecordBulkUpdateEntry ¶
type RecordBulkUpdateEntry struct { ID string `json:"id"` Name string `json:"name"` Ttl *int `json:"ttl"` Type string `json:"type"` Value string `json:"value"` ZoneID string `json:"zone_id"` }
RecordBulkUpdateEntry defines a schema for an entry for the request to bulk update records.
type RecordBulkUpdateRequest ¶
type RecordBulkUpdateRequest struct {
Records []RecordBulkUpdateEntry `json:"records"`
}
RecordBulkUpdateRequest defines a schema for the request to bulk update records.
type RecordBulkUpdateResponse ¶
type RecordBulkUpdateResponse struct { Records []Record `json:"records"` FailedRecords []RecordBulkEntry `json:"failed_records"` }
RecordBulkUpdateResponse defines a schema for the respose to bulk update 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"` }
RecordCreateRequest defines a schema for the request to create a record.
type RecordListResponse ¶
type RecordListResponse struct {
Records []Record `json:"records"`
}
RecordListResponse defines the schema of the response when listing zones.
type RecordResponse ¶
type RecordResponse struct {
Record Record `json:"record"`
}
RecordResponse defines the schema of the response when listing zones.
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"` }
RecordUpdateRequest defines a schema for the request to update a record.
type TxtVerification ¶
TxtVerification represents the text verification of a zone.
type ValidateZoneFileResponse ¶
type ValidateZoneFileResponse struct { PassedRecords int `json:"passed_records"` ValidRecords []Record `json:"valid_records"` }
ValidateZoneFileResponse defines the schema of the response when validating a zone file.
type Zone ¶
type Zone struct { ID string `json:"id"` Created HdnsTime `json:"created"` Modified HdnsTime `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 int `json:"ttl"` Verified HdnsTime `json:"verified"` RecordsCount int `json:"records_count"` IsSecondaryDNS bool `json:"is_secondary_dns"` TxtVerification TxtVerification `json:"txt_verification"` }
Zone represents a zone in Hetzner DNS.
type ZoneCreateRequest ¶
CreateZoneRequest defines a schema for the request to create a zone.
type ZoneListResponse ¶
type ZoneListResponse struct {
Zones []Zone `json:"zones"`
}
ZoneListResponse defines the schema of the response when listing zones.
type ZoneResponse ¶
type ZoneResponse struct {
Zone Zone `json:"zone"`
}
ZoneGetResponse defines the schema of the response when listing zones.
type ZoneUpdateRequest ¶
CreateZoneRequest defines a schema for the request to create a zone.