Giter VIP home page Giter VIP logo

skytap-sdk-go's Introduction

Skytap GO SDK

API

API package provides go based REST client.

API Tests

The tests use canned API responses downloaded from the production service and slightly sanitized. Using this data, they validate that the API calls are being made correctly.

export GOPATH=`pwd`
go get -t github.com/skytap/skytap-sdk-go/api
cd api
go test -v

License

Apache 2.0; see LICENSE for details

skytap-sdk-go's People

Contributors

dantjones avatar djones-skytap avatar etrueskytap avatar kahliburke avatar lokeuei avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skytap-sdk-go's Issues

NetworkNatAddress network_id should be integer, not string.

While mocking up data I discovered a compatibility issue. When a network interface is connected to a NAT network, it has a NAT address which we represent like this:

"nat_addresses": {
  "network_nat_addresses": [
  {
    "ip_address": "10.0.4.1",
    "network_id": 10846630,
    "network_name": "Default Network",
    "network_url": "https://cloud.skytap.com/configurations/18714628/networks/10846630",
    "configuration_id": 18714628,
    "configuration_name": "My Environment",
    "configuration_url": "https://cloud.skytap.com/configurations/18714628",
    "viewable": true
  }
],

The network_id in this data structure is an integer. This is an inconsistency in the REST API -- the network_id of the interface itself is a string. The NetworkNatAddress struct needs to accept an integer when parsing JSON.

Use Go modules

To make the project more compatible with the terraform provider.

Refactor struct string comparison

I don't see how to compare response will assert that routable is False? I can find any assert latter?

Originally posted by @pegerto in #49

"should not put this in a string to compare the structs"

Probably wrap the client in top of a library as [go-retriable](https://godoc.org/github.com/hashicorp/go-retryablehttp#Client) Instead of self implement the logic, it will provide exponential backoff and jitter.

Probably wrap the client in top of a library as go-retriable Instead of self implement the logic, it will provide exponential backoff and jitter.

I will probably not differentiate the request by verb in do an let the implementation of the check Resource to take that decision.

Originally posted by @pegerto in #42

Release the SDK

To be trackable the latest stable state of the SDK needs to be released. This can simply be a git tag.

Modify User-Agent string to include incoming data

In order to allow our API to track calls coming from different clients through the SDK, we need to accept the incoming User-Agent string from SDK clients (eg. terraform), and append it to the outgoing User-Agent string to Skytap APIs.

Terraform client's User-Agent: tf-1.0.0
Go SDK -> API User-Agent: skytap-go-sdk/tf-1.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.