Documentation ¶
Index ¶
Constants ¶
View Source
const ( OnqlaveAPIKey string = "ONQLAVE-API-KEY" OnqlaveContent string = "Content-Type" OnqlaveHost string = "ONQLAVE-HOST" OnqlaveVersion string = "ONQLAVE-VERSION" OnqlaveSignature string = "ONQLAVE-SIGNATURE" OnqlaveDigest string = "ONQLAVE-DIGEST" OnqlaveArx string = "ONQLAVE-ARX" OnqlaveAgent string = "User-Agent" OnqlaveRequestTime string = "ONQLAVE-REQUEST-TIME" OnqlaveContentLength string = "ONQLAVE-CONTEXT-LEN" )
View Source
const ( ServerType string = "Onqlave/0.1" Version string = "0.1" Oonqlave_Content string = "application/json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Post(resource string, body requests.OnqlaveRequest, headers map[string]string) ([]byte, error)
}
func NewClient ¶
func NewClient(retrySettings *RetrySettings, logger *onqlavelogger.Logger) Client
type Configuration ¶
type Configuration struct { Credential *Credential Retry *RetrySettings ArxURL string ArxID string }
type Connection ¶
type Connection interface {
Post(resource string, body requests.OnqlaveRequest) ([]byte, *onqlaveerrors.OnqlaveError)
}
func NewConnection ¶
func NewConnection(configuration *Configuration, hasher onqlaveutils.Hasher, logger *onqlavelogger.Logger) Connection
type Credential ¶
type RetrySettings ¶
var DefaultRetrySettings *RetrySettings = &RetrySettings{ Count: 3, WaitTime: 400 * time.Millisecond, MaxWaitTime: 2000 * time.Millisecond, }
func (*RetrySettings) Valid ¶
func (s *RetrySettings) Valid() error
Click to show internal directories.
Click to hide internal directories.