rest

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	BaseURL    string
	BaseHost   string
	APIKey     string
	ProjectID  string
	HTTPClient *http.Client
	K8SClient  *K8SClient
}

APIClient represents the HTTP client with API key, project ID, and base URL configuration.

func NewAPIClient

func NewAPIClient(baseURL, baseHost, apiKey, projectID string) (*APIClient, error)

NewAPIClient creates a new instance of the APIClient.

func (*APIClient) Domain

func (c *APIClient) Domain() *DomainClient

Domain returns a client for Domain objects.

func (*APIClient) Proxy

func (c *APIClient) Proxy() *ProxyClient

Proxy returns a client for Proxy objects.

func (*APIClient) SendRequest

func (c *APIClient) SendRequest(method, path string, body []byte) (*http.Response, error)

sendRequest sends an HTTP request with the configured headers.

type DomainClient

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

func (*DomainClient) Create

func (c *DomainClient) Create(domain *v1alpha.Domain) (*v1alpha.Domain, error)

Create creates a Domain object.

func (*DomainClient) Delete

func (c *DomainClient) Delete(name string) error

Delete deletes a Domain object.

func (*DomainClient) Get

func (c *DomainClient) Get(name string) (*v1alpha.Domain, error)

Get returns a Domain object.

func (*DomainClient) List

func (c *DomainClient) List() (*v1alpha.DomainList, error)

List returns all of Domain object.

type K8SClient

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

func NewK8SClient

func NewK8SClient(baseURL, baseHost, apiKey, projectID string) (*K8SClient, error)

type ProxyClient

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

func (*ProxyClient) Create

func (c *ProxyClient) Create(proxy *v1alpha.Proxy) (*v1alpha.Proxy, error)

Create creates a Proxy object.

func (*ProxyClient) Delete

func (c *ProxyClient) Delete(name string) error

Delete deletes a Proxy object.

func (*ProxyClient) Get

func (c *ProxyClient) Get(name string) (*v1alpha.Proxy, error)

Get returns a Proxy object.

func (*ProxyClient) List

func (c *ProxyClient) List() (*v1alpha.ProxyList, error)

List returns all of Proxy objects.

func (*ProxyClient) ListWithOptions

func (c *ProxyClient) ListWithOptions(opts metav1.ListOptions) (*v1alpha.ProxyList, error)

ListWithOptions returns all of Proxy objects.

Jump to

Keyboard shortcuts

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