Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RateLimitingPolicyScopeTypeStrings ¶
func RateLimitingPolicyScopeTypeStrings() []string
RateLimitingPolicyScopeTypeStrings returns a slice of all String values of the enum
Types ¶
type GetRateLimitingPolicyByIdRequest ¶
type GetRateLimitingPolicyByIdRequest struct {
ID string `uri:"id"`
}
type ListRateLimitingPoliciesResponse ¶
type ListRateLimitingPoliciesResponse struct {
ItemType string `json:"ItemType"`
TotalResults int `json:"TotalResults"`
ItemsPerPage int `json:"ItemsPerPage"`
Items []RateLimitingPolicy `json:"Items"`
NumberOfPages int `json:"NumberOfPages"`
LastPageNumber int `json:"LastPageNumber"`
}
func List ¶
func List(client newclient.Client, request ListRateLimitingPoliciesRequest) (*ListRateLimitingPoliciesResponse, error)
List returns a paginated collection of rate limiting policies.
type ModifyRateLimitingPolicyCommand ¶
type ModifyRateLimitingPolicyCommand struct {
ID string `uri:"id" json:"-"`
Name string `json:"Name"`
IsEnabled bool `json:"IsEnabled"`
ScopeType RateLimitingPolicyScopeType `json:"ScopeType"`
RequestsPerHour int `json:"RequestsPerHour"`
BurstLimit int `json:"BurstLimit"`
AuditMode bool `json:"AuditMode"`
}
type RateLimitingPolicy ¶
type RateLimitingPolicy struct {
ID string `json:"Id"`
IsBuiltIn bool `json:"IsBuiltIn"`
Name string `json:"Name"`
IsEnabled bool `json:"IsEnabled"`
ScopeType RateLimitingPolicyScopeType `json:"ScopeType"`
RequestsPerHour int `json:"RequestsPerHour"`
BurstLimit int `json:"BurstLimit"`
AuditMode bool `json:"AuditMode"`
}
func GetByID ¶
func GetByID(client newclient.Client, request GetRateLimitingPolicyByIdRequest) (*RateLimitingPolicy, error)
GetByID returns the rate limiting policy that matches the given ID.
func Modify ¶
func Modify(client newclient.Client, command ModifyRateLimitingPolicyCommand) (*RateLimitingPolicy, error)
Modify changes the rate limiting policy that matches the given ID.
type RateLimitingPolicyScopeType ¶
type RateLimitingPolicyScopeType int
const ( Unauthenticated RateLimitingPolicyScopeType = iota AuthenticatedHuman AuthenticatedAgent )
func RateLimitingPolicyScopeTypeString ¶
func RateLimitingPolicyScopeTypeString(s string) (RateLimitingPolicyScopeType, error)
RateLimitingPolicyScopeTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func RateLimitingPolicyScopeTypeValues ¶
func RateLimitingPolicyScopeTypeValues() []RateLimitingPolicyScopeType
RateLimitingPolicyScopeTypeValues returns all values of the enum
func (RateLimitingPolicyScopeType) IsARateLimitingPolicyScopeType ¶
func (i RateLimitingPolicyScopeType) IsARateLimitingPolicyScopeType() bool
IsARateLimitingPolicyScopeType returns "true" if the value is listed in the enum definition. "false" otherwise
func (RateLimitingPolicyScopeType) MarshalJSON ¶
func (i RateLimitingPolicyScopeType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for RateLimitingPolicyScopeType
func (RateLimitingPolicyScopeType) String ¶
func (i RateLimitingPolicyScopeType) String() string
func (*RateLimitingPolicyScopeType) UnmarshalJSON ¶
func (i *RateLimitingPolicyScopeType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for RateLimitingPolicyScopeType