Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct { Status *Status `json:"status,omitempty"` Request *RequestInfo `json:"request,omitempty"` Data []interface{} `json:"data,omitempty"` }
APIResponse returned on success
type BearerAuthTransport ¶
type BearerAuthTransport struct {
// contains filtered or unexported fields
}
BearerAuthTransport wraps a RoundTripper. It capitalized bearer token authorization headers.
type Client ¶
Client wraps the api for you
func NewClient ¶
func NewClient(baseURL string, opts ...ClientOption) (*Client, error)
NewClient returns a new wazuh API client
func NewClientFromEnvironment ¶
func NewClientFromEnvironment(opts ...ClientOption) (*Client, error)
NewClientFromEnvironment creates a new client from default environment variables
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithContext ¶
func WithContext(ctx context.Context) ClientOption
WithContext specifies the credentials for
func WithLogin ¶
func WithLogin(user string, password string) ClientOption
WithLogin specifies the credentials for
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
WithUserAgent specify a user agent string to identify the client
type Fault ¶
type Fault struct { FaultString string `json:"faultstring,omitempty"` Detail *FaultDetail `json:"detail,omitempty"` }
Fault returned if something went wrong
type FaultDetail ¶
type FaultDetail struct {
ErrorCode string `json:"errorcode,omitempty"`
}
FaultDetail detailed fault information
type FaultResponse ¶
FaultResponse is returned by InfoSight
func NewFaultResponse ¶
func NewFaultResponse(r *http.Response) (*FaultResponse, error)
NewFaultResponse create a new NewFaultResponse from an http response
func (*FaultResponse) Error ¶
func (e *FaultResponse) Error() string
type FilterInfo ¶
FilterInfo filter details
type HTTPRequestDoer ¶
HTTPRequestDoer performs HTTP requests.
The standard http.Client implements this interface.
type PagingInfo ¶
PagingInfo request details
type RequestInfo ¶
type RequestInfo struct { Paging *PagingInfo `json:"paging,omitempty"` Filter *FilterInfo `json:"filter,omitempty"` Sort *Sorting `json:"sort,omitempty"` }
RequestInfo request details
type Wellness ¶
func NewWellness ¶
func (*Wellness) GetObjectSet ¶
GetObjectSet fetches a list of objects url.Values