ucloud

package
v0.0.0-...-7a753a7 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSolver

func NewSolver(cfg config.Config) webhook.Solver

Types

type Config

type Config struct {
	Region string `json:"region"`
	Dn     string `json:"dn"`
	Secret string `json:"secret"`
}

type DnsRecord

type DnsRecord struct {
	DnsType    string `json:"DnsType"`
	RecordName string `json:"RecordName"`
	Content    string `json:"Content"`
	Prio       string `json:"Prio"`
	TTL        string `json:"TTL"`
}

func (*DnsRecord) String

func (s *DnsRecord) String() string

type Payload

type Payload struct {
	RetCode int          `json:"RetCode"`
	Action  string       `json:"Action"`
	Message string       `json:"Message"`
	Data    []*DnsRecord `json:"Data"`
}

type Solver

type Solver struct {
	K8sClient  *kubernetes.Clientset
	UClient    *UClient
	Namespace  string
	SecretName string
}

func (*Solver) CleanUp

func (s *Solver) CleanUp(ch *whapi.ChallengeRequest) error

func (*Solver) Initialize

func (s *Solver) Initialize(kubeClientConfig *rest.Config, stopCh <-chan struct{}) error

func (*Solver) Name

func (s *Solver) Name() string

func (*Solver) Present

func (s *Solver) Present(ch *whapi.ChallengeRequest) error

type UClient

type UClient struct {
	UClient *uhost.UHostClient
}

func NewClient

func NewClient(cfg config.Config) *UClient

func NewClientFromKeys

func NewClientFromKeys(puk, pk string) *UClient

func (*UClient) UdnrDeleteDnsRecord

func (s *UClient) UdnrDeleteDnsRecord(Region string, Dn string, record *DnsRecord) error

func (*UClient) UdnrDomainDNSAdd

func (s *UClient) UdnrDomainDNSAdd(Region string, Dn string, record *DnsRecord) error

func (*UClient) UdnrDomainDNSQuery

func (s *UClient) UdnrDomainDNSQuery(Region string, Dn string) ([]*DnsRecord, error)

Jump to

Keyboard shortcuts

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