README
NIFCLOUD SDK for Go
nifcloud-sdk-go is data-driven SDK for the Go programming language. It works by feeding AWS-SDK-compatible model JSONs to github.com/aws/aws-sdk-go-v2.
Features
- ✔️ Support for NIFCLOUD Computing / RDB / NAS / Script / Hatoba APIs
- ✔️ AWS-SDK-compatible data-driven architecture
Getting started
Requirements
- Go 1.13 or later.
Installing
go get -u github.com/nifcloud/nifcloud-sdk-go
Example
This example shows DescribeInstances.
package main
import (
"fmt"
"context"
"github.com/nifcloud/nifcloud-sdk-go/nifcloud"
"github.com/nifcloud/nifcloud-sdk-go/nifcloud/endpoints"
"github.com/nifcloud/nifcloud-sdk-go/service/computing"
)
func main() {
// Create config with credentials and region.
cfg := nifcloud.NewConfig(
"YOUR_ACCESS_KEY_ID",
"YOUR_SECRET_ACCESS_KEY",
"jp-east-1",
)
// Create the Computing client with Config value.
svc := computing.New(cfg)
req := svc.DescribeInstancesRequest(nil)
// Send the request
resp, err := req.Send(context.TODO())
if err != nil {
panic(err)
}
fmt.Println(resp)
}
Resources
LICENCES
See LICENSE.
Directories
Path | Synopsis |
---|---|
internal/nifcloudtesting | |
internal/nifcloudtesting/unit | Package unit performs initialization and validation for unit tests |
internal/nifcloudutil | |
models/endpoints | Package endpoints contains the models for endpoints that should be used to generate endpoint definition files for the SDK. |
nifcloud | |
nifcloud/endpoints | |
nifcloud/signer/v2 | |
private/protocol/computing | Package computing provides serialization of NIFCLOUD Computing requests and responses. |
private/protocol/nas | Package nas provides serialization of NIFCLOUD NAS requests and responses. |
private/protocol/query/queryutil | |
private/protocol/rdb | Package rdb provides serialization of NIFCLOUD RDB requests and responses. |
private/protocol/script | Package script provides serialization of NIFCLOUD Script requests and responses. |
private/protocol/xml/xmlutil | |
service | |
service/computing | Package computing provides the client and types for making API requests to computing. |
service/computing/computingiface | Package computingiface provides an interface to enable mocking the NIFCLOUD Computing service client for testing your code. |
service/hatoba | Package hatoba provides the client and types for making API requests to hatoba. |
service/hatoba/hatobaiface | Package hatobaiface provides an interface to enable mocking the NIFCLOUD Hatoba beta service client for testing your code. |
service/nas | Package nas provides the client and types for making API requests to nas. |
service/nas/nasiface | Package nasiface provides an interface to enable mocking the NIFCLOUD NAS service client for testing your code. |
service/rdb | Package rdb provides the client and types for making API requests to rdb. |
service/rdb/rdbiface | Package rdbiface provides an interface to enable mocking the NIFCLOUD RDB service client for testing your code. |
service/script | Package script provides the client and types for making API requests to script. |
service/script/scriptiface | Package scriptiface provides an interface to enable mocking the NIFCLOUD Script service client for testing your code. |