Skip to content
forked from equinix/ne-go

Network Edge client library in Go

License

Notifications You must be signed in to change notification settings

schadalawada/ne-go

This branch is 10 commits ahead of, 3 commits behind equinix/ne-go:refs/heads/main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

59bbcdc · Apr 8, 2024
Mar 29, 2022
Apr 8, 2024
Apr 8, 2024
Nov 8, 2021
Sep 3, 2020
Dec 1, 2021
Aug 4, 2020
Aug 4, 2020
Feb 18, 2022
Apr 8, 2024
Mar 12, 2021
Feb 23, 2022
Feb 12, 2024
Feb 12, 2024
Feb 5, 2024
Feb 5, 2024
Feb 19, 2021
Feb 19, 2021
Feb 23, 2021
Feb 23, 2021
Feb 24, 2024
Apr 8, 2024
Mar 26, 2024
Feb 24, 2024
Feb 19, 2021
Feb 19, 2021
Feb 9, 2023
Feb 9, 2023
Feb 19, 2021
Feb 19, 2021
Feb 5, 2024
Feb 5, 2024
Feb 24, 2021
Feb 24, 2021
Jan 26, 2021
Jan 26, 2021

Repository files navigation

Equinix Network Edge Go client

Equinix Network Edge (NE) client library written in Go.

Build Status Go Report Card GoDoc GitHub


Purpose

Equinix Network Edge client library was written in Go for purpose of managing NE resources from Terraform provider plugin.

Library gives possibility to manage virtual network devices and associated network services.

NOTE: Scope of this library is limited to needs of Terraform provider plugin and it is not providing full capabilities of Equinix Network Edge API

Usage

Code

  1. Add ne-go module to import statement. In below example, Equinix oauth2-go module is imported as well

    import (
    "github.com/equinix/oauth2-go"
    "github.com/equinix/ne-go"
    )
  2. Define baseURL that will be used in all REST API requests

    baseURL := "https://api.equinix.com"
  3. Create oAuth configuration and oAuth enabled http.Client

    authConfig := oauth2.Config{
      ClientID:     "someClientId",
      ClientSecret: "someSecret",
      BaseURL:      baseURL}
    ctx := context.Background()
    authClient := authConfig.New(ctx)
  4. Create NE REST client with a given baseURL and oauth's http.Client

    var neClient ne.Client = ne.NewClient(ctx, baseURL, authClient)
  5. Use NE client to perform some operation i.e. get device details

    device, err := neClient.GetDevice("existingDeviceUUID")
    if err != nil {
      log.Printf("Error while fetching device - %v", err)
    } else {
      log.Printf("Retrieved device - %+v", device)
    }

About

Network Edge client library in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.9%
  • Makefile 0.1%