[#266] pkg/client: Export Client interface instead of structure

Make it easier to test API clients and mock specific methods.
Also add comments on exported methods.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-03-12 18:02:26 +03:00 committed by Leonard Lyubich
parent e39a1fd949
commit ae2fb263f1
7 changed files with 134 additions and 52 deletions

View file

@ -68,7 +68,7 @@ func (e errOptionsLack) Error() string {
return fmt.Sprintf("lack of sdk client options to create %s client", string(e))
}
func (c Client) defaultCallOptions() callOptions {
func (c clientImpl) defaultCallOptions() callOptions {
return callOptions{
ttl: 2,
version: pkg.SDKVersion(),