models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

NOTE: modified by hand to reflect actual API enumerators

NOTE: modified by hand to reflect actual API enumerators

NOTE: modified by hand to reflect actual API enumerators

NOTE: modified by hand to reflect actual API enumerators

NOTE: modified by hand to reflect actual API enumerators

NOTE: modified by hand to reflect actual API enumerators

NOTE: modified by hand to reflect actual API enumerators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetOptional

func SetOptional(output interface{}, value interface{})

SetOptional sets output pointer to a given value that can be a constant. This is a shortcut for eg.: name := "device name" device.DeviceName = &name output must be pointer to a pointer

Types

type Aggregate

type Aggregate struct {
	Name       string
	Column     string
	Fn         AggregateFunctionType
	SampleRate int   // default 1
	Rank       *int  // valid: number 5..99; only used when Fn == Percentile
	Raw        *bool // required for chart queries
}

func NewAggregate

func NewAggregate(name string, column string, fn AggregateFunctionType) Aggregate

NewAggregate creates an Aggregate with all required fields set

type AggregateFunctionType

type AggregateFunctionType int
const (
	AggregateFunctionTypeSum               AggregateFunctionType = iota // "sum"
	AggregateFunctionTypeAverage                                        // "average"
	AggregateFunctionTypePercentile                                     // "percentile"
	AggregateFunctionTypeMax                                            // "max"
	AggregateFunctionTypeComposite                                      // "composite"
	AggregateFunctionTypeExponent                                       // "exponent"
	AggregateFunctionTypeModulus                                        // "modulus"
	AggregateFunctionTypeGreaterThan                                    // "greaterThan"
	AggregateFunctionTypeGreaterThanEquals                              // "greaterThanEquals"
	AggregateFunctionTypeLessThan                                       // "lessThan"
	AggregateFunctionTypeLessThanEquals                                 // "lessThanEquals"
	AggregateFunctionTypeEquals                                         // "equals"
	AggregateFunctionTypeNotEquals                                      // "notEquals"
)

func AggregateFunctionTypeString

func AggregateFunctionTypeString(s string) (AggregateFunctionType, error)

AggregateFunctionTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func AggregateFunctionTypeValues

func AggregateFunctionTypeValues() []AggregateFunctionType

AggregateFunctionTypeValues returns all values of the enum

func (AggregateFunctionType) IsAAggregateFunctionType

func (i AggregateFunctionType) IsAAggregateFunctionType() bool

IsAAggregateFunctionType returns "true" if the value is listed in the enum definition. "false" otherwise

func (AggregateFunctionType) String

func (i AggregateFunctionType) String() string

type Alarm

type Alarm struct {
	AlarmID         ID
	RowType         string
	AlarmState      string
	AlertID         ID
	MitigationID    ID
	TresholdID      ID
	AlertKey        string
	AlertDimension  string
	AlertMetric     []string
	AlertValue      float32
	AlertValue2nd   float32
	AlertValue3rd   float32
	AlertMatchCount int
	AlertBaseline   int
	AlertSeverity   string
	BaselineUsed    int
	LearningMode    bool
	DebugMode       bool
	AlarmStart      time.Time
	AlarmEnd        *string
	AlarmLastComent *string
	MitAlertID      ID
	MitAlertIP      string
	MitTresholdID   int
	Args            string
	ID              ID
	PolicyID        ID
	PolicyName      string
	AlertKeyLookup  string
}

type AlertsQueryParams

type AlertsQueryParams struct {
	StartTime       *time.Time
	EndTime         *time.Time
	FilterBy        string
	FilterVal       string
	SortOrder       string
	ShowMitigations bool
	ShowAlarms      bool
	ShowMatches     bool
	LearningMode    bool
}

type AllInterfaces

type AllInterfaces struct {
	InterfaceDescription string
	DeviceID             ID
	SNMPSpeed            float64
	InitialSNMPSpeed     *float64
}

type AppliedLabels

type AppliedLabels struct {
	// read-only properties
	ID         ID
	DeviceName string
	Labels     []DeviceLabel
}

type AuthenticationProtocol

type AuthenticationProtocol string
const (
	AuthenticationProtocolNoAuth AuthenticationProtocol = "NoAuth"
	AuthenticationProtocolMD5    AuthenticationProtocol = "MD5"
	AuthenticationProtocolSHA    AuthenticationProtocol = "SHA"
)

type CDNAttribute

type CDNAttribute string
const (
	CDNAttributeNone CDNAttribute = "None"
	CDNAttributeYes  CDNAttribute = "Y"
	CDNAttributeNo   CDNAttribute = "N"
)

type ChartViewType

type ChartViewType int
const (
	ChartViewTypeStackedArea ChartViewType = iota // "stackedArea"
	ChartViewTypeLine                             // "line"
	ChartViewTypeStackedBar                       // "stackedBar"
	ChartViewTypeBar                              // "bar"
	ChartViewTypePie                              // "pie"
	ChartViewTypeSankey                           // "sankey"
	ChartViewTypeTable                            // "table"
	ChartViewTypeMatrix                           // "matrix"
)

func ChartViewTypeString

func ChartViewTypeString(s string) (ChartViewType, error)

ChartViewTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ChartViewTypeValues

func ChartViewTypeValues() []ChartViewType

ChartViewTypeValues returns all values of the enum

func (ChartViewType) IsAChartViewType

func (i ChartViewType) IsAChartViewType() bool

IsAChartViewType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ChartViewType) String

func (i ChartViewType) String() string

type CustomApplication

type CustomApplication struct {
	// read-write properties (can be updated in update call)
	Name        string
	Description *string
	IPRange     *string
	Protocol    *string
	Port        *string
	ASN         *string

	// read-only properties (can't be updated in update call)
	ID          ID
	CompanyID   ID
	UserID      *ID
	CreatedDate *time.Time
	UpdatedDate *time.Time
}

func NewCustomApplication

func NewCustomApplication(name string) *CustomApplication

NewCustomApplication crates a CustomApplication with all required fields set

type CustomDimension

type CustomDimension struct {
	// read-write properties (can be updated in update call)
	DisplayName string

	// read-only properties (can't be updated in update call)
	Name       string // must start with c_ and be unique even against deleted dimensions (deleted names are retained for 1 year)
	Type       CustomDimensionType
	ID         ID
	CompanyID  ID
	Populators []Populator
}

func NewCustomDimension

func NewCustomDimension(name, displayName string, dimensionType CustomDimensionType) *CustomDimension

NewCustomDimension creates a CustomDimension with all necessary fields set Note: name must begin with "c_" and be unique even among already deleted custom dimensions as names are retained for 1 year

type CustomDimensionType

type CustomDimensionType string
const (
	CustomDimensionTypeStr    CustomDimensionType = "string"
	CustomDimensionTypeUint32 CustomDimensionType = "uint32"
)

type Device

type Device struct {
	// read-write properties (can be updated in update call)
	PlanID                *ID
	SiteID                *ID
	DeviceDescription     *string
	DeviceSampleRate      int
	SendingIPS            []string
	DeviceSNMNPIP         *string
	DeviceSNMPCommunity   *string
	MinimizeSNMP          *bool
	DeviceBGPType         *DeviceBGPType // Note: for DeviceBGPType = DeviceBGPTypeDevice, either DeviceBGPNeighborIP or DeviceBGPNeighborIPv6 is required
	DeviceBGPNeighborIP   *string
	DeviceBGPNeighborIPv6 *string
	DeviceBGPNeighborASN  *string
	DeviceBGPFlowSpec     *bool
	DeviceBGPPassword     *string
	UseBGPDeviceID        *ID
	DeviceSNMPv3Conf      *SNMPv3Conf
	CDNAttr               *CDNAttribute

	// read-only properties (can't be updated in update call)
	ID              ID
	DeviceName      string
	DeviceType      DeviceType
	DeviceSubType   DeviceSubtype
	DeviceStatus    *string
	DeviceFlowType  *string
	CompanyID       ID
	SNMPLastUpdated *string
	CreatedDate     time.Time
	UpdatedDate     time.Time
	BGPPeerIP4      *string
	BGPPeerIP6      *string
	Plan            DevicePlan
	Site            *DeviceSite
	Labels          []DeviceLabel
	AllInterfaces   []AllInterfaces
}

func NewDeviceDNS

func NewDeviceDNS(

	DeviceName string,
	DeviceSubType DeviceSubtype,
	DeviceSampleRate int,
	PlanID ID,

	CDNAttr CDNAttribute,
) *Device

NewDeviceDNS creates a new DSN with all necessary fields set Optional fields that can be set include: - DeviceDescription - SiteID - DeviceBGPFlowSpec

func NewDeviceRouter

func NewDeviceRouter(

	DeviceName string,
	DeviceSubType DeviceSubtype,
	DeviceSampleRate int,
	PlanID ID,

	SendingIPS []string,
	MinimizeSNMP bool,
) *Device

NewDeviceRouter creates a new Router with all necessary fields set Optional fields that can be set for router include: - DeviceSNMNPIP - DeviceSNMPCommunity - DeviceSNMPv3Conf // when set, overwrites "device_snmp_community" Optional fields that can be always set include: - DeviceDescription - SiteID - DeviceBGPFlowSpec

func (*Device) WithBGPTypeDevice

func (d *Device) WithBGPTypeDevice(deviceBGPNeighborASN string) *Device

WithBGPTypeDevice is alternative to WithBGPTypeOtherDevice Optional fields that can be set for BGPTypeDevice include: - DeviceBGPPassword Note: either DeviceBGPNeighborIP or DeviceBGPNeighborIPv6 is required for DeviceBGPTypeDevice

func (*Device) WithBGPTypeOtherDevice

func (d *Device) WithBGPTypeOtherDevice(useBGPDeviceID ID) *Device

WithBGPTypeOtherDevice is alternative to WithBGPTypeDevice

type DeviceBGPType

type DeviceBGPType string
const (
	DeviceBGPTypeNone        DeviceBGPType = "none"
	DeviceBGPTypeDevice      DeviceBGPType = "device"
	DeviceBGPTypeOtherDevice DeviceBGPType = "other_device"
)

type DeviceItem

type DeviceItem struct {
	ID            ID
	DeviceName    string
	DeviceSubtype string
	DeviceType    *string
}

type DeviceLabel

type DeviceLabel struct {
	// read-write properties (can be updated in update call)
	Name  string
	Color string

	// read-only properties (can't be updated in update call)
	Devices     []DeviceItem
	ID          ID
	UserID      *ID
	CompanyID   ID
	CreatedDate time.Time
	UpdatedDate time.Time
}

func NewDeviceLabel

func NewDeviceLabel(name string, color string) *DeviceLabel

NewDeviceLabel creates a DeviceLabel with all necessary fields set

type DevicePlan

type DevicePlan struct {
	ID            *ID
	CompanyID     *ID
	Name          *string
	Description   *string
	Active        *bool
	MaxDevices    *int
	MaxFPS        *int
	BGPEnabled    *bool
	FastRetention *int
	FullRetention *int
	CreatedDate   *time.Time
	UpdatedDate   *time.Time
	MaxBigdataFPS *int
	DeviceTypes   []PlanDeviceType
	Devices       []PlanDevice
}

DevicePlan embedded under Device differs from regular Plan in that all fields are optional

type DeviceSite

type DeviceSite struct {
	ID        *ID
	CompanyID *ID
	Latitude  *float64
	Longitude *float64
	SiteName  *string
}

DeviceSite embedded under Device differs from regular Site in that all fields are optional

type DeviceSubtype

type DeviceSubtype string
const (
	// for DeviceType = DeviceTypeRouter
	DeviceSubtypeRouter                 DeviceSubtype = "router"
	DeviceSubtypeCiscoAsa               DeviceSubtype = "cisco_asa"
	DeviceSubtypePaloalto               DeviceSubtype = "paloalto"
	DeviceSubtypeSilverpeak             DeviceSubtype = "silverpeak"
	DeviceSubtypeMpls                   DeviceSubtype = "mpls"
	DeviceSubtypeViptela                DeviceSubtype = "viptela"
	DeviceSubtypePfeSyslog              DeviceSubtype = "pfe_syslog"
	DeviceSubtypeSyslog                 DeviceSubtype = "syslog"
	DeviceSubtypeMeraki                 DeviceSubtype = "meraki"
	DeviceSubtypeIstio                  DeviceSubtype = "istio"
	DeviceSubtypeIosxr                  DeviceSubtype = "ios_xr"
	DeviceSubtypeCiscoZoneBasedFirewall DeviceSubtype = "cisco_zone_based_firewall"
	DeviceSubtypeCiscoNbar              DeviceSubtype = "cisco_nbar"
	DeviceSubtypeCiscoAsaSyslog         DeviceSubtype = "cisco_asa_syslog"
	DeviceSubtypeAdvancedSflow          DeviceSubtype = "advanced_sflow"
	DeviceSubtypeA10Cgn                 DeviceSubtype = "a10_cgn"

	// for DeviceType = DeviceTypeHostNProbeDNSWWW
	DeviceSubtypeKprobe      DeviceSubtype = "kprobe"
	DeviceSubtypeNprobe      DeviceSubtype = "nprobe"
	DeviceSubtypeAwsSubnet   DeviceSubtype = "aws_subnet"
	DeviceSubtypeAzureSubnet DeviceSubtype = "azure_subnet"
	DeviceSubtypeGcpSubnet   DeviceSubtype = "gcp_subnet"
	DeviceSubtypeKappa       DeviceSubtype = "kappa"      // not in the API documentation
	DeviceSubtypeIbmSubnet   DeviceSubtype = "ibm_subnet" // not in the API documentation
)

type DeviceType

type DeviceType string
const (
	DeviceTypeRouter           DeviceType = "router"
	DeviceTypeHostNProbeDNSWWW DeviceType = "host-nprobe-dns-www"
)

type DimensionType

type DimensionType int
const (
	DimensionTypeASSrc               DimensionType = iota // "AS_src"
	DimensionTypeGeographySrc                             // "Geography_src"
	DimensionTypeInterfaceIDSrc                           // "InterfaceID_src"
	DimensionTypePortSrc                                  // "Port_src"
	DimensionTypeSrcEthMac                                // "src_eth_mac"
	DimensionTypeVLANSRC                                  // "VLAN_src"
	DimensionTypeIPSrc                                    // "IP_src"
	DimensionTypeASDst                                    // "AS_dst"
	DimensionTypeGeographyDst                             // "Geography_dst"
	DimensionTypeInterfaceIDDst                           // "InterfaceID_dst"
	DimensionTypePortDst                                  // "Port_dst"
	DimensionTypeDstEthMac                                // "dst_eth_mac"
	DimensionTypeVLANDst                                  // "VLAN_dst"
	DimensionTypeIPDst                                    // "IP_dst"
	DimensionTypeTopFlow                                  // "TopFlow"
	DimensionTypeProto                                    // "Proto"
	DimensionTypeTraffic                                  // "Traffic"
	DimensionTypeASTopTalkers                             // "ASTopTalkers"
	DimensionTypeInterfaceTopTalkers                      // "InterfaceTopTalkers"
	DimensionTypePortPortTalkers                          // "PortPortTalkers"
	DimensionTypeTopFlowsIP                               // "TopFlowsIP"
	DimensionTypeSrcGeoRegion                             // "src_geo_region"
	DimensionTypeSrcGeoCity                               // "src_geo_city"
	DimensionTypeDstGeoRegion                             // "dst_geo_region"
	DimensionTypeDstGeoCity                               // "dst_geo_city"
	DimensionTypeRegionTopTalkers                         // "RegionTopTalkers"
	DimensionTypeIDeviceID                                // "i_device_id"
	DimensionTypeIDeviceSiteName                          // "i_device_site_name"
	DimensionTypeSrcRoutePrefixLen                        // "src_route_prefix_len"
	DimensionTypeSrcRouteLength                           // "src_route_length"
	DimensionTypeSrcBGPCommunity                          // "src_bgp_community"
	DimensionTypeSrcBGPAspath                             // "src_bgp_aspath"
	DimensionTypeSrcNexthopIP                             // "src_nexthop_ip"
	DimensionTypeSrcNexthopASN                            // "src_nexthop_asn"
	DimensionTypeSrcSecondASN                             // "src_second_asn"
	DimensionTypeSrcThirdASN                              // "src_third_asn"
	DimensionTypeSrcProtoPort                             // "src_proto_port"
	DimensionTypeDstRoutePrefixLen                        // "dst_route_prefix_len"
	DimensionTypeDstRouteLength                           // "dst_route_length"
	DimensionTypeDstBGPCommunity                          // "dst_bgp_community"
	DimensionTypeDstBGPAspath                             // "dst_bgp_aspath"
	DimensionTypeDstNexthopIP                             // "dst_nexthop_ip"
	DimensionTypeDstNexthopASN                            // "dst_nexthop_asn"
	DimensionTypeDstSecondASN                             // "dst_second_asn"
	DimensionTypeDstThirdASN                              // "dst_third_asn"
	DimensionTypeDstProtoPort                             // "dst_proto_port"
	DimensionTypeINetFamily                               // "inet_family"
	DimensionTypeTOS                                      // "TOS"
	DimensionTypeTCPFlags                                 // "tcp_flags"
)

func DimensionTypeString

func DimensionTypeString(s string) (DimensionType, error)

DimensionTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func DimensionTypeValues

func DimensionTypeValues() []DimensionType

DimensionTypeValues returns all values of the enum

func (DimensionType) IsADimensionType

func (i DimensionType) IsADimensionType() bool

IsADimensionType returns "true" if the value is listed in the enum definition. "false" otherwise

func (DimensionType) String

func (i DimensionType) String() string

type FastDataType

type FastDataType int
const (
	FastDataTypeAuto FastDataType = iota // "Auto"
	FastDataTypeFast                     // "Fast"
	FastDataTypeFull                     // "Full"
)

func FastDataTypeString

func FastDataTypeString(s string) (FastDataType, error)

FastDataTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func FastDataTypeValues

func FastDataTypeValues() []FastDataType

FastDataTypeValues returns all values of the enum

func (FastDataType) IsAFastDataType

func (i FastDataType) IsAFastDataType() bool

IsAFastDataType returns "true" if the value is listed in the enum definition. "false" otherwise

func (FastDataType) String

func (i FastDataType) String() string

type Filter

type Filter struct {
	// read-write properties
	FilterField string
	FilterValue string
	Operator    string

	// read-only properties
	ID *ID
}

type FilterGroups

type FilterGroups struct {
	// read-write properties
	Connector string
	Not       bool
	Filters   []Filter

	// read-only properties
	FilterString *string
	ID           *ID
	Metric       *string
}

type Filters

type Filters struct {
	// read-write properties
	Connector    string
	FilterGroups []FilterGroups

	// read-only properties (reserved for internal use)
	Custom       *bool
	FilterString *string
}

type HistoricalAlert

type HistoricalAlert struct {
	RowType         string
	OldAlarmState   string
	NewAlarmState   string
	AlertMatchCount string
	AlertSeverity   string
	AlertID         ID
	ThresholdID     ID
	AlarmID         ID
	AlertKey        string
	AlertDimension  string
	AlertMetric     []string
	AlertValue      float32
	AlertValue2nd   int
	AlertValue3rd   int
	AlertBaseline   float32
	BaselineUsed    int
	LearningMode    bool
	DebugMode       bool
	CreationTime    time.Time
	AlarmStartTime  *string
	Comment         *string
	MitigationID    *int
	MitMethodID     int
	Args            string
	ID              ID
	PolicyID        ID
	PolicyName      string
	AlertKeyLookup  string
}

type ID

type ID = int

ID is a common identifier type across all resources.

type ImageType

type ImageType int
const (
	ImageTypePNG ImageType = iota // "png"
	ImageTypeJPG                  // "jpeg"
	ImageTypeSVG                  // "svg"
	ImageTypePDF                  // "pdf"
	ImageTypeUnknown
)

func ImageTypeString

func ImageTypeString(s string) (ImageType, error)

ImageTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ImageTypeValues

func ImageTypeValues() []ImageType

ImageTypeValues returns all values of the enum

func (ImageType) IsAImageType

func (i ImageType) IsAImageType() bool

IsAImageType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ImageType) String

func (i ImageType) String() string

type Interface

type Interface struct {
	// read-write properties (can be updated in update call)
	SNMPID               ID
	SNMPSpeed            int
	InterfaceDescription string // if fact, this is interface name, that's why not optional
	SNMPAlias            *string
	InterfaceIP          *string
	InterfaceIPNetmask   *string
	VRF                  *VRFAttributes
	VRFID                *ID
	SecondaryIPS         []SecondaryIP

	// read-only properties (can't be updated in update call)
	ID                          ID
	CompanyID                   ID
	DeviceID                    ID
	CreatedDate                 time.Time
	UpdatedDate                 time.Time
	InitialSNMPID               *string
	InitialSNMPAlias            *string
	InitialInterfaceDescription *string
	InitialSNMPSpeed            *int
	TopNextHopASNs              []TopNextHopASN
}

func NewInterface

func NewInterface(deviceID ID, snmpID ID, snmpSpeed int, interfaceDescription string) *Interface

NewInterface creates a new Interface with all necessary fields set

type ManualMitigation

type ManualMitigation struct {
	IPCidr                string
	Comment               *string
	PlatformID            ID
	MethodID              ID
	MinutesBeforeAutoStop string
}

type MetricType

type MetricType int
const (
	MetricTypeBytes             MetricType = iota // "bytes"
	MetricTypeInBytes                             // "in_bytes"
	MetricTypeOutBytes                            // "out_bytes"
	MetricTypePackets                             // "packets"
	MetricTypeInPackets                           // "in_packets"
	MetricTypeOutPackets                          // "out_packets"
	MetricTypeTCPRetransmit                       // "tcp_retransmit"
	MetricTypePercRetransmit                      // "perc_retransmit"
	MetricTypeRetransmitsIn                       // "retransmits_in"
	MetricTypePercRetransmitsIn                   // "perc_retransmits_in"
	MetricTypeOutOfOrderIn                        // "out_of_order_in"
	MetricTypePercOutOfOrderIn                    // "perc_out_of_order_in"
	MetricTypeFragments                           // "fragments"
	MetricTypePercFragmets                        // "perc_fragments"
	MetricTypeClientLatency                       // "client_latency"
	MetricTypeServerLatency                       // "server_latency"
	MetricTypeApplLatency                         // "appl_latency"
	MetricTypeFPS                                 // "fps"
	MetricTypeUniqueSrcIP                         // "unique_src_ip"
	MetricTypeUniqueDstIP                         // "unique_dst_ip"
)

func MetricTypeString

func MetricTypeString(s string) (MetricType, error)

MetricTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func MetricTypeValues

func MetricTypeValues() []MetricType

MetricTypeValues returns all values of the enum

func (MetricType) IsAMetricType

func (i MetricType) IsAMetricType() bool

IsAMetricType returns "true" if the value is listed in the enum definition. "false" otherwise

func (MetricType) String

func (i MetricType) String() string

type Plan

type Plan struct {
	ID            ID
	CompanyID     ID
	Name          string
	Description   string
	Active        bool
	MaxDevices    int
	MaxFPS        int
	BGPEnabled    bool
	FastRetention int
	FullRetention int
	CreatedDate   time.Time
	UpdatedDate   *time.Time
	MaxBigdataFPS int
	DeviceTypes   []PlanDeviceType
	Devices       []PlanDevice
}

type PlanDevice

type PlanDevice struct {
	DeviceName string
	DeviceType string
	ID         ID
}

type PlanDeviceType

type PlanDeviceType struct {
	DeviceType string
}

type Populator

type Populator struct {
	// read-write properties (can be updated in update call)
	Value         string
	Direction     PopulatorDirection
	DeviceName    string
	InterfaceName *string
	Addr          *string
	Port          *string
	TCPFlags      *string
	Protocol      *string
	ASN           *string
	NextHopASN    *string
	NextHop       *string
	BGPAsPath     *string
	BGPCommunity  *string
	DeviceType    *string
	Site          *string
	LastHopAsName *string
	NextHopAsName *string
	MAC           *string
	Country       *string
	VLans         *string

	// read-only properties (can't be updated in update call)
	ID          ID
	CompanyID   ID
	DimensionID ID
	User        *string
	MACCount    int
	AddrCount   int
	CreatedDate time.Time
	UpdatedDate time.Time
}

func NewPopulator

func NewPopulator(dimensionID ID, value, deviceName string, direction PopulatorDirection) *Populator

NewPopulator creates a Populator with all necessary fields set

type PopulatorDirection

type PopulatorDirection string
const (
	PopulatorDirectionSrc    PopulatorDirection = "SRC"
	PopulatorDirectionDst    PopulatorDirection = "DST"
	PopulatorDirectionEither PopulatorDirection = "EITHER"
)

type PrivacyProtocol

type PrivacyProtocol string
const (
	PrivacyProtocolNoPriv PrivacyProtocol = "NoPriv"
	PrivacyProtocolDES    PrivacyProtocol = "DES"
	PrivacyProtocolAES    PrivacyProtocol = "AES"
)

type Query

type Query struct {
	Metric          MetricType
	Dimension       []DimensionType
	FiltersObj      *Filters
	SavedFilters    []SavedFilter
	MatrixBy        []string       // DimensionType or custom dimension, required non-nil even if no elements
	CIDR            *int           // valid: number 0..32
	CIDR6           *int           // valid: number 0..128
	PPSThreshold    *int           // valid: number > 0
	TopX            int            // valid: number 1..40, default 8
	Depth           int            // valid: number 25..250, default 100
	FastData        FastDataType   // default FastDataTypeAuto
	TimeFormat      TimeFormat     // default TimeFormatUTC
	HostnameLookup  bool           // default True
	LookbackSeconds int            // default 3600, value != 0 overrides "StartingTime" and "EndingTime"
	StartingTime    *time.Time     // alternative with "LookbackSeconds"
	EndingTime      *time.Time     // alternative with "LookbackSeconds"
	AllSelected     *bool          // overrides "DeviceName" if true (makes it ignored)
	DeviceName      []string       // alternative with "AllSelected"; but required non-nil even if no elements
	Descriptor      string         // default "", only used when Dimension is "Traffic"
	Aggregates      []Aggregate    // if empty, will be auto-filled based on "Metric" field
	Outsort         *string        // name of aggregate object, required when more than 1 objects on "Aggregates" list
	QueryTitle      string         // default "", only used in QueryChart
	VizType         *ChartViewType // only used in QueryChart, QueryURL
	ShowOverlay     *bool          // only used in QueryChart, QueryURL
	OverlayDay      *int           // only used in QueryChart, QueryURL
	SyncAxes        *bool          // only used in QueryChart, QueryURL
}

func NewQuery

func NewQuery(metric MetricType, dimension []DimensionType) *Query

NewQuery creates a Query with all required fields set

type QueryArrayItem

type QueryArrayItem struct {
	Query       Query
	Bucket      string
	BucketIndex *int
	IsOverlay   *bool // used in QueryChart, QueryURL
}

type QueryChartResult

type QueryChartResult struct {
	ImageType ImageType
	ImageData []byte // raw chart image binary data that can be directly dumped into a file
}

func (QueryChartResult) SaveImageAs

func (r QueryChartResult) SaveImageAs(filename string) error

type QueryDataResult

type QueryDataResult struct {
	Results []interface{} // contents depend on used query object
}

type QueryObject

type QueryObject struct {
	Queries   []QueryArrayItem
	ImageType *ImageType // used in QueryChart
}

QueryObject is the root object describing QueryAPI Data/Chart/URL query

type QuerySQLResult

type QuerySQLResult struct {
	Rows []interface{} // contents depend on used sql query
}

type QueryURLResult

type QueryURLResult struct {
	URL string // URL to Kentik Explorer webpage that was generated for given query
}

type SNMPv3Conf

type SNMPv3Conf struct {
	UserName                 string
	AuthenticationProtocol   *AuthenticationProtocol
	AuthenticationPassphrase *string
	PrivacyProtocol          *PrivacyProtocol
	PrivacyPassphrase        *string
}

func NewSNMPv3Conf

func NewSNMPv3Conf(userName string) *SNMPv3Conf

func (*SNMPv3Conf) WithAuthentication

func (c *SNMPv3Conf) WithAuthentication(protocol AuthenticationProtocol, pass string) *SNMPv3Conf

func (*SNMPv3Conf) WithPrivacy

func (c *SNMPv3Conf) WithPrivacy(protocol PrivacyProtocol, pass string) *SNMPv3Conf

type SavedFilter

type SavedFilter struct {
	// read-write properties (can be updated in update call)
	FilterName        string
	FilterDescription string
	FilterLevel       string
	Filters           Filters

	// read-only properties (can't be updated in update call)
	ID          ID
	CompanyID   ID
	CreatedDate time.Time
	UpdatedDate time.Time
}

func NewSavedFilter

func NewSavedFilter(name string, description string, level string, filters Filters) SavedFilter

NewSavedFilter creates a new SavedFilter with all required fields set.

type SecondaryIP

type SecondaryIP struct {
	Address string
	Netmask string
}

type Site

type Site struct {
	ID        ID
	SiteName  string
	Latitude  *float64
	Longitude *float64
	CompanyID ID
}

func NewSite

func NewSite(name string) *Site

NewSite creates a new Site with all necessary fields set Optional fields that can be set for Site include: - Longitude - Latitude

type Tag

type Tag struct {
	// read-write properties (can be updated in update call)
	FlowTag       string
	DeviceName    *string
	DeviceType    *string
	Site          *string
	InterfaceName *string
	Addr          *string
	Port          *string
	TCPFlags      *string
	Protocol      *string
	ASN           *string
	LasthopAsName *string
	NexthopAsn    *string
	NexthopAsName *string
	Nexthop       *string
	BGPAspath     *string
	BGPCommunity  *string
	MAC           *string
	Country       *string
	VLANs         *string

	// read-only properties (can't be updated in update call)
	ID          ID
	UserID      ID
	CompanyID   ID
	AddrCount   int
	MACCount    int
	EditedBy    string
	CreatedDate time.Time
	UpdatedDate time.Time
}

Tag model.

func NewTag

func NewTag(flowTag string) *Tag

NewTag creates a new Tag with all required fields set. Creating a tag requires specifying the FlowTag parameter, and also specifying at least one additional optional property that can be found in read-write group of Tag properties above.

type Tenant

type Tenant struct {
	ID          ID
	CompanyID   *ID
	Name        string
	Description string
	CreatedDate time.Time
	UpdatedDate time.Time
	Users       []TenantUser
}

type TenantUser

type TenantUser struct {
	ID        ID
	CompanyID ID
	Email     string
	Name      *string
	Fullname  *string
	TenantID  ID
	LastLogin *time.Time
}

type TimeFormat

type TimeFormat int
const (
	TimeFormatUTC   TimeFormat = iota // "UTC"
	TimeFormatLocal                   // "Local"
)

func TimeFormatString

func TimeFormatString(s string) (TimeFormat, error)

TimeFormatString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func TimeFormatValues

func TimeFormatValues() []TimeFormat

TimeFormatValues returns all values of the enum

func (TimeFormat) IsATimeFormat

func (i TimeFormat) IsATimeFormat() bool

IsATimeFormat returns "true" if the value is listed in the enum definition. "false" otherwise

func (TimeFormat) String

func (i TimeFormat) String() string

type TopNextHopASN

type TopNextHopASN struct {
	ASN     int
	Packets int
}

type User

type User struct {
	// read-write properties (can be updated in update call)
	Username     string
	UserFullName string
	UserEmail    string
	// Role of the user, e.g. "Member", "Administrator", "Super Administrator".
	Role         string
	EmailService bool
	EmailProduct bool

	// read-only properties (can't be updated in update call)
	ID           ID
	LastLogin    *time.Time
	CreatedDate  time.Time
	UpdatedDate  time.Time
	CompanyID    ID
	UserAPIToken *string
}

User model.

func NewUser

func NewUser(u UserRequiredFields) *User

NewUser creates a new User with all required fields set.

type UserRequiredFields

type UserRequiredFields struct {
	Username     string
	UserFullName string
	UserEmail    string
	// Role of the user, e.g. "Member", "Administrator", "Super Administrator".
	Role         string
	EmailService bool
	EmailProduct bool
}

UserRequiredFields is subset of User fields required to create a User.

type VRFAttributes

type VRFAttributes struct {
	// read-write
	Name                  string
	RouteTarget           string
	RouteDistinguisher    string
	Description           *string
	ExtRouteDistinguisher *string

	// read-only
	ID        ID
	CompanyID ID
	DeviceID  ID
}

func NewVRFAttributes

func NewVRFAttributes(name string, routeTarget string, routeDistinguisher string) *VRFAttributes

NewVRFAttributes creates new VRFAttributes with all necessary fields set

Jump to

Keyboard shortcuts

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