websupportsk

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

Types

type Client

type Client struct {
	Dns DnsClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string, secret string, baseUrl string) *Client

func (*Client) Do

func (c *Client) Do(req *http.Request, output interface{}) (*http.Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)

type DnsClient

type DnsClient struct {
	// contains filtered or unexported fields
}

func (*DnsClient) CreateDnsRecord

func (client *DnsClient) CreateDnsRecord(ctx context.Context, body DnsRecord) (DnsRecord, error)

func (*DnsClient) DeleteDnsRecord

func (client *DnsClient) DeleteDnsRecord(ctx context.Context, zone string, id string) error

func (*DnsClient) ReadDnsRecord

func (client *DnsClient) ReadDnsRecord(ctx context.Context, zone string, id string) (DnsRecord, error)

func (*DnsClient) UpdateDnsRecord

func (client *DnsClient) UpdateDnsRecord(ctx context.Context, id string, body DnsRecord) (DnsRecord, error)

type DnsRecord

type DnsRecord struct {
	Id      int         `json:"id"`
	Type    string      `json:"type"`
	Name    string      `json:"name"`
	Content string      `json:"content"`
	Prio    json.Number `json:"prio,omitempty"`
	Port    json.Number `json:"port,omitempty"`
	Weight  json.Number `json:"weight,omitempty"`
	Ttl     int         `json:"ttl"`
	Note    string      `json:"note"`
	Zone    DnsZone     `json:"zone"`
}

func GetDnsRecord

func GetDnsRecord(data *schema.ResourceData) DnsRecord

func (*DnsRecord) SetResourceData

func (dnsRecord *DnsRecord) SetResourceData(data *schema.ResourceData)

type DnsRecordStatusWrapper

type DnsRecordStatusWrapper struct {
	Status string    `json:"status"`
	Item   DnsRecord `json:"item"`
}

type DnsZone

type DnsZone struct {
	Id         int    `json:"id"`
	Name       string `json:"name"`
	UpdateTime int    `json:"updateTime"`
}

type ErrorData

type ErrorData struct {
	Content []string `json:"content"`
	Name    []string `json:"name"`
}

type ErrorResponse

type ErrorResponse struct {
	Status   string    `json:"status"`
	Messages []string  `json:"messages"`
	Errors   ErrorData `json:"errors"`
	Code     int       `json:"code"`
	Message  string    `json:"message"`
}

Jump to

Keyboard shortcuts

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