https://github.com/seagate/gofish
Gofish is a Golang client library for DMTF Redfish and SNIA Swordfish interaction.
https://github.com/seagate/gofish
Last synced: 6 months ago
JSON representation
Gofish is a Golang client library for DMTF Redfish and SNIA Swordfish interaction.
- Host: GitHub
- URL: https://github.com/seagate/gofish
- Owner: Seagate
- License: bsd-3-clause
- Archived: true
- Fork: true (stmcginnis/gofish)
- Created: 2023-01-05T16:30:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T15:47:47.000Z (over 3 years ago)
- Last Synced: 2024-06-20T00:28:08.783Z (about 2 years ago)
- Language: Go
- Size: 9.05 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gofish - Redfish and Swordfish client library
[](http://godoc.org/github.com/stmcginnis/gofish)
[](https://goreportcard.com/report/github.com/stmcginnis/gofish)
[](https://github.com/stmcginnis/gofish/releases)
[](https://github.com/stmcginnis/gofish/blob/main/LICENSE)

## Introduction
Gofish is a Golang library for interacting with [DMTF
Redfish](https://www.dmtf.org/standards/redfish) and [SNIA
Swordfish](https://www.snia.org/forums/smi/swordfish) enabled devices.
## Usage ##
Basic usage would be:
```go
package main
import (
"fmt"
"github.com/stmcginnis/gofish"
)
func main() {
c, err := gofish.ConnectDefault("http://localhost:5000")
if err != nil {
panic(err)
}
service := c.Service
chassis, err := service.Chassis()
if err != nil {
panic(err)
}
for _, chass := range chassis {
fmt.Printf("Chassis: %#v\n\n", chass)
}
}
```