client

package
v0.0.0-...-0a5513a Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BundleStateInProgress       = BundleState("InProgress")
	BundleStateReadyForDownload = BundleState("ReadyForDownload")
	BundleStateError            = BundleState("Error")
)
View Source
const (
	HarvesterURLAuthLogin  = "/v1-public/auth?action=login"
	HarvesterURLAuthLogout = "/v1-public/auth?action=logout"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleError

type BundleError string

type BundleState

type BundleState string

type JWTAuthRequest

type JWTAuthRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type JWTAuthResponse

type JWTAuthResponse struct {
	JWEToken string `json:"jweToken"`
}

type RESTClient

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

func NewRESTClient

func NewRESTClient(ctx context.Context, apiURL string, username string, password string, insecure bool) *RESTClient

func (*RESTClient) Download

func (r *RESTClient) Download(url string, path string) (string, error)

func (*RESTClient) Get

func (r *RESTClient) Get(url string) ([]byte, error)

func (*RESTClient) Login

func (r *RESTClient) Login() error

func (*RESTClient) Logout

func (r *RESTClient) Logout() error

func (*RESTClient) Post

func (r *RESTClient) Post(url string, data []byte) ([]byte, error)

func (*RESTClient) Request

func (r *RESTClient) Request(method string, url string, data []byte) ([]byte, error)

type SupportBundleClient

type SupportBundleClient struct {
	User       string
	Password   string
	NoAuth     bool
	OutputFile string
	Insecure   bool

	IssueURL         string
	IssueDescription string
	// contains filtered or unexported fields
}

func (*SupportBundleClient) Run

func (c *SupportBundleClient) Run(url string) error

type SupportBundleInitateInput

type SupportBundleInitateInput struct {
	IssueURL    string `json:"issueURL"`
	Description string `json:"description"`
}

type SupportBundleResource

type SupportBundleResource struct {
	PodID              string      `json:"podID"`
	NodeID             string      `json:"nodeID"`
	State              BundleState `json:"state"`
	Name               string      `json:"name"`
	ErrorMessage       BundleError `json:"errorMessage"`
	ProgressPercentage int         `json:"progressPercentage"`
}

func (*SupportBundleResource) BackendID

func (sbr *SupportBundleResource) BackendID() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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