Documentation ¶
Index ¶
- func GetUrlFormedMap(source map[string]string) string
- type IRequest
- type SRequest
- func (self *SRequest) AddFormParam(key, value string)
- func (self *SRequest) AddHeaderParam(key, value string)
- func (self *SRequest) AddQueryParam(key, value string)
- func (self *SRequest) BuildQueries() string
- func (self *SRequest) BuildUrl() string
- func (self *SRequest) GetBodyReader() io.Reader
- func (self *SRequest) GetContent() []byte
- func (self *SRequest) GetEndpoint() string
- func (self *SRequest) GetFormParams() map[string]string
- func (self *SRequest) GetHeaders() map[string]string
- func (self *SRequest) GetHost() string
- func (self *SRequest) GetMethod() string
- func (self *SRequest) GetPort() string
- func (self *SRequest) GetProduct() string
- func (self *SRequest) GetProjectId() string
- func (self *SRequest) GetQueryParams() map[string]string
- func (self *SRequest) GetRegionId() string
- func (self *SRequest) GetScheme() string
- func (self *SRequest) GetStringToSign() string
- func (self *SRequest) GetURI() string
- func (self *SRequest) GetVersion() string
- func (self *SRequest) SetContent(content []byte)
- func (self *SRequest) SetScheme(scheme string)
- func (self *SRequest) SetStringToSign(stringToSign string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUrlFormedMap ¶
Types ¶
type IRequest ¶
type IRequest interface { GetScheme() string GetMethod() string GetEndpoint() string GetPort() string GetRegionId() string GetProjectId() string GetHost() string GetURI() string GetHeaders() map[string]string GetQueryParams() map[string]string GetFormParams() map[string]string GetContent() []byte GetBodyReader() io.Reader GetProduct() string GetVersion() string SetStringToSign(stringToSign string) GetStringToSign() string SetContent(content []byte) SetScheme(scheme string) BuildUrl() string BuildQueries() string AddHeaderParam(key, value string) AddQueryParam(key, value string) AddFormParam(key, value string) }
type SRequest ¶
type SRequest struct { Scheme string // HTTP、HTTPS Method string // GET、PUT、DELETE、POST、PATCH Endpoint string // ecs.cn-north-1.myhuaweicloud.com Port string // 80 RegionId string // cn-north-1 QueryParams map[string]string Headers map[string]string FormParams map[string]string Content []byte // contains filtered or unexported fields }
func NewResourceRequest ¶
func (*SRequest) AddFormParam ¶
func (*SRequest) AddHeaderParam ¶
func (*SRequest) AddQueryParam ¶
func (*SRequest) BuildQueries ¶
func (*SRequest) GetBodyReader ¶
func (*SRequest) GetContent ¶
func (*SRequest) GetEndpoint ¶
func (*SRequest) GetFormParams ¶
func (*SRequest) GetHeaders ¶
func (*SRequest) GetProduct ¶
func (*SRequest) GetProjectId ¶
func (*SRequest) GetQueryParams ¶
func (*SRequest) GetRegionId ¶
func (*SRequest) GetStringToSign ¶
func (*SRequest) GetVersion ¶
func (*SRequest) SetContent ¶
func (*SRequest) SetStringToSign ¶
Click to show internal directories.
Click to hide internal directories.