Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Create(endpoint string, o interface{}) (interface{}, error)
- func (c *Client) Delete(endpoint string) error
- func (c *Client) GetContentType() string
- func (c *Client) Logout() error
- func (c *Client) Read(endpoint string, o interface{}) error
- func (c *Client) Request(endpoint, method string, data []byte, contentType string) ([]byte, error)
- func (c *Client) Update(endpoint string, o interface{}) (interface{}, error)
- func (c *Client) UpdateWithPut(endpoint string, o interface{}) (interface{}, error)
- type Credentials
- type ErrorResponse
- type Session
Constants ¶
View Source
const ( MaxNumOfRetries = 100 RetryWaitMaxSeconds = 20 RetryWaitMinSeconds = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { sync.Mutex URL string HTTPClient *http.Client Logger *log.Logger // contains filtered or unexported fields }
Client ...
func (*Client) GetContentType ¶
func (*Client) UpdateWithPut ¶
Update ...
type Credentials ¶
type Credentials struct { Username string `json:"username"` Password string `json:"password"` APIKey string `json:"apiKey"` TimeStamp string `json:"timestamp"` }
Credentials ...
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
func (ErrorResponse) IsObjectNotFound ¶
func (r ErrorResponse) IsObjectNotFound() bool
IsObjectNotFound returns true on missing object error (404).
type Session ¶
type Session struct { AuthType string `json:"authType"` ObfuscateAPIKey bool `json:"obfuscateApiKey"` PasswordExpiryTime int `json:"passwordExpiryTime"` PasswordExpiryDays int `json:"passwordExpiryDays"` Source string `json:"source"` JSessionID string `json:"jSessionID,omitempty"` }
Session ...
func MakeAuthRequestZIA ¶
func MakeAuthRequestZIA(credentials *Credentials, url string, client *http.Client) (*Session, error)
MakeAuthRequestZIA ...
Click to show internal directories.
Click to hide internal directories.