# kgrvamsi/redfishapi architecture

> Architecture diagram of the GitHub repository kgrvamsi/redfishapi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kgrvamsi/redfishapi
- Repository: https://github.com/kgrvamsi/redfishapi

## Overview

Redfish API Go is a Go client library for managing Dell and HP servers that expose Redfish. The documented workflow is to create an IloClient with a host and credentials, call a vendor-specific method, and receive a result or error. Vendor methods issue Redfish requests and decode responses; the shared helper supplies authenticated HTTP transport. The README demonstrates Dell BIOS data and HP firmware retrieval. Sampled excerpts also show power control, health and inventory reads, configuration, account management, and event logs. Dell and HP excerpts are partial, so unsampled capabilities are grouped by vendor rather than individually mapped.

Main entry points: [`helper.go`](https://github.com/kgrvamsi/redfishapi/blob/master/helper.go) (Authenticated requests), [`dell.go`](https://github.com/kgrvamsi/redfishapi/blob/master/dell.go) (Dell operations), [`hp.go`](https://github.com/kgrvamsi/redfishapi/blob/master/hp.go) (HP operations), [`client.go`](https://github.com/kgrvamsi/redfishapi/blob/master/client.go) (Client credentials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client setup"]
  node_client_api["Client credentials<br/>[client.go]"]
end

subgraph group_vendors["Server operations"]
  node_dell_ops["Dell operations<br/>[dell.go]"]
  node_hp_ops["HP operations<br/>[hp.go]"]
  node_response_types["Redfish data types<br/>[types.go]"]
end

subgraph group_transport["HTTP transport"]
  node_http_helper["Authenticated requests<br/>[helper.go]"]
end

node_caller(("Library user"))
node_redfish_server["Redfish server"]

node_caller -->|"creates client"| node_client_api
node_caller -->|"calls Dell methods"| node_dell_ops
node_caller -->|"calls HP methods"| node_hp_ops
node_dell_ops -->|"sends requests"| node_http_helper
node_hp_ops -->|"sends requests"| node_http_helper
node_http_helper -->|"sends HTTP"| node_redfish_server

click node_client_api "https://github.com/kgrvamsi/redfishapi/blob/master/client.go"
click node_dell_ops "https://github.com/kgrvamsi/redfishapi/blob/master/dell.go"
click node_hp_ops "https://github.com/kgrvamsi/redfishapi/blob/master/hp.go"
click node_response_types "https://github.com/kgrvamsi/redfishapi/blob/master/types.go"
click node_http_helper "https://github.com/kgrvamsi/redfishapi/blob/master/helper.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_api,node_caller toneBlue
class node_dell_ops,node_hp_ops,node_response_types toneAmber
class node_http_helper,node_redfish_server toneMint
```

## Components

### Client setup

- [Client credentials](https://github.com/kgrvamsi/redfishapi/blob/master/client.go): `client.go`

### Server operations

- [Dell operations](https://github.com/kgrvamsi/redfishapi/blob/master/dell.go): `dell.go`
- [HP operations](https://github.com/kgrvamsi/redfishapi/blob/master/hp.go): `hp.go`
- [Redfish data types](https://github.com/kgrvamsi/redfishapi/blob/master/types.go): `types.go`

### HTTP transport

- [Authenticated requests](https://github.com/kgrvamsi/redfishapi/blob/master/helper.go): `helper.go`

### Other components

- **Library user**
- **Redfish server**

## Connections

- Library user → Client credentials: creates client (evidence: `README.md`)
- Library user → Dell operations: calls Dell methods (evidence: `README.md`)
- Library user → HP operations: calls HP methods (evidence: `README.md`)
- Dell operations → Authenticated requests: sends requests (evidence: `dell.go`)
- HP operations → Authenticated requests: sends requests (evidence: `hp.go`)
- Authenticated requests → Redfish server: sends HTTP (evidence: `helper.go`)
