Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, gatewayID, throttleID string) (err error)
- func UnbindPolicy(client *golangsdk.ServiceClient, gatewayID, throttleBindID string) (err error)
- type ApiThrottle
- type BindOpts
- type BindThrottleResp
- type BindingPage
- type CreateOpts
- type ListBindingOpts
- type ListBoundOpts
- type ListOpts
- type ListUnoundOpts
- type ThrottlingBindResp
- type ThrottlingPage
- type ThrottlingResp
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*ThrottlingResp, error)
- func ExtractTrPolicy(r pagination.NewPage) ([]ThrottlingResp, error)
- func Get(client *golangsdk.ServiceClient, gatewayID, throttleID string) (*ThrottlingResp, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) ([]ThrottlingResp, error)
- func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*ThrottlingResp, error)
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, gatewayID, throttleID string) (err error)
func UnbindPolicy ¶
func UnbindPolicy(client *golangsdk.ServiceClient, gatewayID, throttleBindID string) (err error)
Types ¶
type ApiThrottle ¶
type ApiThrottle struct { AuthType string `json:"auth_type"` GroupName string `json:"group_name"` PublishID string `json:"publish_id"` ThrottleApplyID string `json:"throttle_apply_id"` ApplyTime string `json:"apply_time"` Description string `json:"remark"` RunEnvID string `json:"run_env_id"` Type int `json:"int"` ThrottleName string `json:"throttle_name"` ReqUri string `json:"req_uri"` RunEnvName string `json:"run_env_name"` GroupID string `json:"group_id"` Name string `json:"name"` ID string `json:"id"` ReqID string `json:"req_id"` ReqMethod string `json:"req_method"` }
func ExtractBindings ¶
func ExtractBindings(r pagination.NewPage) ([]ApiThrottle, error)
func ListAPIBoundPolicy ¶
func ListAPIBoundPolicy(client *golangsdk.ServiceClient, opts ListBoundOpts) ([]ApiThrottle, error)
func ListAPIUnoundPolicy ¶
func ListAPIUnoundPolicy(client *golangsdk.ServiceClient, opts ListBoundOpts) ([]ApiThrottle, error)
type BindThrottleResp ¶
type BindThrottleResp struct { PublishID string `json:"publish_id"` Scope int `json:"scope"` StrategyID string `json:"strategy_id"` ApplyTime string `json:"apply_time"` ID string `json:"id"` }
func BindPolicy ¶
func BindPolicy(client *golangsdk.ServiceClient, opts BindOpts) ([]BindThrottleResp, error)
type BindingPage ¶
type BindingPage struct {
pagination.NewSinglePageBase
}
type CreateOpts ¶
type CreateOpts struct { GatewayID string `json:"-"` Name string `json:"name" required:"true"` AppCallLimits *int `json:"app_call_limits,omitempty"` ApiCallLimits *int `json:"api_call_limits" required:"true"` TimeInterval *int `json:"time_interval" required:"true"` TimeUnit string `json:"time_unit" required:"true"` Description string `json:"remark,omitempty"` Type *int `json:"type,omitempty"` IpCallLimits *int `json:"ip_call_limits,omitempty"` UserCallLimits *int `json:"user_call_limits,omitempty"` EnableAdaptiveControl string `json:"enable_adaptive_control,omitempty"` }
type ListBindingOpts ¶
type ListBoundOpts ¶
type ListUnoundOpts ¶
type ThrottlingBindResp ¶
type ThrottlingBindResp struct { AppCallLimits int `json:"app_call_limits"` Name string `json:"name"` TimeUnit string `json:"time_unit"` Description string `json:"remark"` ApiCallLimits int `json:"api_call_limits"` Type int `json:"type"` EnableAdaptiveControl string `json:"enable_adaptive_control"` UserCallLimits int `json:"user_call_limits"` TimeInterval int `json:"time_interval"` IpCallLimits int `json:"ip_call_limits"` ID string `json:"id"` BindNum int `json:"bind_num"` IsIncluSpecialThrottle int `json:"is_inclu_special_throttle"` CreateTime string `json:"create_time"` EnvName string `json:"env_name"` BindID string `json:"bind_id"` BindTime string `json:"bind_time"` }
func ExtractPolicies ¶
func ExtractPolicies(r pagination.NewPage) ([]ThrottlingBindResp, error)
func ListBoundPolicies ¶
func ListBoundPolicies(client *golangsdk.ServiceClient, opts ListBindingOpts) ([]ThrottlingBindResp, error)
type ThrottlingPage ¶
type ThrottlingPage struct {
pagination.NewSinglePageBase
}
type ThrottlingResp ¶
type ThrottlingResp struct { AppCallLimits int `json:"app_call_limits"` Name string `json:"name"` TimeUnit string `json:"time_unit"` Description string `json:"remark"` ApiCallLimits int `json:"api_call_limits"` Type int `json:"type"` EnableAdaptiveControl string `json:"enable_adaptive_control"` UserCallLimits int `json:"user_call_limits"` TimeInterval int `json:"time_interval"` IpCallLimits int `json:"ip_call_limits"` ID string `json:"id"` BindNum int `json:"bind_num"` IsIncluSpecialThrottle int `json:"is_inclu_special_throttle"` CreateTime string `json:"create_time"` }
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*ThrottlingResp, error)
func ExtractTrPolicy ¶
func ExtractTrPolicy(r pagination.NewPage) ([]ThrottlingResp, error)
func Get ¶
func Get(client *golangsdk.ServiceClient, gatewayID, throttleID string) (*ThrottlingResp, error)
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) ([]ThrottlingResp, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*ThrottlingResp, error)
type UpdateOpts ¶
type UpdateOpts struct { GatewayID string `json:"-"` ThrottleID string `json:"-"` Name string `json:"name" required:"true"` AppCallLimits *int `json:"app_call_limits,omitempty"` ApiCallLimits *int `json:"api_call_limits" required:"true"` TimeInterval *int `json:"time_interval" required:"true"` TimeUnit string `json:"time_unit" required:"true"` Description string `json:"remark,omitempty"` Type *int `json:"type,omitempty"` IpCallLimits *int `json:"ip_call_limits,omitempty"` UserCallLimits *int `json:"user_call_limits,omitempty"` EnableAdaptiveControl string `json:"enable_adaptive_control,omitempty"` }
Click to show internal directories.
Click to hide internal directories.