Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fishman/go-freenas
Golang FreeNAS api client
https://github.com/fishman/go-freenas
freenas go
Last synced: 2 months ago
JSON representation
Golang FreeNAS api client
- Host: GitHub
- URL: https://github.com/fishman/go-freenas
- Owner: fishman
- License: bsd-3-clause
- Created: 2018-08-19T18:14:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T18:17:43.000Z (over 6 years ago)
- Last Synced: 2024-08-03T23:29:45.318Z (6 months ago)
- Topics: freenas, go
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - go-freenas
README
# go-freenas
[![Build Status](https://travis-ci.org/fishman/go-freenas.svg?branch=master)](https://travis-ci.org/fishman/go-freenas)
go-freenas is a Go client library for accessing the [FreeNAS API](http://api.freenas.org).
## Usage ##
```go
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:```go
package mainimport (
"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