Skip to content

fishman/go-freenas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-freenas

Build Status

go-freenas is a Go client library for accessing the FreeNAS API.

Usage

import "github.com/fishman/go-freenas/freenas"

Construct a new FreeNAS client, then use the various services on the client to access different parts of the FreeNAS API. For example:

package main

import (
  "context"
  "fmt"

  "github.com/fishman/go-freenas/freenas"
)

func main() {
  client := freenas.NewClient("http://freenas.local", "root", "freenas")
  // Turn on debugging
  client.Debug(true)

  shares, _, _ := client.NfsShares.List(context.Background())

  for _, element := range shares {
      fmt.Println(element.ID, element.Paths)
  }

}

Ref

  • google go-github client

About

Golang FreeNAS api client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages