Documentation
¶
Index ¶
- Constants
- type Client
- type Option
- func WithBaseURL(baseURL string) Option
- func WithProxy(proxy string) Option
- func WithRetryCondition(retryCondition func(resp *http.Response, err error) bool) Option
- func WithRetryInterval(retryInterval time.Duration) Option
- func WithRetryTimes(retryTimes int) Option
- func WithTimeout(timeout time.Duration) Option
Constants ¶
View Source
const ( // header V1Header = "X-Ys-Version" V1Value = "2023-05-30" // DefaultBaseURL defaults gateway for Open-API DefaultBaseURL = "http://localhost:8899/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents the Open-API client
func NewClient ¶
func NewClient(cred *credential.Credential, options ...Option) (c *Client, err error)
NewClient creates new client for Open-YS
func (*Client) GetBaseUrl ¶
func (*Client) PrintSign ¶
func (c *Client) PrintSign(rb *xhttp.RequestBuilder)
func (*Client) SetBaseUrl ¶
func (*Client) SetCredential ¶
func (c *Client) SetCredential(cred *credential.Credential) error
func (*Client) SetTimeout ¶
type Option ¶
func WithBaseURL ¶
func WithRetryCondition ¶
func WithRetryInterval ¶
func WithRetryTimes ¶
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.