go-freenas

module
v0.0.0-...-521ba90 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: BSD-3-Clause

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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