model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRecordRequest

type CreateRecordRequest struct {
	Action string              `json:"action"`
	Domain string              `json:"domain"`
	Header string              `json:"header"`
	Type   constant.DomainType `json:"type"`
	Ttl    uint32              `json:"ttl"`
	Value  string              `json:"value"`
}

CreateRecord

type CreateRecordResponse

type CreateRecordResponse = []struct{}

type DeleteRecordRequest

type DeleteRecordRequest struct {
	Action string              `json:"action"`
	Domain string              `json:"domain"`
	Header string              `json:"header"`
	Type   constant.DomainType `json:"type"`
	Ttl    uint32              `json:"ttl"`
	Value  string              `json:"value"`
}

DeleteRecord

type DeleteRecordResponse

type DeleteRecordResponse = []struct{}

type DomainListRequest

type DomainListRequest struct {
	Action string `json:"action"`
}

DomainList

type DomainListResponse

type DomainListResponse struct {
	Domains []*DomainListResponseItem `json:"domains"`
}

type DomainListResponseItem

type DomainListResponseItem struct {
	// 域名
	Domain string `json:"domain"`
	// Type 释义:https://doc.hostker.dev/dns/
	Type uint8 `json:"type"`
}

type Record

type Record struct {
	Header string              `json:"header"` // 域名头部,空为@
	Type   constant.DomainType `json:"type"`   // 类型
	Ttl    uint32              `json:"ttl"`    // 生命周期
	Value  string              `json:"value"`  // 记录值
}

type RecordsRequest

type RecordsRequest struct {
	Action string `json:"action"`
	Domain string `json:"domain"`
}

Records

type RecordsResponse

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

type Response

type Response[T any] struct {
	Success bool `json:"success"`
	Result  T    `json:"result"`
	// ErrorMessage
	Error string `json:"error"`
}

type UpdateRecordRequest

type UpdateRecordRequest struct {
	Action    string  `json:"action"`
	Domain    string  `json:"domain"`
	OldRecord *Record `json:"old_record"`
	NewRecord *Record `json:"new_record"`
}

UpdateRecord

type UpdateRecordResponse

type UpdateRecordResponse = []struct{}

Jump to

Keyboard shortcuts

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