Documentation
¶
Index ¶
- func GetCommands(base bot.BaseCommand, config *config.Config) bot.Commands
- type Config
- type CreditsResponse
- type HopResult
- type Measurement
- type MeasurementDefinition
- type MeasurementRequest
- type MeasurementResult
- type MeasurementStatus
- type MeasurementsResponse
- type PayloadResult
- type Probes
- type StreamingResponse
- type StreamingResponsePayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommands ¶
Types ¶
type Config ¶
type Config struct {
APIKey string `mapstructure:"api_key"`
APIURL string `mapstructure:"api_url"`
StreamURL string `mapstructure:"stream_url"`
UpdateInterval time.Duration `mapstructure:"update_interval"`
}
Config configuration: API key to do API calls
type CreditsResponse ¶
type CreditsResponse struct {
CurrentBalance int `json:"current_balance"`
CreditChecked bool `json:"credit_checked"`
MaxDailyCredits int `json:"max_daily_credits"`
EstimatedDailyIncome int `json:"estimated_daily_income"`
EstimatedDailyExpenditure int `json:"estimated_daily_expenditure"`
EstimatedDailyBalance int `json:"estimated_daily_balance"`
CalculationTime string `json:"calculation_time"`
EstimatedRunoutSeconds any `json:"estimated_runout_seconds"`
PastDayMeasurementResults int `json:"past_day_measurement_results"`
PastDayCreditsSpent int `json:"past_day_credits_spent"`
LastDateDebited string `json:"last_date_debited"`
LastDateCredited string `json:"last_date_credited"`
IncomeItems string `json:"income_items"`
ExpenseItems string `json:"expense_items"`
Transactions string `json:"transactions"`
}
type Measurement ¶
type Measurement struct {
AddressFamily int `json:"af"`
CreationTime int `json:"creation_time"`
CreditsPerResult int `json:"credits_per_result"`
Description string `json:"description"`
EstimatedResultsPerDay int `json:"estimated_results_per_day"`
Group string `json:"group"`
GroupID int64 `json:"group_id"`
ID int `json:"id"`
InWifiGroup bool `json:"in_wifi_group"`
IncludeProbeID bool `json:"include_probe_id"`
Interval int `json:"interval"`
IsAllScheduled bool `json:"is_all_scheduled"`
IsOneoff bool `json:"is_oneoff"`
IsPublic bool `json:"is_public"`
PacketInterval int64 `json:"packet_interval"`
Packets int `json:"packets"`
ParticipantCount int64 `json:"participant_count"`
ProbesRequested int64 `json:"probes_requested"`
ProbesScheduled int64 `json:"probes_scheduled"`
ResolveOnProbe bool `json:"resolve_on_probe"`
ResolvedIps string `json:"resolved_ips"`
Result string `json:"result"`
Size int64 `json:"size"`
Spread int64 `json:"spread"`
StartTime int `json:"start_time"`
Status MeasurementStatus `json:"status"`
StopTime int `json:"stop_time"`
Tags []string `json:"tags"`
Target string `json:"target"`
TargetAsn int64 `json:"target_asn"`
TargetIP string `json:"target_ip"`
TargetPrefix string `json:"target_prefix"`
Type string `json:"type"`
}
type MeasurementDefinition ¶
type MeasurementDefinition struct {
Target string `json:"target,omitempty"`
Af int `json:"af,omitempty"`
ResponseTimeout int `json:"response_timeout,omitempty"`
Description string `json:"description,omitempty"`
Protocol string `json:"protocol,omitempty"`
ResolveOnProbe bool `json:"resolve_on_probe,omitempty"`
Packets int `json:"packets,omitempty"`
Size int `json:"size,omitempty"`
FirstHop int `json:"first_hop,omitempty"`
MaxHops int `json:"max_hops,omitempty"`
Paris int `json:"paris,omitempty"`
DestinationOptionSize int `json:"destination_option_size,omitempty"`
HopByHopOptionSize int `json:"hop_by_hop_option_size,omitempty"`
DontFragment bool `json:"dont_fragment,omitempty"`
SkipDNSCheck bool `json:"skip_dns_check,omitempty"`
Type string `json:"type,omitempty"`
IsPublic bool `json:"is_public"`
}
type MeasurementRequest ¶
type MeasurementRequest struct {
Definitions []MeasurementDefinition `json:"definitions"`
Probes []Probes `json:"probes"`
IsOneOff bool `json:"is_oneoff"`
}
type MeasurementResult ¶
type MeasurementResult struct {
Measurements []int `json:"measurements"`
}
type MeasurementStatus ¶
type MeasurementsResponse ¶
type MeasurementsResponse struct {
Count int `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Measurements []Measurement `json:"results"`
}
type PayloadResult ¶
type StreamingResponse ¶
type StreamingResponse struct {
Type string `json:"type"`
Payload StreamingResponsePayload `json:"payload"`
}
func (*StreamingResponse) UnmarshalJSON ¶
func (sr *StreamingResponse) UnmarshalJSON(b []byte) error
type StreamingResponsePayload ¶
type StreamingResponsePayload struct {
Fw int `json:"fw,omitempty"`
Mver string `json:"mver,omitempty"`
Lts int `json:"lts,omitempty"`
Endtime int `json:"endtime,omitempty"`
DstName string `json:"dst_name,omitempty"`
DstAddr string `json:"dst_addr,omitempty"`
SrcAddr string `json:"src_addr,omitempty"`
Proto string `json:"proto,omitempty"`
Af int `json:"af,omitempty"`
Size int `json:"size,omitempty"`
ParisID int `json:"paris_id,omitempty"`
Result []PayloadResult `json:"result,omitempty"`
MsmID int `json:"msm_id,omitempty"`
PrbID int `json:"prb_id,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
MsmName string `json:"msm_name,omitempty"`
From string `json:"from,omitempty"`
Type string `json:"type,omitempty"`
GroupID int `json:"group_id,omitempty"`
}
func (StreamingResponsePayload) String ¶
func (srp StreamingResponsePayload) String() string
Click to show internal directories.
Click to hide internal directories.