https://github.com/canhanhan/go-salt-netapi-client
A Go client library for accessing the NetAPI modules of SaltStack OSS
https://github.com/canhanhan/go-salt-netapi-client
go salt salt-api saltstack
Last synced: 8 months ago
JSON representation
A Go client library for accessing the NetAPI modules of SaltStack OSS
- Host: GitHub
- URL: https://github.com/canhanhan/go-salt-netapi-client
- Owner: canhanhan
- License: mit
- Created: 2020-01-20T22:55:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T17:40:49.000Z (over 6 years ago)
- Last Synced: 2025-03-20T21:16:26.461Z (about 1 year ago)
- Topics: go, salt, salt-api, saltstack
- Language: Go
- Homepage:
- Size: 80.1 KB
- Stars: 3
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# go-salt-netapi-client
[](https://godoc.org/github.com/finarfin/go-salt-netapi-client/cherrypy)
[](https://github.com/finarfin/go-salt-netapi-client/actions?query=workflow%3AGo)
go-salt-netapi-client is a Go client library for accessing the [NetAPI modules](https://docs.saltstack.com/en/latest/ref/netapi/all/index.html) of [SaltStack OSS](https://github.com/saltstack/salt). Currently only [rest_cherrypy](https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html) is supported.
go-salt-netapi-client requires Go version 1.13 or greater.
## Usage ##
```go
import "github.com/finarfin/go-salt-netapi-client/cherrypy"
```
Construct a new client, then use the various methods on the client.
```go
client := cherrypy.NewClient("https://master:8000", "admin", "password", "pam")
// list all minions
minions, err := client.Minions()
```
See [GoDoc](https://godoc.org/github.com/finarfin/go-salt-netapi-client/cherrypy) for details.