ruckus

package module
v0.0.0-...-c7d796b Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L2ACL_Restriction_ALLOW = "ALLOW"
	L2ACL_Restriction_BLOCK = "BLOCK"
)

Variables

This section is empty.

Functions

func ClearMacs

func ClearMacs(rks *Ruckus)

func IsCorrectMac

func IsCorrectMac(mac string) bool

func IsDuplicatedMac

func IsDuplicatedMac(mac string, compareList []string) bool

func WithDebug

func WithDebug() func(*Ruckus)

Types

type Ap

type Ap struct {
	// Administrative state of the AP. A locked AP will not provide any WLAN services.
	AdministrativeState string

	// Identifier of the AP group to which the AP belongs. If the AP belongs to the default AP group, this property is not needed.
	ApGroupId string

	// Venue code
	AwsVenue string

	// Description of the AP
	Description string

	// GPS Source of the AP
	GpsSource string

	// Latitude coordinate (in decimal format) of the AP
	Latitude float32

	// Location of the AP. This is a free format text description that indicates the location of the AP
	Location string

	// Longitude coordinate (in decimal format) of the AP
	Longitude float32

	// required
	// MAC address of the A
	Mac string

	// Model name of the AP
	// minLength: 2
	// maxLength: 64
	// pattern: "^[!-~]((?!\$\()[ -_a-~]){0,62}[!-~]$"
	Model string

	// Name of the AP
	Name string

	// Provision checklist of the AP. This field indicates the steps that have been completed in the AP provisioning process.
	ProvisionChecklist string

	// Serial number of the AP
	Serial string

	// required
	// Identifier of the zone to which the AP belongs
	ZoneId string
}

Access Point

type Client

type Client struct {
	// MAC of the Client
	Mac string

	// IP address of the Client
	IpAddress string

	// IP V6 address of the Client
	Ipv6Address string

	HostName string
	OsType   string
	User     string
	Status   string

	// Radio inditifier
	RadioId string

	RadioMode string
	Channel   string

	// WLAN inditifier
	WlanId string

	// SSID
	Ssid string

	// SNR(dB)
	Snr string

	// RSSI(dBm)
	Rssi string

	// RX Byte Rate
	RxByteRate int

	// TX Byte Rate
	TxByteRate int

	// RX Avg Byte Rate
	RxAvgByteRate int

	// TX Avg Byte Rate
	TxAvgByteRate int

	// From client bytes
	FromClientBytes int

	// To client bytes
	ToClientBytes int

	// From client package frames
	FromClientPkts int

	// To client package frames
	ToClientPkts int

	// Connected since (in milliseconds)
	ConnectedSince int

	// VLAN id
	Vlan string

	// AP Tx Data Rate
	ToClientDroppedPkts int
}

Wireless Client

type L2acl

type L2acl struct {
	// required
	// name of the L2 Access Control
	Name string `json:"name"`

	// identifier of the L2 Access Control
	Id string `json:"id"`

	// description of the L2 Access Control
	Description string `json:"description"`

	// identifier of the zone which the L2 Access Control belongs to
	ZoneId string `json:"zoneId"`

	// required
	// either ALLOW or BLOCK
	// restriction of the L2 Access Control, ALLOW: Only allow all stations listed below, BLOCK:Only block all stations listed below
	Restriction string `json:"restriction"`

	RuleMacs []string `json:"ruleMacs"`
}

L2 Access Control

type LogonSessions

type LogonSessions struct {
	Username          string `json:"username"`
	Password          string `json:"password"`
	TimeZoneUtcOffset string `json:"timeZoneUtcOffset"`
}

func NewLogonSessions

func NewLogonSessions(username string, password string) LogonSessions

type Options

type Options func(*Ruckus)

type Ruckus

type Ruckus struct {
	*RuckusError
	// contains filtered or unexported fields
}

func NewRuckus

func NewRuckus() *Ruckus

func (*Ruckus) AddMacsToL2acl

func (rks *Ruckus) AddMacsToL2acl(mac ...string) error

L2 Access Control => Modify Rule Macs Modify a specific L2 Access Control Rule Macs. response code should be 204

func (*Ruckus) CheckBaseUrl

func (rks *Ruckus) CheckBaseUrl() bool

func (*Ruckus) CheckMacs

func (rks *Ruckus) CheckMacs(mac ...string) *Ruckus

func (*Ruckus) CheckMacsWithNoDuplitation

func (rks *Ruckus) CheckMacsWithNoDuplitation(mac ...string) *Ruckus

func (*Ruckus) Close

func (rks *Ruckus) Close() error

func (*Ruckus) CreateL2ACL

func (rks *Ruckus) CreateL2ACL(aclName string, restriction string, description string, macs ...string) *Ruckus

L2 Access Control => Create L2 Access Control Create a new L2 Access Control. response status code should be 201

func (*Ruckus) DeleteL2acl

func (rks *Ruckus) DeleteL2acl() error

L2 Access Control => DELETE Delete an L2 Access Control. response code should be 204

func (*Ruckus) DeleteL2aclByName

func (rks *Ruckus) DeleteL2aclByName(name string) error

L2 Access Control => DELETE Delete an L2 Access Control. response code should be 204

func (*Ruckus) DeleteMacsToL2acl

func (rks *Ruckus) DeleteMacsToL2acl(mac ...string) error

L2 Access Control => Modify Rule Macs Modify a specific L2 Access Control Rule Macs. response code should be 204

func (*Ruckus) Err

func (rks *Ruckus) Err() error

func (*Ruckus) GetAps

func (rks *Ruckus) GetAps() ([]Ap, error)

Access Point Configuration => Retrieve List Use this API command to retrieve the list of APs that belong to a zone or a domain. response code should be 200

func (*Ruckus) GetClients

func (rks *Ruckus) GetClients() (
	[]struct {
		Client
		Ap
	},
	error)

func (*Ruckus) GetClientsByApName

func (rks *Ruckus) GetClientsByApName(apName string) ([]Client, error)

Wireless Client => RETRIEVE CLIENT LIST Use this API command to retrieve the client list per AP. response code should be 200

func (*Ruckus) GetCorrectMacs

func (rks *Ruckus) GetCorrectMacs() []string

func (*Ruckus) GetDuplicatedMacs

func (rks *Ruckus) GetDuplicatedMacs() []string

func (*Ruckus) GetErrorCode

func (rks *Ruckus) GetErrorCode() int

func (*Ruckus) GetErrorType

func (rks *Ruckus) GetErrorType() string

func (*Ruckus) GetIncorrectMacs

func (rks *Ruckus) GetIncorrectMacs() []string

func (*Ruckus) GetL2acl

func (rks *Ruckus) GetL2acl() (L2acl, error)

L2 Access Control => Retrieve Retrieve an L2 Access Control. response code should be 200

func (*Ruckus) GetL2aclById

func (rks *Ruckus) GetL2aclById(id string) (L2acl, error)

L2 Access Control => Retrieve Retrieve an L2 Access Control. response code should be 200

func (*Ruckus) GetL2aclByName

func (rks *Ruckus) GetL2aclByName(name string) (L2acl, error)

L2 Access Control => Retrieve Retrieve an L2 Access Control. response code should be 200

func (*Ruckus) GetL2aclId

func (rks *Ruckus) GetL2aclId() string

func (*Ruckus) GetL2aclList

func (rks *Ruckus) GetL2aclList() ([]L2acl, error)

L2 Access Control => Retrieve List Retrieve a list of L2 Access Control. response code should be 200

func (*Ruckus) GetL2acls

func (rks *Ruckus) GetL2acls() ([]L2acl, error)

func (*Ruckus) GetMessage

func (rks *Ruckus) GetMessage() string

func (*Ruckus) GetZoneId

func (rks *Ruckus) GetZoneId() string

func (*Ruckus) GetZones

func (rks *Ruckus) GetZones() ([]Zone, error)

Ruckus Wireless AP Zone => Retrieve List Use this API command to retrieve the list of Ruckus Wireless AP zones that belong to a domain. response code should be 200

func (*Ruckus) Logoff

func (rks *Ruckus) Logoff() error
Sessions => Logoff

Use this API command to log off of the controller.

func (*Ruckus) Logon

func (rks *Ruckus) Logon(username string, password string) error

Logon Sessions => Logon Use this API command to log on to the controller and acquire a valid logon session.

func (*Ruckus) SetBaseUrl

func (rks *Ruckus) SetBaseUrl(address string, port interface{}) *Ruckus

func (*Ruckus) SetL2aclByName

func (rks *Ruckus) SetL2aclByName(name string) *Ruckus

func (*Ruckus) SetZoneByName

func (rks *Ruckus) SetZoneByName(name string) *Ruckus

func (*Ruckus) Use

func (rks *Ruckus) Use(opts ...Options)

type RuckusError

type RuckusError struct {
	Message   *string `json:"message,omitempty"`
	ErrorCode *int    `json:"errorCode,omitempty"`
	ErrorType *string `json:"errorType,omitempty"`
}

type RuckusGeneral

type RuckusGeneral struct {
	TotalCount int
	HasMore    bool
	FirstIndex int
}

type Zone

type Zone struct {
	// Identifier of the zone
	Id string

	// Name of the zone
	Name string
}

Wireless AP Zone

Jump to

Keyboard shortcuts

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