You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Алексей Фетисов 9ec34c6bfc
v1.9.1
3 months ago
config v1.8.2 8 months ago
interfaces v1.8.0 10 months ago
internal v1.9.1 3 months ago
pkg v1.9.1 3 months ago
samples/config v1.7.6 11 months ago
tests/platform_upgrade v1.9.0 3 months ago
.gitignore v1.9.0 3 months ago
.golangci.yml Merge 'dev' into 'main' 2 years ago
CHANGELOG.md v1.9.1 3 months ago
LICENSE v1.9.0 3 months ago
Makefile v1.2.1 2 years ago
README.md v1.9.0 3 months ago
README_EN.md v1.3.0 2 years ago
client.go v1.8.2 8 months ago
client_bvs.go v1.8.2 8 months ago
go.mod v1.8.0 10 months ago
go.sum v1.8.0 10 months ago
legacy-client.go v1.8.2 8 months ago
universal-client.go v1.8.2 8 months ago

README_EN.md

Decort SDK

Decort SDK is a library, written in GO (Golang) for interact with the DECORT API.
The library contents structures and methods for requesting to an user (cloudapi) and admin (cloudbroker) groups of API.
Also the library have structures for responses.

Contents

Install

go get -u repository.basistech.ru/BASIS/decort-golang-sdk

API List

Examples

package main

import (
	"context"
	"fmt"
	"log"

	"repository.basistech.ru/BASIS/decort-golang-sdk/config"
	"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/kvmx86"
)

func main() {
	cfg := config.Config{
		AppID:     "<APPID>",
		AppSecret: "<APPSECRET>",
		SSOURL:    "https://sso.digitalenergy.online",
		DecortURL: "https://mr4.digitalenergy.online",
		Retries:   5,
	}
	client := decort.New(cfg)
	req := kvmx86.CreateRequest{
		RGID:    123,
		Name:    "compute",
		CPU:     4,
		RAM:     4096,
		ImageID: 321,
	}

	res, err := client.KVMX86().Create(context.Background(), req)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(res)
}

Examples2