Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/shztki/nifcloud-sdk-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/shztki/nifcloud-sdk-go

  • v0.0.7
  • Source
  • Go
  • Socket score

Version published
Created
Source

NIFCLOUD SDK for Go

nifcloud-sdk-go is the UNOFFICIAL NIFCLOUD SDK for the Go programming language.

This repository was forked from aws-sdk-go and modified the following items.

  • Fix package name and import path.
  • Remove AWS services.
  • Add JSON models for NIFCLOUD and generate services.
  • Add signature version v2computing for NIFCLOUD Computing.
  • Add protocol computing and script.
  • Fix datetime format.

Change

  • nifcloud-sdk-goを利用させていただきました。
  • 最新にしようと考えたため、nifcloud-sdk-python/nifcloud/data/にある各API の service-2.json を、 nifcloud-sdk-go/models/apis/ にある各API の api-2.json として上書きコピーしました。
  • path を shztki に変更させていただきました。
  • models/apis/ 配下の jsonファイルについては、適宜必要な修正を実施しています。
    • TStamp にしている変数をすべて String に変更しました。ただし一括置換してしまうと以下定義部分まで書き換えてしまうのでこの定義は変更しないように注意。
    "TStamp": {
      "name": "TStamp",
      "type": "timestamp"
    },
  • 修正したら都度、 go generate ./service で再生成し、タグのバージョンを上げています。

Features

  • :heavy_check_mark: Full support for NIFCLOUD Computing / RDB / NAS / Script APIs (as of Nov 13, 2017)
  • :heavy_check_mark: AWS-SDK-compatible data-driven architecture

Installing

$ go get -u github.com/shztki/nifcloud-sdk-go

or if you use dep, within your repo run:

$ dep ensure -add github.com/shztki/nifcloud-sdk-go

Usage

Write the following code.

package main

import (
        "fmt"

        "github.com/shztki/nifcloud-sdk-go/nifcloud"
        "github.com/shztki/nifcloud-sdk-go/nifcloud/credentials"
        "github.com/shztki/nifcloud-sdk-go/nifcloud/session"
        "github.com/shztki/nifcloud-sdk-go/service/computing"
)

func main() {
        sess := session.Must(session.NewSession(&nifcloud.Config{
                Region: nifcloud.String("jp-east-1"),
                Credentials: credentials.NewEnvCredentials(),
        }))

        client := computing.New(sess)

        fmt.Println(client.DescribeInstances(nil))
}

Set environment variables and execute the program.

$ export AWS_ACCESS_KEY_ID=<Your NIFCLOUD Access Key ID>
$ export AWS_SECRET_ACCESS_KEY=<Your NIFCLOUD Secret Access Key>
$ go run main.go

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.

FAQs

Package last updated on 06 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc