api

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Type    string `json:"type"`
	Message string `json:"message"`
}

type RestApiClient

type RestApiClient struct {
	Client   *http.Client
	BaseURL  *url.URL
	Username string
	Password string
}

func NewRestApiClient

func NewRestApiClient(client *http.Client, baseURL *url.URL, username, password string, caCertBytes []byte, clientCertBytes []byte, clientCertKey []byte) (*RestApiClient, diag.Diagnostics)

func (*RestApiClient) DeleteRequest

func (c *RestApiClient) DeleteRequest(endpoint string) (*http.Response, diag.Diagnostics)

func (*RestApiClient) DoRequest

func (c *RestApiClient) DoRequest(method string, endpoint string, body []byte) (*http.Response, diag.Diagnostics)

func (*RestApiClient) GetRequest

func (c *RestApiClient) GetRequest(endpoint string) (*http.Response, diag.Diagnostics)

func (*RestApiClient) PostRequest

func (c *RestApiClient) PostRequest(endpoint string, body []byte) (*http.Response, diag.Diagnostics)

func (*RestApiClient) PutRequest

func (c *RestApiClient) PutRequest(endpoint string, body []byte) (*http.Response, diag.Diagnostics)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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