Documentation
¶
Overview ¶
* GoStack API Client * * Copyright 2022 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoStack API Client * * Copyright 2021 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoStack API Client * * Copyright 2022 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountableStatistic ¶
type DDoS ¶ added in v0.0.4
type DDoS struct {
Global string `json:"globalThreshold"`
Burst string `json:"burstThreshold"`
SubSecond string `json:"subSecondBurstThreshold"`
}
func (DDoS) GetSubSecond ¶ added in v0.0.4
func (DDoS) MustGetBurst ¶ added in v0.0.4
func (DDoS) MustGetGlobal ¶ added in v0.0.4
func (DDoS) MustGetSubSecond ¶ added in v0.0.4
type NumericTrafficEntry ¶ added in v0.0.3
type NumericTrafficEntry struct {
Timestamp time.Time
Api uint64
Ajax uint64
Static uint64
CustomBlocked uint64
PolicyBlocked uint64
DdosBlocked uint64
Monitored uint64
CustomWhitelisted uint64
PolicyWhitelisted uint64
OriginError4xx uint64
OriginError5xx uint64
OriginTimeout uint64
Uncategorized uint64
PassedToOrigin uint64
ResponseTime float64
Total uint64
}
func (NumericTrafficEntry) IsEmpty ¶ added in v0.0.3
func (n NumericTrafficEntry) IsEmpty() bool
type RequestDetails ¶
type RequestDetails struct {
Id string `json:"id"`
Path string `json:"path"`
ClientIPString string `json:"clientIp"`
Method string `json:"method"`
StatusCode string `json:"statusCode"`
RuleName string `json:"ruleName"`
CountryCode string `json:"country"`
Action string `json:"action"`
Result string `json:"result"`
RuleID string `json:"ruleId"`
UserAgent string `json:"userAgent"`
UserAgentClient string `json:"userAgentClient"`
Organization string `json:"organization"`
RequestTime string `json:"requestTime"`
ReferenceID string `json:"referenceId"`
}
type RequestStatistics ¶
type RequestStatistics struct {
Total RequestStatisticsData `json:"count"`
Blocked RequestStatisticsData `json:"blocked"`
}
type RequestStatisticsAction ¶
func (RequestStatisticsAction) GetCount ¶
func (r RequestStatisticsAction) GetCount() (int64, error)
func (RequestStatisticsAction) MustGetCount ¶
func (r RequestStatisticsAction) MustGetCount() int
type RequestStatisticsCountry ¶
type RequestStatisticsCountry struct {
Country string `json:"country"`
CountryCode string `json:"countryCode"`
Count string `json:"count"`
}
func (RequestStatisticsCountry) GetCount ¶
func (r RequestStatisticsCountry) GetCount() (int64, error)
func (RequestStatisticsCountry) MustGetCount ¶
func (r RequestStatisticsCountry) MustGetCount() int
type RequestStatisticsData ¶
type RequestStatisticsData struct {
Rules []RequestStatisticsRule `json:"rules"`
Countries []RequestStatisticsCountry `json:"countries"`
Organizations []RequestStatisticsOrganization `json:"organizations"`
Actions []RequestStatisticsAction `json:"actions"`
}
type RequestStatisticsOrganization ¶
type RequestStatisticsOrganization struct {
Organization string `json:"organization"`
Count string `json:"count"`
}
func (RequestStatisticsOrganization) GetCount ¶
func (r RequestStatisticsOrganization) GetCount() (int64, error)
func (RequestStatisticsOrganization) MustGetCount ¶
func (r RequestStatisticsOrganization) MustGetCount() int
type RequestStatisticsRule ¶
func (RequestStatisticsRule) GetCount ¶
func (r RequestStatisticsRule) GetCount() (int64, error)
func (RequestStatisticsRule) MustGetCount ¶
func (r RequestStatisticsRule) MustGetCount() int
type TrafficEntry ¶ added in v0.0.3
type TrafficEntry struct {
Timestamp string `json:"timestamp"`
Api string `json:"api"`
Ajax string `json:"ajax"`
Static string `json:"static"`
CustomBlocked string `json:"customBlocked"`
PolicyBlocked string `json:"policyBlocked"`
DdosBlocked string `json:"ddosBlocked"`
Monitored string `json:"monitored"`
CustomWhitelisted string `json:"customWhitelisted"`
PolicyWhitelisted string `json:"policyWhitelisted"`
OriginError4xx string `json:"originError4xx"`
OriginError5xx string `json:"originError5xx"`
OriginTimeout string `json:"originTimeout"`
Uncategorized string `json:"uncategorized"`
PassedToOrigin string `json:"passedToOrigin"`
ResponseTime string `json:"responseTime"`
Total string `json:"total"`
}
func (TrafficEntry) Numeric ¶ added in v0.0.3
func (t TrafficEntry) Numeric() (ret NumericTrafficEntry, err error)
type TrafficItem ¶ added in v0.0.3
type TrafficItem struct {
Traffic TrafficEntry
StartTime time.Time
Interval Interval
}