hcloud

package module
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 7 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 App added in v0.0.13

type App struct {
	Id            string       `json:"_id,omitempty"`
	Name          string       `json:"name,omitempty"`
	Permissions   []Permission `json:"permissions,omitempty"`
	OrgnizationId string       `json:"organizationId,omitempty"`
	CreatorId     string       `json:"creatorId,omitempty"`
	CreateDate    int          `json:"createDate,omitempty"` // UTC+0 unix timestamp
}

func (App) String added in v0.0.13

func (a App) String() string

type AppPermission added in v0.0.13

type AppPermission string
const (
	NONE    AppPermission = "NONE"
	READ    AppPermission = "READ"
	EXECUTE AppPermission = "EXECUTE"
	WRITE   AppPermission = "WRITE"
	MANAGE  AppPermission = "MANAGE"
	OWNER   AppPermission = "OWNER"
)

type AuditLog added in v0.0.9

type AuditLog struct {
	Origin    string      `json:"origin"`
	Level     string      `json:"level"`
	Event     string      `json:"event"`
	Type      string      `json:"type"`
	User      string      `json:"user"`
	Timestamp int64       `json:"timestamp"`
	Message   interface{} `json:"message"`
}

func (AuditLog) String added in v0.0.9

func (a AuditLog) String() string

type Client

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

func New

func New(config *ClientConfig) *Client

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) GetEndpoint

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

func (*Client) Post

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

func (*Client) SetApi

func (c *Client) SetApi(api string)

func (*Client) SetToken

func (c *Client) SetToken(token string)

type ClientConfig

type ClientConfig struct {
	Api   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

type Event added in v0.0.13

type Event struct {
	Id            string `json:"_id,omitempty"`
	Name          string `json:"name,omitempty"`
	AppId         string `json:"appId,omitempty"`
	OrgnizationId string `json:"organizationId,omitempty"`
	CreatorId     string `json:"creatorId,omitempty"`
	CreateDate    int    `json:"createDate,omitempty"` // UTC+0 unix timestamp
}

func (Event) String added in v0.0.13

func (e Event) String() string

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 Permission added in v0.0.13

type Permission struct {
	UserId     string        `json:"userId,omitempty"`
	Permission AppPermission `json:"permission,omitempty"`
}

func (Permission) String added in v0.0.13

func (p Permission) 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 Stream added in v0.0.13

type Stream struct {
	Id            string `json:"_id,omitempty"`
	Name          string `json:"name,omitempty"`
	EventId       string `json:"eventId,omitempty"`
	AppId         string `json:"appId,omitempty"`
	OrgnizationId string `json:"organizationId,omitempty"`
	CreatorId     string `json:"creatorId,omitempty"`
	CreateDate    int    `json:"createDate,omitempty"` // UTC+0 unix timestamp
}

func (Stream) String added in v0.0.13

func (s Stream) String() string

type StreamExecutionRequest added in v0.0.13

type StreamExecutionRequest struct {
	StreamId      string `json:"streamId"`
	Target        string `json:"target"`
	Data          string `json:"data"`
	Timeout       int    `json:"timeout"`
	WaitForResult bool   `json:"waitForResult"`
}

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