Versions in this module Expand all Collapse all v1 v1.0.0 Apr 16, 2023 Changes in this version + const AuthenMethodOAuth1UserContext + const AuthenMethodOAuth2BearerToken + const OAuth2TokenEndpoint + const OAuthSignatureMethodHMACSHA1 + const OAuthVersion10 + func Bool(b bool) *bool + func BoolValue(b *bool) bool + func Float64(f float64) *float64 + func Float64Value(f *float64) float64 + func GenerateBearerToken(c IClient, apiKey, apiKeySecret string) (string, error) + func Int(i int) *int + func IntValue(i *int) int + func String(s string) *string + func StringValue(s *string) string + func Time(t time.Time) *time.Time + func TimeValue(t *time.Time) time.Time + type AuthenticationMethod string + func (a AuthenticationMethod) Valid() bool + type Client struct + Client *http.Client + func NewClient(in *NewClientInput) (*Client, error) + func NewClientWithAccessToken(in *NewClientWithAccessTokenInput) (*Client, error) + func (c *Client) AccessToken() string + func (c *Client) AuthenticationMethod() AuthenticationMethod + func (c *Client) CallAPI(ctx context.Context, endpoint, method string, p util.Parameters, ...) error + func (c *Client) Exec(req *http.Request, i util.Response) (*resources.Non2XXError, error) + func (c *Client) IsReady() bool + func (c *Client) OAuthConsumerKey() string + func (c *Client) OAuthToken() string + func (c *Client) SetAccessToken(v string) + func (c *Client) SetAuthenticationMethod(v AuthenticationMethod) + func (c *Client) SetOAuthConsumerKey(v string) + func (c *Client) SetOAuthToken(v string) + func (c *Client) SetSigningKey(v string) + func (c *Client) SigningKey() string + type ClientResponse struct + Body []byte + Error *resources.Non2XXError + Response util.Response + Status string + StatusCode int + type CreateOAuthSignatureInput struct + HTTPMethod string + OAuthConsumerKey string + OAuthToken string + ParameterMap map[string]string + RawEndpoint string + SigningKey string + type CreateOAuthSignatureOutput struct + OAuthNonce string + OAuthSignature string + OAuthSignatureMethod string + OAuthTimestamp string + OAuthVersion string + func CreateOAuthSignature(in *CreateOAuthSignatureInput) (*CreateOAuthSignatureOutput, error) + type Endpoint string + func (e Endpoint) Detail() (*EndpointInfo, error) + func (e Endpoint) String() string + type EndpointInfo struct + Base string + EncodedQueryParameterMap map[string]string + Raw string + type GotwiError struct + OnAPI bool + func (e *GotwiError) Error() string + func (e *GotwiError) Unwrap() error + type IClient interface + AccessToken func() string + AuthenticationMethod func() AuthenticationMethod + Exec func(req *http.Request, i util.Response) (*resources.Non2XXError, error) + IsReady func() bool + OAuthConsumerKey func() string + OAuthToken func() string + SigningKey func() string + type NewClientInput struct + APIKey string + APIKeySecret string + AuthenticationMethod AuthenticationMethod + Debug bool + HTTPClient *http.Client + OAuthToken string + OAuthTokenSecret string + type NewClientWithAccessTokenInput struct + AccessToken string + HTTPClient *http.Client + type OAuth2TokenResponse struct + AccessToken string + TokenType string + func (o OAuth2TokenResponse) HasPartialError() bool + type StreamClient struct + func (s *StreamClient[T]) Read() (T, error) + func (s *StreamClient[T]) Receive() bool + func (s *StreamClient[T]) Stop() + type TypedClient struct + Client *http.Client + func NewTypedClient(c *Client) *TypedClient[T] + func (c *TypedClient[T]) AccessToken() string + func (c *TypedClient[T]) AuthenticationMethod() AuthenticationMethod + func (c *TypedClient[T]) CallStreamAPI(ctx context.Context, endpoint, method string, p util.Parameters) (*StreamClient[T], error) + func (c *TypedClient[T]) Exec(req *http.Request, i util.Response) (*resources.Non2XXError, error) + func (c *TypedClient[T]) ExecStream(req *http.Request) (*http.Response, *resources.Non2XXError, error) + func (c *TypedClient[T]) IsReady() bool + func (c *TypedClient[T]) OAuthConsumerKey() string + func (c *TypedClient[T]) OAuthToken() string + func (c *TypedClient[T]) SigningKey() string