Versions in this module Expand all Collapse all v0 v0.0.10 Jun 10, 2020 v0.0.9 Jun 10, 2020 Changes in this version + const Infinite + func SetDebug(enable bool) + type API struct + APIEndpoint string + APIPassword string + HTTPClient *http.Client + LicenseID string + func NewAPI(licenseID string, apiPassword string) *API + func (api *API) Do(request APIRequest) (body []byte, err error) + func (api *API) DoPaginated(request PaginatedAPIRequest) (body []byte, err error) + func (api *API) GetRequestToken(request *BaseRequest) string + type APINotFoundError struct + func (e *APINotFoundError) Error() string + type APIRequest interface + GetDebug func() *DebugInfo + GetHTTPRequest func(api *API) (req *http.Request, err error) + GetRequestDetails func() *BaseRequest + type AuthenticationRequest struct + func NewAuthenticationRequest() *AuthenticationRequest + func (req *AuthenticationRequest) Do(api *API) (r *AuthenticationResponse, err error) + type AuthenticationResponse struct + Code string + ContentHash string + Error string + LicenseID string + Method string + RequestTimestamp string + Resource string + Result string + type BaseRequest struct + Content []byte + Method string + Query *url.Values + Resource string + Timestamp int64 + func (r *BaseRequest) GetContentHash() string + func (r *BaseRequest) GetDebug() *DebugInfo + func (r *BaseRequest) GetHTTPRequest(api *API) (req *http.Request, err error) + func (r *BaseRequest) GetRequestDetails() *BaseRequest + func (r *BaseRequest) GetRequestString() string + type ClientDetailRequest struct + func NewClientDetailRequest(clientID int64) *ClientDetailRequest + func (req *ClientDetailRequest) Do(api *API) (r *ClientDetailResponse, err error) + type ClientDetailResponse struct + Alias string + ClientID int64 + ClientVersion string + Comment string + LastSessions []SessionNode + Online bool + OnlineSinceSeconds int64 + func (r *ClientDetailResponse) OnlineSince() time.Time + type ClientNode struct + Alias string + ClientID int64 + type DebugInfo struct + Available bool + Request *http.Request + RequestBody []byte + RequestURL *url.URL + Response *http.Response + ResponseBody []byte + type PaginatedAPIRequest interface + GetPaginationOptions func() *PaginationOptions + type PaginationOptions struct + Limit int64 + Offset int64 + Order SortOrder + Sort string + func NewPaginationOptions() *PaginationOptions + func (po *PaginationOptions) GetPaginationOptions() *PaginationOptions + type SessionCommentChangeRequest struct + Comment *string + func NewSessionCommentChangeRequest(session string, comment string) *SessionCommentChangeRequest + func (req *SessionCommentChangeRequest) Do(api *API) (err error) + type SessionDirection string + const DirectionIn + const DirectionInOut + const DirectionOut + type SessionListRequest struct + func NewSessionListRequest(search *SessionListSearch) *SessionListRequest + func (req *SessionListRequest) Do(api *API) (err error) + type SessionListSearch struct + ClientID int64 + Direction SessionDirection + TimeFrom time.Time + TimeTo time.Time + type SessionNode struct + Active bool + Comment string + DurationInSeconds int64 + EndTimestamp int64 + SessionID string + Source *ClientNode + StartTimestamp int64 + Target *ClientNode + func (n *SessionNode) Duration() time.Duration + func (n *SessionNode) EndTime() time.Time + func (n *SessionNode) StartTime() time.Time + type SortOrder string + const OrderAsc + const OrderDesc + type SysinfoRequest struct + func NewSysinfoRequest() *SysinfoRequest + func (req *SysinfoRequest) Do(api *API) (resp *SysinfoResponse, err error) + type SysinfoResponse struct + APIVersion string + Clients struct{ ... } + License struct{ ... } + Name string + Sessions struct{ ... } + Standalone bool