aregion

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCrossRegionMiddleware

func AddCrossRegionMiddleware(client *resty.Client) *resty.Client

func ClearCache

func ClearCache()

func InitCrossRegionConfig

func InitCrossRegionConfig(application *aconfig.Application) error

func MustNewRestyWith

func MustNewRestyWith(portName aconfig.PortName, appConfig *aconfig.Application, protocol string) *resty.Client

func NewRestyWith

func NewRestyWith(portName aconfig.PortName, appConfig *aconfig.Application, protocol string) (*resty.Client, error)

Types

type AuthServer

type AuthServer struct {
	Location *Location `json:"location,omitempty"`
}

type Az

type Az struct {
	AzCode  string `json:"azCode,omitempty"`
	AzName  string `json:"azName,omitempty"`
	Status  int    `json:"status,omitempty"`
	Default bool   `json:"default,omitempty"`
	PropMap Prop   `json:"propMap,omitempty"`
}

type Config

type Config struct {
	AuthServer   *AuthServer   `json:"auth_server,omitempty"`
	RegionServer *RegionServer `json:"region_server,omitempty"`
}

type Location

type Location struct {
	Address string `json:"address,omitempty"`
	Port    int    `json:"port,omitempty"`
	Path    string `json:"path,omitempty"`
	AK      string `json:"ak,omitempty"`
	SK      string `json:"sk,omitempty"`
}

type Prop

type Prop map[string]interface{}

func (Prop) GetString

func (p Prop) GetString(key string) string

func (Prop) GetStringIgnoreCase

func (p Prop) GetStringIgnoreCase(key string) string

type Region

type Region struct {
	RegionCode string `json:"regionCode,omitempty"`
	RegionName string `json:"regionName,omitempty"`
	Status     int    `json:"status,omitempty"`
	OpsEnv     string `json:"opsEnv,omitempty"`
	OpsArch    string `json:"opsArch,omitempty"`
	Default    bool   `json:"default,omitempty"`
	PropMap    Prop   `json:"propMap,omitempty"`
	AzList     []*Az  `json:"azList,omitempty"`
}

func GetRegionList

func GetRegionList(ctx context.Context) (list []*Region, err error)

get operation region list

type RegionResult

type RegionResult struct {
	Status   int       `json:"status,omitempty"`
	Message  string    `json:"message,omitempty"`
	ErrorMsg string    `json:"errorMsg,omitempty"`
	Regions  []*Region `json:"result,omitempty"`
}

type RegionServer

type RegionServer struct {
	Location *Location `json:"location,omitempty"`
}

Jump to

Keyboard shortcuts

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