Go library for eLabFTW REST API.
This repository contains a Go library to interact with eLabFTW REST API v2. It uses oapi-codegen to generate it based on the OpenApi specification of eLabFTW REST API v2.
# from your Go module
go get github.com/elabftw/elabapi-goThe package name is elabapi:
import "github.com/elabftw/elabapi-go"The options for the generator are in oapi-codegen.yaml. It is run with go run so its dependencies are not added to go.mod. The OpenAPI specification is read directly from the eLabFTW release on GitHub (here 6.0.9), nothing is downloaded or stored locally.
go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.8.2 -config oapi-codegen.yaml https://github.com/elabftw/elabftw/releases/download/6.0.9/openapi.yaml
go mod tidy