func NewClient(endpoint Endpoint, accessID, accessKey string, opts ...Option) (c *Client) {
	c = &Client{endpoint: string(endpoint), accessID: accessID, accessKey: accessKey}
	conf := &options{
		httpClient: &http.Client{Timeout: 10 * time.Second},
		logger:     log.DefaultLogger,
		storage:    &MemoryStore{},
		maxRetires: 5,
	}
	for _, opt := range opts {
		opt(conf)
	}
	c.httpClient = conf.httpClient
	c.logger = conf.logger
	c.storage = conf.storage
	c.validator = validator.New()
	c.maxRetires = conf.maxRetires
	return
}
// NewClient returns API client.
NewClient returns API client.
// NewClient returns API client .
func NewClient(endpoint Endpoint, accessID, accessKey string, opts ...Option) (c *Client) {
	c = &Client{endpoint: string(endpoint), accessID: accessID, accessKey: accessKey}
	conf := &options{
		httpClient: &http.Client{Timeout: 10 * time.Second},
		logger:     log.DefaultLogger,
		storage:    &MemoryStore{},
		maxRetires: 5,
	}
	for _, opt := range opts {
		opt(conf)
	}
	c.httpClient = conf.httpClient
	c.logger = conf.logger
	c.storage = conf.storage
	c.validator = validator.New()
	c.maxRetires = conf.maxRetires
	return
}
func NewClient ( endpoint Endpoint , accessID , accessKey string , opts ... Option ) ( c * Client ) { c = & Client { endpoint : string ( endpoint ) , accessID : accessID , accessKey : accessKey } conf := & options { httpClient : & http . Client { Timeout : 10 * time . Second } , logger : log . DefaultLogger , storage : & MemoryStore { } , maxRetires : 5 , } for _ , opt := range opts { opt ( conf ) } c . httpClient = conf . httpClient c . logger = conf . logger c . storage = conf . storage c . validator = validator . New ( ) c . maxRetires = conf . maxRetires return }
NewClient returns API client.
NewClient returns API client .