key

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, groupID string) (err error)

func UnbindKey

func UnbindKey(client *golangsdk.ServiceClient, gatewayID, signBindingID string) (err error)

Types

type ApiForSign

type ApiForSign struct {
	AuthType      string `json:"auth_type"`
	RunEnvName    string `json:"run_env_name"`
	GroupName     string `json:"group_name"`
	PublishID     string `json:"publish_id"`
	GroupID       string `json:"group_id"`
	Name          string `json:"name"`
	Description   string `json:"Remark"`
	RunEnvID      string `json:"run_env_id"`
	ID            string `json:"id"`
	ReqURI        string `json:"req_uri"`
	Type          int    `json:"type"`
	SignatureName string `json:"signature_name"`
}

func ExtractApis

func ExtractApis(r pagination.NewPage) ([]ApiForSign, error)

func ListUnboundKeys

func ListUnboundKeys(client *golangsdk.ServiceClient, opts ListUnbindOpts) ([]ApiForSign, error)

type BindOpts

type BindOpts struct {
	GatewayID  string   `json:"-"`
	SignID     string   `json:"sign_id" required:"true"`
	PublishIds []string `json:"publish_ids" required:"true"`
}

type BindSignResp

type BindSignResp struct {
	PublishID      string `json:"publish_id"`
	ApiID          string `json:"api_id"`
	ApiType        int    `json:"api_type"`
	ApiName        string `json:"api_name"`
	ApiDescription string `json:"api_remark"`
	EnvID          string `json:"env_id"`
	EnvName        string `json:"env_name"`
	GroupName      string `json:"group_name"`
	Name           string `json:"name"`
	SignType       string `json:"sign_type"`
	SignKey        string `json:"sign_key"`
	SignSecret     string `json:"sign_secret"`
	SignAlgorithm  string `json:"sign_algorithm"`
	BindingTime    string `json:"binding_time"`
	ID             string `json:"id"`
	SignID         string `json:"sign_id"`
	SignName       string `json:"sign_name"`
}

func BindKey

func BindKey(client *golangsdk.ServiceClient, opts BindOpts) ([]BindSignResp, error)

func ExtractBindings

func ExtractBindings(r pagination.NewPage) ([]BindSignResp, error)

func ListAPIBoundKeys

func ListAPIBoundKeys(client *golangsdk.ServiceClient, opts ListBoundOpts) ([]BindSignResp, error)

ListAPIBoundKeys This func basically copies ListBoundKeys without signature info I guess the intended way was to return []ApiForSign here but something went wrong along the way

func ListBoundKeys

func ListBoundKeys(client *golangsdk.ServiceClient, opts ListBindingOpts) ([]BindSignResp, error)

type BindingPage

type BindingPage struct {
	pagination.NewSinglePageBase
}

type CreateOpts

type CreateOpts struct {
	GatewayID     string `json:"-"`
	Name          string `json:"name" required:"true"`
	SignType      string `json:"sign_type,omitempty"`
	SignKey       string `json:"sign_key,omitempty"`
	SignSecret    string `json:"sign_secret,omitempty"`
	SignAlgorithm string `json:"sign_algorithm,omitempty"`
}

type ListBindingOpts

type ListBindingOpts struct {
	GatewayID string `json:"-"`
	ApiID     string `q:"api_id"`
	SignID    string `q:"sign_id"`
	SignName  string `q:"sign_name"`
	EnvID     string `q:"env_id"`
}

type ListBoundOpts

type ListBoundOpts struct {
	GatewayID string `json:"-"`
	ApiID     string `q:"api_id"`
	SignID    string `q:"sign_id"`
	EnvID     string `q:"env_id"`
	ApiName   string `q:"api_name"`
	GroupID   string `q:"group_id"`
}

type ListOpts

type ListOpts struct {
	GatewayID     string `json:"-"`
	SignatureID   string `q:"id"`
	SignatureName string `q:"name"`
	PreciseSearch string `q:"precise_search"`
}

type ListUnbindOpts

type ListUnbindOpts struct {
	GatewayID string `json:"-"`
	ApiID     string `q:"api_id"`
	SignID    string `q:"sign_id"`
	SignName  string `q:"sign_name"`
	EnvID     string `q:"env_id"`
}

type SignKeyResp

type SignKeyResp struct {
	Name          string `json:"name"`
	SignType      string `json:"sign_type"`
	SignKey       string `json:"sign_key"`
	SignSecret    string `json:"sign_secret"`
	SignAlgorithm string `json:"sign_algorithm"`
	UpdateTime    string `json:"update_time"`
	CreateTime    string `json:"create_time"`
	ID            string `json:"id"`
}

func Create

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

func ExtractSignatureKey

func ExtractSignatureKey(r pagination.NewPage) ([]SignKeyResp, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]SignKeyResp, error)

func Update

func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*SignKeyResp, error)

type SignatureKeyPage

type SignatureKeyPage struct {
	pagination.NewSinglePageBase
}

type UpdateOpts

type UpdateOpts struct {
	GatewayID     string `json:"-"`
	SignID        string `json:"-"`
	Name          string `json:"name" required:"true"`
	SignType      string `json:"sign_type,omitempty"`
	SignKey       string `json:"sign_key,omitempty"`
	SignSecret    string `json:"sign_secret,omitempty"`
	SignAlgorithm string `json:"sign_algorithm,omitempty"`
}

Jump to

Keyboard shortcuts

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