go-salt-api-client

command module
v0.0.0-...-9252583 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 6 Imported by: 0

README

logo

go-salt-api-client

Go implementation of a salt api client.

Modules

  • Wheel: usable and with automatic test
  • Runner: usable without automatic tests
  • Modules: experimental

Usage

The only authentication mechanism available is with username and password.

Login and Logout endpoint calls are not implemented.

Salt Master Preparation

One needs to configure salt api on the salt master. Information on how to do it can be found on salt documentation

API usage examples

Simple call

func main() {
	clientSalt := client.NewClient("host:port", "user", "pass", "auth_type")
	data, err := clientSalt.Run(client.LOCAL, "test.ping", target.NewTargetList([]string{"m43-minion-suse.tf.local"}), nil, nil)
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Printf("data: >%s<\n", data)
}

Call usage examples can be found for:

How to contribute

  • Fork the project
  • Make any change you want
  • Open a PR for this repository

TODO List

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