hcloud

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 5 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 {
	Config     *Config
	HttpClient *http.Client
	Token      string
}

func (*Client) Delete

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

func (*Client) Get

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

func (*Client) Post

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

type Config added in v0.0.4

type Config struct {
	Api   string
	Token string
}

func LoadDefaultConfig added in v0.0.4

func LoadDefaultConfig() *Config

func NewConfig added in v0.0.4

func NewConfig() *Config

type ErrorResponse

type ErrorResponse struct {
	Code    int    `json:"status"`
	Message string `json:"message"`
}

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

type Login

type Login struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (Login) String

func (l Login) String() string

type Organization

type Organization struct {
	Id      string `json:"_id,omitempty"`
	Name    string `json:"name,omitempty"`
	Creator User   `json:"creator,omitempty"`
	Company string `json:"company,omitempty"`
}

func (Organization) String

func (o Organization) String() string

type OrganizationMember

type OrganizationMember struct {
	Id             string   `json:"_id,omitempty"`
	OrganizationId string   `json:"organizationId,omitempty"`
	User           User     `json:"userDbRef,omitempty"`
	Roles          []string `json:"roles,omitempty"`
}

func (OrganizationMember) String

func (o OrganizationMember) String() string

type Register

type Register struct {
	Name     string `json:"name"`
	Company  string `json:"company,omitempty"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (Register) String

func (r Register) String() string

type Token

type Token struct {
	Token string `json:"token"`
}

func (Token) String

func (t Token) String() string

type User

type User struct {
	Id      string `json:"_id,omitempty"`
	Name    string `json:"name,omitempty"`
	Email   string `json:"email,omitempty"`
	Company string `json:"company,omitempty"`
}

func (User) String

func (u User) String() string

type Version

type Version struct {
	Version string `json:"version"`
}

func (Version) String

func (v Version) String() string

Directories

Path Synopsis
service
idp

Jump to

Keyboard shortcuts

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