package
0.0.0-20240422041829-e8c9bfedff66
Repository: https://github.com/nttdots/go-dots.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
* Convert data channel Acl port to flow spec port
*/.
* Parse ACL activation type to int activation type
*
* return:
* int activation type
*/.
No description provided by the author
No description provided by the author
No description provided by the author
* Check overlap targets(target_prefix, target_fqdn, target_uri)
* return:
* true: if request targets overlap with current targets
* false: else
*/.
* Check peace time signal channel
*/.
database connection create.
No description provided by the author
Cobvert data to PercentilePeakAndCurrent.
Convert data to TotalAttackConnectionPort.
Convert data to TotalAttackConnectionProtocol.
Convert query-type to string.
Convert the interval(string) or the sample(string) to second(int).
* Create ip/ipv6 access group to apply acl to interface
*/.
* Create ip/ipv6 access list
*/.
* Create ACL target for data channel ACL
*/.
* Create ACL target for mitigation request
*/.
No description provided by the author
Create baseline.
* Stores a Blocker object to the database
*
* parameter:
* blocker Blocker
* return:
* newBlocker db_models.Blocker
* err error
*/.
* Create configure session
*/.
* Create a new customer object and store it to the DB.
* Create FlowSpec target for data channel ACL
*
* parameter:
* acl the data channel acl
*
* return
* flowspecTargets the list of flowspec
* err the error
*/.
* Create FlowSpec target for mitigation request
*
* parameter:
* m the mitigation request
* vrf the virtual routing forwarding as customer configuration
*
* return
* flowspecTargets the list of flowspec
* err the error
*/.
* Create a new MitigationScope object and store it to the DB.
* Stores a Protection object to the DB.
* Stores SignalSessionConfiguration to the DB.
Create targets.
Create telemetry configuration.
Registed telemetry parameter value (target-protocol, target-fqdn, target-uri) to DB.
Create telemetry pre-mitigation that is called by controller.
Create telemetry setup with setup_type is 'baseline'.
Create telemetry setup with setup_type is 'pipe'.
Create telemetry setup with setup_type is 'telemetry_configuration'.
Create total pipe capacity.
Default value of baseline.
Default value of total pipe capacity.
Default value of telemetry configuration.
Delete all telemetry pre-mitigation.
Delete all telemetry configuration.
Delete baseline.
* Delete the Blocker by the Blocker ID.
Delete current uri filtering telemetry pre-mitigation.
* Delete a customer by customer ID.
* Deletes a mitigation scope object by a customerId and a mitigationId.
Delete one telemetry pre-mitigation.
Delete one telemetry setup configuration.
* Deletes a protection by the mitigation ID.
No description provided by the author
* Deletes the SignalSessionConfiguration by the customer ID and session id.
* Deletes the SignalSessionConfiguration by the customer ID
*
* parameter:
* customerId customer ID
* return:
* error error
*/.
Delete telemetry attack_detail.
Delete telemetry configuration.
Delete telemetry setup with setup type is 'baseline'.
Delete telemetry setup with setup type is 'pipe'.
Delete telemetry setup with setup type is 'telemetry_configuration'.
Delete uri filtering attack detail.
Execute SQL.
No description provided by the author
*/.
Get alias by name list (the name list from baseline/pre-mitigation).
Get alias data as TargetList.
* Get all mitigationScope.
Get baseline by teleSetupId.
No description provided by the author
* Get blocker configuration by customerID and targetType
*/.
* Obtain the designated BlockerConfigurationParameters by the Blocker COnfiguration ID.
* Obtain the designated BlockerParameters by the Blocker ID.
* Obtain all the blocker information stored in the database.
* Get control filtering from mitigation scope id
*/.
* Get control filtering from mitigation scope id
*/.
* Find cuid by a customerId.
* Obtains the current SignalSessionConfiguration by the customer ID.
* Find a customer by customer ID.
* find Customer by the common name in the certificate.
* find Customer by the integer customer ID.
* Find a customer by CommonName
*
* parameter:
* customer_id Customer ID
* return:
* customer Customer
* error error
*/.
No description provided by the author
* Obtain the blocker with the least load.
Get mitigation by customerId and cuid.
* Find all mitigationId by a customerId.
Find all mitigationIds with status is 2 by a customerId.
* Obtains a mitigation scope object by a customerId and a mitigationId.
Get mitigation scope by id.
Return mitigation scope validator by input blocker type (goBgpScopeValidator or goAristaScopeValidator).
Get percentile peak and current with type is PercentilePeakAndCurrent.
Get traffic with type is Traffic.
* Find all mitigationIds with status is 8 by a customerId
*
* parameter:
* customerId id of the Customer
* return:
* mitigationIds list of mitigation id
* error error
*/.
* Obtains a Protection object by ID.
No description provided by the author
* Obtains a list of ProtectionParameter objects by ID of the parent Protection.
Get queries from Uri-query.
Session start.
* Obtains the SignalSessionConfiguration by the customer ID.
Get telemetry attack detail.
Get telemetry attack detail by Id.
Get telemetry configuration.
Get telemetry fqdn as target.
Get telemetry parameter with parameter type is 'alias'.
Get telemetry parameter with parameter type is 'fqdn'.
Get telemetry parameter with parameter type is 'protocol'.
Get telemetry parameter with parameter type is 'uri'.
Get telemetry port range.
Get telemetry prefix.
Get telemetry prefix as target.
Get telemetry setup by cuid.
Get telemetry setup by cuid and tsid >= 0.
Get telemetry setup by cuid and setup type (telemetry_configuration, pipe, baseline).
Get telemetry setup by customerId and setup type (telemetry_configuration, pipe, baseline).
Get telemetry setup by tsid.
Get telemetry setup by tsid and setup type (telemetry_configuration, pipe, baseline).
Get telemetry source count.
Get telemetry source icmp type range.
Get telemetry source port range.
Get telemetry source prefix.
Get telemetry target list.
Get telemetry top talker.
Get telemetry top talker by Id.
Get telemetry total attack connection.
Get telemetry traffic.
Get telemetry uri as target.
Get tmids (telemetry_pre_mitigation and uri_filtering_telemetry_pre_mitigation) by customer_id and cuid.
Get total connection capacity.
Get total connection capacity per port.
Get total pipe capacity.
Get traffic.
Get traffic per port.
Get traffic per protocol.
Get uri filtering attack detail.
Get uri filtering attack detail by id.
Get uri filtering icmp type range.
Get uri filtering pre-mitigation list.
Get uri filtering source count.
Get uri filtering source port range.
Get uri filtering source prefix.
Get uri filtering target.
Get uri filtering telemetry pre-mitigation.
Get uri filtering telemetry pre-mitigation attributes.
Get uri filtering telemetry pre-mitigation by id.
Get uri filtering top talker.
Get uri filtering top talker by id.
Get uri filtering total attack connection port.
Get uri filtering total attack connection protocol.
Get uri filtering traffic.
Get uri filtering traffic per port.
Get uri filtering traffic per protocol.
* Create all system tables.
* Return status that is active or inactive
*
* return:
* bool
* true status is active
* false status is inactive
*/.
Check contain integer value between uri-query and target-value target-protocol.
Check contain range values between uri-query and target-value target-port.
Check contain string value between uri-query and target-value target-prefix, target-fqdn, alias-name.
* Check vendor-mapping is exist
* true: if existed
* false: if doesn't exist
*/.
* Check existed uri filtering telemetry pre-mitigation by uri-query
* return:
* true: if existed
* false: if doesn't exist
*/.
* Check if the target prefix is not included in customer's domain address
* parameters:
* customer the customer
* targets list of mitigation target address
* return: string
* "" all targets are in customer's domain
* errMsg some of targets is not in customer's domain
*/.
* Check if the target prefix include multicast, broadcast or loopback ip address
* parameters:
* targets list of mitigation target address
* return: string
* "" all targets are valid
* errMsg some of targets is invalid
*/.
* Marshal Flowspec Rules
* Base on func MarshalFlowSpecRules(), packet "github.com/osrg/gobgp/v3/internal/pkg/apiutil" from GoBGP open source
*/.
* Marshal nlri
* Base on func MarshalNLRI(), packet "github.com/osrg/gobgp/v3/internal/pkg/apiutil" from GoBGP open source
*/.
* Marshal path attributes
* Base on func MarshalPathAttributes(), packet "github.com/osrg/gobgp/v3/internal/pkg/apiutil" from GoBGP open source
*/.
No description provided by the author
New attack detail.
No description provided by the author
New baseline.
* Create a new ConfigurationParameterRange
*
* parameter:
* min_value min_value of the range
* max_value max_value of the range
* return:
* configurationParameterRange ConfigurationParameterRange
*/.
Conflict Scope constructor.
No description provided by the author
No description provided by the author
* New Extended Communities Attribute
* Base on func NewExtendedCommunitiesAttributeFromNative(), packet "github.com/osrg/gobgp/v3/internal/pkg/apiutil" from GoBGP open source
*/.
* Flowspec protection constructor
*/.
No description provided by the author
No description provided by the author
No description provided by the author
* Create a new icmp type range.
* New IP6 Extended Communities Attribute
* Base on func NewIP6ExtendedCommunitiesAttributeFromNative(), packet "github.com/osrg/gobgp/v3/internal/pkg/apiutil" from GoBGP open source
*/.
Mitigation Scope constructor.
New percentile peak and current.
* Create a new port range.
Create new prefixes from CIDR format strings.
* Create new prefixes from FQDN format strings.
No description provided by the author
* Create new prefixes from URI format strings.
No description provided by the author
* New Redirect Extended Communities Attribute
* Base on func redirectParser() and, packet "github.com/osrg/gobgp/v3/cmd/gobgp" from GoBGP open source
*/.
No description provided by the author
No description provided by the author
No description provided by the author
* Store newly created SignalSessionConfiguration objects to the DB.
New targets (target_prefix, target_port_range, target_uri, target_fqdn, alias_name).
New target port range.
New telemetry attack-detail.
New telemetry configuration.
New telemetry prefix.
New telemetry pre-mtigation.
New telemetry top talker.
New telemetry total-attack-traffic.
New top talker.
New total attack connection port.
New total attack connection protocol.
New total connection capacity.
New total connection capacity per port.
New total pipe capacity.
New traffic.
New traffic per port.
New traffic per protocol.
* Convert port to string
*/.
No description provided by the author
database reconnection create.
* Refresh or update an active session configuration when client request Get with sid
* or request Put with sid to update session configuration
*/.
Registed baseline to DB.
Registered telemetry configuration to DB.
Registered telemetry parameter int value.
Registered telemetry parameter string value.
Registed telemetry port range to DB.
Registered telemetry prefix to DB.
Registed telemetry setup to DB.
Registered total connection capacity to DB.
Registered total connection capacity per port to DB.
Registed total pipe capacity to DB.
Registered traffic to DB.
Registered traffic per port to DB.
Registered traffic per procol to DB.
Registered unit configuration to DB.
Register uri filtering telemetry pre-mitigation.
* Remove ip/ipv6 access group to remove acl from interface
*/.
* Remove ip/ipv6 access list
*/.
* Remove Acl by ID
*/.
No description provided by the author
* Remove by customer id an active session configuration out of map when it is deleted
* or expired max-age and reset to default value
*/.
* Remove configure session
*/.
* Remove control filtering by ID
*/.
Remove overlap prefix.
test mode set.
Execute SQL display mode change.
* Updates a protection object in the DB on the invocation of the protection.
* Updates a protection object in the DB on the termination of the protection.
* Update acl_name for mitigation scope
*/.
Update baseline.
* Update the load value of a Blocker
*
* parameter:
* blockerId id
* diff diff of the load value
* return:
* error error
*/.
* Update a customer object.
* Updates a MitigationScope object in the DB.
* Updates a MitigationScope status in the DB.
* Updates a Protection object in the DB.
* Updates SignalSessionConfiguration in the DB.
Update telemetry configuration.
Update total pipe capacity.
Validate attack-detail.
Validate baseline.
*
* Check conflict for unit
* parameter:
* percentileList: the list with key is unit, value is value of
* low-percentile-g/mid-percentile-g/high-percentile-g/peak-g/current-g
* percentile: the value of low-percentile-g/mid-percentile-g/high-percentile-g/peak-g/current-g
* unit: the unit
* return
* errMsg:
* if unit is not conflict, errMsg is ""
* if unit is conflict, errMsg is not ""
*/.
*
* Validate unit for low-percentile-g, mid-percentile-g, high-percentile-g, peak-g, current-g
* parameter:
* lowPercentileList: the list with key is unit, value is value of low-percentile-g
* midPercentileList: the list with key is unit, value is value of mid-percentile-g
* highPercentileList: the list with key is unit, value is value of high-percentile-g
* peakPercentileList: the list with key is unit, value is value of peak-g
* currentPercentileList: the list with key is unit, value is value of current-g
* return
* errMsg:
* if unit is not conflict, errMsg is ""
* if unit is conflict, errMsg is not ""
*/.
*
* Auto scale and check conflict for unit
* parameter:
* percentileList: the list with key is unit, value is value of
* low-percentile-g/mid-percentile-g/high-percentile-g/peak-g/current-g
* return
* errMsg:
* if unit is not conflict, errMsg is ""
* if unit is conflict, errMsg is not ""
*/.
Validate description-lang.
Validate port.
Validate port range.
Validate prefix.
Validate protocol.
Validate protocol.
Validate targets (target_prefix, target_port_range, target_uri, target_fqdn).
Validate telemetry configuration.
Validate telemetry pre-mitigation.
Valdate total-attack-connection-port.
Valdate total-attack-connection-protocol.
Validate total connection capacity.
Validate total connection capacity per port.
Validate total pipe capacity.
Validate traffic.
Validate traffic per port.
Validate traffic per protocol.
Validate unit.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
Arista ACL that mapping with mitigation request or data channel ACL.
No description provided by the author
* Struct for Active Mitigation Request.
* Struct for Fresh Session Configuration.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
define Blocker struct.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GoBGP Flowspec bitmask that mapping with mitigation request or data channel flags.
GoBGP Flowspec icmp type that mapping with mitigation request or data channel icmp type.
GoBGP Flowspec object that mapping with mitigation request or data channel ACL.
GoBGP Flowspec port that mapping with mitigation request or data channel port.
No description provided by the author
implements Blocker.
implements Blocker.
implements Blocker.
No description provided by the author
Blocker selection strategy which select the blockers with lowest loads.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Object to store CIDR.
Protection Base.
No description provided by the author
implements Protection.
No description provided by the author
No description provided by the author
implements SignalSessionConfigurationValidator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
Blocker selection algorithm interface.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author