Documentation ¶
Index ¶
- Constants
- Variables
- func Int(v int) *int
- func Int64(v int64) *int64
- func MasterIpType(fl validator.FieldLevel) bool
- func OrderBy(fl validator.FieldLevel) bool
- func Port(fl validator.FieldLevel) bool
- func Priority(fl validator.FieldLevel) bool
- func RecordTypes(fl validator.FieldLevel) bool
- func RegisterValidationErrors(trans ut.Translator)
- func RowsPerPage(fl validator.FieldLevel) bool
- func SetAppInfo(info *AppInfo)
- func SetBackend(b Backend)
- func String(v string) *string
- func Ttl(fl validator.FieldLevel) bool
- func ValidateParams[T any](value T) []string
- func ValidatorInit()
- func Weight(fl validator.FieldLevel) bool
- func ZoneStatus(fl validator.FieldLevel) bool
- func ZoneType(fl validator.FieldLevel) bool
- type AccountBalanceResponse
- type AccountIpResponse
- type AccountLoginResponse
- type AddRecordParams
- type AddRecordResponse
- type AddRecordResponseData
- type AppInfo
- type AvailableNameServers
- type AvailableNameServersListParams
- type Backend
- type BackendConfig
- type BackendImplementation
- func (s *BackendImplementation) Call(method, path string, params interface{}, v interface{}, isPlain bool) error
- func (s *BackendImplementation) CallRaw(method, path string, params []byte, v interface{}, isPlain bool) error
- func (s *BackendImplementation) Do(req *http.Request, body *bytes.Buffer, v interface{}, isPlain bool) error
- func (s *BackendImplementation) NewRequest(method, path, contentType string, params *bytes.Buffer) (*http.Request, error)
- func (s *BackendImplementation) ReadPlainResponse(resBody []byte, v interface{}) error
- func (s *BackendImplementation) UnmarshalJSONVerbose(statusCode int, body []byte, v interface{}) error
- type Backends
- type ChangeZoneStatusParams
- type ChangeZoneStatusResponse
- type DeleteDomainZoneParams
- type DeleteDomainZoneResponse
- type DeleteRecordParams
- type DeleteRecordResponse
- type DomainZones
- type DomainZonesPagesCountParams
- type GetZoneInformationParams
- type IsUpdatedZoneParams
- type ListDomainZonesParams
- type ListDomainZonesResponse
- type ModifyRecordParams
- type ModifyRecordResponse
- type Record
- type RecordListParams
- type RecordListResponse
- type RecordParams
- type RecordResponse
- type RecordsPagesCountParams
- type RecordsStatisticsResponse
- type RegisterDomainZoneParams
- type RegisterDomainZoneResponse
- type UpdateZoneParams
- type UpdateZoneResponse
- type UpdateZoneStatusParams
- type UpdateZoneStatusResponse
- type ZoneInformationResponse
- type ZoneStatisticsResponse
Constants ¶
View Source
const ( // APIVersion is the currently supported API version APIVersion string = apiVersion // APIURL is the URL of the API service backend. APIURL string = "https://api.cloudns.net" )
Variables ¶
View Source
var ( // AuthId Api user ID AuthId *string = nil // SubAuthId Api sub user ID SubAuthId *int = nil // SubAuthUser Api sub user name SubAuthUser *string = nil // AuthPassword is the password for API user ID or for API sub user ID AuthPassword *string = nil // DefaultMaxNetworkRetries is the default maximum number of retries made // by a Cloudns client. DefaultMaxNetworkRetries int64 = 2 )
Functions ¶
func MasterIpType ¶
func MasterIpType(fl validator.FieldLevel) bool
func RecordTypes ¶
func RecordTypes(fl validator.FieldLevel) bool
func RegisterValidationErrors ¶
func RegisterValidationErrors(trans ut.Translator)
func RowsPerPage ¶
func RowsPerPage(fl validator.FieldLevel) bool
func SetAppInfo ¶
func SetAppInfo(info *AppInfo)
func SetBackend ¶
func SetBackend(b Backend)
func ValidateParams ¶
func ValidatorInit ¶
func ValidatorInit()
func ZoneStatus ¶
func ZoneStatus(fl validator.FieldLevel) bool
Types ¶
type AccountBalanceResponse ¶
type AccountBalanceResponse struct {
Funds string `json:"funds"`
}
type AccountIpResponse ¶
type AccountIpResponse struct {
Ip string `json:"ip"`
}
type AccountLoginResponse ¶
type AddRecordParams ¶
type AddRecordParams struct { auth.Auth `json:",inline"` DomainName *string `json:"domain-name" validate:"required"` RecordType *string `json:"record-type" validate:"required,record_types"` Host *string `json:"host" validate:"required"` Record *string `json:"record" validate:"required"` TTL *string `json:"ttl,omitempty" validate:"required,ttl"` Priority *string `json:"priority,omitempty" validate:"omitempty,priority"` Weight *string `json:"weight,omitempty" validate:"omitempty,weight"` Port *string `json:"port,omitempty" validate:"omitempty,port"` }
type AddRecordResponse ¶
type AddRecordResponse struct { Status string `json:"status"` StatusDescription string `json:"statusDescription"` Data AddRecordResponseData `json:"data"` }
type AddRecordResponseData ¶
type AddRecordResponseData struct {
Id *int `json:"id"`
}
type AvailableNameServers ¶
type Backend ¶
type Backend interface {
Call(method, path string, params interface{}, v interface{}, isPlain bool) error
}
func GetBackend ¶
func GetBackend() Backend
func GetBackendWithConfig ¶
func GetBackendWithConfig(config *BackendConfig) Backend
type BackendConfig ¶
type BackendImplementation ¶
type BackendImplementation struct { URL string HTTPClient *http.Client MaxNetworkRetries int64 // contains filtered or unexported fields }
func (*BackendImplementation) Call ¶
func (s *BackendImplementation) Call(method, path string, params interface{}, v interface{}, isPlain bool) error
func (*BackendImplementation) CallRaw ¶
func (s *BackendImplementation) CallRaw(method, path string, params []byte, v interface{}, isPlain bool) error
func (*BackendImplementation) NewRequest ¶
func (*BackendImplementation) ReadPlainResponse ¶
func (s *BackendImplementation) ReadPlainResponse(resBody []byte, v interface{}) error
func (*BackendImplementation) UnmarshalJSONVerbose ¶
func (s *BackendImplementation) UnmarshalJSONVerbose(statusCode int, body []byte, v interface{}) error
type ChangeZoneStatusParams ¶
type DeleteDomainZoneParams ¶
type DeleteRecordParams ¶
type DeleteRecordResponse ¶
type DomainZones ¶
type DomainZones struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` Group *string `json:"group,omitempty"` HasBulk *bool `json:"hasBulk,omitempty"` Zone *string `json:"zone,omitempty"` Status *string `json:"status,omitempty"` Serial *string `json:"serial,omitempty"` IsUpdated *int `json:"isUpdated,omitempty"` }
type IsUpdatedZoneParams ¶
type ListDomainZonesParams ¶
type ListDomainZonesResponse ¶
type ListDomainZonesResponse struct { Page *int `json:"page"` RowsPerPage *int `json:"rows-per-page"` PageCount *int `json:"page-count"` DomainZones []*DomainZones `json:"domain-zones"` }
type ModifyRecordParams ¶
type ModifyRecordParams struct { auth.Auth `json:",inline"` DomainName *string `json:"domain-name" validate:"required"` RecordId *string `json:"record-id" validate:"required"` Host *string `json:"host" validate:"required"` Record *string `json:"record" validate:"required"` TTL *string `json:"ttl,omitempty" validate:"required,ttl"` Priority *string `json:"priority,omitempty" validate:"omitempty,priority"` Weight *string `json:"weight,omitempty" validate:"omitempty,weight"` Port *string `json:"port,omitempty" validate:"omitempty,port"` }
type ModifyRecordResponse ¶
type Record ¶
type Record struct { Id *string `json:"id"` Type *string `json:"type"` Host *string `json:"host"` Record *string `json:"record"` DynamicUrlStatus *int `json:"dynamicurl_status"` Priority *string `json:"priority"` Weight *string `json:"weight"` Port *string `json:"port"` Failover *string `json:"failover"` TTL *string `json:"ttl"` Status *int `json:"status"` }
type RecordListParams ¶ added in v0.0.20
type RecordListParams struct { auth.Auth `json:",inline"` DomainName *string `json:"domain-name" validate:"required"` Host *string `json:"host,omitempty"` HostLike *string `json:"host-like,omitempty"` Type *string `json:"type,omitempty" validate:"omitempty,record_types"` RowsPerPage *int `json:"rows-per-page,omitempty" validate:"omitempty,rows_per_page"` Page *int `json:"page,omitempty"` OrderBy *string `json:"order-by,omitempty" validate:"omitempty,order_by"` }
type RecordListResponse ¶ added in v0.0.20
type RecordParams ¶
type RecordResponse ¶
type RecordResponse struct { Id *string `json:"id"` Type *string `json:"type"` Host *string `json:"host"` Record *string `json:"record"` TTL *string `json:"ttl"` Priority *string `json:"priority"` Weight *string `json:"weight,omitempty"` Port *string `json:"port,omitempty"` DynamicUrlStatus *int `json:"dynamicurl_status"` Failover *string `json:"failover"` Status *int `json:"status"` }
type RecordsPagesCountParams ¶
type RecordsPagesCountParams struct { auth.Auth `json:",inline"` DomainName *string `json:"domain-name" validate:"required"` Host *string `json:"host,omitempty"` Type *string `json:"type,omitempty" validate:"omitempty,record_types"` RowsPerPage *int `json:"rows-per-page" validate:"required,rows_per_page"` }
type UpdateZoneParams ¶
type UpdateZoneResponse ¶
type UpdateZoneStatusParams ¶
type ZoneInformationResponse ¶
type ZoneStatisticsResponse ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package accounts provides the /accounts APIs
|
Package accounts provides the /accounts APIs |
Package customer provides the dns zones APIs
|
Package customer provides the dns zones APIs |
Package customer provides the records APIs
|
Package customer provides the records APIs |
Click to show internal directories.
Click to hide internal directories.