core

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const PWD = `github.com/tencentcloudplatform/tcpicli/core`

Variables

View Source
var Endpoint = map[string]string{
	"vpc":     "vpc.api.qcloud.com/v2/index.php",
	"cdn":     "cdn.api.qcloud.com/v2/index.php",
	"cvm":     "cvm.api.qcloud.com/v2/index.php",
	"ccs":     "ccs.api.qcloud.com/v2/index.php",
	"account": "account.api.qcloud.com/v2/index.php",
	"dfw":     "dfw.api.qcloud.com/v2/index.php",
	"redis":   "redis.api.qcloud.com/v2/index.php",
	"img":     "image.api.qcloud.com/v2/index.php",
	"eip":     "eip.api.qcloud.com/v2/index.php",
	"lb":      "lb.api.qcloud.com/v2/index.php",
	"vod":     "vod.api.qcloud.com/v2/index.php",
}
View Source
var (
	Log = log.New(ioutil.Discard, "", log.LstdFlags)
)

Functions

func AssignParams

func AssignParams(params map[string]interface{}, options ...string) error

func CreateProfile

func CreateProfile(name string, conf *Configure) error

func CurrentProfile

func CurrentProfile() string

func DefaultRegion

func DefaultRegion() string

func DoAction

func DoAction(service, action string, options ...string) ([]byte, error)

func FmtOutput added in v1.1.0

func FmtOutput(view string, intf interface{}) ([]byte, error)

func HasRegion

func HasRegion(options ...string) (string, bool)

func HasVersion added in v1.1.0

func HasVersion(options ...string) (string, bool)

func Inspect

func Inspect(flag string, cmd string, action string, options ...string) error

unmarshal response to query into empty interface

func Internal

func Internal() bool

func ListProfiles

func ListProfiles() []*ini.Section

func ParamsToStr

func ParamsToStr(params map[string]interface{}) string

func SwitchProfile

func SwitchProfile(name string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(requesturl string, verbose bool) *Client

func (*Client) SendRequest

func (c *Client) SendRequest(method string, params map[string]interface{}) (*http.Response, error)

type ConfigFile

type ConfigFile struct {
	*ini.File
}

type Configure

type Configure struct {
	SecretId      string
	SecretKey     string
	DefaultRegion string
	Internal      bool
}

Jump to

Keyboard shortcuts

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