a10go

package
v0.0.0-...-fb69549 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A10Port

type A10Port struct {
	Number   string
	Protocol string
}

A10Port defines port/protocol for A10Server

type A10SGMember

type A10SGMember struct {
	Name string
	Port string
}

A10SGMember is a service group member for A10ServiceGroup

type A10Server

type A10Server struct {
	Name  string
	Host  string
	Ports []A10Port
}

A10Server is a server for ServerList()

type A10ServiceGroup

type A10ServiceGroup struct {
	Name     string
	Protocol string
	Members  []A10SGMember
}

A10ServiceGroup is a service group for ServiceGroupList()

type A10VServer

type A10VServer struct {
	Name         string
	Address      string
	VirtualPorts []A10VirtualPort
}

A10VServer is a virtual server for VirtualServerList()

type A10VirtualPort

type A10VirtualPort struct {
	Port         string
	Protocol     string
	ServiceGroup string
}

A10VirtualPort is a virtual port for A10VServer

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an api client

func New

func New(host string, options Options) *Client

New creates api client

func (*Client) Get

func (c *Client) Get(method string) ([]byte, error)

Get calls http GET for an specific api method

func (*Client) Login

func (c *Client) Login(username, password string) error

Login opens a new session

func (*Client) Logout

func (c *Client) Logout() error

Logout closes an existing session

func (*Client) Post

func (c *Client) Post(method, body string) ([]byte, error)

Post calls http POST for an specific api method

func (*Client) ServerCreate

func (c *Client) ServerCreate(name, host string, ports []string) error

ServerCreate creates new server. ports is list of "portName,portProtocol"

func (*Client) ServerDelete

func (c *Client) ServerDelete(name string) error

ServerDelete deletes an existing server

func (*Client) ServerList

func (c *Client) ServerList() []A10Server

ServerList retrieves the full server list

func (*Client) ServerUpdate

func (c *Client) ServerUpdate(name, host string, ports []string) error

ServerUpdate updates server. ports is list of "portName,portProtocol"

func (*Client) ServiceGroupCreate

func (c *Client) ServiceGroupCreate(name, protocol string, members []string) error

ServiceGroupCreate creates new service group members is list of "serverName,portNumber"

func (*Client) ServiceGroupDelete

func (c *Client) ServiceGroupDelete(name string) error

ServiceGroupDelete deletes an existing service group

func (*Client) ServiceGroupList

func (c *Client) ServiceGroupList() []A10ServiceGroup

ServiceGroupList retrieves the full server group list

func (*Client) ServiceGroupUpdate

func (c *Client) ServiceGroupUpdate(name, protocol string, members []string) error

ServiceGroupUpdate updates service group members is list of "serverName,portNumber"

func (*Client) VirtualServerCreate

func (c *Client) VirtualServerCreate(name, address string, virtualPorts []string) error

VirtualServerCreate creates new virtual server virtualPorts is list of "serviceGroup,port,protocol"

func (*Client) VirtualServerDelete

func (c *Client) VirtualServerDelete(name string) error

VirtualServerDelete deletes an existing virtual server

func (*Client) VirtualServerList

func (c *Client) VirtualServerList() []A10VServer

VirtualServerList retrieves the full virtual server list

func (*Client) VirtualServerUpdate

func (c *Client) VirtualServerUpdate(name, address string, virtualPorts []string) error

VirtualServerUpdate updates virtual server virtualPorts is list of "serviceGroup,port,protocol"

type FuncPrintf

type FuncPrintf func(format string, v ...interface{})

FuncPrintf is function type for debug Printf

type Options

type Options struct {
	Debug       bool       // enable debugging
	DebugPrintf FuncPrintf // custom Printf function for debugging
	Dry         bool       // do not change anything
}

Options specify parameters for the api client

Jump to

Keyboard shortcuts

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