network

package module
v0.0.0-...-3abb338 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

README

go-networkapiclient

go client for GloboNetworkAPI

build status GoDoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient *http.Client
	Dialer     *net.Dialer
	// contains filtered or unexported fields
}

Client is the basic type of this pacGkage. It provides methods for interaction with the API.

func NewClient

func NewClient(endpoint, user, password string) (*Client, error)

NewClient returns a Client instance ready for communication with the given server endpoint. It will use the latest remote API version available in the server.

func (*Client) ListVlans

func (c *Client) ListVlans(opts ListVlansOptions) ([]Vlan, error)

ListVlans returns a []Vlan and is filtered by ListVlansOptions

type ListVlansOptions

type ListVlansOptions struct {
	Name string
}

ListVlansOptions is used to define the ListVlans parameters

type NetworkIPV4

type NetworkIPV4 struct {
	Network string `xml:"network"`
}

NetworkIPV4 represents a network

type Vlan

type Vlan struct {
	Environment int         `xml:"ambiente"`
	Number      int         `xml:"num_vlan"`
	NetworkIPV4 NetworkIPV4 `xml:"redeipv4"`
}

Vlan represents a vlan

Jump to

Keyboard shortcuts

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