api

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationsResponse added in v0.4.0

type AnnotationsResponse struct {
	Domain Domain `json:"dt"`
}

type Client

type Client struct {
	Endpoint string
	// contains filtered or unexported fields
}

Client is a Domain Management Backend API client

func NewClient

func NewClient(endpoint string) (*Client, error)

func (*Client) CreateAnnotations

func (c *Client) CreateAnnotations(domain string, payload string) (resp []byte, err error)

func (*Client) DeleteAnnotations

func (c *Client) DeleteAnnotations(domain string, payload []byte) (resp []byte, err error)

func (*Client) GetDomains added in v0.4.0

func (c *Client) GetDomains(request DomainReq) (resp []*Domain, err error)

func (*Client) GetDomainsFull added in v0.3.0

func (c *Client) GetDomainsFull(request DomainReq) (resp []*DomainFull, err error)

func (*Client) ReadAnnotations

func (c *Client) ReadAnnotations(domain string, payload []byte) (resp map[string]any, err error)

func (*Client) UpdateAnnotations

func (c *Client) UpdateAnnotations(domain string, payload []byte) (resp []byte, err error)

type Domain added in v0.4.0

type Domain struct {
	Domain   string   `json:"domain"`
	Metadata Metadata `json:"metadata"`
}

type DomainFull added in v0.4.0

type DomainFull struct {
	Domain     string      `json:"domain"`
	Metadata   Metadata    `json:"metadata"`
	Subdomains []Subdomain `json:"subdomains"`
}

type DomainFullResponse added in v0.4.0

type DomainFullResponse struct {
	DomainsFull []*DomainFull `json:"dt"`
}

type DomainReq added in v0.6.0

type DomainReq struct {
	FilterDomains    *IncludeExclude `json:"domains,omitempty"`
	FilterSubdomains *IncludeExclude `json:"subdomains,omitempty"`
}

func (*DomainReq) ToURLQuery added in v0.6.0

func (request *DomainReq) ToURLQuery() (url.Values, error)

type DomainResponse added in v0.4.0

type DomainResponse struct {
	Domains []*Domain `json:"dt"`
}

type Exclude added in v0.8.0

type Exclude struct {
	Metadata *Metadata `json:"metadata" binding:"omitempty"`
}

type Include added in v0.8.0

type Include struct {
	Metadata *Metadata `json:"metadata" binding:"omitempty"`
}

type IncludeExclude added in v0.8.0

type IncludeExclude struct {
	Include *Include `json:"include,omitempty"`
	Exclude *Exclude `json:"exclude,omitempty"`
}

type Metadata added in v0.4.0

type Metadata struct {
	Labels      map[string]interface{} `json:"labels,omitempty"`
	Annotations map[string]interface{} `json:"annotations,omitempty"`
}

type Subdomain added in v0.4.0

type Subdomain struct {
	Fqdn     string   `json:"fqdn,omitempty"`
	Name     string   `json:"name"`
	Metadata Metadata `json:"metadata"`
}

Jump to

Keyboard shortcuts

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