infosight

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

README

go infosight

go client for the infosight

GitHub license Sourcegraph GoDoc

Usage

import "github.com/autonubil/go-infosight"

There are a few With... option functions that can be used to customize the API client:

  • WithBaseURL custom base url
  • WithLogin (username, password)
  • WithContext (custom Context)
  • WithInsecure allow insecure certificates
  • WithUserAgent to set custom user agent
  • WithTrace traces all calls

go-infosight supports following environment variables for easy construction of a client:

  • INFOSIGHT_URL
  • INFOSIGHT_CLIENT_KEY
  • INFOSIGHT_CLIENT_SECRET

Construct a new InfoSight client, then use the various service on the client to access different parts of the wazuh API. For example, to list all agents:

c, err := NewClientFromEnvironment(WithTrace(true))
if err != nil {
    t.Error(err)
    return
}
i, err := c.Wellness.GetIssues()
if err != nil {
    t.Error(err)
    return
}

fmt.Printf("%v", i)

ToDo

  • more test cases

Issues

Author

Carsten Zeumer (carsten.zeumer@autonubil.net)

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL