Documentation
¶
Overview ¶
json_inline.go
Index ¶
- Constants
- Variables
- func AvailablePowers(cfg WiFiConfig, caps WifiCapabilities) []int
- func CalcCentralChannel(settings RRMChannel) int
- func EncodeRPCRequest(method string, args interface{}) ([]byte, error)
- func ExecCommand(name string, params ...string) (string, error)
- func GenerateFileReport(data [][]string, format string) ([]byte, error)
- func GetChannelWidth(index int) int
- func MQTTConnectSync(addr string) (mqtt.Client, error)
- func MQTTConnectSyncOpts(opts *mqtt.ClientOptions) (mqtt.Client, error)
- func MQTTMakePublishChan(client mqtt.Client, log_cb func(string)) chan<- MQTTMessage
- func MQTTMustConnectSync(addr string) mqtt.Client
- func MQTTMustConnectSyncOpts(opts *mqtt.ClientOptions) mqtt.Client
- func MQTTMustSubscribeSync(client mqtt.Client, topics []Topic, cb MsgCb)
- func MQTTMustUnsubscribeSync(client mqtt.Client, topics []Topic)
- func MQTTPublishMsg(client mqtt.Client, msg MQTTMessage) error
- func MQTTServiceStart(addr string, s Module, v Version, meta interface{}) (mqtt.Client, error)
- func MQTTServiceStartWithId(addr string, s Module, v Version, id string, meta interface{}) (mqtt.Client, error)
- func MQTTSubscribeSync(client mqtt.Client, topics []Topic, cb MsgCb) error
- func MQTTUnsubscribeSync(client mqtt.Client, topics []Topic) error
- func MacAddrHash(mac string) string
- func MacAddrIsGlobalAssigned(s string) bool
- func MacAddrIsReal(s string) bool
- func MacAddrShrink(s string) string
- func MacAddrVendor(s string) string
- func MarshalInline(val interface{}) (b []byte, e error)
- func NewUUID() string
- func ParseBandmode(bandmode string) (width int, mode int, offset int)
- func SendHTTPGet(url string) ([]byte, error)
- func SendHTTPPost(url, mime string, request []byte) ([]byte, error)
- func SendHTTPPostFile(url, filename, filetype string) ([]byte, error)
- func SendHTTPSFileDataRequest(url, bearerKey string, path string, data []byte) ([]byte, error)
- func SendHTTPSFileRequest(url, bearerKey string, path string) ([]byte, error)
- func SendHTTPSGet(url, bearerKey string) ([]byte, error)
- func SendHTTPSRequest(url, bearerKey, method string, body []byte, contentType string) ([]byte, error)
- func UnmarshalInline(b []byte, val interface{}, tmpl map[string]interface{}) error
- type AccountingDPI
- type AccountingData
- type AccountingRadio
- type AgentStatus
- type AgentStatusBroker
- type AgentStatusConnHost
- type AgentStatusConnInfo
- type AgentStatusType
- func (en *AgentStatusType) GetBSON() (interface{}, error)
- func (en AgentStatusType) GetPtr() *AgentStatusType
- func (en *AgentStatusType) MarshalJSON() ([]byte, error)
- func (en *AgentStatusType) SetBSON(v bson.Raw) error
- func (en AgentStatusType) String() string
- func (en *AgentStatusType) UnmarshalJSON(b []byte) error
- type AnalyticsMwHttpRequest
- type AnalyticsMwHttpResponse
- type BSSStatInfo
- type BackScanModelRaw
- type BaseLocationMask
- type BeelineConfig
- type BroadcastTopic
- type CPE
- type CPEAllInfo
- type CPECompact
- type CPEConfig
- type CPEConfigCompact
- type CPEConfigItemCompact
- type CPEConnectedData
- type CPEFirmware
- type CPEFirmwareConfig
- type CPEFirmwareConfigResponse
- type CPEFirmwareUpgradeParams
- type CPEInterfaceState
- func (en *CPEInterfaceState) GetBSON() (interface{}, error)
- func (en CPEInterfaceState) GetPtr() *CPEInterfaceState
- func (en *CPEInterfaceState) MarshalJSON() ([]byte, error)
- func (en *CPEInterfaceState) SetBSON(v bson.Raw) error
- func (en CPEInterfaceState) String() string
- func (en *CPEInterfaceState) UnmarshalJSON(b []byte) error
- type CPEInterfaceStateData
- type CPEMask
- type CPEMeta
- type CPEModel
- type CPEModelLink
- type CPEModelMask
- type CPEPollSettings
- type CPERRMChannelParams
- type CPEScanData
- type CPESessionInfo
- type CPEStatInfo
- type CPEState
- type CPEStateCompact
- type CPETunnelDescription
- type CPEWireTCConfig
- type CameraClientData
- type CapChannel
- type CapTxPower
- type Capabilities
- type CaptiveRedirect
- type ClientAddr
- type ClientAssocData
- type ClientAuthorizationData
- type ClientConnectedData
- type ClientDisconnectedData
- type ClientDistance
- type ClientProbeData
- type ClientRF
- type ClientSessionInfo
- type ClientStat
- type ClientStatInfo
- type ClientStatMask
- type ClientStatOld
- type ClientStatPacketType
- func (en *ClientStatPacketType) GetBSON() (interface{}, error)
- func (en ClientStatPacketType) GetPtr() *ClientStatPacketType
- func (en *ClientStatPacketType) MarshalJSON() ([]byte, error)
- func (en *ClientStatPacketType) SetBSON(v bson.Raw) error
- func (en ClientStatPacketType) String() string
- func (en *ClientStatPacketType) UnmarshalJSON(b []byte) error
- type ConfigInterfaceCpeReboot
- type ConfigRule
- type ConfigRuleMask
- type ConfigurationStatus
- func (en *ConfigurationStatus) GetBSON() (interface{}, error)
- func (en ConfigurationStatus) GetPtr() *ConfigurationStatus
- func (en *ConfigurationStatus) MarshalJSON() ([]byte, error)
- func (en *ConfigurationStatus) SetBSON(v bson.Raw) error
- func (en ConfigurationStatus) String() string
- func (en *ConfigurationStatus) UnmarshalJSON(b []byte) error
- type ConnectionModeType
- func (en *ConnectionModeType) GetBSON() (interface{}, error)
- func (en ConnectionModeType) GetPtr() *ConnectionModeType
- func (en *ConnectionModeType) MarshalJSON() ([]byte, error)
- func (en *ConnectionModeType) SetBSON(v bson.Raw) error
- func (en ConnectionModeType) String() string
- func (en *ConnectionModeType) UnmarshalJSON(b []byte) error
- type ConnectorInfo
- type Controller
- type ControllerMask
- type ControllerStatusType
- func (en *ControllerStatusType) GetBSON() (interface{}, error)
- func (en ControllerStatusType) GetPtr() *ControllerStatusType
- func (en *ControllerStatusType) MarshalJSON() ([]byte, error)
- func (en *ControllerStatusType) SetBSON(v bson.Raw) error
- func (en ControllerStatusType) String() string
- func (en *ControllerStatusType) UnmarshalJSON(b []byte) error
- type CornerCoords
- type CpeFirmwareData
- type CpeStatusMeta
- type CreateL2TunnelSessionParams
- type CreateL2TunnelSessionResult
- type DBDataMasks
- type DBDataObj
- type DBDataUUID
- type DBRequestC
- type DBRequestD
- type DBRequestR
- type DBRequestU
- type DBResponseBase
- type DBResponseC
- type DBResponseD
- type DBResponseObj
- type DBResponseR
- type DBResponseU
- type DBResponseUUID
- type DHCPAckData
- type DHCPCapConfig
- type DHCPHeader
- type DHCPOptions
- type DHCPPackage
- type DeleteL2TunnelSessionParams
- type DeleteL2TunnelSessionResult
- type DnsAddress
- type Document
- type EnumSecurity
- type ErrorCode
- type EthernetHeader
- type EventMask
- type EventTopic
- type EventWriter
- type FireWallSettings
- type FirewallDirection
- func (en *FirewallDirection) GetBSON() (interface{}, error)
- func (en FirewallDirection) GetPtr() *FirewallDirection
- func (en *FirewallDirection) MarshalJSON() ([]byte, error)
- func (en *FirewallDirection) SetBSON(v bson.Raw) error
- func (en FirewallDirection) String() string
- func (en *FirewallDirection) UnmarshalJSON(b []byte) error
- type FirewallPolicy
- func (en *FirewallPolicy) GetBSON() (interface{}, error)
- func (en FirewallPolicy) GetPtr() *FirewallPolicy
- func (en *FirewallPolicy) MarshalJSON() ([]byte, error)
- func (en *FirewallPolicy) SetBSON(v bson.Raw) error
- func (en FirewallPolicy) String() string
- func (en *FirewallPolicy) UnmarshalJSON(b []byte) error
- type FirmwareConfig
- type FirmwareState
- type FirmwareUpdateMode
- func (en *FirmwareUpdateMode) GetBSON() (interface{}, error)
- func (en FirmwareUpdateMode) GetPtr() *FirmwareUpdateMode
- func (en *FirmwareUpdateMode) MarshalJSON() ([]byte, error)
- func (en *FirmwareUpdateMode) SetBSON(v bson.Raw) error
- func (en FirmwareUpdateMode) String() string
- func (en *FirmwareUpdateMode) UnmarshalJSON(b []byte) error
- type FirmwareUploadedData
- type GAModelInfo
- type GANetGeneral
- type GANetIface
- type GANetSubdevice
- type GANetwork
- type GASysInfo
- type GAVersion
- type GAWanInfo
- type GAWifi
- type GAWifiNetInfo
- type GAWifiStatus
- type GuestControlSettings
- type HS20_3GPPNetwork
- type HS20_ConnCaps
- type HS20_Consortium
- type HS20_IPTypes
- type HS20_NAIAuth
- type HS20_NAIRealm
- type HS20_Venue
- type HS20_WanMetrics
- type Hotspot20Profile
- type I18nName
- type IPAddress
- type IPHeader
- type JSONRPCClientRequest
- type JSONRPCClientRequestList
- type JSONRPCClientResponse
- type JSONRPCClientResponseList
- type JSONRPCProcedure
- type JSONRPC_Error
- type JSONRPC_ErrorCode
- type L2Chain
- type L2Rule
- type L2TPState
- type L3Filter
- type L3Protocol
- type L4Protocol
- type LBSCPEInfo
- type LBSCPEInfoMask
- type LBSClientCoords
- type LBSClientCoordsMask
- type LBSClientData
- type LBSClientDataMask
- type LBSClientSignal
- type LBSConfig
- type LBSZone
- type LimitBetween
- type LimitBetweenOptional
- type LinkDescriptor
- type LogConfig
- type LogMsg
- type LogTopic
- type MACPrefixVendor
- type MCSRequire
- type MQTTDocumentMessage
- type MQTTMessage
- type MQTTRawMessage
- type MacFilterType
- func (en *MacFilterType) GetBSON() (interface{}, error)
- func (en MacFilterType) GetPtr() *MacFilterType
- func (en *MacFilterType) MarshalJSON() ([]byte, error)
- func (en *MacFilterType) SetBSON(v bson.Raw) error
- func (en MacFilterType) String() string
- func (en *MacFilterType) UnmarshalJSON(b []byte) error
- type ManufMap
- func (e *ManufMap) Add(key, c string)
- func (e *ManufMap) AddI(key int64, c string)
- func (e *ManufMap) Delete(key string)
- func (e *ManufMap) DeleteI(key int64)
- func (e *ManufMap) GenerateMap(data []MACPrefixVendor)
- func (e *ManufMap) Get(key string) string
- func (e *ManufMap) GetI(key int64) string
- func (e *ManufMap) Len() int
- type ModelError
- type Module
- type ModuleStatus
- type MonitorRuleViolationData
- type MsgCb
- type NAIAuthMethod
- type NAIRealmParams
- type NetManual
- type NetworkState
- type NetworkStateCompact
- type NotifyType
- type Operation
- type OtherClientData
- type PortalAuthType
- func (en *PortalAuthType) GetBSON() (interface{}, error)
- func (en PortalAuthType) GetPtr() *PortalAuthType
- func (en *PortalAuthType) MarshalJSON() ([]byte, error)
- func (en *PortalAuthType) SetBSON(v bson.Raw) error
- func (en PortalAuthType) String() string
- func (en *PortalAuthType) UnmarshalJSON(b []byte) error
- type PortalProfileType
- func (en *PortalProfileType) GetBSON() (interface{}, error)
- func (en PortalProfileType) GetPtr() *PortalProfileType
- func (en *PortalProfileType) MarshalJSON() ([]byte, error)
- func (en *PortalProfileType) SetBSON(v bson.Raw) error
- func (en PortalProfileType) String() string
- func (en *PortalProfileType) UnmarshalJSON(b []byte) error
- type PowerConfig
- type RPCServer
- type RRMAlgoObject
- type RRMAlgoType
- type RRMChannel
- type RRMCpeStatus
- type RRMGreedParams
- type RRMGroup
- type RRMOperation
- type RRMParamUpdateGroup
- type RRMStatusData
- type RRMTimerParams
- type RadarClientBaseObject
- type RadarClientFirst
- type RadarClientIncome
- type RadarClientVisit
- type RadarClientVisitGroup
- type RadarClientVisitor
- type RadarExportCreds
- type RadarExportFilter
- func (en *RadarExportFilter) GetBSON() (interface{}, error)
- func (en RadarExportFilter) GetPtr() *RadarExportFilter
- func (en *RadarExportFilter) MarshalJSON() ([]byte, error)
- func (en *RadarExportFilter) SetBSON(v bson.Raw) error
- func (en RadarExportFilter) String() string
- func (en *RadarExportFilter) UnmarshalJSON(b []byte) error
- type RadarExportFormat
- func (en *RadarExportFormat) GetBSON() (interface{}, error)
- func (en RadarExportFormat) GetPtr() *RadarExportFormat
- func (en *RadarExportFormat) MarshalJSON() ([]byte, error)
- func (en *RadarExportFormat) SetBSON(v bson.Raw) error
- func (en RadarExportFormat) String() string
- func (en *RadarExportFormat) UnmarshalJSON(b []byte) error
- type RadarExportMacs
- func (en *RadarExportMacs) GetBSON() (interface{}, error)
- func (en RadarExportMacs) GetPtr() *RadarExportMacs
- func (en *RadarExportMacs) MarshalJSON() ([]byte, error)
- func (en *RadarExportMacs) SetBSON(v bson.Raw) error
- func (en RadarExportMacs) String() string
- func (en *RadarExportMacs) UnmarshalJSON(b []byte) error
- type RadarExportObject
- type RadarExportObjectUpdate
- type RadarExportPeriod
- type RadarExportResult
- type RadarExportState
- type RadarExportStatus
- func (en *RadarExportStatus) GetBSON() (interface{}, error)
- func (en RadarExportStatus) GetPtr() *RadarExportStatus
- func (en *RadarExportStatus) MarshalJSON() ([]byte, error)
- func (en *RadarExportStatus) SetBSON(v bson.Raw) error
- func (en RadarExportStatus) String() string
- func (en *RadarExportStatus) UnmarshalJSON(b []byte) error
- type RadarExportType
- func (en *RadarExportType) GetBSON() (interface{}, error)
- func (en RadarExportType) GetPtr() *RadarExportType
- func (en *RadarExportType) MarshalJSON() ([]byte, error)
- func (en *RadarExportType) SetBSON(v bson.Raw) error
- func (en RadarExportType) String() string
- func (en *RadarExportType) UnmarshalJSON(b []byte) error
- type RadarExportUpdate
- type Radius
- type RadiusAccessAccept
- type RadiusAccessReject
- type RadiusAccessRequest
- type RadiusAccountingRequest
- type RadiusAccountingSendData
- type RadiusMessageObject
- type RadiusMessageType
- func (en *RadiusMessageType) GetBSON() (interface{}, error)
- func (en RadiusMessageType) GetPtr() *RadiusMessageType
- func (en *RadiusMessageType) MarshalJSON() ([]byte, error)
- func (en *RadiusMessageType) SetBSON(v bson.Raw) error
- func (en RadiusMessageType) String() string
- func (en *RadiusMessageType) UnmarshalJSON(b []byte) error
- type RedirectClientSession
- type RedirectClientSessionAcct
- type ReportActionType
- func (en *ReportActionType) GetBSON() (interface{}, error)
- func (en ReportActionType) GetPtr() *ReportActionType
- func (en *ReportActionType) MarshalJSON() ([]byte, error)
- func (en *ReportActionType) SetBSON(v bson.Raw) error
- func (en ReportActionType) String() string
- func (en *ReportActionType) UnmarshalJSON(b []byte) error
- type ReportFormat
- type ReportPeriod
- type ReportSubject
- func (en *ReportSubject) GetBSON() (interface{}, error)
- func (en ReportSubject) GetPtr() *ReportSubject
- func (en *ReportSubject) MarshalJSON() ([]byte, error)
- func (en *ReportSubject) SetBSON(v bson.Raw) error
- func (en ReportSubject) String() string
- func (en *ReportSubject) UnmarshalJSON(b []byte) error
- type ReportType
- type RequestTopic
- type ResponseTopic
- type SLChain
- type SLChainConfig
- type SLChainObject
- type SLMessageContentsJSONRPC
- type SLNatAttrs
- type SLNatConfig
- type SSHAccess
- type ScanConfig
- type SecuritySuite
- func (en *SecuritySuite) GetBSON() (interface{}, error)
- func (en SecuritySuite) GetPtr() *SecuritySuite
- func (en *SecuritySuite) MarshalJSON() ([]byte, error)
- func (en *SecuritySuite) SetBSON(v bson.Raw) error
- func (en SecuritySuite) String() string
- func (en *SecuritySuite) UnmarshalJSON(b []byte) error
- type SecurityType
- type ServiceConnectedData
- type ServiceFatalErrorData
- type ServiceState
- type SimpleMask
- type SpeedConfig
- type SpeedType
- type Stat
- type StatEventRule
- type StatEventRuleObject
- type StatEventRuleType
- func (en *StatEventRuleType) GetBSON() (interface{}, error)
- func (en StatEventRuleType) GetPtr() *StatEventRuleType
- func (en *StatEventRuleType) MarshalJSON() ([]byte, error)
- func (en *StatEventRuleType) SetBSON(v bson.Raw) error
- func (en StatEventRuleType) String() string
- func (en *StatEventRuleType) UnmarshalJSON(b []byte) error
- type StatReport
- type StatReportResult
- type StationDumpData
- type StatisticsConfig
- type StatsMask
- type StatusTopic
- type SystemEvent
- type SystemEventLevel
- func (en *SystemEventLevel) GetBSON() (interface{}, error)
- func (en SystemEventLevel) GetPtr() *SystemEventLevel
- func (en *SystemEventLevel) MarshalJSON() ([]byte, error)
- func (en *SystemEventLevel) SetBSON(v bson.Raw) error
- func (en SystemEventLevel) String() string
- func (en *SystemEventLevel) UnmarshalJSON(b []byte) error
- type SystemEventObject
- type SystemEventType
- func (en *SystemEventType) GetBSON() (interface{}, error)
- func (en SystemEventType) GetPtr() *SystemEventType
- func (en *SystemEventType) MarshalJSON() ([]byte, error)
- func (en *SystemEventType) SetBSON(v bson.Raw) error
- func (en SystemEventType) String() string
- func (en *SystemEventType) UnmarshalJSON(b []byte) error
- type TimestampMask
- type Topic
- type TunManagerBroadcastMeta
- type TunManagerRPC
- func (en *TunManagerRPC) GetBSON() (interface{}, error)
- func (en TunManagerRPC) GetPtr() *TunManagerRPC
- func (en *TunManagerRPC) MarshalJSON() ([]byte, error)
- func (en *TunManagerRPC) SetBSON(v bson.Raw) error
- func (en TunManagerRPC) String() string
- func (en *TunManagerRPC) UnmarshalJSON(b []byte) error
- type TunnelConfig
- type TunnelConfigs
- type TunnelType
- type UDPHeader
- type UUID
- type UciAgent
- type UciAgentCfg
- type UciBrokerCfg
- type UciConfig
- type UciDhcpcapCfg
- type UciDotSystem
- type UciEthernetAcct
- type UciEthernetStat
- type UciFirmwareCfg
- type UciLbsCfg
- type UciNetIface
- type UciNetSwitchPort
- type UciNetSwitchVlan
- type UciNetTunnel
- type UciNetwork
- type UciNtp
- type UciRadius
- type UciRedirectCfg
- type UciScanningCfg
- type UciStatCfg
- type UciSystem
- type UciWifiIface
- type UciWifiWlan
- type UciWireless
- type UciWsnmpd
- type UciWsnmpdDefautl
- type UserAgent
- type UserAuthorizationSuccessData
- type VPNHost
- type Version
- type VlanState
- type WLAN
- type WLANCentrAccChangeData
- type WLANCompact
- type WLANMask
- type WLANStatInfo
- type WMMAccessCategory
- func (en *WMMAccessCategory) GetBSON() (interface{}, error)
- func (en WMMAccessCategory) GetPtr() *WMMAccessCategory
- func (en *WMMAccessCategory) MarshalJSON() ([]byte, error)
- func (en *WMMAccessCategory) SetBSON(v bson.Raw) error
- func (en WMMAccessCategory) String() string
- func (en *WMMAccessCategory) UnmarshalJSON(b []byte) error
- type WMMCategoryConfig
- type WMMConfig
- type WMSNMPDConfig
- type WMSNMPDDefault
- type WPA2EnterpriseData
- type WPA2PersonalData
- type WPACommon
- type WPAEnterpriseData
- type WPAPersonalData
- type WanState
- type WiFiConfig
- type WiFiConfigs
- type WiFiState
- type WiFiStates
- type WifiCapabilities
- type WifiManual
- type WiredCapabilities
- type WiredConfig
- type WiredConfigs
- type WiredPortCaps
- type WiredSpeedConfig
- type WiredState
- type WiredStates
- type WiredVlanConfig
- type WirelessClient
- type WirelessClientObject
- type WirelessClientState
- func (en *WirelessClientState) GetBSON() (interface{}, error)
- func (en WirelessClientState) GetPtr() *WirelessClientState
- func (en *WirelessClientState) MarshalJSON() ([]byte, error)
- func (en *WirelessClientState) SetBSON(v bson.Raw) error
- func (en WirelessClientState) String() string
- func (en *WirelessClientState) UnmarshalJSON(b []byte) error
- type WirelessClientType
- func (en *WirelessClientType) GetBSON() (interface{}, error)
- func (en WirelessClientType) GetPtr() *WirelessClientType
- func (en *WirelessClientType) MarshalJSON() ([]byte, error)
- func (en *WirelessClientType) SetBSON(v bson.Raw) error
- func (en WirelessClientType) String() string
- func (en *WirelessClientType) UnmarshalJSON(b []byte) error
- type WirelessClientUpdate
- type WlanState
Constants ¶
const ( JSONRPC_CPE_AGENT_PROCESS_REQ = "agent:process_request" JSONRPC_CPE_AGENT_GET_STATICS = "agent:get_statics" JSONRPC_CPE_AGENT_GET_METHODS = "agent:get_methods" JSONRPC_CPE_AGENT_STATUS = "agent:status" JSONRPC_CPE_AGENT_OPKG = "agent:opkg" )
JSONRPC functions from CPE for AGENT
const ( JSONRPC_CPE_UCI_SET = "uci:set" JSONRPC_CPE_UCI_GET = "uci:get" JSONRPC_CPE_UCI_OPEN = "uci:open_config" JSONRPC_CPE_UCI_APPLY = "uci:apply_config" JSONRPC_CPE_UCI_CHANGES = "uci:changes" JSONRPC_CPE_UCI_COMMIT = "uci:commit" JSONRPC_CPE_UCI_FINISH = "uci:finish" )
JSONRPC functions from CPE for UCI
const ( JSONRPC_CPE_WIFI_ADD = "wifi:add" JSONRPC_CPE_WIFI_CLEAR = "wifi:clear" JSONRPC_CPE_WIFI_UPDATE = "wifi:update" JSONRPC_CPE_WIFI_ENABLE_RADIO = "wifi:enable_radio" JSONRPC_CPE_WIFI_CONFIGURE_ACCT = "wifi:configure_acct" JSONRPC_CPE_WIFI_NAI_COMPILE = "wifi:compile_nai_realm" JSONRPC_CPE_WIFI_RADIO_STATE = "wifi:get_radios_state" )
JSONRPC functions from CPE for WIFI
const ( JSONRPC_CPE_NETWORK_GET_BOARD = "network:get_boardinfo" JSONRPC_CPE_NETWORK_RELOAD = "network:reload" JSONRPC_CPE_NETWORK_L2AP = "network:l2ap" JSONRPC_CPE_NETWORK_VLAN = "network:vlan" JSONRPC_CPE_NETWORK_CLEAN_L2TP = "network:clean_l2tp" JSONRPC_CPE_NETWORK_ADD_NAT = "network:add_nat" JSONRPC_CPE_NETWORK_WAN_ACCESS = "network:wan_access" JSONRPC_CPE_NETWORK_WIRE_TC_ADD = "network:wire_tc_add" JSONRPC_CPE_NETWORK_WIRE_TC_DEL = "network:wire_tc_del" )
JSONRPC functions from CPE for NETWORK
const ( JSONRPC_CPE_LBS_CONFIGURE = "lbs:configure" JSONRPC_CPE_LBS_CHECK = "lbs:check" )
JSONRPC functions from CPE for LBS
const ( JSONRPC_CPE_GET_SYSTEM = "get:system" JSONRPC_CPE_GET_NETWORK = "get:network" JSONRPC_CPE_GET_WIFI = "get:wifi" JSONRPC_CPE_GET_CAPABILITIES = "get:capabilities" JSONRPC_CPE_GET_MODEL = "get:model" JSONRPC_CPE_GET_VERSION = "get:version" )
JSONRPC functions from CPE for GET
const ( JSONRPC_CPE_NOTIFIER_OPEN = "notifier:open" JSONRPC_CPE_NOTIFIER_CLOSE = "notifier:close" JSONRPC_CPE_NOTIFIER_ERROR = "notifier:error" )
JSONRPC functions from CPE for NOTIFIER
const ( JSONRPC_CPE_ACL_L2 = "acl:l2" JSONRPC_CPE_ACL_L2_CLEAR = "acl:l2_clear" JSONRPC_CPE_ACL_L2_FROM_UCI = "acl:l2_from_uci" JSONRPC_CPE_ACL_L2_TO_UCI = "acl:l2_to_uci" JSONRPC_CPE_ACL_L2_CLEAR_UCI = "acl:l2_clear_uci" JSONRPC_CPE_ACL_L3 = "acl:l3" JSONRPC_CPE_ACL_L3_RELOAD = "acl:l3_reload" )
JSONRPC functions from CPE for ACL
const ( JSONRPC_CPE_FW_CONFIG = "firmware:config" JSONRPC_CPE_FW_CHECK = "firmware:check" JSONRPC_CPE_FW_UPGRADE = "firmware:upgrade" )
JSONRPC functions from CPE for FW upgrade
const ( JSONRPC_CPE_L2PORTAL_WHITELIST_ADD = "l2portal:whitelist_add" JSONRPC_CPE_L2PORTAL_WHITELIST_REMOVE = "l2portal:whitelist_remove" )
JSONRPC functions from CPE for l2portal
const ( JSONRPC_CPE_WIFI_SET_CHANNEL = "wifi:switch_chan" JSONRPC_CPE_WIFI_SET_TXPOWER = "wifi:set_txpower" )
JSONRPC functions from CPE for RRM
const ( JSONRPC_CISCO_GET = "cisco:get" JSONRPC_CISCO_SET = "cisco:set" )
JSONRPC functions for interaction with CISCO mediator
const ( JSONRPC_CPE_SYSTEM_FIRSTBOOT = "system:firstboot" JSONRPC_CPE_SYSTEM_REBOOT = "system:reboot" )
JSONRPC system functions from CPE
const ( // CollClientRF collection for client rf CollClientRF = "client_rf" // CollClientDistance collection for client distance from CPE CollClientDistance = "client_distance" )
const ( COLL_STAT_REPORT = "reports" COLL_STAT_REPORT_RESULT = "report_results" )
const ( TOPIC_STATUS_FORMAT = `B/%s/%s` TOPIC_STATUS_REGEXP = `B/(.*)/(.*)` TOPIC_LOG_FORMAT = `LOG/%s/%s` TOPIC_LOG_REGEXP = `LOG/(.*)/(.*)` TOPIC_EVENT_FORMAT = `EVENT/%s/%s/%s` TOPIC_EVENT_REGEXP = `EVENT/(.*)/(.*)/(.*)` TOPIC_REQ_FORMAT = `REQ/%s/%s/%s/%s/%s/%s/%s` TOPIC_REQ_REGEXP = `REQ/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)` TOPIC_RSP_FORMAT = `RSP/%s/%s/%s/%s/%s` TOPIC_RSP_REGEXP = `RSP/(.*)/(.*)/(.*)/(.*)/(.*)` )
const ( JSONRPC_RRM_UPDATE_GROUP = "UpdateRRMGroup" JSONRPC_RRM_FORCE_GROUP = "ForceRRMGroup" )
JSONRPC functions of RRM daemon
const ( TAG_MATCH = "$match" TAG_GROUP = "$group" TAG_LIMIT = "$limit" // необработанные пробы от точки -- TTL 24 часа COLL_RADAR_BASE = "radar_probes_raw" // отфильтрованные пробы по реальным MAC -- TTL 24 часа COLL_RADAR_BASE_REAL = "radar_probes_real" // первое появление конкретного клиента с привязской к точке -- TTL 1 год COLL_RADAR_VISITS_FIRST = "radar_visits_first" // подсчет клиентских визитов RadarClientVisit -- TTL 1 год -- аггрегация раз в сутки COLL_RADAR_VISITS = "radar_visits" // клиентские визиты с привязкой к конкретному часу -- TTL 1 год -- аггрегация раз в сутки COLL_RADAR_VISITS_HOUR = "radar_visits_hour" // radar export COLL_RADAR_EXPORT = "radar_export" // radar export result -- save every worker state to DB -- TTL 6 months COLL_RADAR_EXPORT_RESULT = "radar_export_result" // resample periods RADAR_RESAMPLE_HOUR = "h" RADAR_RESAMPLE_DAY = "d" RADAR_RESAMPLE_WEEK = "w" RADAR_RESAMPLE_MONTH = "m" )
const ( CollCPEStat = "stats" CollClient = "clients" CollClientStat = "client_stats" CollCPEStatInfo = "cpe_stat_info" CollBSSStatInfo = "bss_stat_info" CollWLANStatInfo = "wlan_stat_info" CollClientStatInfo = "client_stat_info" CollCPEStatInfoCache = "cpe_stat_info_capped" CollBSSStatInfoCache = "bss_stat_info_capped" CollWLANStatInfoCache = "wlan_stat_info_capped" CollClientStatInfoCache = "client_stat_info_capped" CollCPESession = "cpe_session_info" CollClientSession = "client_session_info" )
const COLLECTION_RRM_GROUPS = "rrm_groups"
const (
CPEClientDisAssocTemplate = "" /* 192-byte string literal not displayed */
)
const (
JSONRPC_CONFIG_REBOOT = "reboot"
)
JSONRPC functions for manager
const (
JSONRPC_CPE_LOGGING_CONFIGURE = "logging:configure"
)
JSONRPC functions from CPE for LOGGING
const (
JSONRPC_CPE_RADIUS_PREPARE = "radius:prepare"
)
JSONRPC functions from CPE for RADIUS
const (
JSONRPC_CPE_STATISTIC_CONFIGURE = "statistic:configure"
)
JSONRPC functions from CPE for STATISTIC
const JSON_RPC_VERSION = "2.0"
const MQTT_ANY_WILDCARD = "+"
const MQTT_MULTILEVEL_WILDCARD = "#"
Variables ¶
var Chan160 = []int{50, 114}
var Chan40 = []int{38, 46, 54, 62, 102, 110, 118, 126, 134, 142, 151, 159}
var Chan80 = []int{42, 58, 106, 122, 138, 155}
Functions ¶
func AvailablePowers ¶
func AvailablePowers(cfg WiFiConfig, caps WifiCapabilities) []int
func CalcCentralChannel ¶
func CalcCentralChannel(settings RRMChannel) int
func EncodeRPCRequest ¶
EncodeClientRequest encodes parameters for a JSON-RPC client request.
func GenerateFileReport ¶
GenerateFileReport return []byte as format: csv,pdf,xls format set as format variable set data as [][]string by table(columns and rows)
func GetChannelWidth ¶
func MQTTConnectSyncOpts ¶
func MQTTConnectSyncOpts(opts *mqtt.ClientOptions) (mqtt.Client, error)
func MQTTMakePublishChan ¶
func MQTTMakePublishChan(client mqtt.Client, log_cb func(string)) chan<- MQTTMessage
func MQTTMustConnectSync ¶
func MQTTMustConnectSyncOpts ¶
func MQTTMustConnectSyncOpts(opts *mqtt.ClientOptions) mqtt.Client
func MQTTMustSubscribeSync ¶
func MQTTMustUnsubscribeSync ¶
func MQTTPublishMsg ¶
func MQTTPublishMsg(client mqtt.Client, msg MQTTMessage) error
func MQTTServiceStart ¶
func MQTTServiceStartWithId ¶
func MacAddrHash ¶
func MacAddrIsGlobalAssigned ¶
func MacAddrIsReal ¶
func MacAddrShrink ¶
func MacAddrVendor ¶
func MarshalInline ¶
func SendHTTPGet ¶
func SendHTTPPostFile ¶
func SendHTTPSFileDataRequest ¶
SendHTTPSFileDataRequest function to POST file & data
func SendHTTPSFileRequest ¶
SendHTTPSFileRequest function to POST file from provided PATH
func SendHTTPSGet ¶
SendHTTPSGet function to get from remote https URL
func SendHTTPSRequest ¶
func SendHTTPSRequest(url, bearerKey, method string, body []byte, contentType string) ([]byte, error)
SendHTTPSRequest function to make a request to remote URL
func UnmarshalInline ¶
Types ¶
type AccountingDPI ¶
type AccountingDPI struct {
DestIPs []string `json:"dest_ips" bson:"dest_ips"`
}
type AccountingData ¶
type AccountingRadio ¶
type AccountingRadio struct {
Signal int `json:"signal"`
Noise int `json:"noise"`
Inactive int `json:"inactive"`
RxMhz int `json:"rx_mhz"`
TxMhz int `json:"tx_mhz"`
RxRate int `json:"rx_rate"`
TxRate int `json:"tx_rate"`
RxHt bool `json:"rx_ht"`
TxHt bool `json:"tx_ht"`
RxVht bool `json:"rx_vht"`
TxVht bool `json:"tx_vht"`
RxHE bool `json:"rx_he"`
TxHE bool `json:"tx_he"`
TxMcs int `json:"tx_mcs"`
RxMcs int `json:"rx_mcs"`
TxNSS int `json:"tx_nss"`
RxNSS int `json:"rx_nss"`
Tx40Mhz bool `json:"tx_40mhz"`
Rx40Mhz bool `json:"rx_40mhz"`
TxShortGi bool `json:"tx_short_gi"`
RxShortGi bool `json:"rx_short_gi"`
ExpThroughput int `json:"expected_throughput"`
}
type AgentStatus ¶
type AgentStatus struct {
State string `json:"state"`
Connection AgentStatusConnInfo `json:"conninfo"`
Broker AgentStatusBroker `json:"broker"`
TunnelBroker AgentStatusBroker `json:"tunnel_broker"`
TunnelType string `json:"tunnel"`
}
type AgentStatusConnHost ¶
type AgentStatusConnHost struct {
Host string `json:"address"`
}
type AgentStatusConnInfo ¶
type AgentStatusConnInfo struct {
Remote AgentStatusConnHost `json:"remote"`
Local AgentStatusConnHost `json:"local"`
}
type AgentStatusType ¶
type AgentStatusType string
const AgentStatusTypeException AgentStatusType = "exception"
const AgentStatusTypeSuccess AgentStatusType = "success"
const AgentStatusTypeSyntaxError AgentStatusType = "syntax"
const AgentStatusTypeUndefined AgentStatusType = "undefined"
func (*AgentStatusType) GetBSON ¶
func (en *AgentStatusType) GetBSON() (interface{}, error)
func (AgentStatusType) GetPtr ¶
func (en AgentStatusType) GetPtr() *AgentStatusType
func (*AgentStatusType) MarshalJSON ¶
func (en *AgentStatusType) MarshalJSON() ([]byte, error)
func (AgentStatusType) String ¶
func (en AgentStatusType) String() string
func (*AgentStatusType) UnmarshalJSON ¶
func (en *AgentStatusType) UnmarshalJSON(b []byte) error
type AnalyticsMwHttpRequest ¶
type AnalyticsMwHttpRequest struct {
CPEs []string `query:"cpes[]"`
Location string `query:"location"`
WithChildren bool `query:"with_childs"`
Start int64 `query:"start"`
Stop int64 `query:"stop"`
Timeout int `query:"timeout"`
Period string `query:"period"`
Rate int `query:"rate"`
Raw bool `query:"raw"`
Long bool `query:"long"`
Hash bool `query:"hash"`
Filter string `query:"filter"`
Duration int `query:"duration"`
WithNightClients bool `query:"with_night_clients"`
WorkTimeRange string `query:"work_time_range"`
Zone string `query:"zone"`
ExportMac RadarExportMacs `query:"export_mac"`
}
func (*AnalyticsMwHttpRequest) String ¶
func (r *AnalyticsMwHttpRequest) String() string
type AnalyticsMwHttpResponse ¶
type BSSStatInfo ¶
type BSSStatInfo struct {
ID string `json:"id" bson:"_id"`
WLAN string `json:"wlan_id" bson:"wlan_id"`
SSID string `json:"ssid" bson:"ssid"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Radio string `json:"radio" bson:"radio"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
TotalRxBytes int64 `json:"total_rx_bytes" bson:"total_rx_bytes"`
TotalTxBytes int64 `json:"total_tx_bytes" bson:"total_tx_bytes"`
DeltaTxBytes int64 `json:"delta_tx_bytes" bson:"delta_tx_bytes"`
DeltaRxBytes int64 `json:"delta_rx_bytes" bson:"delta_rx_bytes"`
ConnectedClients []string `json:"connected_clients" bson:"connected_clients"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
}
BSSStatInfo struct for store BSS (CPE+WLAN) accumulated stats
type BackScanModelRaw ¶
type BackScanModelRaw struct {
SSID string `json:"ssid" bson:"ssid"`
BSSID string `json:"bssid" bson:"bssid"`
Signal float32 `json:"signal" bson:"signal"`
Channel int `json:"channel" bson:"channel"`
Quality float32 `json:"quality" bson:"quality"`
QualityMax int `json:"quality_max" bson:"quality_max"`
Mode string `json:"mode" bson:"mode"`
CenterIndex int `json:"center_idx0" bson:"center_idx0"`
ChanOffset int `json:"sec_channel_offset" bson:"sec_channel_offset"`
HTModes map[string]bool `json:"htmodelist" bson:"htmodelist"`
Encryption struct {
Enabled bool `json:"enabled" bson:"enabled"`
AuthAlgs []string `json:"auth_algs" bson:"auth_algs"`
Description string `json:"description" bson:"description"`
WEP bool `json:"wep" bson:"wep"`
WPA int `json:"wpa" bson:"wpa"`
AuthSuites []string `json:"auth_suites" bson:"auth_suites"`
PairCiphers []string `json:"pair_ciphers" bson:"pair_ciphers"`
GroupCiphers []string `json:"group_ciphers" bson:"group_ciphers"`
} `json:"encryption" bson:"encryption"`
}
type BaseLocationMask ¶
type BeelineConfig ¶
type BeelineConfig struct {
NASIP string `json:"nas_ip" bson:"nas_ip"`
}
type BroadcastTopic ¶
func ParseBroadcastTopic ¶
func ParseBroadcastTopic(s string, format string) (BroadcastTopic, error)
func (BroadcastTopic) TopicPathGeneric ¶
func (topic BroadcastTopic) TopicPathGeneric(format string) string
type CPE ¶
type CPE struct {
Name string `json:"name"`
Connected bool `json:"connected"`
Description string `json:"description"`
Model CPEModelLink `json:"model"`
ConfigStatus ConfigurationStatus `json:"config_status"`
LastError ModelError `json:"last_error" bson:"last_error"`
Config CPEConfig `json:"config"`
State CPEState `json:"state"`
FirstConnection int64 `json:"first_connection" bson:"first_connection"`
LastConnection int64 `json:"last_connection" bson:"last_connection"`
LastDisconnection int64 `json:"last_disconnection" bson:"last_disconnection"`
// reconfiguration
ConfigNotSend bool `json:"config_not_send" bson:"config_not_send"`
Latitude float64 `json:"latitude" bson:"latitude"`
Longitude float64 `json:"longitude" bson:"longitude"`
}
type CPEAllInfo ¶
type CPEAllInfo struct {
Wifi map[string]GAWifi `json:"wifi,omitempty"`
Network GANetwork `json:"network,omitempty"`
Config UciConfig `json:"configuration,omitempty"`
System GASysInfo `json:"system,omitempty"`
Capability Capabilities `json:"capabilities,omitempty"`
Model GAModelInfo `json:"model,omitempty"`
Version GAVersion `json:"version,omitempty"`
Status AgentStatus `json:"status,omitempty"`
Packages map[string]string `json:"packages,omitempty"`
Statics map[string]Version `json:"statics,omitempty"`
WifiStatus []GAWifiStatus `json:"wifistatus,omitempty"`
Latitude float64 `json:"latitude,omitempty"`
Longitude float64 `json:"longitude,omitempty"`
Errors map[int]JSONRPC_Error `json:"-"`
}
type CPECompact ¶
type CPECompact struct {
Name string `json:"name" bson:"name"`
Connected bool `json:"connected" bson:"connected"`
Description string `json:"description" bson:"description"`
Model CPEModelLink `json:"model" bson:"model"`
ConfigStatus ConfigurationStatus `json:"config_status" bson:"configstatus"`
Config CPEConfigCompact `json:"config" bson:"config"`
State CPEStateCompact `json:"state" bson:"state"`
}
type CPEConfig ¶
type CPEConfig struct {
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Wifi WiFiConfigs `json:"wifi" bson:"wifi"`
Wired WiredConfigs `json:"wired" bson:"wired"`
LbsConfig LBSConfig `json:"lbs_config" bson:"lbs_config"`
StatisticsConfig StatisticsConfig `json:"stats_config" bson:"stats_config"`
LogConfig LogConfig `json:"log_config" bson:"log_config"`
DHCPCapConfig DHCPCapConfig `json:"dhcpcap_config" bson:"dhcpcap_config"`
Firewall FireWallSettings `json:"firewall" bson:"firewall"`
Firmware FirmwareConfig `json:"firmware" bson:"firmware"`
Tunnels TunnelConfigs `json:"tunnels" bson:"tunnels"`
Beeline BeelineConfig `json:"beeline_config" bson:"beeline_config"`
Wmsnmpd WMSNMPDConfig `json:"wmsnmpd" bson:"wmsnmpd"`
WiFiLock bool `json:"wifi_lock" bson:"wifi_lock"`
GrePeerAddrConfig string `json:"gre_peer_addr" bson:"gre_peer_addr"`
NetManual NetManual `json:"net_manual" bson:"net_manual"`
WifiManual WifiManual `json:"wifi_manual" bson:"wifi_manual"`
}
type CPEConfigCompact ¶
type CPEConfigCompact struct {
LbsConfig CPEConfigItemCompact `json:"lbs_config" bson:"lbs_config"`
}
type CPEConfigItemCompact ¶
type CPEConfigItemCompact struct {
Enabled bool `json:"enabled" bson:"enabled"`
}
type CPEConnectedData ¶
type CPEFirmware ¶
type CPEFirmwareConfig ¶
type CPEFirmwareConfig struct {
FileUrl string `json:"file,omitempty"`
StorageUrl string `json:"storage,omitempty"`
Md5SumsUrl string `json:"md5sums,omitempty"`
CheckTimeout int `json:"timeout,omitempty"`
Mode FirmwareUpdateMode `json:"mode"`
AvailableMd5 string `json:"available_md5,omitempty"`
ForceUpgrade bool `json:"force_upgrade"`
}
type CPEFirmwareConfigResponse ¶
type CPEFirmwareConfigResponse struct {
Action string `json:"action"`
CpeFirmwareData
}
type CPEFirmwareUpgradeParams ¶
type CPEFirmwareUpgradeParams struct {
Config CPEFirmwareConfig `json:"config"`
FastResponce bool `json:"fast_response"`
}
for firmware:*
type CPEInterfaceState ¶
type CPEInterfaceState string
const CPEInterfaceStateACS CPEInterfaceState = "ACS"
const CPEInterfaceStateCountryUpdate CPEInterfaceState = "COUNTRY_UPDATE"
const CPEInterfaceStateDFS CPEInterfaceState = "DFS"
const CPEInterfaceStateDisabled CPEInterfaceState = "DISABLED"
const CPEInterfaceStateEnabled CPEInterfaceState = "ENABLED"
const CPEInterfaceStateHtScan CPEInterfaceState = "HT_SCAN"
const CPEInterfaceStateTerminated CPEInterfaceState = "TERMINATED"
const CPEInterfaceStateUninitialized CPEInterfaceState = "UNINITIALIZED"
const CPEInterfaceStateUnknown CPEInterfaceState = "UNKNOWN"
func (*CPEInterfaceState) GetBSON ¶
func (en *CPEInterfaceState) GetBSON() (interface{}, error)
func (CPEInterfaceState) GetPtr ¶
func (en CPEInterfaceState) GetPtr() *CPEInterfaceState
func (*CPEInterfaceState) MarshalJSON ¶
func (en *CPEInterfaceState) MarshalJSON() ([]byte, error)
func (CPEInterfaceState) String ¶
func (en CPEInterfaceState) String() string
func (*CPEInterfaceState) UnmarshalJSON ¶
func (en *CPEInterfaceState) UnmarshalJSON(b []byte) error
type CPEInterfaceStateData ¶
type CPEInterfaceStateData struct {
Interface string `json:"radio_id"`
State CPEInterfaceState `json:"state"`
}
type CPEModel ¶
type CPEModel struct {
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Caps Capabilities `json:"caps" bson:"caps"`
Firmwares []CPEFirmware `json:"firmwares" bson:"firmwares"`
Version Version `json:"version" bson:"version"`
}
type CPEModelLink ¶
type CPEModelMask ¶
type CPEPollSettings ¶
type CPEPollSettings struct {
Rules []UUID `json:"rules"`
}
type CPERRMChannelParams ¶
type CPERRMChannelParams struct {
Count int `json:"bcn_count"`
Freq int `json:"freq"`
Block string `json:"block_tx,omitempty"`
Offset int `json:"sec_channel_offset,omitempty"`
CenterFreq1 int `json:"center_freq1,omitempty"`
CenterFreq2 int `json:"center_freq2,omitempty"`
Bandwidth int `json:"bandwidth,omitempty"`
HT string `json:"ht,omitempty"`
VHT string `json:"vht,omitempty"`
}
for RRM
func RRMChannelToReq ¶
func RRMChannelToReq(settings RRMChannel) CPERRMChannelParams
type CPEScanData ¶
type CPEScanData struct {
CPE UUID `json:"cpe" bson:"cpe"`
Radio string `json:"radio" bson:"radio"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
Scanlist map[string]BackScanModelRaw `json:"scanlist" bson:"scanlist"`
}
type CPESessionInfo ¶
type CPEStatInfo ¶
type CPEStatInfo struct {
ID string `json:"id" bson:"_id"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Timestamp time.Time `json:"timestamp" bson:"timestamp"` // as create_at
CPULoad float64 `json:"cpu_load" bson:"cpu_load"`
MemoryFree int `json:"memory_free" bson:"memory_free"`
MemoryTotal int `json:"memory_total" bson:"memory_total"`
TotalRxBytes int64 `json:"total_rx_bytes" bson:"total_rx_bytes"`
TotalTxBytes int64 `json:"total_tx_bytes" bson:"total_tx_bytes"`
LastRxBytes int64 `json:"last_rx_bytes" bson:"last_rx_bytes"`
LastTxBytes int64 `json:"last_tx_bytes" bson:"last_tx_bytes"`
DeltaTxBytes int64 `json:"delta_tx_bytes" bson:"delta_tx_bytes"`
DeltaRxBytes int64 `json:"delta_rx_bytes" bson:"delta_rx_bytes"`
TxSpeed float64 `json:"tx_speed" bson:"tx_speed"`
RxSpeed float64 `json:"rx_speed" bson:"rx_speed"`
Uptime int64 `json:"uptime" bson:"uptime"`
ConnectedClients []string `json:"connected_clients" bson:"connected_clients"`
}
CPEStatInfo struct for store CPE accumulated stats
type CPEState ¶
type CPEState struct {
Wifi WiFiStates `json:"wifi,omitempty"`
Wired WiredStates `json:"wired,omitempty"`
Firmware FirmwareState `json:"firmware,omitempty"`
Wan WanState `json:"wan"`
L2TPState L2TPState `json:"l2tp_state" bson:"l2tp_state"`
Network NetworkState `json:"network" bson:"network"`
Tunnels TunnelConfigs `json:"tunnels" bson:"tunnels"`
NetManual NetManual `json:"net_manual" bson:"net_manual"`
WifiManual WifiManual `json:"wifi_manual" bson:"wifi_manual"`
}
type CPEStateCompact ¶
type CPEStateCompact struct {
Network NetworkStateCompact `json:"network" bson:"network"`
}
type CPETunnelDescription ¶
type CPEWireTCConfig ¶
type CPEWireTCConfig struct {
Iface string `json:"iface"`
Max int `json:"max,omitempty"`
Min int `json:"min,omitempty"`
Type string `json:"type,omitempty"`
}
for tc config on wire nat iface
type CameraClientData ¶
type CapChannel ¶
type CapChannel struct {
Restricted bool `json:"restricted"`
Freq int `json:"mhz"`
Channel int `json:"channel"`
MaxPower CapTxPower `json:"max_txpower"`
}
type CapTxPower ¶
type Capabilities ¶
type Capabilities struct {
Wifi map[string]WifiCapabilities `json:"wifi" bson:"wifi"`
Wired map[string]WiredCapabilities `json:"wired" bson:"wired"`
}
type CaptiveRedirect ¶
type CaptiveRedirect struct {
Name string `json:"name" bson:"name"`
// URL to redirect (Portal Web part)
RedirectURL string `json:"redirect_url" bson:"redirect_url"`
MACWhiteList []string `json:"mac_list" bson:"mac_list"`
URLWhiteList []DnsAddress `json:"url_list" bson:"url_list"`
PreAuthList []string `json:"preauth_list" bson:"preauth_list"`
NoMasquerade bool `json:"no_masquerade" bson:"no_masquerade"`
}
CaptiveRedirect struct for manage of Client redirect system
type ClientAddr ¶
type ClientAddr struct {
Timestamp int64 `json:"timestamp"`
Ethernet *EthernetHeader `json:"ethernet"`
IP *IPHeader `json:"ip"`
UDP *UDPHeader `json:"udp"`
DHCP *DHCPPackage `json:"dhcp"`
Error string `json:"error"`
}
type ClientAssocData ¶
type ClientAssocData struct {
WLAN string `json:"wlan_id" bson:"wlan_id"`
SSID string `json:"wlan_ssid" bson:"wlan_ssid"`
Desc string `json:"wlan_desc" bson:"wlan_desc"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Radio string `json:"radio_id" bson:"radio_id"`
Freq string `json:"freq" bson:"freq"`
Channel string `json:"channel" bson:"channel"`
}
for new storing lbs probe data collection
type ClientAuthorizationData ¶
type ClientAuthorizationData struct {
Session string `json:"session_id"`
MAC string `json:"mac"`
CPE string `json:"cpe_id"`
WLAN string `json:"wlan_id"`
NasID string `json:"nas_id"`
LocID string `json:"loc_id"`
Radio string `json:"radio_id"` // from what -- ?
SessionTimeout int64 `json:"session_timeout"`
UserName string `json:"username,omitempty"`
UserAgent string `json:"useragent,omitempty"`
AuthenType string `json:"authen_type,omitempty"`
AuthType string `json:"auth_type,omitempty"`
}
type ClientConnectedData ¶
type ClientDisconnectedData ¶
type ClientDistance ¶
type ClientDistance struct {
ID string `json:"id" bson:"_id,omitempty"`
MAC string `json:"mac" bson:"mac"`
CPE string `json:"cpe" bson:"cpe"`
Freq int `json:"freq" bson:"freq"`
TS int64 `json:"ts" bson:"ts"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
Signal int `json:"signal" bson:"signal"`
Noise int `json:"noise" bson:"noise"`
SNR int `json:"snr" bson:"snr"`
Distance float64 `json:"distance" bson:"distance"`
}
ClientDistance struct for history client distance data
type ClientProbeData ¶
type ClientProbeData struct {
Id string `json:"id" bson:"_id"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
MAC string `json:"mac" bson:"mac"`
CPE string `json:"cpe" bson:"cpe"`
CPEName string `json:"cpe_name" bson:"cpe_name"`
CPEMAC string `json:"cpe_mac" bson:"cpe_mac"`
Radio string `json:"radio" bson:"radio"`
Frequency int `json:"freq" bson:"freq"`
RSSI int `json:"rssi" bson:"rssi"`
Manufacturer string `json:"manufacturer" bson:"manufacturer"`
AssocData ClientAssocData `json:"assoc_data,omitempty" bson:"assoc_data"`
}
type ClientRF ¶
type ClientRF struct {
ID string `json:"id" bson:"_id,omitempty"`
MAC string `json:"mac" bson:"mac"`
CPE string `json:"cpe" bson:"cpe"`
Freq int `json:"freq" bson:"freq"`
TS int64 `json:"ts" bson:"ts"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
RF AccountingRadio `json:"rf" bson:"rf"`
SNR int `json:"snr" bson:"snr"`
}
ClientRF struct for history client rf data
type ClientSessionInfo ¶
type ClientSessionInfo struct {
ID string `json:"id" bson:"_id"`
MAC string `json:"mac" bson:"mac"`
WLAN string `json:"wlan_id" bson:"wlan_id"`
SSID string `json:"ssid" bson:"ssid"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Radio string `json:"radio_id" bson:"radio_id"`
Freq string `json:"freq" bson:"freq"`
Mode string `json:"mode" bson:"mode"`
Start int64 `json:"start" bson:"start"`
Stop int64 `json:"stop" bson:"stop"`
Duration int64 `json:"duration" bson:"duration"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
StartNoise int `json:"start_noise" bson:"start_noise"`
StopNoise int `json:"stop_noise" bson:"stop_noise"`
StartRSSI int `json:"start_rssi" bson:"start_rssi"`
StopRSSI int `json:"stop_rssi" bson:"stop_rssi"`
RxBytes int64 `json:"rx_bytes" bson:"rx_bytes"`
TxBytes int64 `json:"tx_bytes" bson:"tx_bytes"`
// auth data
UserAgent string `json:"useragent" bson:"useragent"`
UserName string `json:"username" bson:"username"`
AuthenType string `json:"authen_type,omitempty" bson:"authen_type"`
AuthType string `json:"auth_type,omitempty" bson:"auth_type"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
// list of clients IPS
DPI AccountingDPI `json:"dpi" bson:"dpi"`
}
type ClientStat ¶
type ClientStat struct {
Type ClientStatPacketType `json:"type"`
MAC string `json:"macaddr"`
SSID string `json:"ssid"`
WLAN UUID `json:"wlan_id"`
CPE UUID `json:"cpe_id"`
RadioId string `json:"radio_id"`
BSSID string `json:"bssid"`
Frequency int `json:"frequency,omitempty"`
Username string `json:"identity"`
SessionId string `json:"session_id"`
SessionTime int `json:"session_time"`
Timestamp int64 `json:"timestamp"`
Accounting AccountingData `json:"accounting"`
Radio AccountingRadio `json:"rf"`
DPI AccountingDPI `json:"dpi"`
}
type ClientStatInfo ¶
type ClientStatInfo struct {
ID string `json:"id" bson:"_id"`
MAC string `json:"mac" bson:"mac"`
WLAN string `json:"wlan_id" bson:"wlan_id"`
SSID string `json:"ssid" bson:"ssid"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Radio string `json:"radio" bson:"radio"`
Channel string `json:"channel" bson:"channel"`
Frequence string `json:"freq" bson:"freq"`
Noise int `json:"noise" bson:"noise"`
RSSI int `json:"rssi" bson:"rssi"`
Mode ConnectionModeType `json:"mode" bson:"mode"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
TotalRxBytes int64 `json:"total_rx_bytes" bson:"total_rx_bytes"`
TotalTxBytes int64 `json:"total_tx_bytes" bson:"total_tx_bytes"`
DeltaTxBytes int64 `json:"delta_tx_bytes" bson:"delta_tx_bytes"`
DeltaRxBytes int64 `json:"delta_rx_bytes" bson:"delta_rx_bytes"`
LastRxBytes int64 `json:"last_rx_bytes" bson:"last_rx_bytes"`
LastTxBytes int64 `json:"last_tx_bytes" bson:"last_tx_bytes"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
}
type ClientStatMask ¶
type ClientStatMask struct {
TimestampMask
CPE []UUID
CallingStationId []string
}
type ClientStatOld ¶
type ClientStatOld struct {
AcctStatusType ClientStatPacketType `json:"Acct-Status-Type"`
CPE UUID `json:"cpe_id"`
WLAN UUID `json:"wlan_id"`
RadioId string `json:"radio_id"`
CallingStationId string `json:"Calling-Station-Id"`
CalledStationId string `json:"Called-Station-Id"`
UserName string `json:"User-Name"`
AcctDelayTime int `json:"Acct-Delay-Time"`
AcctSessionId string `json:"Acct-Session-Id"`
AcctInputGigawords *int `json:"Acct-Input-Gigawords"`
AcctOutputGigawords *int `json:"Acct-Output-Gigawords"`
AcctOutputOctets *int `json:"Acct-Output-Octets"`
AcctInputOctets *int `json:"Acct-Input-Octets"`
AcctInputPackets *int `json:"Acct-Input-Packets"`
AcctOutputPackets *int `json:"Acct-Output-Packets"`
AcctSessionTime *int `json:"Acct-Session-Time"`
Timestamp int `json:"Timestamp"`
ConnectInfo string `json:"Connect-Info"`
NasIPAddress string `json:"NAS-IP-Address"`
NasPortType string `json:"NAS-Port-Type"`
NasPort string `json:"NAS-Port"`
// newly added fields
Inactive int `json:"inactive"`
Tx_ht bool `json:"tx_ht"`
Rx_ht bool `json:"rx_ht"`
Tx_rate int `json:"tx_rate,omitempty"`
Rx_rate int `json:"rx_rate,omitempty"`
Rx_vht bool `json:"rx_vht"`
Tx_vht bool `json:"tx_vht"`
Rx_mhz int `json:"rx_mhz,omitempty"`
Tx_mhz int `json:"tx_mhz,omitempty"`
Signal int `json:"signal,omitempty"`
Noise int `json:"noise,omitempty"`
Frequency int `json:"frequency,omitempty"`
}
type ClientStatPacketType ¶
type ClientStatPacketType string
const ClientStatPacketTypeInterim ClientStatPacketType = "interim"
const ClientStatPacketTypeInterimOld ClientStatPacketType = "Interim-Update"
const ClientStatPacketTypeOffOld ClientStatPacketType = "Accounting-Off"
const ClientStatPacketTypeOnOld ClientStatPacketType = "Accounting-On"
const ClientStatPacketTypeStart ClientStatPacketType = "start"
const ClientStatPacketTypeStartOld ClientStatPacketType = "Start"
const ClientStatPacketTypeStop ClientStatPacketType = "stop"
const ClientStatPacketTypeStopOld ClientStatPacketType = "Stop"
func (*ClientStatPacketType) GetBSON ¶
func (en *ClientStatPacketType) GetBSON() (interface{}, error)
func (ClientStatPacketType) GetPtr ¶
func (en ClientStatPacketType) GetPtr() *ClientStatPacketType
func (*ClientStatPacketType) MarshalJSON ¶
func (en *ClientStatPacketType) MarshalJSON() ([]byte, error)
func (ClientStatPacketType) String ¶
func (en ClientStatPacketType) String() string
func (*ClientStatPacketType) UnmarshalJSON ¶
func (en *ClientStatPacketType) UnmarshalJSON(b []byte) error
type ConfigInterfaceCpeReboot ¶
type ConfigInterfaceCpeReboot struct {
Ids []UUID `json:"cpes"`
Broker string `json:"broker"`
NoReset bool `json:"noreset"`
}
for agent:*
type ConfigRule ¶
type ConfigRule struct {
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Model UUID `json:"model" bson:"model"`
CPEs []UUID `json:"cpes" bson:"cpes"`
MacPrefix string `json:"mac_prefix" bson:"mac_prefix"`
Subnet IPAddress `json:"subnet" bson:"subnet"`
Template struct {
WLANs []UUID `json:"wlans" bson:"wlans"`
CpeConfig CPEConfig `json:"cpe_config_template" bson:"cpe_config_template"`
Tags []string `json:"tags" bson:"tags"`
Location UUID `json:"location" bson:"location"`
} `json:"template" bson:"template"`
Is_auto bool `json:"is_auto" bson:"is_auto"`
Is_always bool `json:"is_always" bson:"is_always"`
}
type ConfigRuleMask ¶
type ConfigurationStatus ¶
type ConfigurationStatus string
const ConfigurationStatusDontUse1 ConfigurationStatus = "pending"
const ConfigurationStatusDontUse2 ConfigurationStatus = "error"
const ConfigurationStatusEmpty ConfigurationStatus = "empty"
const ConfigurationStatusOK ConfigurationStatus = "ok"
const ConfigurationStatusOffline ConfigurationStatus = "offline"
const ConfigurationStatusRebooting ConfigurationStatus = "rebooting"
const ConfigurationStatusUpdating ConfigurationStatus = "updating"
const ConfigurationStatusUpgrading ConfigurationStatus = "upgrading"
func (*ConfigurationStatus) GetBSON ¶
func (en *ConfigurationStatus) GetBSON() (interface{}, error)
func (ConfigurationStatus) GetPtr ¶
func (en ConfigurationStatus) GetPtr() *ConfigurationStatus
func (*ConfigurationStatus) MarshalJSON ¶
func (en *ConfigurationStatus) MarshalJSON() ([]byte, error)
func (ConfigurationStatus) String ¶
func (en ConfigurationStatus) String() string
func (*ConfigurationStatus) UnmarshalJSON ¶
func (en *ConfigurationStatus) UnmarshalJSON(b []byte) error
type ConnectionModeType ¶
type ConnectionModeType string
const ConnectionModeTypeModeAC ConnectionModeType = "ac"
const ConnectionModeTypeModeAX ConnectionModeType = "ax"
const ConnectionModeTypeModeLegacy ConnectionModeType = "legacy"
const ConnectionModeTypeModeN ConnectionModeType = "n"
func (*ConnectionModeType) GetBSON ¶
func (en *ConnectionModeType) GetBSON() (interface{}, error)
func (ConnectionModeType) GetPtr ¶
func (en ConnectionModeType) GetPtr() *ConnectionModeType
func (*ConnectionModeType) MarshalJSON ¶
func (en *ConnectionModeType) MarshalJSON() ([]byte, error)
func (ConnectionModeType) String ¶
func (en ConnectionModeType) String() string
func (*ConnectionModeType) UnmarshalJSON ¶
func (en *ConnectionModeType) UnmarshalJSON(b []byte) error
type ConnectorInfo ¶
type Controller ¶
type Controller struct {
Status ControllerStatusType `json:"status"`
Enable bool `json:"enable"`
Name string `json:"name"`
Description string `json:"description"`
MAC string `json:"mac"`
Serial string `json:"serial"`
Vendor string `json:"vendor"`
Firmware string `json:"fw_version"`
Access SSHAccess `json:"access"`
IPAddr string `json:"ip_addr"`
}
type ControllerMask ¶
type ControllerStatusType ¶
type ControllerStatusType string
const ControllerStatusTypeConnected ControllerStatusType = "connected"
const ControllerStatusTypeDisconnected ControllerStatusType = "disconnected"
const ControllerStatusTypeEmpty ControllerStatusType = "empty"
const ControllerStatusTypeError ControllerStatusType = "error"
const ControllerStatusTypeProvisioning ControllerStatusType = "provision"
const ControllerStatusTypeUpdating ControllerStatusType = "updating"
func (*ControllerStatusType) GetBSON ¶
func (en *ControllerStatusType) GetBSON() (interface{}, error)
func (ControllerStatusType) GetPtr ¶
func (en ControllerStatusType) GetPtr() *ControllerStatusType
func (*ControllerStatusType) MarshalJSON ¶
func (en *ControllerStatusType) MarshalJSON() ([]byte, error)
func (ControllerStatusType) String ¶
func (en ControllerStatusType) String() string
func (*ControllerStatusType) UnmarshalJSON ¶
func (en *ControllerStatusType) UnmarshalJSON(b []byte) error
type CornerCoords ¶
type CornerCoords struct {
X float64 `json:"x" bson:"x"`
Y float64 `json:"y" bson:"y"`
Z float64 `json:"z" bson:"z"`
}
CornerCoords координаты углов зоны
type CpeFirmwareData ¶
type CpeStatusMeta ¶
type CreateL2TunnelSessionParams ¶
type CreateL2TunnelSessionParams struct {
CPEIP string `json:"cpe_ip"`
CPESessionID int `json:"cpe_session_id"`
CPETunnelID int `json:"cpe_tunnel_id"`
HostIP string `json:"host_ip"`
CommutationInterfaceName string `json:"commutation_interface"`
CommutationInterfaceVlan int `json:"commutation_vlan,omitempty"`
}
type DBDataMasks ¶
type DBDataMasks struct {
WLANs *WLANMask `json:"wlan,omitempty"`
CPEs *CPEMask `json:"cpe,omitempty"`
Stats *StatsMask `json:"stat,omitempty"`
ClientStats *SimpleMask `json:"client-stat,omitempty"`
Events *EventMask `json:"event,omitempty"`
StatEventRules *SimpleMask `json:"stat-event-rule,omitempty"`
PollCPE *SimpleMask `json:"poll-cpe,omitempty"`
Radius *SimpleMask `json:"radius,omitempty"`
LBSCPEInfo *LBSCPEInfoMask `json:"lbs-cpe-info,omitempty"`
LBSClientData *LBSClientDataMask `json:"lbs-client-data,omitempty"`
LBSClientCoords *LBSClientCoordsMask `json:"lbs-client-coords,omitempty"`
VPNHosts *SimpleMask `json:"vpn-host,omitempty"`
CPEScanData *SimpleMask `json:"cpe-scan-data,omitempty"`
CPEModel *CPEModelMask `json:"cpe-model,omitempty"`
ConfigRule *ConfigRuleMask `json:"config-rule,omitempty"`
L2Chain *SimpleMask `json:"l2-chain,omitempty"`
CaptiveRedirect *SimpleMask `json:"captive-redirect,omitempty"`
HotspotProfile *SimpleMask `json:"hotspot-profile,omitempty"`
Controller *ControllerMask `json:"controller,omitempty"`
LBSZones *SimpleMask `json:"lbs_zones,omitempty"`
BaseLocation *BaseLocationMask `json:"base_locations,omitempty"`
}
func (*DBDataMasks) Reset ¶
func (dbd *DBDataMasks) Reset()
type DBDataObj ¶
type DBDataObj struct {
WLANs map[UUID]WLAN `json:"wlan,omitempty"`
CPEs map[UUID]CPE `json:"cpe,omitempty"`
Stats map[UUID]Stat `json:"stat,omitempty"`
ClientStats map[UUID]ClientStat `json:"client-stat,omitempty"`
Events map[UUID]SystemEvent `json:"event,omitempty"`
StatEventRules map[UUID]StatEventRule `json:"stat-event-rule,omitempty"`
PollCPE map[UUID]CPEPollSettings `json:"poll-cpe,omitempty"`
Radius map[UUID]Radius `json:"radius,omitempty"`
LBSCPEInfo map[UUID]LBSCPEInfo `json:"lbs-cpe-info,omitempty"`
LBSClientData map[UUID]LBSClientData `json:"lbs-client-data,omitempty"`
LBSClientCoords map[UUID]LBSClientCoords `json:"lbs-client-coords,omitempty"`
VPNHosts map[UUID]VPNHost `json:"vpn-host,omitempty"`
CPEScanData map[UUID]CPEScanData `json:"cpe-scan-data,omitempty"`
CPEModel map[UUID]CPEModel `json:"cpe-model,omitempty"`
ConfigRule map[UUID]ConfigRule `json:"config-rule,omitempty"`
L2Chain map[UUID]L2Chain `json:"l2-chain,omitempty"`
CaptiveRedirect map[UUID]CaptiveRedirect `json:"captive-redirect,omitempty"`
HotspotProfile map[UUID]Hotspot20Profile `json:"hotspot-profile,omitempty"`
Controller map[UUID]Controller `json:"controller,omitempty"`
LBSZones map[UUID]LBSZone `json:"lbs_zones,omitempty"`
}
type DBDataUUID ¶
type DBDataUUID struct {
WLANs []UUID `json:"wlan,omitempty"`
CPEs []UUID `json:"cpe,omitempty"`
Stats []UUID `json:"stat,omitempty"`
ClientStats []UUID `json:"client-stat,omitempty"`
Events []UUID `json:"event,omitempty"`
StatEventRules []UUID `json:"stat-event-rule,omitempty"`
PollCPE []UUID `json:"poll-cpe,omitempty"`
Radius []UUID `json:"radius,omitempty"`
LBSCPEInfo []UUID `json:"lbs-cpe-info,omitempty"`
LBSClientData []UUID `json:"lbs-client-data,omitempty"`
LBSClientCoords []UUID `json:"lbs-client-coords,omitempty"`
VPNHosts []UUID `json:"vpn-host,omitempty"`
CPEScanData []UUID `json:"cpe-scan-data,omitempty"`
CPEModel []UUID `json:"cpe-model,omitempty"`
ConfigRule []UUID `json:"config-rule,omitempty"`
L2Chain []UUID `json:"l2-chain,omitempty"`
CaptiveRedirect []UUID `json:"captive-redirect,omitempty"`
HotspotProfile []UUID `json:"hotspot-profile,omitempty"`
Controller []UUID `json:"controller,omitempty"`
LBSZones []UUID `json:"lbs_zones,omitempty"`
}
func (*DBDataUUID) Reset ¶
func (dbd *DBDataUUID) Reset()
type DBRequestC ¶
type DBRequestC DBDataObj
func (*DBRequestC) UnmarshalJSON ¶
func (dbd *DBRequestC) UnmarshalJSON(b []byte) error
type DBRequestD ¶
type DBRequestD DBDataMasks
func (*DBRequestD) UnmarshalJSON ¶
func (dbd *DBRequestD) UnmarshalJSON(b []byte) error
type DBRequestR ¶
type DBRequestR DBDataMasks
func (*DBRequestR) UnmarshalJSON ¶
func (dbd *DBRequestR) UnmarshalJSON(b []byte) error
type DBRequestU ¶
type DBRequestU DBDataObj
func (*DBRequestU) UnmarshalJSON ¶
func (dbd *DBRequestU) UnmarshalJSON(b []byte) error
type DBResponseBase ¶
type DBResponseBase struct {
Errors []ModelError `json:"errors,omitempty"`
}
type DBResponseC ¶
type DBResponseC DBResponseUUID
func (*DBResponseC) UnmarshalJSON ¶
func (dbd *DBResponseC) UnmarshalJSON(b []byte) error
type DBResponseD ¶
type DBResponseD DBResponseUUID
func (*DBResponseD) UnmarshalJSON ¶
func (dbd *DBResponseD) UnmarshalJSON(b []byte) error
type DBResponseObj ¶
type DBResponseObj struct {
DBResponseBase `json:",inline"`
DBDataObj `json:"data,inline"`
}
type DBResponseR ¶
type DBResponseR DBResponseObj
func (*DBResponseR) UnmarshalJSON ¶
func (dbd *DBResponseR) UnmarshalJSON(b []byte) error
type DBResponseU ¶
type DBResponseU DBResponseUUID
func (*DBResponseU) UnmarshalJSON ¶
func (dbd *DBResponseU) UnmarshalJSON(b []byte) error
type DBResponseUUID ¶
type DBResponseUUID struct {
DBResponseBase `json:",inline"`
DBDataUUID `json:"data,inline"`
}
type DHCPAckData ¶
type DHCPCapConfig ¶
type DHCPHeader ¶
type DHCPOptions ¶
type DHCPPackage ¶
type DHCPPackage struct {
Header DHCPHeader `json:"header"`
Options DHCPOptions `json:"options"`
Fingerprint []int `json:"fingerprint"`
}
type DnsAddress ¶
type DnsAddress struct {
Ip string `json:"ip" bson:"ip"`
DomainName string `json:"domain_name" bson:"domain_name"`
}
DnsAddress for link IP with domain name
type EnumSecurity ¶
type EnumSecurity struct {
Type SecurityType "json:\"type\""
Data interface{} "json:\"data\""
}
func (*EnumSecurity) UnmarshalJSON ¶
func (en *EnumSecurity) UnmarshalJSON(b []byte) error
type ErrorCode ¶
type ErrorCode string
const ErrorCodeBadEnvironment ErrorCode = "ERROR_BAD_ENV"
const ErrorCodeCPE ErrorCode = "ERROR_CPE"
const ErrorCodeDB ErrorCode = "ERROR_DB"
const ErrorCodeJson ErrorCode = "ERROR_JSON"
const ErrorCodeJsonRpc ErrorCode = "ERROR_JSONRPC"
const ErrorCodeModuleOffline ErrorCode = "ERROR_MODULE_OFFLINE"
const ErrorCodeMqtt ErrorCode = "ERROR_MQTT"
const ErrorCodeNoError ErrorCode = ""
const ErrorCodeObjectNotExist ErrorCode = "ERROR_OBJECT_NOT_EXIST"
const ErrorCodeOther ErrorCode = "ERROR_OTHER"
const ErrorCodeProtocol ErrorCode = "ERROR_PROTOCOL"
const ErrorCodeRequestCheck ErrorCode = "ERROR_REQUEST_CHECK"
const ErrorCodeRspTimeout ErrorCode = "ERROR_RSP_TIMEOUT"
func (*ErrorCode) MarshalJSON ¶
func (*ErrorCode) UnmarshalJSON ¶
type EthernetHeader ¶
type EventMask ¶
type EventMask struct {
TimestampMask
Type []SystemEventType `json:"type"`
Subject_id []string `json:"subject_id"`
Level []SystemEventLevel `json:"level"`
}
type EventTopic ¶
type EventTopic struct {
SenderModule Module
SenderID string
Type SystemEventType
}
func ParseEventTopic ¶
func ParseEventTopic(s string) (EventTopic, error)
func (EventTopic) TopicPath ¶
func (topic EventTopic) TopicPath() string
type EventWriter ¶
type EventWriter struct {
// contains filtered or unexported fields
}
func NewEventWriter ¶
func NewEventWriter(c mqtt.Client, makeMsg func(msg LogMsg) MQTTMessage) EventWriter
type FireWallSettings ¶
type FirewallDirection ¶
type FirewallDirection string
const FirewallDirectionAny FirewallDirection = "ANY"
const FirewallDirectionIn FirewallDirection = "IN"
const FirewallDirectionOut FirewallDirection = "OUT"
func (*FirewallDirection) GetBSON ¶
func (en *FirewallDirection) GetBSON() (interface{}, error)
func (FirewallDirection) GetPtr ¶
func (en FirewallDirection) GetPtr() *FirewallDirection
func (*FirewallDirection) MarshalJSON ¶
func (en *FirewallDirection) MarshalJSON() ([]byte, error)
func (FirewallDirection) String ¶
func (en FirewallDirection) String() string
func (*FirewallDirection) UnmarshalJSON ¶
func (en *FirewallDirection) UnmarshalJSON(b []byte) error
type FirewallPolicy ¶
type FirewallPolicy string
const FirewallPolicyAccept FirewallPolicy = "ACCEPT"
const FirewallPolicyDrop FirewallPolicy = "DROP"
const FirewallPolicyEmpty FirewallPolicy = ""
const FirewallPolicyReturn FirewallPolicy = "RETURN"
func (*FirewallPolicy) GetBSON ¶
func (en *FirewallPolicy) GetBSON() (interface{}, error)
func (FirewallPolicy) GetPtr ¶
func (en FirewallPolicy) GetPtr() *FirewallPolicy
func (*FirewallPolicy) MarshalJSON ¶
func (en *FirewallPolicy) MarshalJSON() ([]byte, error)
func (FirewallPolicy) String ¶
func (en FirewallPolicy) String() string
func (*FirewallPolicy) UnmarshalJSON ¶
func (en *FirewallPolicy) UnmarshalJSON(b []byte) error
type FirmwareConfig ¶
type FirmwareConfig struct {
FileUrl string `json:"file" bson:"file"`
StorageUrl string `json:"storage" bson:"storage"`
ChecksumUrl string `json:"checksum" bson:"checksum"`
CheckTimeout int `json:"timeout" bson:"timeout"`
Mode FirmwareUpdateMode `json:"mode" bson:"mode"`
}
type FirmwareState ¶
type FirmwareUpdateMode ¶
type FirmwareUpdateMode string
const FirmwareUpdateModeCheck FirmwareUpdateMode = "check"
const FirmwareUpdateModeOff FirmwareUpdateMode = "off"
const FirmwareUpdateModeOn FirmwareUpdateMode = "on"
func (*FirmwareUpdateMode) GetBSON ¶
func (en *FirmwareUpdateMode) GetBSON() (interface{}, error)
func (FirmwareUpdateMode) GetPtr ¶
func (en FirmwareUpdateMode) GetPtr() *FirmwareUpdateMode
func (*FirmwareUpdateMode) MarshalJSON ¶
func (en *FirmwareUpdateMode) MarshalJSON() ([]byte, error)
func (FirmwareUpdateMode) String ¶
func (en FirmwareUpdateMode) String() string
func (*FirmwareUpdateMode) UnmarshalJSON ¶
func (en *FirmwareUpdateMode) UnmarshalJSON(b []byte) error
type FirmwareUploadedData ¶
type FirmwareUploadedData struct {
CpeIDs []UUID `json:"cpe_ids"`
Url string `json:"url"`
Md5Sum string `json:"md5sum"`
Mode FirmwareUpdateMode `json:"mode"`
}
type GAModelInfo ¶
type GANetGeneral ¶
type GANetIface ¶
type GANetSubdevice ¶
type GANetwork ¶
type GANetwork struct {
General GANetGeneral `json:"general"`
Interfaces map[string]GANetIface `json:"interfaces"`
WanInfo GAWanInfo `json:"waninfo"`
}
type GAWifi ¶
type GAWifi struct {
Device string `json:"device"`
Name string `json:"name"`
Up bool `json:"up"`
Networks map[string]GAWifiNetInfo `json:"networks"`
}
type GAWifiNetInfo ¶
type GAWifiStatus ¶
type GAWifiStatus struct {
Device string `json:"device"`
State CPEInterfaceState `json:"state"`
}
type GuestControlSettings ¶
type GuestControlSettings struct {
CaptiveRedirect UUID `json:"captive_redirect" bson:"captive_redirect"`
MACAuth []UUID `json:"mac_radius_auth_servers" bson:"mac_radius_auth_servers"`
}
GuestControlSettings for WLAN/Wired Guest Control settings
type HS20_3GPPNetwork ¶
type HS20_ConnCaps ¶
type HS20_Consortium ¶
type HS20_IPTypes ¶
type HS20_NAIAuth ¶
type HS20_NAIRealm ¶
type HS20_NAIRealm struct {
Name string `json:"name" bson:"name"`
EAP int `json:"eap" bson:"eap"`
Auth []HS20_NAIAuth `json:"auth" bson:"auth"`
}
type HS20_Venue ¶
type HS20_WanMetrics ¶
type HS20_WanMetrics struct {
WANInfo int `json:"wan_info" bson:"wan_info"`
DownlinkSpeed int `json:"dl_speed" bson:"dl_speed"`
UplinkSpeed int `json:"ul_speed" bson:"ul_speed"`
DownlinkLoad int `json:"dl_load" bson:"dl_load"`
UplinkLoad int `json:"ul_load" bson:"ul_load"`
MeasureDuration int `json:"lmd" bson:"lmd"`
}
type Hotspot20Profile ¶
type Hotspot20Profile struct {
Name string `json:"name" bson:"name"`
NetType int `json:"net_type" bson:"net_type"`
Internet bool `json:"internet" bson:"internet"`
ASRA bool `json:"asra" bson:"asra"`
ESR bool `json:"esr" bson:"esr"`
UESA bool `json:"uesa" bson:"uesa"`
DGAF bool `json:"dgaf" bson:"dgaf"`
HESSID string `json:"hessid" bson:"hessid"`
Venue HS20_Venue `json:"venue" bson:"venue"`
Domains []string `json:"domains" bson:"domains"`
Realms []HS20_NAIRealm `json:"realms" bson:"realms"`
Cellular []HS20_3GPPNetwork `json:"cellular" bson:"cellular"`
Consortiums []HS20_Consortium `json:"consortiums" bson:"consortiums"`
OperNames []I18nName `json:"oper_names" bson:"oper_names"`
IpTypes HS20_IPTypes `json:"ip_types" bson:"ip_types"`
ConnCaps []HS20_ConnCaps `json:"conn_caps" bson:"conn_caps"`
WanMetrics HS20_WanMetrics `json:"wan_metrics" bson:"wan_metrics"`
OperClasses []int `json:"oper_classes" bson:"oper_classes"`
}
type JSONRPCClientRequest ¶
type JSONRPCClientRequest struct {
// JSON-RPC protocol.
Version string `json:"jsonrpc"`
// A String containing the name of the method to be invoked.
Method string `json:"method"`
// Object to pass as request parameter to the method.
Params interface{} `json:"params,omitempty"`
// The request id. This can be of any type. It is used to match the
// response with the request that it is replying to.
Id int `json:"id,omitempty"`
}
clientRequest represents a JSON-RPC request sent by a client.
func NewJSONRPCRequest ¶
func NewJSONRPCRequest(method string, args interface{}, id int) JSONRPCClientRequest
type JSONRPCClientRequestList ¶
type JSONRPCClientRequestList []JSONRPCClientRequest
type JSONRPCClientResponse ¶
type JSONRPCClientResponse struct {
// JSON-RPC protocol.
Version string `json:"jsonrpc"`
Result interface{} `json:"result,omitempty"`
Error *JSONRPC_Error `json:"error,omitempty"`
Id int `json:"id"`
}
clientResponse represents a JSON-RPC response returned to a client.
func MakeRPCError ¶
func MakeRPCError(code JSONRPC_ErrorCode, description string, id int, data interface{}) *JSONRPCClientResponse
func MakeRPCSuccessResponse ¶
func MakeRPCSuccessResponse(id int, payload interface{}) *JSONRPCClientResponse
type JSONRPCClientResponseList ¶
type JSONRPCClientResponseList []JSONRPCClientResponse
func ProcessJSONRPCMessage ¶
func ProcessJSONRPCMessage(msg mqtt.Message, server *RPCServer) (JSONRPCClientResponseList, error)
type JSONRPCProcedure ¶
type JSONRPCProcedure interface {
ProcedureExecute(JSONRPCClientRequest) *JSONRPCClientResponse
}
type JSONRPC_Error ¶
type JSONRPC_Error struct {
// code of the error
Code JSONRPC_ErrorCode `json:"code"`
// description of the error
Message string `json:"message"`
// optional data to attach
Data interface{} `json:"data,omitempty"`
}
type JSONRPC_ErrorCode ¶
type JSONRPC_ErrorCode int
const ( E_PARSE JSONRPC_ErrorCode = -32700 E_INVALID_REQ JSONRPC_ErrorCode = -32600 E_NO_METHOD JSONRPC_ErrorCode = -32601 E_BAD_PARAMS JSONRPC_ErrorCode = -32602 E_INTERNAL JSONRPC_ErrorCode = -32603 E_SERVER JSONRPC_ErrorCode = -32000 )
RFC error codes
type L2Chain ¶
type L2Chain struct {
Name string `json:"name" bson:"name"`
Policy FirewallPolicy `json:"policy" bson:"policy"`
Rules []L2Rule `json:"rules" bson:"rules"`
Direction FirewallDirection `json:"direction" bson:"direction"`
}
type L2Rule ¶
type L2Rule struct {
Protocol string `json:"protocol" bson:"protocol"`
SrcMAC []string `json:"source" bson:"source"`
DstMAC []string `json:"destination" bson:"destination"`
SrcIP []string `json:"ip_source" bson:"ip_source"`
DstIP []string `json:"ip_destination" bson:"ip_destination"`
IPProto string `json:"ip_protocol" bson:"ip_protocol"`
SrcPort []string `json:"ip_source_port" bson:"ip_source_port"`
DstPort []string `json:"ip_destination_port" bson:"ip_destination_port"`
Jump string `json:"jump" bson:"jump"`
}
type L2TPState ¶
type L2TPState struct {
Enabled bool `json:"enabled" bson:"enabled"`
HostId UUID `json:"host" bson:"host"`
HostAddr string `json:"host_addr" bson:"host_addr"`
HostTunnelId int `json:"host_tunnel" bson:"host_tunnel"`
TunnelType string `json:"tunnel_type" bson:"tunnel_type"`
LocalAddr string `json:"local_addr" bson:"local_addr"`
LocalInterface string `json:"local_iface" bson:"local_iface"`
LocalTunnelId int `json:"local_tunnel" bson:"local_tunnel"`
}
type L3Protocol ¶
type L3Protocol string
const L3ProtocolEmpty L3Protocol = ""
const L3ProtocolIP L3Protocol = "ip"
const L3ProtocolIPv4 L3Protocol = "ipv4"
const L3ProtocolIPv6 L3Protocol = "ipv6"
func (*L3Protocol) GetBSON ¶
func (en *L3Protocol) GetBSON() (interface{}, error)
func (L3Protocol) GetPtr ¶
func (en L3Protocol) GetPtr() *L3Protocol
func (*L3Protocol) MarshalJSON ¶
func (en *L3Protocol) MarshalJSON() ([]byte, error)
func (L3Protocol) String ¶
func (en L3Protocol) String() string
func (*L3Protocol) UnmarshalJSON ¶
func (en *L3Protocol) UnmarshalJSON(b []byte) error
type L4Protocol ¶
type L4Protocol string
const L4ProtocolEmpty L4Protocol = ""
const L4ProtocolTCP L4Protocol = "TCP"
const L4ProtocolUDP L4Protocol = "UDP"
func (*L4Protocol) GetBSON ¶
func (en *L4Protocol) GetBSON() (interface{}, error)
func (L4Protocol) GetPtr ¶
func (en L4Protocol) GetPtr() *L4Protocol
func (*L4Protocol) MarshalJSON ¶
func (en *L4Protocol) MarshalJSON() ([]byte, error)
func (L4Protocol) String ¶
func (en L4Protocol) String() string
func (*L4Protocol) UnmarshalJSON ¶
func (en *L4Protocol) UnmarshalJSON(b []byte) error
type LBSCPEInfo ¶
type LBSCPEInfoMask ¶
type LBSCPEInfoMask struct {
SimpleMask
Group []UUID `json:"group"`
CPE []UUID `json:"cpe"`
Name []string `json:"name"`
X LimitBetweenOptional `json:"x"`
Y LimitBetweenOptional `json:"y"`
Z LimitBetweenOptional `json:"z"`
}
type LBSClientCoords ¶
type LBSClientCoordsMask ¶
type LBSClientCoordsMask struct {
TimestampMask
Group []UUID `json:"group"`
Mac []string `json:"mac"`
X LimitBetweenOptional `json:"x"`
Y LimitBetweenOptional `json:"y"`
Z LimitBetweenOptional `json:"z"`
}
type LBSClientData ¶
type LBSClientDataMask ¶
type LBSClientDataMask struct {
TimestampMask
CPE []UUID `json:"cpe"`
Radio []string `json:"radio"`
ClientMac []string `json:"client_mac"`
RSSI []int `json:"rssi"`
}
type LBSClientSignal ¶
type LBSConfig ¶
type LBSConfig struct {
Enabled bool `json:"enabled"`
ReportPeriod int `json:"reportperiod"`
ClientTimeout int `json:"clienttimeout"`
MaxQuiet int `json:"maxquiet"`
MaxCacheQueue int `json:"maxcachequeue"`
EmptyWatcher bool `json:"emptywatcher"`
WhiteList []string `json:"whitelist"`
BlackList []string `json:"blacklist"`
FilterMode MacFilterType `json:"filtermode"`
}
type LBSZone ¶
type LBSZone struct {
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
//Identity поля для определения зоны
Identity string `json:"identity" bson:"identity"`
Group UUID `json:"group"`
Corners []CornerCoords `json:"corners" bson:"corners"`
}
LBSZone зоны на картах как Cisco CMX
type LimitBetween ¶
type LimitBetweenOptional ¶
type LinkDescriptor ¶
type MACPrefixVendor ¶
type MACPrefixVendor struct {
Prefix string `bson:"_id" json:"prefix"`
Vendor string `bson:"vendor" json:"vendor"`
}
MACPrefixVendor тип данных mac префикс и производитель оборудования
type MCSRequire ¶
type MCSRequire string
const MCSRequireHT MCSRequire = "ht"
const MCSRequireOff MCSRequire = "off"
const MCSRequireVHT MCSRequire = "vht"
func (*MCSRequire) GetBSON ¶
func (en *MCSRequire) GetBSON() (interface{}, error)
func (MCSRequire) GetPtr ¶
func (en MCSRequire) GetPtr() *MCSRequire
func (*MCSRequire) MarshalJSON ¶
func (en *MCSRequire) MarshalJSON() ([]byte, error)
func (MCSRequire) String ¶
func (en MCSRequire) String() string
func (*MCSRequire) UnmarshalJSON ¶
func (en *MCSRequire) UnmarshalJSON(b []byte) error
type MQTTDocumentMessage ¶
func (MQTTDocumentMessage) Payload ¶
func (mq MQTTDocumentMessage) Payload() ([]byte, error)
func (MQTTDocumentMessage) Retained ¶
func (mq MQTTDocumentMessage) Retained() bool
func (MQTTDocumentMessage) Topic ¶
func (mq MQTTDocumentMessage) Topic() Topic
type MQTTMessage ¶
func DefaultLoggedEvent ¶
func DefaultLoggedEvent(msg LogMsg) MQTTMessage
type MQTTRawMessage ¶
func (MQTTRawMessage) Payload ¶
func (mq MQTTRawMessage) Payload() ([]byte, error)
func (MQTTRawMessage) Retained ¶
func (mq MQTTRawMessage) Retained() bool
func (MQTTRawMessage) Topic ¶
func (mq MQTTRawMessage) Topic() Topic
type MacFilterType ¶
type MacFilterType string
const MacFilterTypeBlackList MacFilterType = "BlackList"
const MacFilterTypeNone MacFilterType = "None"
const MacFilterTypeWhiteList MacFilterType = "WhiteList"
func (*MacFilterType) GetBSON ¶
func (en *MacFilterType) GetBSON() (interface{}, error)
func (MacFilterType) GetPtr ¶
func (en MacFilterType) GetPtr() *MacFilterType
func (*MacFilterType) MarshalJSON ¶
func (en *MacFilterType) MarshalJSON() ([]byte, error)
func (MacFilterType) String ¶
func (en MacFilterType) String() string
func (*MacFilterType) UnmarshalJSON ¶
func (en *MacFilterType) UnmarshalJSON(b []byte) error
type ManufMap ¶
type ManufMap struct {
// contains filtered or unexported fields
}
ManufMap struct for store MAC prefix-vendor pairs
var MACPrefixVendorMap ManufMap
MACPrefixVendorMap is singleton map that contains MAC prefix-vendor pairs
func (*ManufMap) GenerateMap ¶
func (e *ManufMap) GenerateMap(data []MACPrefixVendor)
GenerateMap принмает массив, переводит его в мапу
type ModelError ¶
type ModelError struct {
Module Module `json:"module"`
ModuleId UUID `json:"module_id"`
Object string `json:"object,omitempty"`
ObjectId UUID `json:"object_id,omitempty"`
Type ErrorCode `json:"type"`
Description string `json:"description"`
Recommendation string `json:"recommendation"`
Data interface{} `json:"data,omitempty"`
}
type Module ¶
type Module string
const ModuleAC Module = "AC"
const ModuleAnalMW Module = "ANAL-MW"
const ModuleAny Module = "+"
const ModuleBackend Module = "BACKEND"
const ModuleCLI Module = "CLI"
const ModuleCPE Module = "CPE"
const ModuleCPEStat Module = "CPE_STAT"
const ModuleClientDistance Module = "CLIENT-DISTANCE"
const ModuleClientStat Module = "CLIENT_STAT"
const ModuleConfig Module = "CONFIG"
const ModuleDB Module = "DB"
const ModuleDummy Module = "DUMMY"
const ModuleFW Module = "FW"
const ModuleLBS Module = "LBS"
const ModuleMQTTLog Module = "MQTT_LOG"
const ModuleMediator Module = "MEDIATOR"
const ModuleMonitor Module = "MONITOR"
const ModuleNone Module = ""
const ModulePortalBack Module = "PORTAL_BACKEND"
const ModuleRRM Module = "RRM"
const ModuleRadarExportMW Module = "RADAR-EXPORT-MW"
const ModuleRadarMW Module = "RADAR-MW"
const ModuleRadiusGw Module = "RADIUS_GATEWAY"
const ModuleRedirect Module = "REDIRECT"
const ModuleResampling Module = "RESAMPLING"
const ModuleSnmpWalker Module = "SNMP_WALKER"
const ModuleStat Module = "STAT"
const ModuleStatLBS Module = "STAT-LBS"
const ModuleTunManager Module = "TUN_MANAGER"
func (*Module) MarshalJSON ¶
func (*Module) UnmarshalJSON ¶
type ModuleStatus ¶
type ModuleStatus struct {
Service Module `json:"service"`
Id string `json:"id"`
Version string `json:"version"`
Commit string `json:"commit"`
Build int `json:"build"`
State ServiceState `json:"state"`
Meta interface{} `json:"meta,omitempty"`
Statics map[string]Version `json:"statics,omitempty"`
}
func (ModuleStatus) Connected ¶
func (ms ModuleStatus) Connected() ModuleStatus
func (ModuleStatus) Disconnected ¶
func (ms ModuleStatus) Disconnected() ModuleStatus
func (ModuleStatus) String ¶
func (ms ModuleStatus) String() string
func (*ModuleStatus) UnmarshalJSON ¶
func (ms *ModuleStatus) UnmarshalJSON(b []byte) error
type NAIAuthMethod ¶
type NAIRealmParams ¶
type NAIRealmParams struct {
Name string `json:"name"`
Methods []NAIAuthMethod `json:"methods"`
}
type NetManual ¶
type NetManual map[string]UciNetIface
type NetworkState ¶
type NetworkStateCompact ¶
type NotifyType ¶
type NotifyType string
const NotifyTypeEmail NotifyType = "email"
const NotifyTypeEmpty NotifyType = ""
const NotifyTypeMqtt NotifyType = "mqtt"
const NotifyTypeTelegram NotifyType = "telegram"
func (*NotifyType) GetBSON ¶
func (en *NotifyType) GetBSON() (interface{}, error)
func (NotifyType) GetPtr ¶
func (en NotifyType) GetPtr() *NotifyType
func (*NotifyType) MarshalJSON ¶
func (en *NotifyType) MarshalJSON() ([]byte, error)
func (NotifyType) String ¶
func (en NotifyType) String() string
func (*NotifyType) UnmarshalJSON ¶
func (en *NotifyType) UnmarshalJSON(b []byte) error
type Operation ¶
type Operation string
const OperationAny Operation = "+"
const OperationCPEStatus Operation = "STATUS"
const OperationCreate Operation = "C"
const OperationDelete Operation = "D"
const OperationJSONRPC Operation = "JSONRPC"
const OperationLuaScript Operation = "LUA"
const OperationRead Operation = "R"
const OperationSHScript Operation = "SH"
const OperationUpdate Operation = "U"
func (*Operation) MarshalJSON ¶
func (*Operation) UnmarshalJSON ¶
type OtherClientData ¶
type OtherClientData struct {
Description string `json:"description"`
}
type PortalAuthType ¶
type PortalAuthType string
const PortalAuthTypeExternal PortalAuthType = "external"
const PortalAuthTypeNone PortalAuthType = ""
const PortalAuthTypeOAuth2 PortalAuthType = "oauth2"
const PortalAuthTypeRADIUS PortalAuthType = "radius"
const PortalAuthTypeSMS PortalAuthType = "sms"
func (*PortalAuthType) GetBSON ¶
func (en *PortalAuthType) GetBSON() (interface{}, error)
func (PortalAuthType) GetPtr ¶
func (en PortalAuthType) GetPtr() *PortalAuthType
func (*PortalAuthType) MarshalJSON ¶
func (en *PortalAuthType) MarshalJSON() ([]byte, error)
func (PortalAuthType) String ¶
func (en PortalAuthType) String() string
func (*PortalAuthType) UnmarshalJSON ¶
func (en *PortalAuthType) UnmarshalJSON(b []byte) error
type PortalProfileType ¶
type PortalProfileType string
const PortalProfileTypeFree PortalProfileType = "free"
const PortalProfileTypePremium PortalProfileType = "premium"
const PortalProfileTypeSponsor PortalProfileType = "sponsor"
func (*PortalProfileType) GetBSON ¶
func (en *PortalProfileType) GetBSON() (interface{}, error)
func (PortalProfileType) GetPtr ¶
func (en PortalProfileType) GetPtr() *PortalProfileType
func (*PortalProfileType) MarshalJSON ¶
func (en *PortalProfileType) MarshalJSON() ([]byte, error)
func (PortalProfileType) String ¶
func (en PortalProfileType) String() string
func (*PortalProfileType) UnmarshalJSON ¶
func (en *PortalProfileType) UnmarshalJSON(b []byte) error
type PowerConfig ¶
type RPCServer ¶
type RPCServer struct {
// for some reason does not work as below
// RPCs map[TunManagerRPC]Procedure
RPCs map[string]JSONRPCProcedure
}
func (*RPCServer) ExecuteRPC ¶
func (server *RPCServer) ExecuteRPC(req JSONRPCClientRequest) *JSONRPCClientResponse
type RRMAlgoObject ¶
type RRMAlgoObject struct {
Type RRMAlgoType "json:\"type\""
Data interface{} "json:\"data\""
}
func (*RRMAlgoObject) UnmarshalJSON ¶
func (en *RRMAlgoObject) UnmarshalJSON(b []byte) error
type RRMAlgoType ¶
type RRMAlgoType string
const RRMAlgoTypeBlind RRMAlgoType = "Blind"
const RRMAlgoTypeDummy RRMAlgoType = "Dummy"
const RRMAlgoTypeGreed RRMAlgoType = "Greed"
func (*RRMAlgoType) GetBSON ¶
func (en *RRMAlgoType) GetBSON() (interface{}, error)
func (RRMAlgoType) GetPtr ¶
func (en RRMAlgoType) GetPtr() *RRMAlgoType
func (*RRMAlgoType) MarshalJSON ¶
func (en *RRMAlgoType) MarshalJSON() ([]byte, error)
func (RRMAlgoType) String ¶
func (en RRMAlgoType) String() string
func (*RRMAlgoType) UnmarshalJSON ¶
func (en *RRMAlgoType) UnmarshalJSON(b []byte) error
type RRMChannel ¶
type RRMChannel struct {
Channel int `json:"channel"`
Mode int `json:"mode"` // 0-legacy, 1-HT, 2-VHT
Width int `json:"width"` // 20, 40, 80, 160 (no 80+80 support yet)
Offset int `json:"offset"` // -1, 0, 1 - for HT only
Central int `json:"center"`
}
func AvailableChannels ¶
func AvailableChannels(state WiFiState, cfg WiFiConfig, caps WifiCapabilities) []RRMChannel
func RRMChannelFromScan ¶
func RRMChannelFromScan(scan BackScanModelRaw) RRMChannel
func RRMChannelFromState ¶
func RRMChannelFromState(state WiFiState) RRMChannel
type RRMCpeStatus ¶
type RRMCpeStatus struct {
CpeID UUID `json:"cpe_id"`
Radio string `json:"radio"`
Channel RRMChannel `json:"channel"`
Power int `json:"power"`
Error bool `json:"error"`
}
type RRMGreedParams ¶
type RRMGreedParams struct {
RRMTimerParams `bson:",inline"`
ManagePower bool `json:"manage_power" bson:"manage_power"`
}
type RRMGroup ¶
type RRMGroup struct {
Name string `json:"name" bson:"name"`
CPEs []UUID `json:"cpes" bson:"cpes"`
Algo RRMAlgoObject `json:"algo" bson:"algo"`
Force bool `json:"force" bson:"force"`
}
type RRMOperation ¶
type RRMOperation uint8
RRMOperation -тип rrm операции
const ( CreateRRMOperation RRMOperation = iota UpdateRRMOperation DeleteRRMOperation )
func RRMOperationString ¶
func RRMOperationString(s string) (RRMOperation, error)
RRMOperationString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func RRMOperationValues ¶
func RRMOperationValues() []RRMOperation
RRMOperationValues returns all values of the enum
func (RRMOperation) IsARRMOperation ¶
func (i RRMOperation) IsARRMOperation() bool
IsARRMOperation returns "true" if the value is listed in the enum definition. "false" otherwise
func (RRMOperation) MarshalJSON ¶
func (i RRMOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for RRMOperation
func (*RRMOperation) Scan ¶
func (i *RRMOperation) Scan(value interface{}) error
func (RRMOperation) String ¶
func (i RRMOperation) String() string
func (*RRMOperation) UnmarshalJSON ¶
func (i *RRMOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for RRMOperation
type RRMParamUpdateGroup ¶
type RRMParamUpdateGroup struct {
Id UUID `json:"id"`
Group RRMGroup `json:"group"`
Operation RRMOperation `json:"operation"`
}
type RRMStatusData ¶
type RRMStatusData struct {
Cpes []RRMCpeStatus `json:"cpes"`
}
type RRMTimerParams ¶
type RRMTimerParams struct {
Timeout int `json:"timeout"`
}
type RadarClientBaseObject ¶
type RadarClientBaseObject struct {
Id string `json:"id,omitempty" bson:"_id"`
Date time.Time `json:"date" bson:"date"`
Ts int64 `json:"ts" bson:"ts"`
MAC string `json:"mac" bson:"mac"`
CPE string `json:"cpe" bson:"cpe"`
Freq int `json:"freq" bson:"freq"`
RSSI int `json:"rssi" bson:"rssi"`
New bool `json:"new" bson:"new"`
}
base object for
type RadarClientFirst ¶
type RadarClientIncome ¶
type RadarClientVisit ¶
type RadarClientVisit struct {
Id string `json:"id,omitempty" bson:"_id"`
MAC string `json:"mac" bson:"mac"`
DateStart time.Time `json:"start" bson:"start"`
DateStop time.Time `json:"stop" bson:"stop"`
Duration int64 `json:"duration" bson:"duration"`
CPE string `json:"cpe,omitempty" bson:"cpe"`
New bool `json:"new" bson:"new"`
RSSI int `json:"rssi" bson:"rssi"`
}
type RadarClientVisitGroup ¶
type RadarClientVisitor ¶
type RadarClientVisitor struct {
Id string `json:"id,omitempty" bson:"_id"`
MAC string `json:"mac" bson:"mac"`
DateFirst time.Time `json:"visit_first" bson:"visit_first"`
Duration int64 `json:"duration" bson:"duration"`
DurationAvg int64 `json:"duration_avg" bson:"duration_avg"`
VisitsCount int `json:"visits_count" bson:"visits_count"`
Visits []RadarClientVisit `json:"visits" bson:"visits"`
New bool `json:"new" bson:"new"`
}
type RadarExportCreds ¶
type RadarExportFilter ¶
type RadarExportFilter string
const RadarExportFilterAll RadarExportFilter = "all"
const RadarExportFilterNew RadarExportFilter = "new"
const RadarExportFilterReturn RadarExportFilter = "return"
func (*RadarExportFilter) GetBSON ¶
func (en *RadarExportFilter) GetBSON() (interface{}, error)
func (RadarExportFilter) GetPtr ¶
func (en RadarExportFilter) GetPtr() *RadarExportFilter
func (*RadarExportFilter) MarshalJSON ¶
func (en *RadarExportFilter) MarshalJSON() ([]byte, error)
func (RadarExportFilter) String ¶
func (en RadarExportFilter) String() string
func (*RadarExportFilter) UnmarshalJSON ¶
func (en *RadarExportFilter) UnmarshalJSON(b []byte) error
type RadarExportFormat ¶
type RadarExportFormat string
const RadarExportFormatCSV RadarExportFormat = "csv"
const RadarExportFormatJson RadarExportFormat = "json"
const RadarExportFormatTxt RadarExportFormat = "txt"
func (*RadarExportFormat) GetBSON ¶
func (en *RadarExportFormat) GetBSON() (interface{}, error)
func (RadarExportFormat) GetPtr ¶
func (en RadarExportFormat) GetPtr() *RadarExportFormat
func (*RadarExportFormat) MarshalJSON ¶
func (en *RadarExportFormat) MarshalJSON() ([]byte, error)
func (RadarExportFormat) String ¶
func (en RadarExportFormat) String() string
func (*RadarExportFormat) UnmarshalJSON ¶
func (en *RadarExportFormat) UnmarshalJSON(b []byte) error
type RadarExportMacs ¶
type RadarExportMacs string
const RadarExportMacsAll RadarExportMacs = "all"
const RadarExportMacsFake RadarExportMacs = "fake"
const RadarExportMacsReal RadarExportMacs = "real"
func (*RadarExportMacs) GetBSON ¶
func (en *RadarExportMacs) GetBSON() (interface{}, error)
func (RadarExportMacs) GetPtr ¶
func (en RadarExportMacs) GetPtr() *RadarExportMacs
func (*RadarExportMacs) MarshalJSON ¶
func (en *RadarExportMacs) MarshalJSON() ([]byte, error)
func (RadarExportMacs) String ¶
func (en RadarExportMacs) String() string
func (*RadarExportMacs) UnmarshalJSON ¶
func (en *RadarExportMacs) UnmarshalJSON(b []byte) error
type RadarExportObject ¶
type RadarExportObject struct {
Id string `json:"id" bson:"_id"`
// common settings
Name string `json:"name" bson:"name"`
Desc string `json:"desc" bson:"desc"`
// config part
CPEs []string `json:"cpes" bson:"cpes"`
Type RadarExportType `json:"type" bson:"type"`
Creds RadarExportCreds `json:"creds" bson:"creds"`
Format RadarExportFormat `json:"format" bson:"format"`
Period RadarExportPeriod `json:"period" bson:"period"`
Filter RadarExportFilter `json:"filter" bson:"filter"`
MacFilter RadarExportMacs `json:"mac_filter" bson:"mac_filter"`
Hash bool `json:"hash" bson:"hash"`
Auto bool `json:"auto" bson:"auto"` // auto export
AutoPeriod int `json:"auto_period" bson:"auto_period"` // auto period in hours. 24 for 1-day update
// state part
CreateAt int64 `json:"create_at" bson:"create_at"`
LastAt int64 `json:"last_at" bson:"last_at"`
Status RadarExportStatus `json:"status" bson:"status"`
State RadarExportState `json:"state" bson:"state"`
// CTN for BeePro -- just for storing in DB
CTN string `json:"ctn" bson:"ctn"`
}
type RadarExportObjectUpdate ¶
type RadarExportPeriod ¶
type RadarExportResult ¶
type RadarExportState ¶
type RadarExportState struct {
Id int `json:"id" bson:"id"`
Type string `json:"type" bson:"type"`
Status string `json:"status" bson:"status"`
ItemQuantity int `json:"item_quantity" bson:"item_quantity"`
ValidUniqueQuantity int `json:"valid_unique_quantity" bson:"valid_unique_quantity"`
MatchedQuantity int `json:"matched_quantity" bson:"matched_quantity"`
CookiesMatchedQuantity int `json:"cookies_matched_quantity" bson:"cookies_matched_quantity"`
}
type RadarExportStatus ¶
type RadarExportStatus string
const RadarExportStatusCreated RadarExportStatus = "created"
const RadarExportStatusFinished RadarExportStatus = "finished"
const RadarExportStatusRunning RadarExportStatus = "running"
const RadarExportStatusUpdated RadarExportStatus = "updated"
func (*RadarExportStatus) GetBSON ¶
func (en *RadarExportStatus) GetBSON() (interface{}, error)
func (RadarExportStatus) GetPtr ¶
func (en RadarExportStatus) GetPtr() *RadarExportStatus
func (*RadarExportStatus) MarshalJSON ¶
func (en *RadarExportStatus) MarshalJSON() ([]byte, error)
func (RadarExportStatus) String ¶
func (en RadarExportStatus) String() string
func (*RadarExportStatus) UnmarshalJSON ¶
func (en *RadarExportStatus) UnmarshalJSON(b []byte) error
type RadarExportType ¶
type RadarExportType string
const RadarExportTypeBeePro RadarExportType = "beepro"
const RadarExportTypeEmail RadarExportType = "email"
const RadarExportTypeExternal RadarExportType = "external"
const RadarExportTypeMytarget RadarExportType = "mytarget"
const RadarExportTypeYandex RadarExportType = "yandex"
func (*RadarExportType) GetBSON ¶
func (en *RadarExportType) GetBSON() (interface{}, error)
func (RadarExportType) GetPtr ¶
func (en RadarExportType) GetPtr() *RadarExportType
func (*RadarExportType) MarshalJSON ¶
func (en *RadarExportType) MarshalJSON() ([]byte, error)
func (RadarExportType) String ¶
func (en RadarExportType) String() string
func (*RadarExportType) UnmarshalJSON ¶
func (en *RadarExportType) UnmarshalJSON(b []byte) error
type RadarExportUpdate ¶
type Radius ¶
type Radius struct {
Name string `json:"name"`
Hostname string `json:"hostname"`
Auth_port string `json:"auth_port"`
Acc_port string `json:"acc_port"`
Secret string `json:"secret"`
Is_local bool `json:"is_local"`
IsPortal bool `json:"is_portal"`
DaeClient string `json:"dae_client"`
DaeSecret string `json:"dae_secret"`
DaePort string `json:"dae_port"`
}
type RadiusAccessAccept ¶
type RadiusAccessAccept struct {
}
type RadiusAccessReject ¶
type RadiusAccessReject struct {
}
type RadiusAccessRequest ¶
type RadiusAccessRequest struct {
Timestamp int64 `json:"Timestamp"`
EventTimestamp string `json:"Event-Timestamp"`
UserName string `json:"User-Name"`
Password string `json:"User-Password"`
CallingStationId string `json:"Calling-Station-Id"`
CalledStationId string `json:"Called-Station-Id"`
FramedIPAddress string `json:"Framed-IP-Address"`
NasPortType string `json:"NAS-Port-Type"`
NasPort string `json:"NAS-Port"`
NasPortId string `json:"NAS-Port-Id"`
NasIdentifier string `json:"NAS-Identifier"`
NasIPAddress string `json:"NAS-IP-Address"`
}
type RadiusAccountingRequest ¶
type RadiusAccountingRequest struct {
Timestamp int64 `json:"Timestamp"`
EventTimestamp string `json:"Event-Timestamp"`
UserName string `json:"User-Name"`
CallingStationId string `json:"Calling-Station-Id"`
CalledStationId string `json:"Called-Station-Id"`
FramedIPAddress string `json:"Framed-IP-Address"`
NasPortType string `json:"NAS-Port-Type"`
NasPort string `json:"NAS-Port"`
NasPortId string `json:"NAS-Port-Id"`
NasIdentifier string `json:"NAS-Identifier"`
NasIPAddress string `json:"NAS-IP-Address"`
AcctStatusType string `json:"Acct-Status-Type"`
AcctDelayTime int `json:"Acct-Delay-Time"`
AcctSessionTime int `json:"Acct-Session-Time"`
AcctSessionId string `json:"Acct-Session-Id"`
AcctTerminateCause string `json:"Acct-Terminate-Cause,omitempty"`
AcctInputGigawords int `json:"Acct-Input-Gigawords"`
AcctOutputGigawords int `json:"Acct-Output-Gigawords"`
AcctInputOctets int `json:"Acct-Input-Octets"`
AcctOutputOctets int `json:"Acct-Output-Octets"`
AcctInputPackets int `json:"Acct-Input-Packets"`
AcctOutputPackets int `json:"Acct-Output-Packets"`
}
type RadiusAccountingSendData ¶
type RadiusAccountingSendData struct {
RadiusList []Radius `json:"radius_list"`
Mirroring bool `json:"mirroring"`
Message RadiusMessageObject `json:"message"`
}
type RadiusMessageObject ¶
type RadiusMessageObject struct {
Type RadiusMessageType "json:\"type\""
Data interface{} "json:\"data\""
}
func (*RadiusMessageObject) UnmarshalJSON ¶
func (en *RadiusMessageObject) UnmarshalJSON(b []byte) error
type RadiusMessageType ¶
type RadiusMessageType string
const RadiusMessageTypeAccessAccept RadiusMessageType = "access-accept"
const RadiusMessageTypeAccessReject RadiusMessageType = "access-reject"
const RadiusMessageTypeAccessRequest RadiusMessageType = "access-request"
const RadiusMessageTypeAccountingRequest RadiusMessageType = "accounting"
func (*RadiusMessageType) GetBSON ¶
func (en *RadiusMessageType) GetBSON() (interface{}, error)
func (RadiusMessageType) GetPtr ¶
func (en RadiusMessageType) GetPtr() *RadiusMessageType
func (*RadiusMessageType) MarshalJSON ¶
func (en *RadiusMessageType) MarshalJSON() ([]byte, error)
func (RadiusMessageType) String ¶
func (en RadiusMessageType) String() string
func (*RadiusMessageType) UnmarshalJSON ¶
func (en *RadiusMessageType) UnmarshalJSON(b []byte) error
type RedirectClientSession ¶
type RedirectClientSession struct {
ID string `json:"id" bson:"_id"`
Session string `json:"session_id" bson:"session_id"`
MAC string `json:"mac" bson:"mac"`
WLAN string `json:"wlan_id" bson:"wlan_id"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Redirect string `json:"redirect_id" bson:"redirect_id"`
Radio string `json:"radio_id" bson:"radio_id"`
UserAgent string `json:"useragent" bson:"useragent"`
IP string `json:"ip" bson:"ip"`
CPEIP string `json:"cpe_ip" bson:"cpe_ip"`
AcctStart int64 `json:"acct_start" bson:"acct_start"`
AuthStart int64 `json:"auth_start" bson:"auth_start"`
AuthStop int64 `json:"auth_stop" bson:"auth_stop"`
Timeout int64 `json:"timeout" bson:"timeout"`
// data from acct start
UserName string `json:"User-Name"`
CallingStationId string `json:"Calling-Station-Id"`
CalledStationId string `json:"Called-Station-Id"`
NasIdentifier string `json:"NAS-Identifier"`
NasIPAddress string `json:"NAS-IP-Address"`
FramedIPAddress string `json:"Framed-IP-Address"`
UserQosGroup string `json:"Qos-Group"`
// data for interim update and acct stop
AcctSessionTime int `json:"Acct-Session-Time"`
AcctInputGigawords int `json:"Acct-Input-Gigawords"`
AcctOutputGigawords int `json:"Acct-Output-Gigawords"`
AcctInputOctets int `json:"Acct-Input-Octets"`
AcctOutputOctets int `json:"Acct-Output-Octets"`
AcctInputPackets int `json:"Acct-Input-Packets"`
AcctOutputPackets int `json:"Acct-Output-Packets"`
Transferable bool `json:"transferable"`
}
RedirectClientSession struct for store redirect session on platform
func (*RedirectClientSession) String ¶
func (session *RedirectClientSession) String() string
type RedirectClientSessionAcct ¶
type RedirectClientSessionAcct struct {
AcctSessionTime int `json:"Acct-Session-Time"`
AcctInputGigawords int `json:"Acct-Input-Gigawords"`
AcctOutputGigawords int `json:"Acct-Output-Gigawords"`
AcctInputOctets int `json:"Acct-Input-Octets"`
AcctOutputOctets int `json:"Acct-Output-Octets"`
AcctInputPackets int `json:"Acct-Input-Packets"`
AcctOutputPackets int `json:"Acct-Output-Packets"`
}
struct for update acct of redirect session on platform
type ReportActionType ¶
type ReportActionType string
const ReportActionTypeEmail ReportActionType = "email"
const ReportActionTypeScript ReportActionType = "script"
func (*ReportActionType) GetBSON ¶
func (en *ReportActionType) GetBSON() (interface{}, error)
func (ReportActionType) GetPtr ¶
func (en ReportActionType) GetPtr() *ReportActionType
func (*ReportActionType) MarshalJSON ¶
func (en *ReportActionType) MarshalJSON() ([]byte, error)
func (ReportActionType) String ¶
func (en ReportActionType) String() string
func (*ReportActionType) UnmarshalJSON ¶
func (en *ReportActionType) UnmarshalJSON(b []byte) error
type ReportFormat ¶
type ReportFormat string
const ReportFormatCSV ReportFormat = "csv"
const ReportFormatJson ReportFormat = "json"
const ReportFormatTxt ReportFormat = "txt"
const ReportFormatXLSX ReportFormat = "xlsx"
func (*ReportFormat) GetBSON ¶
func (en *ReportFormat) GetBSON() (interface{}, error)
func (ReportFormat) GetPtr ¶
func (en ReportFormat) GetPtr() *ReportFormat
func (*ReportFormat) MarshalJSON ¶
func (en *ReportFormat) MarshalJSON() ([]byte, error)
func (ReportFormat) String ¶
func (en ReportFormat) String() string
func (*ReportFormat) UnmarshalJSON ¶
func (en *ReportFormat) UnmarshalJSON(b []byte) error
type ReportPeriod ¶
type ReportPeriod string
const ReportPeriodDay ReportPeriod = "day"
const ReportPeriodMonth ReportPeriod = "month"
const ReportPeriodNow ReportPeriod = "now"
const ReportPeriodWeek ReportPeriod = "week"
func (*ReportPeriod) GetBSON ¶
func (en *ReportPeriod) GetBSON() (interface{}, error)
func (ReportPeriod) GetPtr ¶
func (en ReportPeriod) GetPtr() *ReportPeriod
func (*ReportPeriod) MarshalJSON ¶
func (en *ReportPeriod) MarshalJSON() ([]byte, error)
func (ReportPeriod) String ¶
func (en ReportPeriod) String() string
func (*ReportPeriod) UnmarshalJSON ¶
func (en *ReportPeriod) UnmarshalJSON(b []byte) error
type ReportSubject ¶
type ReportSubject string
const ReportSubjectCPECommon ReportSubject = "cpes_common"
const ReportSubjectCPEs ReportSubject = "cpes"
const ReportSubjectClients ReportSubject = "clients"
const ReportSubjectEvents ReportSubject = "events"
func (*ReportSubject) GetBSON ¶
func (en *ReportSubject) GetBSON() (interface{}, error)
func (ReportSubject) GetPtr ¶
func (en ReportSubject) GetPtr() *ReportSubject
func (*ReportSubject) MarshalJSON ¶
func (en *ReportSubject) MarshalJSON() ([]byte, error)
func (ReportSubject) String ¶
func (en ReportSubject) String() string
func (*ReportSubject) UnmarshalJSON ¶
func (en *ReportSubject) UnmarshalJSON(b []byte) error
type ReportType ¶
type ReportType string
const ReportTypeClientsAll ReportType = "clients"
const ReportTypeClientsAuthorized ReportType = "clients_auth"
const ReportTypeCurrent ReportType = "current"
const ReportTypeSummary ReportType = "summary"
func (*ReportType) GetBSON ¶
func (en *ReportType) GetBSON() (interface{}, error)
func (ReportType) GetPtr ¶
func (en ReportType) GetPtr() *ReportType
func (*ReportType) MarshalJSON ¶
func (en *ReportType) MarshalJSON() ([]byte, error)
func (ReportType) String ¶
func (en ReportType) String() string
func (*ReportType) UnmarshalJSON ¶
func (en *ReportType) UnmarshalJSON(b []byte) error
type RequestTopic ¶
type RequestTopic struct {
SenderModule Module
SenderID string
ReceiverModule Module
ReceiverID string
RequestID string
Operation Operation
Tag string
}
func ParseRequestTopic ¶
func ParseRequestTopic(s string) (RequestTopic, error)
func (RequestTopic) ToResponse ¶
func (topic RequestTopic) ToResponse() ResponseTopic
func (RequestTopic) TopicPath ¶
func (topic RequestTopic) TopicPath() string
type ResponseTopic ¶
type ResponseTopic struct {
SenderModule Module
SenderID string
ReceiverModule Module
ReceiverID string
RequestID string
}
func ParseResponseTopic ¶
func ParseResponseTopic(s string) (ResponseTopic, error)
func (ResponseTopic) TopicPath ¶
func (topic ResponseTopic) TopicPath() string
type SLChain ¶
type SLChain struct {
Id string `json:"id"`
Policy FirewallPolicy `json:"policy,omitempty"`
Rules []L2Rule `json:"rules"`
}
type SLChainConfig ¶
type SLChainConfig struct {
Chains []SLChain `json:"chains"`
Objects []SLChainObject `json:"objects"`
}
type SLChainObject ¶
type SLChainObject struct {
Type string `json:"type"`
Object string `json:"object"`
Direction FirewallDirection `json:"direction"`
Target string `json:"target"`
}
type SLMessageContentsJSONRPC ¶
type SLMessageContentsJSONRPC struct {
General UciConfig `json:"config"`
Wlans map[string]UciWifiWlan `json:"wlans,omitempty"`
Nats map[string]SLNatConfig `json:"nats,omitempty"`
Chains SLChainConfig `json:"l2chains,omitempty"`
L3Filter []string `json:"l3filter,omitempty"`
ToDel map[string]interface{} `json:"-"`
Timeout time.Duration `json:"-"`
WireTCAdd []CPEWireTCConfig `json:"-"`
WireTCDel []CPEWireTCConfig `json:"-"`
}
type SLNatAttrs ¶
type SLNatConfig ¶
type SLNatConfig struct {
Attrs SLNatAttrs `json:"attrs"`
Access bool `json:"access"`
}
type ScanConfig ¶
type SecuritySuite ¶
type SecuritySuite string
const SecuritySuiteAES SecuritySuite = "aes"
const SecuritySuiteCCMP SecuritySuite = "ccmp"
const SecuritySuiteTKIP SecuritySuite = "tkip"
func (*SecuritySuite) GetBSON ¶
func (en *SecuritySuite) GetBSON() (interface{}, error)
func (SecuritySuite) GetPtr ¶
func (en SecuritySuite) GetPtr() *SecuritySuite
func (*SecuritySuite) MarshalJSON ¶
func (en *SecuritySuite) MarshalJSON() ([]byte, error)
func (SecuritySuite) String ¶
func (en SecuritySuite) String() string
func (*SecuritySuite) UnmarshalJSON ¶
func (en *SecuritySuite) UnmarshalJSON(b []byte) error
type SecurityType ¶
type SecurityType string
const SecurityTypeNone SecurityType = "open"
const SecurityTypeWPA23Enterprise SecurityType = "wpa23enterprise"
const SecurityTypeWPA23Personal SecurityType = "wpa23personal"
const SecurityTypeWPA2Enterprise SecurityType = "wpa2enterprise"
const SecurityTypeWPA2Personal SecurityType = "wpa2personal"
const SecurityTypeWPA3Enterprise SecurityType = "wpa3enterprise"
const SecurityTypeWPA3Personal SecurityType = "wpa3personal"
const SecurityTypeWPAEnterprise SecurityType = "wpaenterprise"
const SecurityTypeWPAPersonal SecurityType = "wpapersonal"
func (*SecurityType) GetBSON ¶
func (en *SecurityType) GetBSON() (interface{}, error)
func (SecurityType) GetPtr ¶
func (en SecurityType) GetPtr() *SecurityType
func (*SecurityType) MarshalJSON ¶
func (en *SecurityType) MarshalJSON() ([]byte, error)
func (SecurityType) String ¶
func (en SecurityType) String() string
func (*SecurityType) UnmarshalJSON ¶
func (en *SecurityType) UnmarshalJSON(b []byte) error
type ServiceConnectedData ¶
type ServiceConnectedData Version
type ServiceFatalErrorData ¶
type ServiceState ¶
type ServiceState string
const ServiceStateConnected ServiceState = "CONNECTED"
const ServiceStateDisconnected ServiceState = "DISCONNECTED"
const ServiceStatePending ServiceState = "PENDING"
func (*ServiceState) GetBSON ¶
func (en *ServiceState) GetBSON() (interface{}, error)
func (ServiceState) GetPtr ¶
func (en ServiceState) GetPtr() *ServiceState
func (*ServiceState) MarshalJSON ¶
func (en *ServiceState) MarshalJSON() ([]byte, error)
func (ServiceState) String ¶
func (en ServiceState) String() string
func (*ServiceState) UnmarshalJSON ¶
func (en *ServiceState) UnmarshalJSON(b []byte) error
type SimpleMask ¶
type SimpleMask struct {
UUID []UUID `json:"uuid"`
}
type SpeedConfig ¶
type SpeedConfig struct {
Value int `json:"value" bson:"value"`
Type SpeedType `json:"type" bson:"type"`
}
func (*SpeedConfig) String ¶
func (sc *SpeedConfig) String() string
type SpeedType ¶
type SpeedType string
const SpeedTypeGbit SpeedType = "gbit"
const SpeedTypeKbit SpeedType = "kbit"
const SpeedTypeMbit SpeedType = "mbit"
const SpeedTypeTbit SpeedType = "tbit"
func (*SpeedType) MarshalJSON ¶
func (*SpeedType) UnmarshalJSON ¶
type Stat ¶
type Stat struct {
CPE UUID `json:"cpe_id"`
Timestamp int64 `json:"timestamp"`
CPU float64 `json:"cpu"`
RAM struct {
Total float64 `json:"total"`
Buffered float64 `json:"buffered"`
Shared float64 `json:"shared"`
Free float64 `json:"free"`
} `json:"memory"`
Uptime int64 `json:"uptime"`
Storage float64 `json:"storage"`
ProcActive uint64 `json:"processes_active"`
ProcSleeping uint64 `json:"processes_sleeping"`
Interfaces map[string]struct {
Type string `json:"type"`
Uptime int64 `json:"uptime"`
Tx float64 `json:"tx"`
Rx float64 `json:"rx"`
TxSpeed float64 `json:"tx_speed"`
RxSpeed float64 `json:"rx_speed"`
TxDelta float64 `json:"tx_delta"`
RxDelta float64 `json:"rx_delta"`
} `json:"interfaces"`
Eth0State struct {
Carrier int16 `json:"carrier"`
CarrierChange int16 `json:"carrier_changes"`
Speed int16 `json:"speed"`
OperState string `json:"operstate"`
Duplex string `json:"duplex"`
} `json:"eth0_state"`
}
type StatEventRule ¶
type StatEventRule struct {
StatEventRuleObject
Name string `json:"name"`
PostScript string `json:"post_script"`
NotifyType NotifyType `json:"notify_type"`
NotifySettings interface{} `json:"notify_settings"`
}
func (*StatEventRule) GetBSON ¶
func (eventRule *StatEventRule) GetBSON() (interface{}, error)
func (*StatEventRule) MarshalJSON ¶
func (eventRule *StatEventRule) MarshalJSON() ([]byte, error)
func (*StatEventRule) UnmarshalJSON ¶
func (eventRule *StatEventRule) UnmarshalJSON(b []byte) error
type StatEventRuleObject ¶
type StatEventRuleObject struct {
Type StatEventRuleType "json:\"type\""
Data interface{} "json:\"data\""
}
func (*StatEventRuleObject) UnmarshalJSON ¶
func (en *StatEventRuleObject) UnmarshalJSON(b []byte) error
type StatEventRuleType ¶
type StatEventRuleType string
const StatEventRuleTypeCPUload StatEventRuleType = "cpu_load"
const StatEventRuleTypeClientCon StatEventRuleType = "client_con"
const StatEventRuleTypeClientDis StatEventRuleType = "client_dis"
const StatEventRuleTypeClientFar StatEventRuleType = "client_far"
const StatEventRuleTypeConfigError StatEventRuleType = "config_error"
const StatEventRuleTypeConnected StatEventRuleType = "connected"
const StatEventRuleTypeCustomerActivity StatEventRuleType = "customer_activity"
const StatEventRuleTypeDisconnected StatEventRuleType = "disconnected"
const StatEventRuleTypeFreeRAM StatEventRuleType = "free_ram"
const StatEventRuleTypeIfaceError StatEventRuleType = "iface_error"
func (*StatEventRuleType) GetBSON ¶
func (en *StatEventRuleType) GetBSON() (interface{}, error)
func (StatEventRuleType) GetPtr ¶
func (en StatEventRuleType) GetPtr() *StatEventRuleType
func (*StatEventRuleType) MarshalJSON ¶
func (en *StatEventRuleType) MarshalJSON() ([]byte, error)
func (StatEventRuleType) String ¶
func (en StatEventRuleType) String() string
func (*StatEventRuleType) UnmarshalJSON ¶
func (en *StatEventRuleType) UnmarshalJSON(b []byte) error
type StatReport ¶
type StatReport struct {
ID string `json:"id" bson:"_id"`
// basic fields
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
// location dat
Location string `json:"-" bson:"location"`
// subject of report (CPEs, Clients, Events, Custom)
Subject ReportSubject `json:"subject" bson:"subject"`
// report type (current, summary)
Type ReportType `json:"type" bson:"type"`
// collect period (now, day, week, month)
Period ReportPeriod `json:"collect_period" bson:"collect_period"`
// period timebounds if Period == now
TimeBounds timeBounds `json:"timebounds" bson:"timebounds"`
// report format
Format ReportFormat `json:"format" bson:"format"`
// time to do post action (CRON string)
ActionTime string `json:"action_time" bson:"action_time"`
// type of post action (email, script)
ActionType ReportActionType `json:"action_type" bson:"action_type"`
// post action address dests
ActionDest []string `json:"action_dest" bson:"action_dest"`
// add charts
Charts bool `json:"charts" bson:"charts"`
}
StatReport struct for represent auto reports
type StatReportResult ¶
type StatReportResult struct {
ID string `json:"id" bson:"_id"`
Report StatReport `json:"report_id" bson:"report_id"`
Data interface{} `json:"data" bson:"data"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
}
StatReportResult struct for store collected reports
type StationDumpData ¶
type StationDumpData struct {
Radio string `json:"radio" bson:"radio"`
AssocList map[string]AccountingRadio `json:"assoclist" bson:"assoclist"`
}
type StatisticsConfig ¶
type StatusTopic ¶
type StatusTopic BroadcastTopic
func ParseStatusTopic ¶
func ParseStatusTopic(s string) (StatusTopic, error)
func (StatusTopic) TopicPath ¶
func (topic StatusTopic) TopicPath() string
type SystemEvent ¶
type SystemEvent struct {
SystemEventObject
Timestamp int64 `json:"timestamp"`
Subject_id string `json:"subject_id"`
Level SystemEventLevel `json:"level"`
Description string `json:"description"`
}
func (*SystemEvent) GetBSON ¶
func (event *SystemEvent) GetBSON() (interface{}, error)
func (*SystemEvent) MarshalJSON ¶
func (event *SystemEvent) MarshalJSON() ([]byte, error)
func (*SystemEvent) UnmarshalJSON ¶
func (event *SystemEvent) UnmarshalJSON(b []byte) error
type SystemEventLevel ¶
type SystemEventLevel string
const SystemEventLevelDEBUG SystemEventLevel = "DEBUG"
const SystemEventLevelERROR SystemEventLevel = "ERROR"
const SystemEventLevelINFO SystemEventLevel = "INFO"
const SystemEventLevelWARNING SystemEventLevel = "WARNING"
func (*SystemEventLevel) GetBSON ¶
func (en *SystemEventLevel) GetBSON() (interface{}, error)
func (SystemEventLevel) GetPtr ¶
func (en SystemEventLevel) GetPtr() *SystemEventLevel
func (*SystemEventLevel) MarshalJSON ¶
func (en *SystemEventLevel) MarshalJSON() ([]byte, error)
func (SystemEventLevel) String ¶
func (en SystemEventLevel) String() string
func (*SystemEventLevel) UnmarshalJSON ¶
func (en *SystemEventLevel) UnmarshalJSON(b []byte) error
type SystemEventObject ¶
type SystemEventObject struct {
Type SystemEventType "json:\"type\""
Data interface{} "json:\"data\""
}
func (*SystemEventObject) UnmarshalJSON ¶
func (en *SystemEventObject) UnmarshalJSON(b []byte) error
type SystemEventType ¶
type SystemEventType string
const SystemEventTypeAny SystemEventType = "+"
const SystemEventTypeCPEConnected SystemEventType = "CPE_CONNECTED"
const SystemEventTypeCPEDisconnected SystemEventType = "CPE_DISCONNECTED"
const SystemEventTypeCPEInterfaceState SystemEventType = "CPE_INTERFACE_STATE"
const SystemEventTypeClientAuthorization SystemEventType = "CLIENT_AUTHORIZATION"
const SystemEventTypeClientConnected SystemEventType = "CLIENT_CONNECTED"
const SystemEventTypeClientDisconnected SystemEventType = "CLIENT_DISCONNECTED"
const SystemEventTypeCpeFirmwareAvailable SystemEventType = "CPE_FIRMWARE_AVAILABLE"
const SystemEventTypeDHCPAck SystemEventType = "DHCP_ACK"
const SystemEventTypeDaemonSettingsChanged SystemEventType = "DAEMON_SETTINGS_CHANGE"
const SystemEventTypeFirmwareUploaded SystemEventType = "FIRMWARE_UPLOADED"
const SystemEventTypeLocationCacheReload SystemEventType = "LOCATION_CACHE_RELOAD"
const SystemEventTypeLoggedError SystemEventType = "LOGGED_ERROR"
const SystemEventTypeMonitorRuleViolation SystemEventType = "MONITOR_RULE_VIOLATION"
const SystemEventTypeRRMGroupApplyAlgo SystemEventType = "RRM_GROUP_APPLY_ALGO"
const SystemEventTypeRRMStatus SystemEventType = "RRM_STATUS_DATA"
const SystemEventTypeRadarExportUpdate SystemEventType = "RADAR_EXPORT_UPDATE"
const SystemEventTypeRadiusAccountingSend SystemEventType = "RADIUS_ACCOUNTING_SEND"
const SystemEventTypeServiceConnected SystemEventType = "SERVICE_CONNECTED"
const SystemEventTypeServiceDisconnected SystemEventType = "SERVICE_DISCONNECTED"
const SystemEventTypeServiceFatalError SystemEventType = "SERVICE_FATAL_ERROR"
const SystemEventTypeSystemTimeChanged SystemEventType = "SYSTEM_TIME_CHANGE"
const SystemEventTypeUserAuthSuccess SystemEventType = "USER_AUTHORIZATION_SUCCESS"
const SystemEventTypeWLANCentrAccChanged SystemEventType = "WLAN_CENTR_ACC_CHANGE"
func (*SystemEventType) GetBSON ¶
func (en *SystemEventType) GetBSON() (interface{}, error)
func (SystemEventType) GetPtr ¶
func (en SystemEventType) GetPtr() *SystemEventType
func (*SystemEventType) MarshalJSON ¶
func (en *SystemEventType) MarshalJSON() ([]byte, error)
func (SystemEventType) String ¶
func (en SystemEventType) String() string
func (*SystemEventType) UnmarshalJSON ¶
func (en *SystemEventType) UnmarshalJSON(b []byte) error
type TimestampMask ¶
type TunManagerBroadcastMeta ¶
type TunManagerBroadcastMeta struct {
Hostname string `json:"hostname"`
HostUUID string `json:"host_uuid"`
HostInterfaces []LinkDescriptor `json:"active_out_interfaces"`
HostTunnels []CPETunnelDescription `json:"active_cpe_tunnels"`
}
type TunManagerRPC ¶
type TunManagerRPC string
const TunManagerRPCCreateL2TunnelSession TunManagerRPC = "CreateL2TunnelSession"
const TunManagerRPCDeleteL2TunnelSession TunManagerRPC = "DeleteL2TunnelSession"
func (*TunManagerRPC) GetBSON ¶
func (en *TunManagerRPC) GetBSON() (interface{}, error)
func (TunManagerRPC) GetPtr ¶
func (en TunManagerRPC) GetPtr() *TunManagerRPC
func (*TunManagerRPC) MarshalJSON ¶
func (en *TunManagerRPC) MarshalJSON() ([]byte, error)
func (TunManagerRPC) String ¶
func (en TunManagerRPC) String() string
func (*TunManagerRPC) UnmarshalJSON ¶
func (en *TunManagerRPC) UnmarshalJSON(b []byte) error
type TunnelConfig ¶
type TunnelConfig struct {
CPETunnelId int `json:"cpe_tunnel_id"`
CPESessionId int `json:"cpe_session_id"`
CPEInterfaceName string `json:"cpe_interface_name"`
HostTunnelId int `json:"host_tunnel_id"`
HostSessionId int `json:"host_session_id"`
HostInterfaceName string `json:"host_interface_name"`
HostL2InterfaceName string `json:"host_l2interface_name"`
}
type TunnelConfigs ¶
type TunnelConfigs map[string]TunnelConfig
type TunnelType ¶
type TunnelType string
const TunnelTypeEoGRE TunnelType = "gretap"
const TunnelTypeGRE TunnelType = "gre"
const TunnelTypeL2TP TunnelType = "l2tpv3"
func (*TunnelType) GetBSON ¶
func (en *TunnelType) GetBSON() (interface{}, error)
func (TunnelType) GetPtr ¶
func (en TunnelType) GetPtr() *TunnelType
func (*TunnelType) MarshalJSON ¶
func (en *TunnelType) MarshalJSON() ([]byte, error)
func (TunnelType) String ¶
func (en TunnelType) String() string
func (*TunnelType) UnmarshalJSON ¶
func (en *TunnelType) UnmarshalJSON(b []byte) error
type UciAgent ¶
type UciAgent innerUciAgent
func (UciAgent) MarshalJSON ¶
func (*UciAgent) UnmarshalJSON ¶
type UciAgentCfg ¶
type UciBrokerCfg ¶
type UciBrokerCfg struct {
Host string `json:"host"`
}
type UciConfig ¶
type UciConfig struct {
Agent UciAgent `json:"agent,omitempty"`
Wireless UciWireless `json:"wireless,omitempty"`
System UciSystem `json:"system,omitempty"`
Network UciNetwork `json:"network,omitempty"`
Wsnmpd interface{} `json:"wmsnmpd,omitempty"`
}
type UciDhcpcapCfg ¶
type UciDhcpcapCfg struct {
Enabled string `json:"enabled"`
MsgTypeFilter []string `json:"typefilter,omitempty"`
ReceiverModule string `json:"receiver"`
ReceiverId string `json:"receiver_id"`
ReqOperation string `json:"crud_op"`
ModelName string `json:"model_name"`
Type string `json:".type,omitempty"`
}
type UciDotSystem ¶
type UciEthernetAcct ¶
type UciEthernetStat ¶
type UciFirmwareCfg ¶
type UciLbsCfg ¶
type UciLbsCfg struct {
Enabled string `json:"enabled"`
ReportPeriod string `json:"report_timeout"`
ClearPeriod string `json:"clear_timeout"`
ClientTimeout string `json:"clear_delta"`
ReceiverModule string `json:"receiver"`
ReceiverId string `json:"receiver_id"`
ReqOperation string `json:"crud_op"`
ModelName string `json:"model_name"`
MacList []string `json:"maclist"`
MacFilter string `json:"macfilter"`
MaxQuiet string `json:"max_quiet"`
MaxCacheQueue string `json:"max_cache_queue"`
EmptyWatcher string `json:"empty_watcher"`
Type string `json:".type,omitempty"`
}
type UciNetIface ¶
type UciNetIface struct {
Id string `json:"id,omitempty"`
HostId string `json:"peerid,omitempty"`
Tunnel string `json:"tunnel,omitempty"`
Network string `json:"network,omitempty"`
Type string `json:"type,omitempty"`
Proto string `json:"proto,omitempty"`
IfName interface{} `json:"ifname,omitempty"`
IpV6 string `json:"ipv6,omitempty"`
UciType string `json:".type,omitempty"`
Redirect string `json:"agent_redirect_l2,omitempty"`
Zone string `json:"zone,omitempty"`
PeerAddr string `json:"peeraddr,omitempty"`
DontFragment string `json:"df,omitempty"`
}
type UciNetSwitchPort ¶
type UciNetSwitchVlan ¶
type UciNetTunnel ¶
type UciNetwork ¶
type UciNetwork innerUciNetwork
func (UciNetwork) MarshalJSON ¶
func (uci UciNetwork) MarshalJSON() (b []byte, e error)
func (*UciNetwork) UnmarshalJSON ¶
func (uci *UciNetwork) UnmarshalJSON(b []byte) error
type UciRedirectCfg ¶
type UciRedirectCfg struct {
Id UUID `json:"id"`
FormattedUrl string `json:"redirect_url_format"`
MacWhiteList []string `json:"whitelist"`
PreAuthList []string `json:"preauth"`
DnsResolve []string `json:"resolve"`
LanPortal string `json:"lan_portal"`
EnableHttps string `json:"enable_https"`
Type string `json:".type,omitempty"`
}
type UciScanningCfg ¶
type UciScanningCfg struct {
Enabled string `json:"enabled"`
ReportPeriod string `json:"report_timeout"`
ScanTimeout string `json:"scan_timeout"`
ScanNumber string `json:"scan_times"`
ReceiverModule string `json:"receiver,omitempty"`
ReceiverId string `json:"receiver_id,omitempty"`
ReqOperation string `json:"crud_op,omitempty"`
ModelName string `json:"model_name,omitempty"`
Tag string `json:"tag,omitempty"`
Type string `json:".type,omitempty"`
}
type UciStatCfg ¶
type UciStatCfg struct {
Enabled string `json:"enabled"`
ReportPeriod string `json:"timeout"`
ReceiverModule string `json:"receiver"`
ReceiverId string `json:"receiver_id"`
ReqOperation string `json:"crud_op"`
ModelName string `json:"model_name"`
Tag string `json:"tag"`
Type string `json:".type,omitempty"`
}
type UciSystem ¶
type UciSystem innerUciSystem
func (UciSystem) MarshalJSON ¶
func (*UciSystem) UnmarshalJSON ¶
type UciWifiIface ¶
type UciWifiIface struct {
Type string `json:".type"`
Addr string `json:"macaddr,omitempty"`
Channel string `json:"channel"`
Power string `json:"txpower"`
BandMode string `json:"hwmode"`
Bandwidth string `json:"htmode"`
Country string `json:"country"`
RequireMode string `json:"require_mode"`
Disabled string `json:"disabled"`
ChanList interface{} `json:"channels"`
BasicRate string `json:"basic_rate,omitempty"`
SupportedRates interface{} `json:"supported_rates,omitempty"`
LegacyRates string `json:"legacy_rates,omitempty"`
LogLevel string `json:"log_level,omitempty"`
MaxInactivity string `json:"max_inactivity,omitempty"`
RSSIThreshold string `json:"rssi_reject_assoc_rssi"`
NoScan string `json:"noscan"`
// Band string `json:"band,omitempty"`
ChanBandwidth string `json:"chanbw,omitempty"`
CellDensity string `json:"cell_density,omitempty"`
HESUBeamformee string `json:"he_su_beamformee,omitempty"`
HEBSSColor string `json:"he_bss_color,omitempty"`
}
type UciWifiWlan ¶
type UciWifiWlan struct {
Type string `json:".type,omitempty"`
SSID string `json:"ssid,omitempty"`
UUID string `json:"uuid,omitempty"`
Iface string `json:"device,omitempty"`
Hidden string `json:"hidden,omitempty"`
WifiMode string `json:"mode,omitempty"`
PMKCaching string `json:"auth_cache,omitempty"`
IEEE80211r string `json:"ieee80211r,omitempty"`
IEEE80211k string `json:"ieee80211k,omitempty"`
IEEE80211v string `json:"ieee80211v,omitempty"`
RrmNeighborReport string `json:"rrm_neighbor_report,omitempty"`
RrmBeaconReport string `json:"rrm_beacon_report,omitempty"`
WnmSleepMode string `json:"wnm_sleep_mode,omitempty"`
BssTransition string `json:"bss_transition,omitempty"`
MobDomain string `json:"mobility_domain,omitempty"`
R0KH interface{} `json:"r0kh,omitempty"`
R1KH interface{} `json:"r1kh,omitempty"`
VLAN interface{} `json:"network,omitempty"`
MacList interface{} `json:"maclist,omitempty"`
MacFilter interface{} `json:"macfilter,omitempty"`
L2Isolate string `json:"isolate"`
MaxClients string `json:"maxassoc,omitempty"`
OwnIp string `json:"ownip,omitempty"`
Redirect string `json:"agent_redirect,omitempty"`
MACAddr string `json:"macaddr,omitempty"`
UbusAcctPeriod string `json:"ubus_acct_interval,omitempty"`
// security
NasID string `json:"nasid,omitempty"`
NasPortID string `json:"nas_port_id,omitempty"`
AcctHost string `json:"acct_server,omitempty"`
AcctSecret string `json:"acct_secret,omitempty"`
AcctPeriod string `json:"acct_interval,omitempty"`
AcctPort string `json:"acct_port,omitempty"`
AuthHost string `json:"auth_server,omitempty"`
AuthSecret string `json:"auth_secret,omitempty"`
AuthPort string `json:"auth_port,omitempty"`
AcctServers string `json:"acct_server_list,omitempty"`
AuthServers string `json:"auth_server_list,omitempty"`
WMNasID string `json:"agent_nasid,omitempty"`
SecType string `json:"encryption,omitempty"`
Password string `json:"key,omitempty"`
// hotspot 2.0
HotspotEnabled string `json:"hotspot20,omitempty"`
HSNetType string `json:"access_network_type,omitempty"`
HSInternet string `json:"internet,omitempty"`
HSAsra string `json:"asra,omitempty"`
HSEsr string `json:"esr,omitempty"`
HSUesa string `json:"uesa,omitempty"`
HSVenueGroup string `json:"venue_group,omitempty"`
HSVenueType string `json:"venue_type,omitempty"`
HSVenueNames interface{} `json:"venue_name,omitempty"`
HS_HESSID string `json:"hessid,omitempty"`
HSConsortium interface{} `json:"roaming_consortium,omitempty"`
HSDomains interface{} `json:"domain_name,omitempty"`
HSCellNetworks interface{} `json:"3gpp_cell_net,omitempty"`
HSNaiRealms interface{} `json:"nai_realm,omitempty"`
HSIpTypeAvail string `json:"ipaddr_type_availability,omitempty"`
HSWanMetrics string `json:"wan_metrics,omitempty"`
HSDgaf string `json:"dgaf,omitempty"`
HSOperFriendlyNames interface{} `json:"oper_friendly_name,omitempty"`
HSConnCaps interface{} `json:"conn_capab,omitempty"`
HSOperClasses string `json:"operating_class,omitempty"`
// WMM
WMM string `json:"wmm"`
Uapsd string `json:"uapsd"`
// TODO use map[WMMAccessCategory]WMMCategoryConfig
// and custom marshal/unmarshal
WmmTxBKAifs string `json:"wmm_tx_bk_aifs"`
WmmTxBKCwmin string `json:"wmm_tx_bk_cwmin"`
WmmTxBKCwmax string `json:"wmm_tx_bk_cwmax"`
WmmTxBKBurst string `json:"wmm_tx_bk_burst"`
WmmTxBEAifs string `json:"wmm_tx_be_aifs"`
WmmTxBECwmin string `json:"wmm_tx_be_cwmin"`
WmmTxBECwmax string `json:"wmm_tx_be_cwmax"`
WmmTxBEBurst string `json:"wmm_tx_be_burst"`
WmmTxVIAifs string `json:"wmm_tx_vi_aifs"`
WmmTxVICwmin string `json:"wmm_tx_vi_cwmin"`
WmmTxVICwmax string `json:"wmm_tx_vi_cwmax"`
WmmTxVIBurst string `json:"wmm_tx_vi_burst"`
WmmTxVOAifs string `json:"wmm_tx_vo_aifs"`
WmmTxVOCwmin string `json:"wmm_tx_vo_cwmin"`
WmmTxVOCwmax string `json:"wmm_tx_vo_cwmax"`
WmmTxVOBurst string `json:"wmm_tx_vo_burst"`
WmmAcBKAifs string `json:"wmm_ac_bk_aifs"`
WmmAcBKCwmin string `json:"wmm_ac_bk_cwmin"`
WmmAcBKCwmax string `json:"wmm_ac_bk_cwmax"`
WmmAcBKTxop string `json:"wmm_ac_bk_txop"`
WmmAcBKAcm string `json:"wmm_ac_bk_acm"`
WmmAcBEAifs string `json:"wmm_ac_be_aifs"`
WmmAcBECwmin string `json:"wmm_ac_be_cwmin"`
WmmAcBECwmax string `json:"wmm_ac_be_cwmax"`
WmmAcBETxop string `json:"wmm_ac_be_txop"`
WmmAcBEAcm string `json:"wmm_ac_be_acm"`
WmmAcVIAifs string `json:"wmm_ac_vi_aifs"`
WmmAcVICwmin string `json:"wmm_ac_vi_cwmin"`
WmmAcVICwmax string `json:"wmm_ac_vi_cwmax"`
WmmAcVITxop string `json:"wmm_ac_vi_txop"`
WmmAcVIAcm string `json:"wmm_ac_vi_acm"`
WmmAcVOAifs string `json:"wmm_ac_vo_aifs"`
WmmAcVOCwmin string `json:"wmm_ac_vo_cwmin"`
WmmAcVOCwmax string `json:"wmm_ac_vo_cwmax"`
WmmAcVOTxop string `json:"wmm_ac_vo_txop"`
WmmAcVOAcm string `json:"wmm_ac_vo_acm"`
// speed limit
// limit_fromrf -- FROM client -- UPLOAD
// limit_torf -- TO client -- DOWNLOAD
LimitFromRf string `json:"limit_fromrf,omitempty"`
LimitToRf string `json:"limit_torf,omitempty"`
// timeouts
MaxInactivity string `json:"max_inactivity,omitempty"`
DisAssocLowAck string `json:"disassoc_low_ack,omitempty"`
// mesh settings
MeshID string `json:"mesh_id"`
MeshForwarding string `json:"mesh_fwding"`
BandSteering string `json:"band_steering"`
FTOverDS string `json:"ft_over_ds"`
// Config for dae aka Dynamic Authorization Extension client in hostapd
DaeClient string `json:"dae_client"`
DaeSecret string `json:"dae_secret"`
DaePort string `json:"dae_port"`
// config for wmwdiscd - rssi based disconnector
// signal_connect '-50'
// signal_stay '-60'
// signal_strikes '3'
// signal_poll_time '5'
// signal_drop_reason '3'
SignalConnect string `json:"signal_connect"`
SignalStay string `json:"signal_stay"`
SignalStrikes string `json:"signal_strikes"`
SignalPollTime string `json:"signal_poll_time"`
SignalDropReason string `json:"signal_drop_reason"`
PMKR1Push string `json:"pmk_r1_push"`
FTPskGenerateLocal string `json:"ft_psk_generate_local"`
}
type UciWireless ¶
type UciWireless innerUciWireless
func (UciWireless) MarshalJSON ¶
func (uci UciWireless) MarshalJSON() (b []byte, e error)
func (*UciWireless) UnmarshalJSON ¶
func (uci *UciWireless) UnmarshalJSON(b []byte) error
type UciWsnmpd ¶
type UciWsnmpd struct {
Default UciWsnmpdDefautl `json:"default,omitempty"`
}
type UciWsnmpdDefautl ¶
type UserAgent ¶
type UserAgent struct {
Type string `json:"type" bson:"type"`
Device string `json:"device" bson:"device"`
Name string `json:"name" bson:"name"`
OS string `json:"os" bson:"os"`
OSVersion string `json:"os_version" bson:"os_version"`
}
UserAgent struct for parse useragent to internal struct
type VPNHost ¶
type VPNHost struct {
HostName string `json:"hostname"`
OSUUID UUID `json:"os_uuid"`
Interfaces []string `json:"interfaces"`
State ServiceState `json:"state"`
Ifaces []LinkDescriptor `json:"interfaces_details"`
}
type Version ¶
type WLAN ¶
type WLAN struct {
Name string `json:"name"`
SSID string `json:"ssid"`
Description string `json:"description"`
Security EnumSecurity `json:"security"`
// RADIUS section
NasID *string `json:"nas_id"`
NasPortID string `json:"nas_port_id" bson:"nas_port_id"`
NasIPAddress string `json:"nas_ip_address" bson:"nas_ip_address"`
RadiusAcctServers []UUID `json:"radius_acct_servers"`
RadiusAcctInterval int `json:"radius_acct_interval"`
RadiusAcctMirroring bool `json:"radius_acct_mirroring" bson:"radius_acct_mirroring"`
// ACL section
FilterMode MacFilterType `json:"filtermode"`
WhiteList []string `json:"whitelist"`
BlackList []string `json:"blacklist"`
Firewall FireWallSettings `json:"firewall"`
// WLAN related specifics
Hidden bool `json:"hidden"`
L2Isolate bool `json:"l2isolate"`
WMMConfig WMMConfig `json:"wmm" bson:"wmm"`
// traffic shaping
SpeedUpload SpeedConfig `json:"speed_upload" bson:"speed_upload"`
SpeedDownload SpeedConfig `json:"speed_download" bson:"speed_download"`
// network section
// remote tunneling
Tunneling bool `json:"tunneling"` // turn on tunneling
Proto TunnelType `json:"proto"` // l2tp or gretap or ??
DefaultTunnel string `json:"default_tunnel"` // network name on server (only for l2tp)
PeerAddress string `json:"peer_address"` // peer address of server
// local vlan (if 0 than untag)
VLAN int `json:"vlan"`
// local nat
NAT bool `json:"nat" bson:"nat"`
NATNetwork IPAddress `json:"nat_network" bson:"nat_network"`
// Portal authorization section
GuestControl GuestControlSettings `json:"guest_control"`
// clients specifics section
BeelineAccountingType string `json:"beeline_accountng_type"`
// 802.11r
PMKCaching bool `json:"pmkcaching"`
Roaming80211r bool `json:"roam80211r"`
FTOverDS bool `json:"ft_over_ds"`
// generate NAS ID (for roaming - will be generated from bssid)
NASGenerate bool `json:"nas_generate"`
// 802.11k
RoamingIEEE80211k bool `json:"ieee80211k"`
RrmNeighborReport bool `json:"rrm_neighbor_report"`
RrmBeaconReport bool `json:"rrm_beacon_report"`
// 802.11v
RoamingIEEE80211v bool `json:"ieee80211v"`
WnmSleepMode bool `json:"wnm_sleep_mode"`
BssTransition bool `json:"bss_transition"`
// roaming marketing
RSSIThreshold int `json:"rssi_threshold"`
BandSteering bool `json:"band_steering"`
LoadBalancing bool `json:"load_balancing"`
// for wmwdisd - rssi based disconnector
SignalConnect int `json:"signal_connect"`
SignalStay int `json:"signal_stay"`
SignalStrikes int `json:"signal_strikes"`
SignalPollTime int `json:"signal_poll_time"`
SignalDropReason int `json:"signal_drop_reason"`
}
type WLANCentrAccChangeData ¶
type WLANCompact ¶
type WLANCompact struct {
Name string `json:"name" bson:"name"`
SSID string `json:"ssid" bson:"ssid"`
Description string `json:"description" bson:"description"`
Security EnumSecurity `json:"security"`
// network section
// remote tunneling
Tunneling bool `json:"tunneling"` // turn on tunneling
Proto TunnelType `json:"proto"` // l2tp or gretap or ??
DefaultTunnel string `json:"default_tunnel"` // network name on server (only for l2tp)
PeerAddress string `json:"peer_address"` // peer address of server
}
type WLANStatInfo ¶
type WLANStatInfo struct {
ID string `json:"id" bson:"_id"`
WLAN string `json:"wlan_id" bson:"wlan_id"`
SSID string `json:"ssid" bson:"ssid"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
TotalRxBytes int64 `json:"total_rx_bytes" bson:"total_rx_bytes"`
TotalTxBytes int64 `json:"total_tx_bytes" bson:"total_tx_bytes"`
DeltaTxBytes int64 `json:"delta_tx_bytes" bson:"delta_tx_bytes"`
DeltaRxBytes int64 `json:"delta_rx_bytes" bson:"delta_rx_bytes"`
ConnectedClients []string `json:"connected_clients" bson:"connected_clients"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
}
WLANStatInfo struct for store WLAN accumulated stats
type WMMAccessCategory ¶
type WMMAccessCategory string
const WMMAccessCategoryBackground WMMAccessCategory = "BK"
const WMMAccessCategoryBestEffort WMMAccessCategory = "BE"
const WMMAccessCategoryVideo WMMAccessCategory = "VI"
const WMMAccessCategoryVoice WMMAccessCategory = "VO"
func (*WMMAccessCategory) GetBSON ¶
func (en *WMMAccessCategory) GetBSON() (interface{}, error)
func (WMMAccessCategory) GetPtr ¶
func (en WMMAccessCategory) GetPtr() *WMMAccessCategory
func (*WMMAccessCategory) MarshalJSON ¶
func (en *WMMAccessCategory) MarshalJSON() ([]byte, error)
func (WMMAccessCategory) String ¶
func (en WMMAccessCategory) String() string
func (*WMMAccessCategory) UnmarshalJSON ¶
func (en *WMMAccessCategory) UnmarshalJSON(b []byte) error
type WMMCategoryConfig ¶
type WMMCategoryConfig struct {
CliCwMin int `json:"cli_cw_min" bson:"cli_cw_min"`
CliCwMax int `json:"cli_cw_max" bson:"cli_cw_max"`
CliAifs int `json:"cli_aifs" bson:"cli_aifs"`
CliTxOp int `json:"cli_txop" bson:"cli_txop"`
CliAcm bool `json:"cli_acm" bson:"cli_acm"`
AcCwMin int `json:"ac_cw_min" bson:"ac_cw_min"`
AcCwMax int `json:"ac_cw_max" bson:"ac_cw_max"`
AcAifs int `json:"ac_aifs" bson:"ac_aifs"`
AcBurst float32 `json:"ac_burst" bson:"ac_burst"`
}
type WMMConfig ¶
type WMMConfig struct {
Categories map[WMMAccessCategory]WMMCategoryConfig `json:"categories" bson:"categories"`
Disabled bool `json:"disabled" bson:"disabled"`
Uapsd bool `json:"uapsd" bson:"uapsd"`
}
type WMSNMPDConfig ¶
type WMSNMPDConfig struct {
Default WMSNMPDDefault `json:"default"`
}
type WMSNMPDDefault ¶
type WPA2EnterpriseData ¶
type WPA2PersonalData ¶
type WPACommon ¶
type WPACommon struct {
Suites []SecuritySuite `json:"suites"`
}
type WPAEnterpriseData ¶
type WPAPersonalData ¶
type WiFiConfig ¶
type WiFiConfig struct {
BandMode string `json:"bandmode"`
Bandwidth string `json:"bandwidth"`
TxPower string `json:"txpower"`
MinTxPower string `json:"mintxpower"`
Power PowerConfig `json:"power"`
WLANs []UUID `json:"wlans"`
Channels []int `json:"channels"`
Country string `json:"country"`
MaxClients int `json:"maxclients"`
ScanConfig ScanConfig `json:"scanningconfig"`
RequireMode MCSRequire `json:"require_mode"`
Frequency string `json:"frequency"`
BasicRate string `json:"basic_rate"`
SupportedRates interface{} `json:"supported_rates"`
LegacyRates string `json:"legacy_rates"`
LogLevel string `json:"log_level"`
MaxInactivity int `json:"max_inactivity"`
CellDensity int `json:"cell_density"`
}
type WiFiConfigs ¶
type WiFiConfigs map[string]WiFiConfig
func (WiFiConfigs) GetBSON ¶
func (wc WiFiConfigs) GetBSON() (interface{}, error)
type WiFiStates ¶
func (WiFiStates) GetBSON ¶
func (wc WiFiStates) GetBSON() (interface{}, error)
type WifiCapabilities ¶
type WifiCapabilities struct {
TxPowers []CapTxPower `json:"txpwrlist"`
HTModes map[string]bool `json:"htmodelist"`
HWModes map[string]bool `json:"hwmodelist"`
Channels []CapChannel `json:"freqlist"`
TxOffset int `json:"txpower_offset"`
Frequency string `json:"frequency"`
}
type WifiManual ¶
type WifiManual map[string]UciWifiWlan
type WiredCapabilities ¶
type WiredCapabilities struct {
Switch string `json:"switch" bson:"switch"`
Ports []WiredPortCaps `json:"ports" bson:"ports"`
}
type WiredConfig ¶
type WiredConfig struct {
PrimaryVlan int `json:"primary_vlan" bson:"primary_vlan"`
Vlans []WiredVlanConfig `json:"vlans" bson:"vlans"`
}
type WiredConfigs ¶
type WiredConfigs map[string]WiredConfig
func (WiredConfigs) GetBSON ¶
func (wc WiredConfigs) GetBSON() (interface{}, error)
type WiredPortCaps ¶
type WiredSpeedConfig ¶
type WiredState ¶
type WiredStates ¶
type WiredStates map[string]WiredState
type WiredVlanConfig ¶
type WiredVlanConfig struct {
Vlan int `json:"vlan" bson:"vlan"`
Vid int `json:"vid" bson:"vid"`
Ports []string `json:"ports" bson:"ports"`
TunnelProto TunnelType `json:"tunnel_proto" bson:"tunnel_proto"`
Tunnel string `json:"tunnel" bson:"tunnel"`
Interface string `json:"interface" bson:"interface"`
PeerAddr string `json:"peer_addr" bson:"peer_addr"`
Accounting bool `json:"acct" bson:"acct"`
FakeWlan UUID `json:"fake_wlan" bson:"fake_wlan"`
GuestControl GuestControlSettings `json:"guest_control" bson:"guest_control"`
NAT bool `json:"nat" bson:"nat"`
NATNetwork IPAddress `json:"nat_network" bson:"nat_network"`
NatAccess bool `json:"nat_access" bson:"nat_access"`
SpeedDownload WiredSpeedConfig `json:"speed_download" bson:"speed_download"`
}
type WirelessClient ¶
type WirelessClient struct {
MAC string `json:"mac" bson:"_id"`
Timestamp int64 `json:"timestamp"`
// general client data
Type WirelessClientType
Data interface{} `bson:"data" json:"data"`
Manufacturer string `json:"manufacturer" bson:"manufacturer"`
MacAddr string `json:"mac_addr" bson:"mac_addr"`
// last connection data
State WirelessClientState
WLAN string `json:"wlan_id" bson:"wlan_id"`
SSID string `json:"wlan_ssid" bson:"wlan_ssid"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Radio string `json:"radio_id" bson:"radio_id"`
Freq string `json:"freq"`
Channel string `json:"channel"`
Mode ConnectionModeType `json:"mode"`
Ip string `json:"ip"`
// radio state
Rssi int `json:"rssi"`
Noise int `json:"noise"`
SNR int `json:"snr" bson:"snr"`
// heath score as Cisco DNA assurance - connected score (1 || 4) + best over 5 minute SNR
HealthScore int `json:"health_score" bson:"health_score"`
// DEPRECATED -- last session traffic data
InPackets int64 `json:"in_packets" bson:"in_packets"`
OutPackets int64 `json:"out_packets" bson:"out_packets"`
InKBytes int64 `json:"in_kbytes" bson:"in_kbytes"`
OutKBytes int64 `json:"out_kbytes" bson:"out_kbytes"`
// session overall data
FirstConnect int64 `json:"first_connect" bson:"first_connect"`
LastConnect int64 `json:"last_connect" bson:"last_connect"`
LastAuthorise int64 `json:"last_auth" bson:"last_auth"`
// auth data
UserAgent string `json:"useragent" bson:"useragent"`
UserName string `json:"username" bson:"username"`
OS string `json:"os" bson:"os"`
OSVersion string `json:"os_version" bson:"os_version"`
UADevice string `json:"ua_device" bson:"ua_device"`
UAType string `json:"ua_type" bson:"ua_type"`
CreateAt time.Time `json:"create_at" bson:"create_at"`
}
func (*WirelessClient) GetSpecificWCInfo ¶
func (wc *WirelessClient) GetSpecificWCInfo() *WirelessClientObject
func (*WirelessClient) SetSpecificWCInfo ¶
func (wc *WirelessClient) SetSpecificWCInfo(wco *WirelessClientObject)
type WirelessClientObject ¶
type WirelessClientObject struct {
Type WirelessClientType "json:\"type\""
Data interface{} "json:\"data\""
}
func (*WirelessClientObject) UnmarshalJSON ¶
func (en *WirelessClientObject) UnmarshalJSON(b []byte) error
type WirelessClientState ¶
type WirelessClientState string
const WirelessClientStateConnected WirelessClientState = "CONNECTED"
const WirelessClientStateDisconnected WirelessClientState = "DISCONNECTED"
func (*WirelessClientState) GetBSON ¶
func (en *WirelessClientState) GetBSON() (interface{}, error)
func (WirelessClientState) GetPtr ¶
func (en WirelessClientState) GetPtr() *WirelessClientState
func (*WirelessClientState) MarshalJSON ¶
func (en *WirelessClientState) MarshalJSON() ([]byte, error)
func (WirelessClientState) String ¶
func (en WirelessClientState) String() string
func (*WirelessClientState) UnmarshalJSON ¶
func (en *WirelessClientState) UnmarshalJSON(b []byte) error
type WirelessClientType ¶
type WirelessClientType string
const WirelessClientTypeCamera WirelessClientType = "camera"
const WirelessClientTypeOther WirelessClientType = "other"
const WirelessClientTypeWired WirelessClientType = "wired"
func (*WirelessClientType) GetBSON ¶
func (en *WirelessClientType) GetBSON() (interface{}, error)
func (WirelessClientType) GetPtr ¶
func (en WirelessClientType) GetPtr() *WirelessClientType
func (*WirelessClientType) MarshalJSON ¶
func (en *WirelessClientType) MarshalJSON() ([]byte, error)
func (WirelessClientType) String ¶
func (en WirelessClientType) String() string
func (*WirelessClientType) UnmarshalJSON ¶
func (en *WirelessClientType) UnmarshalJSON(b []byte) error
type WirelessClientUpdate ¶
type WirelessClientUpdate struct {
MAC string `json:"mac" bson:"_id"`
MacAddr string `json:"mac_addr" bson:"mac_addr"`
CPE string `json:"cpe_id" bson:"cpe_id"`
Type WirelessClientType
Data interface{} `bson:"data" json:"data"`
}
type WlanState ¶
type WlanState struct {
State CPEInterfaceState `json:"state"`
VirtualIface string `json:"virtual_iface" bson:"virtual_iface"`
BSSID string `json:"bssid" bson:"bssid"`
}
Source Files
¶
- cfg_interface.go
- cpe_interface.go
- db_interface.go
- db_masks.go
- enums.go
- enums_assoc.go
- enums_errors.go
- models.go
- models_ap.go
- models_clientrf.go
- models_events.go
- models_firewall.go
- models_hotspot20.go
- models_mediator.go
- models_pcap.go
- models_radius.go
- models_redirect.go
- models_report.go
- models_rrm.go
- models_stat.go
- models_useragent.go
- protocol_common_interface.go
- protocol_jsonrpc.go
- protocol_topics.go
- rrm_interface.go
- rrm_operations.go
- tunman_intreface.go
- util.go
- util_exec.go
- util_http.go
- util_https.go
- util_json.go
- util_macvendor.go
- util_mqtt.go
- util_radar.go
- utils_collections.go