client

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: MPL-2.0 Imports: 0 Imported by: 0

README

aci-go-client

This repository contains the golang client SDK to interact with CISCO APIC using REST API calls. This SDK is used by terraform-provider-aci.

Installation

Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.

$go get github.com/ciscoecosystem/aci-go-client

There are no additional dependancies needed to be installed.

Overview

  • client :- This package contains the HTTP Client configuration as well as service methods which serves the CRUD operations on the Model Objects in CISCO ACI.

  • models :- This package contains all the models structs and utility methods for the same.

  • tests :- This package contains the unit tests for the CRUD operations that can be performed on the Model Objects.

How to Use

import the client in your go application and retrive the client object by calling client.GetClient() method.

import github.com/ciscoecosystem/aci-go-client/client
client.GetClient("URL", "Username", client.Password("Password"), client.Insecure(true/false))

aci-go-client supports signature based authentication also. To use signature based authentication call the GetClient method as follows.

client.GetClient("URL", "Username", client.PrivateKey("PrivateKey path"),client.AdminCert("Certificate name"), client.Insecure(true/false))

Use that client object to call the service methods to perform the CRUD operations on the model objects.

Example,

    client.CreateTenant("tenant_name","description",tenantAttributesStruct)
    # tenantAttributesStruct is struct present in models/fv_tenant.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package container implements a simplified wrapper around creating and parsing JSON.
Package container implements a simplified wrapper around creating and parsing JSON.

Jump to

Keyboard shortcuts

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