foreman

package module
v0.0.0-...-af31798 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2020 License: BSD-3-Clause Imports: 11 Imported by: 1

README

go-foreman

Implementing the foreman apiin golang.

This is currently work in progress. Use it at your own risk.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Foreman

type Foreman struct {
	Hostname string
	Username string

	VerifySSL bool
	BaseURL   string
	// contains filtered or unexported fields
}

func NewForeman

func NewForeman(HostName string, UserName string, Password string) *Foreman

func (*Foreman) CreateHost

func (foreman *Foreman) CreateHost(HostGroupId int, Name string, Mac string) (string, error)

func (*Foreman) Delete

func (foreman *Foreman) Delete(endpoint string) (map[string]interface{}, error)

func (*Foreman) DeleteHost

func (foreman *Foreman) DeleteHost(HostID string) error

func (*Foreman) Get

func (foreman *Foreman) Get(endpoint string) (map[string]interface{}, error)

func (*Foreman) Post

func (foreman *Foreman) Post(endpoint string, jsonData []byte) (map[string]interface{}, error)

func (*Foreman) Put

func (foreman *Foreman) Put(endpoint string, jsonData []byte) (map[string]interface{}, error)

func (*Foreman) SearchAnyResource

func (foreman *Foreman) SearchAnyResource(Resource string, Query string) (map[string]interface{}, error)

func (*Foreman) SearchResource

func (foreman *Foreman) SearchResource(Resource string, Query string) (map[string]interface{}, error)

func (*Foreman) SearchResourceName

func (foreman *Foreman) SearchResourceName(Resource string, Query string) (map[string]interface{}, error)

type Host

type Host struct {
	HostGroupId string `json:"hostgroup_id"`
	Name        string `json:"name"`
	Mac         string `json:"mac"`
	Build       bool   `json:"build"`
}

type HostMap

type HostMap map[string]Host

Jump to

Keyboard shortcuts

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