Skip to content

dudemcbacon/go-theforeman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-theforeman

A small sling wrapper for The Foreman API in Golang

Usage

package main

import (
  "fmt"
  "github.com/dudemcbacon/go-theforeman"
)

func main() {
  config := &theforeman.Config{
    BaseURL:  "http://foreman.mgmt.nweacolo.pvt/api/",
    Username: "api-user",
    Password: "snip",
  }

  foreman := theforeman.NewClient(config, nil)

  names, _, _ := foreman.EnvironmentsService.ListEnvironmentNames(nil)
  for _, name := range names {
    fmt.Println(name)
  }
}

About

A small sling wrapper for The Foreman API in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages