Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 835 Bytes

ReadMe.md

File metadata and controls

32 lines (22 loc) · 835 Bytes

clevercloud-go

A Go library for interacting with Clever Cloud's API.

Installation

go get github.com/dansmaculotte/clevercloud-go/clevercloud

OAuth

Generate an accessToken and accessSecret with Clever Cloud CLI OAuth.

Usage

To properly request a resource you need a fresh new client instance:

import "github.com/dansmaculotte/clevercloud-go/clevercloud"

config := &clevercloud.Config{
    Token: "mytoken",
    Secret: "mysecret"
}
// or get config from $HOME/.config/clever-cloud
config = clevercloud.GetConfigFromUser()
// or get config from env with CLEVER_TOKEN and CLEVER_SECRET
config = clevercloud.GetConfigFromEnv()

client := clevercloud.NewClient(config, &http.Client{})