Help us shape the future of Go! Take the 2026 Go Developer Survey

dome9-sdk-go

module
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2019 License: MIT

README

dome9-sdk-go

NOTE! This repositoy is currently private. Once it will be public, installing instructions and imports will be changed.

Aim and Scope

Dome9 GO SDK aims to access Dome9 Web API through HTTPS calls from a client application purely written in Go language.

For more information about Dome9 Web API Dome9 API.

Pre-requisites

  • The API is built using Go 1.12.9. Some features may not be available or supported unless you have installed a relevant version of Go. Please click https://golang.org/dl/ to download and get more information about installing Go on your computer.

  • Make sure you have properly set both GOROOT and GOPATH environment variables.

  • Before you begin, make sure you have an account in Dome9.

  • When logged in, go to My Settings and create your API KEY. Copy the ID and Secret, they will use you for authetication.

Installation

To download all packages in the repo with their dependencies, simply run

go get github.com/Dome9/Dome9-sdk-go/...

Getting Started

One can start using Dome9 Go SDK by initializing client and making a request. Here is an example of getting IP List.

package main

import (
	"fmt"
	"dome9"
	"services/iplist"
)


func main() {
	accessID := "123456789123456789" // your API ID
	secretKey := "passpasspass"      // you API Secret
	config := dome9.DefaultConfig()
	config.SetCredentials(accessID, secretKey)

	srv := iplist.New(config)
    ipListID := 77281
	res, _, _ := srv.Get(ipListID)
	fmt.Println(res)


}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL