clients

package
v0.0.0-...-881ec4a Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUsernameProvided = errors.New("no username provided")
	ErrNoPasswordProvided = errors.New("no password provided")
	ErrNoBaseUrlProvided  = errors.New("no baseURL provided")
)

Functions

func Init

func Init()

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}
var (
	Client *APIClient
)

func Get

func Get() *APIClient

func (*APIClient) CreateImage

func (apiClient *APIClient) CreateImage(image *types.Image) (*resty.Response, error)

func (*APIClient) Get

func (apiClient *APIClient) Get(endpoint string) (*resty.Response, error)

func (*APIClient) GetImageDetails

func (apiClient *APIClient) GetImageDetails(imageVersion int) (*resty.Response, error)

func (*APIClient) GetImageRepo

func (apiClient *APIClient) GetImageRepo(imageVersion int) (*resty.Response, error)

func (*APIClient) GetImageSetsImageView

func (apiClient *APIClient) GetImageSetsImageView(imagesetId, imageVersion int) (*resty.Response, error)

func (*APIClient) GetImageSetsImages

func (apiClient *APIClient) GetImageSetsImages(imagesetId int) (*resty.Response, error)

func (*APIClient) GetImageSetsList

func (apiClient *APIClient) GetImageSetsList() (*resty.Response, error)

GetImageSetsList returns a list of image sets

func (*APIClient) GetImageSetsView

func (apiClient *APIClient) GetImageSetsView(id int) (*resty.Response, error)

func (*APIClient) GetImageStatus

func (apiClient *APIClient) GetImageStatus(imageVersion int) (*resty.Response, error)

func (*APIClient) Post

func (apiClient *APIClient) Post(endpoint string, payload interface{}) (*resty.Response, error)

func (*APIClient) Put

func (apiClient *APIClient) Put(endpoint string, payload interface{}) (*resty.Response, error)

func (*APIClient) UpdateImage

func (apiClient *APIClient) UpdateImage(imageVersion int, image *types.Image) (*resty.Response, error)

type Settings

type Settings struct {
	BaseURL  string `yaml:"baseurl"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	ProxyUrl string `yaml:"proxy"`
}

func NewSettings

func NewSettings(baseURL, username, password, proxyURL string) (*Settings, error)

type YourPayloadStruct

type YourPayloadStruct struct {
}

Jump to

Keyboard shortcuts

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