hcloud

package module
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 6 Imported by: 0

README

hcloud-sdk-go

This is the official go SDK for the helmut.cloud platform.
A more advanced documentation will follow.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(config *Config) *Client

func (*Client) Delete

func (c *Client) Delete(url string, payload interface{}) (*http.Response, []byte, *ErrorResponse)

func (*Client) Get

func (c *Client) Get(url string) (*http.Response, []byte, *ErrorResponse)

func (*Client) GetEndpoint

func (c *Client) GetEndpoint(endpoint string) string

func (*Client) Patch added in v0.0.19

func (c *Client) Patch(url string, payload interface{}) (*http.Response, []byte, *ErrorResponse)

func (*Client) Post

func (c *Client) Post(url string, payload interface{}) (*http.Response, []byte, *ErrorResponse)

func (*Client) Put added in v0.0.21

func (c *Client) Put(url string, payload interface{}) (*http.Response, []byte, *ErrorResponse)

func (*Client) SetServer added in v0.0.20

func (c *Client) SetServer(server string)

func (*Client) SetToken

func (c *Client) SetToken(token string)

type Config added in v0.0.4

type Config struct {
	Server string
	Token  string
}

type ErrorResponse

type ErrorResponse struct {
	Code    string `json:"code"`
	Error   string `json:"error"`
	Message string `json:"message"`
}

ErrorReponse holds a code and a message parsed from an error resposne from the helmut.cloud platform

func (*ErrorResponse) ToString added in v0.0.7

func (e *ErrorResponse) ToString() string

Directories

Path Synopsis
service
idp

Jump to

Keyboard shortcuts

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