cloudapi

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	/* PrivateDNS */
	CreatePrivateZoneRecord       = Action{Service: "PrivateDns", Name: "CreatePrivateZoneRecord", ReadOnly: false}
	DeletePrivateZoneRecord       = Action{Service: "PrivateDns", Name: "DeletePrivateZoneRecord", ReadOnly: false}
	ModifyPrivateZoneRecord       = Action{Service: "PrivateDns", Name: "ModifyPrivateZoneRecord", ReadOnly: false}
	DescribePrivateZoneList       = Action{Service: "PrivateDns", Name: "DescribePrivateZoneList", ReadOnly: true}
	DescribePrivateZoneRecordList = Action{Service: "PrivateDns", Name: "DescribePrivateZoneRecordList", ReadOnly: true}

	/* DNSPod */
	DescribeDomainList = Action{Service: "DnsPod", Name: "DescribeDomainList", ReadOnly: true}
	DescribeRecordList = Action{Service: "DnsPod", Name: "DescribeRecordList", ReadOnly: true}
	CreateRecord       = Action{Service: "DnsPod", Name: "CreateRecord", ReadOnly: false}
	DeleteRecord       = Action{Service: "DnsPod", Name: "DeleteRecord", ReadOnly: false}
	ModifyRecord       = Action{Service: "DnsPod", Name: "ModifyRecord", ReadOnly: false}
)

Functions

func APIErrorRecord

func APIErrorRecord(apiAction Action, request string, response string, err error)

func APIRecord

func APIRecord(apiAction Action, request string, response string)

func JsonWrapper

func JsonWrapper(obj interface{}) string

func NewMockService

func NewMockService(privateZones []*privatedns.PrivateZone, privateZoneRecords map[string][]*privatedns.PrivateZoneRecord, dnspodDomains []*dnspod.DomainListItem, dnspodRecords map[string][]*dnspod.RecordListItem) *mockAPIService

func NewReadOnlyAPIService

func NewReadOnlyAPIService(region string, rate int, secretId string, secretKey string, internetEndpoint bool) *readonlyAPIService

func NewTencentAPIService

func NewTencentAPIService(region string, rate int, secretId string, secretKey string, internetEndpoint bool) *defaultTencentAPIService

func NewTencentClientSetService

func NewTencentClientSetService(region string, rate int, secretId string, secretKey string, internetEndpoint bool) *defaultTencentClientSetService

func RandStringRunes

func RandStringRunes(n int) string

func RandUint64

func RandUint64() uint64

Types

type Action

type Action struct {
	Service  string `json:"service"`
	Name     string `json:"name"`
	ReadOnly bool   `json:"readOnly"`
}

type TencentAPIService

type TencentAPIService interface {
	// PrivateDNS
	CreatePrivateZoneRecord(request *privatedns.CreatePrivateZoneRecordRequest) (response *privatedns.CreatePrivateZoneRecordResponse, err error)
	DeletePrivateZoneRecord(request *privatedns.DeletePrivateZoneRecordRequest) (response *privatedns.DeletePrivateZoneRecordResponse, err error)
	ModifyPrivateZoneRecord(request *privatedns.ModifyPrivateZoneRecordRequest) (response *privatedns.ModifyPrivateZoneRecordResponse, err error)
	DescribePrivateZoneList(request *privatedns.DescribePrivateZoneListRequest) (response *privatedns.DescribePrivateZoneListResponse, err error)
	DescribePrivateZoneRecordList(request *privatedns.DescribePrivateZoneRecordListRequest) (response *privatedns.DescribePrivateZoneRecordListResponse, err error)

	// DNSPod
	DescribeDomainList(request *dnspod.DescribeDomainListRequest) (response *dnspod.DescribeDomainListResponse, err error)
	DescribeRecordList(request *dnspod.DescribeRecordListRequest) (response *dnspod.DescribeRecordListResponse, err error)
	CreateRecord(request *dnspod.CreateRecordRequest) (response *dnspod.CreateRecordResponse, err error)
	DeleteRecord(request *dnspod.DeleteRecordRequest) (response *dnspod.DeleteRecordResponse, err error)
	ModifyRecord(request *dnspod.ModifyRecordRequest) (response *dnspod.ModifyRecordResponse, err error)
}

type TencentClientSetService

type TencentClientSetService interface {
	PrivateDnsCli(action string) *privatedns.Client
	DnsPodCli(action string) *dnspod.Client
}

Jump to

Keyboard shortcuts

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