client

package
v0.0.0-...-edb7ed8 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestSharingID = "test_account"
)

Variables

This section is empty.

Functions

func MockTestHelper

func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, *gomock.Controller) Services)

func ResolveSharingID

func ResolveSharingID(_ context.Context, meta schema.ClientMeta, r *schema.Resource, col schema.Column) error

Types

type CertificateClient

type CertificateClient interface {
	ListCertificates() ([]certificate.CertificateType, error)
	// GetCertificate(certificateId string) (certificate.CertificateType, error)
	ListPackages() ([]certificate.Package, error)
}

type Client

type Client struct {
	Services Services
	// contains filtered or unexported fields
}

func New

func New(logger zerolog.Logger, services Services, sharingId string) Client

func (*Client) ID

func (c *Client) ID() string

func (*Client) Logger

func (c *Client) Logger() *zerolog.Logger

type DomainClient

type DomainClient interface {
	ListDomains() ([]domain.ListResponse, error)
	GetDomain(domainname string) (domain.Details, error)
	ListDNSSECKeys(domainname string) ([]domain.DNSSECKey, error)
	ListGlueRecords(domainname string) ([]domain.GlueRecord, error)
	ListWebRedirections(domainname string) ([]domain.WebRedirection, error)
	GetLiveDNS(domainname string) (domain.LiveDNS, error)
}

type LiveDNSClient

type LiveDNSClient interface {
	ListDomains() ([]livedns.Domain, error)
	// GetDomainNS(fqdn string) ([]string, error)
	ListSnapshots(fqdn string) ([]livedns.Snapshot, error)
}

type Services

type Services struct {
	CertificateClient   CertificateClient
	DomainClient        DomainClient
	LiveDNSClient       LiveDNSClient
	SimpleHostingClient SimpleHostingClient
}

type SimpleHostingClient

type SimpleHostingClient interface {
	ListInstances() ([]simplehosting.Instance, error)
	// GetInstance(instanceId string) (simplehosting.Instance, error)
	ListVhosts(instanceId string) ([]simplehosting.Vhost, error)
}

type Spec

type Spec struct {
	APIKey     string `json:"api_key,omitempty"`
	SharingID  string `json:"sharing_id,omitempty"`
	GandiDebug bool   `json:"gandi_debug,omitempty"`

	EndpointURL string `json:"endpoint_url,omitempty"`
	Timeout     int64  `json:"timeout_secs,omitempty"`
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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