Documentation
¶
Index ¶
- Constants
- func AwsRequest(keyId, key string) (client *route53.Route53)
- func CloudflareRequest(api, key, mail, method, zoneId string) *http.Request
- func CompareString(a, b []string) []string
- func DoRequest(req *http.Request) (content []byte, err error)
- func RemoveString(s []string, i int) []string
- func TelegramSendMessage(token, chatId, msg string) string
- func WestDoRequest(req *http.Request) (content []byte, err error)
- func WestRequest(api, account, key, method, zoneId string) *http.Request
- type AwsRecord
- type AwsRecordView
- type AwsZone
- type AwsZoneView
- type CloudflareRecord
- type CloudflareRecordView
- type CloudflareZone
- type CloudflareZoneView
- type Sql
- func (my *Sql) Connection() *sql.DB
- func (my *Sql) CreateTable(query string)
- func (my *Sql) DropTable(tableName string)
- func (my *Sql) InsertData(query string, val []interface{}) (err error)
- func (my *Sql) QueryData(query string) (err error)
- func (my *Sql) QueryWestDomain(query string) (result []string, err error)
- type WestRecord
- type WestRecordView
- type WestZone
- type WestZoneView
Constants ¶
View Source
const ( TableAwsZone = `awsZone` TableAwsRecord = `awsRecord` )
View Source
const ( TableCloudflareZone = `cloudflareZone` TableCloudflareRecord = `cloudflareRecord` )
View Source
const ( TableWestZone = `westZone` TableWestRecord = `westRecord` )
Variables ¶
This section is empty.
Functions ¶
func AwsRequest ¶
func CloudflareRequest ¶
func RemoveString ¶
func TelegramSendMessage ¶
func WestDoRequest ¶
For debug West use
func WestRequest ¶
Types ¶
type AwsRecord ¶
type AwsRecord struct {
ResourceRecordSets []AwsRecordView `json:"ResourceRecordSets"`
IsTruncated bool `json:"IsTruncated"`
MaxItems string `json:"MaxItems"`
NextRecordIdentifier string `json:"NextRecordIdentifier"`
NextRecordName string `json:"NextRecordName"`
NextRecordType string `json:"NextRecordType"`
}
type AwsRecordView ¶
type AwsRecordView struct {
Name string `json:"Name"`
TTL int `json:"TTL"`
Type string `json:"Type"`
Weight int `json:"Weight"`
ResourceRecords []map[string]string `json:"ResourceRecords"`
GeoLocation map[string]string `json:"GeoLocation"`
AliasTarget string `json:"AliasTarget"`
Failover string `json:"Failover"`
HealthCheckId string `json:"HealthCheckId"`
MultiValueAnswer string `json:"MultiValueAnswer"`
Region string `json:"Region"`
SetIdentifier string `json:"SetIdentifier"`
TrafficPolicyInstanceId string `json:"TrafficPolicyInstanceId"`
}
func (*AwsRecordView) CreateTableQuery ¶
func (a *AwsRecordView) CreateTableQuery() string
func (*AwsRecordView) GetRecords ¶
func (a *AwsRecordView) GetRecords(keyId, key, zoneId string) []AwsRecordView
func (*AwsRecordView) InsertDataQuery ¶
func (a *AwsRecordView) InsertDataQuery() (string, []interface{})
type AwsZone ¶
type AwsZone struct {
IsTruncated bool `json:"IsTruncated"`
MaxItems string `json:"MaxItems"`
NextMarker string `json:"NextMarker"`
HostedZones []AwsZoneView `json:"HostedZones"`
}
type AwsZoneView ¶
type AwsZoneView struct {
CallerReference string `json:"CallerReference"`
Id string `json:"Id"`
Name string `json:"Name"`
ResourceRecordSetCount int `json:"ResourceRecordSetCount"`
Config map[string]interface{} `json:"Config"`
}
func (*AwsZoneView) CreateTableQuery ¶
func (a *AwsZoneView) CreateTableQuery() string
func (*AwsZoneView) GetZones ¶
func (a *AwsZoneView) GetZones(keyId, key string) ([]string, []AwsZoneView)
func (*AwsZoneView) InsertDataQuery ¶
func (a *AwsZoneView) InsertDataQuery() (string, []interface{})
type CloudflareRecord ¶
type CloudflareRecordView ¶
type CloudflareRecordView struct {
Id string `json:"id"`
ZoneName string `json:"zone_name"`
Name string `json:"name"`
Type string `json:"type"`
Content string `json:"content"`
TTL int `json:"ttl"`
Proxiable bool `json:"proxiable"`
Proxied bool `json:"proxied"`
Locked bool `json:"locked"`
Meta map[string]interface{} `json:"meta"`
ModifiedTime string `json:"modified_on"`
CreatedTime string `json:"created_on"`
ZoneId string `json:"zone_id"`
}
func (*CloudflareRecordView) CreateTableQuery ¶
func (cf *CloudflareRecordView) CreateTableQuery() string
func (*CloudflareRecordView) GetRecords ¶
func (cf *CloudflareRecordView) GetRecords(api, key, mail, zoneId string) []CloudflareRecordView
func (*CloudflareRecordView) InsertData ¶
func (cf *CloudflareRecordView) InsertData() (string, []interface{})
type CloudflareZone ¶
type CloudflareZoneView ¶
type CloudflareZoneView struct {
Id string `json:"id"`
Name string `json:"name"`
OriginalRegistrar string `json:"original_registrar"`
Status string `json:"status"`
Type string `json:"type"`
ActivatedTime string `json:"activated_on"`
ModifiedTime string `json:"modified_on"`
CreatedTime string `json:"created_on"`
Paused bool `json:"paused"`
NameServers []string `json:"name_servers"`
OriginalNameServers []string `json:"original_name_servers"`
Account map[string]string `json:"account"`
Owner map[string]string `json:"owner"`
Plan map[string]interface{} `json:"plan"`
Meta map[string]interface{} `json:"meta"`
DevelopmentMode int `json:"development_mode"`
OriginalDnshost string `json:"original_dnshost"`
}
func (*CloudflareZoneView) CreateTableQuery ¶
func (cf *CloudflareZoneView) CreateTableQuery() string
func (*CloudflareZoneView) GetZones ¶
func (cf *CloudflareZoneView) GetZones(api, key, mail string) ([]string, []CloudflareZoneView)
func (*CloudflareZoneView) InsertData ¶
func (cf *CloudflareZoneView) InsertData() (string, []interface{})
type WestRecord ¶
type WestRecord struct {
Result int `json:"result"`
ClientId string `json:"clientid"`
Data struct {
PageNo int `json:"pageno"`
Limit int `json:"limit"`
Total int `json:"total"`
PageCount int `json:"pagecount"`
Items []WestRecordView `json:"items"`
} `json:"data"`
TotalPage string `json:"totalpages"`
}
type WestRecordView ¶
type WestRecordView struct {
Id int `json:"id"`
Item string `json:"item"`
Value string `json:"value"`
Type string `json:"type"`
Level int `json:"level"`
TTL int `json:"ttl"`
Line string `json:"line"`
Pause int `json:"pause"`
Zone string
}
func (*WestRecordView) CreateTableQuery ¶
func (w *WestRecordView) CreateTableQuery() string
func (*WestRecordView) GetRecords ¶
func (w *WestRecordView) GetRecords(api, account, key, zoneId string) []WestRecordView
func (*WestRecordView) InsertData ¶
func (w *WestRecordView) InsertData() (string, []interface{})
type WestZoneView ¶
type WestZoneView struct {
Domain string `json:"domain"`
RegistryDate string `json:"regdate"`
ExpiryDate string `json:"expdate"`
Dns1 string `json:"dns1"`
Dns2 string `json:"dns2"`
Dns3 string `json:"dns3"`
Dns4 string `json:"dns4"`
Dns5 string `json:"dns5"`
Dns6 string `json:"dns6"`
Year string `json:"year"`
Version string `json:"version"`
Hold string `json:"clienthold"`
}
func (*WestZoneView) CreateTableQuery ¶
func (w *WestZoneView) CreateTableQuery() string
func (*WestZoneView) GetZones ¶
func (w *WestZoneView) GetZones(api, account, key string) ([]string, []WestZoneView)
func (*WestZoneView) InsertData ¶
func (w *WestZoneView) InsertData() (string, []interface{})
Source Files
¶
Click to show internal directories.
Click to hide internal directories.