gf
github.com/fishman/go-freenas
go get github.com/fishman/go-freenas
gf

github.com/fishman/go-freenas

Golang FreeNAS api client

by Reza Jelveh

v0.0.0-20180821181731-521ba9059782 (see all)License:BSD-3-Clause
go get github.com/fishman/go-freenas
Readme

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

GitHub Stars

12

LAST COMMIT

4yrs ago

MAINTAINERS

0

CONTRIBUTORS

1

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
v0.0.0-20180821181731-521ba9059782
1yr ago
No alternatives found
No tutorials found
Add a tutorial