centralrest

package
v0.0.0-...-c8c5fee Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var URIApi string = "https://apigw-prod2.central.arubanetworks.com"

URIApi Root api url of central

Functions

This section is empty.

Types

type ApRadioStruct

type ApRadioStruct struct {
	Band    float64 `json:"band"`
	Index   float64 `json:"index"`
	MacAddr string  `json:"macaddr"`
	Status  string  `json:"status"`
}

ApRadioStruct radio struct

type ApStruct

type ApStruct struct {
	ApDeploymentMode string          `json:"ap_deployment_mode"`
	ClientCount      float64         `json:"client_count"`
	APGroup          string          `json:"ap_group"`
	ClusterID        string          `json:"cluster_id"`
	Labels           []string        `json:"labels"`
	Model            string          `json:"model"`
	Radios           []ApRadioStruct `json:"radios"`
	Serial           string          `json:"serial"`
	FirmwareVersion  string          `json:"firmware_version"`
	IPAddress        string          `json:"ip_address"`
	LastModified     float64         `json:"last_modified"`
	MeshRole         string          `json:"mesh_role"`
	Name             string          `json:"name"`
	Status           string          `json:"status"`
	Macaddr          string          `json:"macaddr"`
	Notes            string          `json:"notes"`
	PublicIPAddress  string          `json:"public_ip_address"`
	SubnetMask       string          `json:"subnet_mask"`
	GroupName        string          `json:"group_name"`
	Site             string          `json:"site"`
	SwarmID          string          `json:"swarm_id"`
	SwarmMaster      bool            `json:"swarm_master"`
}

ApStruct access point struct

func Getaps

func Getaps(token TokenStruct, verbose bool) []ApStruct

Getaps get a list of devices

type AuthcodeStruct

type AuthcodeStruct struct {
	AuthCode string `json:"auth_code,omitempty"`
}

AuthcodeStruct auth code

func Getauthcode

func Getauthcode(customerID string, sessionID string, csrfToken string, clientID string, verbose bool) (AuthcodeStruct, error)

Getauthcode Phase 2 auth

type AuthtokenStruct

type AuthtokenStruct struct {
	CsrfToken string
	SessionID string
}

AuthtokenStruct init csrf and session

func Gettoken

func Gettoken(username string, password string, clientID string, verbose bool) (AuthtokenStruct, error)

Gettoken Phase 1 auth

type DeviceStruct

type DeviceStruct struct {
	ArubaPartNo  string `json:"aruba_part_no"`
	CustomerID   string `json:"customer_id"`
	CustomerName string `json:"customer_name"`
	DeviceType   string `json:"device_type"`
	Macaddr      string `json:"macaddr"`
	Model        string `json:"model"`
	Serial       string `json:"serial"`
}

DeviceStruct device struct

func Getdevices

func Getdevices(token TokenStruct, verbose bool) []DeviceStruct

Getdevices get a list of devices

type SwarmStruct

type SwarmStruct struct {
	FirmwareVersion string `json:"firmware_version"`
	GroupName       string `json:"group_name"`
	IPAddress       string `json:"ip_address"`
	Name            string `json:"name"`
	PublicIPAddress string `json:"public_ip_address"`
	Status          string `json:"status"`
	SwarmID         string `json:"swarm_id"`
}

func Getswarms

func Getswarms(token TokenStruct, verbose bool) []SwarmStruct

Getswarms qweqe

type TokenStruct

type TokenStruct struct {
	AccessToken  string `json:"access_token,omitempty"`
	RefreshToken string `json:"refresh_token,omitempty"`
	TokenType    string `json:"token_type,omitempty"`
}

TokenStruct List of tokens

func Getaccesstoken

func Getaccesstoken(clientID string, clientSecret string, authCode string, customerID string, verbose bool) (TokenStruct, error)

Getaccesstoken Phase 3 auth

Jump to

Keyboard shortcuts

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