Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DomainActionCreate defines OPCreate DomainActionCreate = "create" // DomainActionRemove defines OPRemove DomainActionRemove = "remove" // DomainActionInfo defines OPInfo DomainActionInfo = "info" // DomainActionStatus defines OPStatus DomainActionStatus = "status" // DomainActionList defines OPList DomainActionList = "list" )
View Source
const ( // RecordActionCreate defines OPCreate RecordActionCreate = "create" // RecordActionRemove defines OPRemove RecordActionRemove = "remove" // RecordActionModify defines OPModify RecordActionModify = "modify" // RecordActionImport defines OPImport RecordActionImport = "import" // RecordActionExport defines OPExport RecordActionExport = "export" )
View Source
const ( // RecordFlagClear for clear conflict records RecordFlagClear = iota // RecordFlagForceDomain for create domain if not exist when import record RecordFlagForceDomain // RecordFlagExclude for exclude non declared records when ensure RecordFlagExclude // RecordFlagClearNS for force clear @ NS record RecordFlagClearNS )
View Source
const ( // APIIDField defines the field raw string of `api_id` in config file APIIDField = "api_id" // APITokenField defines the field raw string of `api_token` in config file APITokenField = "api_token" // LogOutput defines the output of writer of log LogOutput = "log_output" // GlobalNamespace defines the default namespace raw string GlobalNamespace = "global" )
Variables ¶
View Source
var ( // DefaultRecordLineID defines the default record_line_id, 0 is "默认" DefaultRecordLineID = "0" // DefaultTTL defines the default TTL value DefaultTTL = "600" // CNAMEMagicString defines the magic string in value to replace in CNAME CNAMEMagicString = "{DOMAIN}" )
Functions ¶
Types ¶
type ActionRunner ¶
ActionRunner defines the interface to run action
type DomainActionRunner ¶
type DomainActionRunner struct { Domain string Action string Params map[string]string APIID int APIToken string }
DomainActionRunner defines the runner to run domain action
func (*DomainActionRunner) Detail ¶
func (r *DomainActionRunner) Detail() string
Detail returns detail information
func (*DomainActionRunner) Name ¶
func (r *DomainActionRunner) Name() string
Name returns runner name
type InfoActionRunner ¶
InfoActionRunner defines the runner to run info action
func (*InfoActionRunner) Detail ¶
func (r *InfoActionRunner) Detail() string
Detail returns detail information
type OPRecordEntry ¶
type OPRecordEntry struct { Action string `json:"action"` Domain string `json:"domain"` DomainID string `json:"domain_id"` RecordID string `json:"record_id"` SubDomain string `json:"sub_domain"` Type string `json:"type"` Value string `json:"value"` RealValue string `json:"real_value"` TTL string `json:"ttl"` Err error `json:"err"` Message string `json:"message"` }
OPRecordEntry defines the struct for adding record and result info
type PlaybookRunner ¶
type PlaybookRunner struct { Scene string Action string ActionRunners []ActionRunner }
PlaybookRunner defines the runner to run scene
func NewPlaybookRunner ¶
func NewPlaybookRunner(action, scene string, cfg dnspodapi.Scene, auths dnspodapi.Auth, ) *PlaybookRunner
NewPlaybookRunner returns a new PlaybookRunner pointer
type RecordActionRunner ¶
type RecordActionRunner struct { Record string Action string Params map[string]string APIID int APIToken string // contains filtered or unexported fields }
RecordActionRunner defines the runner to run record action
func (*RecordActionRunner) Detail ¶
func (r *RecordActionRunner) Detail() string
Detail returns detail information
func (*RecordActionRunner) Name ¶
func (r *RecordActionRunner) Name() string
Name returns runner name
Click to show internal directories.
Click to hide internal directories.