special_policy

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, gatewayID, throttleID, strategyID string) (err error)

Types

type CreateOpts

type CreateOpts struct {
	GatewayID  string `json:"-"`
	ThrottleID string `json:"throttle_id" required:"true"`
	CallLimits int    `json:"call_limits" required:"true"`
	ObjectID   string `json:"object_id" required:"true"`
	ObjectType string `json:"object_type" required:"true"`
}

type ListOpts

type ListOpts struct {
	GatewayID  string `json:"-"`
	ThrottleID string `json:"-"`
	ObjectType string `q:"object_type"`
	AppName    string `q:"app_name"`
	User       string `q:"user"`
}

type ThrottlingPage

type ThrottlingPage struct {
	pagination.NewSinglePageBase
}

type ThrottlingResp

type ThrottlingResp struct {
	ID         string `json:"id"`
	CallLimits int    `json:"call_limits"`
	ApplyTime  string `json:"apply_time"`
	AppName    string `json:"app_name"`
	AppID      string `json:"app_id"`
	ObjectID   string `json:"object_id"`
	ObjectType string `json:"object_type"`
	ObjectName string `json:"object_name"`
	ThrottleID string `json:"throttle_id"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*ThrottlingResp, error)

func ExtractTrPolicy

func ExtractTrPolicy(r pagination.NewPage) ([]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:"-"`
	SpecialPolicyID string `json:"strategy_id" required:"true"`
	CallLimits      int    `json:"call_limits" required:"true"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL