Documentation ¶
Index ¶
- Constants
- type HTTPAdapter
- func (a *HTTPAdapter) Authenticate(token string, timeout time.Duration) (bool, error)
- func (a *HTTPAdapter) RefreshToken() (accessToken string, err error)
- func (a *HTTPAdapter) Request(resourceName string, data map[string]interface{}, timeout time.Duration) ([]byte, error)
- func (a *HTTPAdapter) SetCreds(login, password string)
- func (a *HTTPAdapter) SetRefreshToken(refTok string)
- func (a *HTTPAdapter) Subscribe(resourceName string, pollingWaitTimeoutSeconds int, ...) (subscription *transport.Subscription, subscriptionId string, ...)
- func (a *HTTPAdapter) Unsubscribe(resourceName, subscriptionId string, timeout time.Duration) error
- type Timestamp
- type TransportAdapter
- type WSAdapter
- func (a *WSAdapter) Authenticate(token string, timeout time.Duration) (bool, error)
- func (a *WSAdapter) RefreshToken() (accessToken string, err error)
- func (a *WSAdapter) Request(resourceName string, data map[string]interface{}, timeout time.Duration) ([]byte, error)
- func (a *WSAdapter) SetCreds(login, password string)
- func (a *WSAdapter) SetRefreshToken(refTok string)
- func (a *WSAdapter) Subscribe(resourceName string, pollingWaitTimeoutSeconds int, ...) (subscription *transport.Subscription, subscriptionId string, ...)
- func (a *WSAdapter) Unsubscribe(resourceName, subscriptionId string, timeout time.Duration) error
Constants ¶
View Source
const (
TokenExpiredErr = "401 token expired"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPAdapter ¶
type HTTPAdapter struct {
// contains filtered or unexported fields
}
func (*HTTPAdapter) Authenticate ¶
func (*HTTPAdapter) RefreshToken ¶
func (a *HTTPAdapter) RefreshToken() (accessToken string, err error)
func (*HTTPAdapter) SetCreds ¶
func (a *HTTPAdapter) SetCreds(login, password string)
func (*HTTPAdapter) SetRefreshToken ¶
func (a *HTTPAdapter) SetRefreshToken(refTok string)
func (*HTTPAdapter) Subscribe ¶
func (a *HTTPAdapter) Subscribe(resourceName string, pollingWaitTimeoutSeconds int, params map[string]interface{}) (subscription *transport.Subscription, subscriptionId string, err *transport.Error)
func (*HTTPAdapter) Unsubscribe ¶
func (a *HTTPAdapter) Unsubscribe(resourceName, subscriptionId string, timeout time.Duration) error
type TransportAdapter ¶
type TransportAdapter interface { Request(resourceName string, data map[string]interface{}, timeout time.Duration) (res []byte, err error) Subscribe(resourceName string, pollingWaitTimeoutSeconds int, params map[string]interface{}) (subscription *transport.Subscription, subscriptionId string, err *transport.Error) Unsubscribe(resourceName, subscriptionId string, timeout time.Duration) error Authenticate(token string, timeout time.Duration) (result bool, err error) SetCreds(login, password string) SetRefreshToken(refTok string) RefreshToken() (accessToken string, err error) }
func New ¶
func New(tsp transport.Transporter) TransportAdapter
type WSAdapter ¶
type WSAdapter struct {
// contains filtered or unexported fields
}
func (*WSAdapter) Authenticate ¶
func (*WSAdapter) RefreshToken ¶
func (*WSAdapter) SetRefreshToken ¶
Click to show internal directories.
Click to hide internal directories.