https://github.com/anexia/go-e5e
Support library to help Go developers build Anexia e5e functions
https://github.com/anexia/go-e5e
hacktoberfest
Last synced: 4 months ago
JSON representation
Support library to help Go developers build Anexia e5e functions
- Host: GitHub
- URL: https://github.com/anexia/go-e5e
- Owner: anexia
- License: mit
- Created: 2022-08-08T08:29:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T09:36:23.000Z (over 1 year ago)
- Last Synced: 2025-01-18T11:14:40.193Z (6 months ago)
- Topics: hacktoberfest
- Language: Go
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
go-e5e
======[](https://pkg.go.dev/go.anx.io/e5e/v2)
[](https://github.com/anexia/go-e5e/actions/?query=workflow%3Atest)
[](https://codeclimate.com/github/anexia/go-e5e/test_coverage)
[](https://goreportcard.com/report/go.anx.io/e5e/v2)go-e5e is a support library to help Go developers build Anexia e5e functions.
## Install
With a [correctly configured](https://go.dev/doc/install) Go toolchain:
```sh
go get -u go.anx.io/e5e/v2
```## Getting started
```go
package mainimport (
"context"
"go.anx.io/e5e/v2"
)type SumData struct {
A int `json:"a"`
B int `json:"b"`
}func Sum(ctx context.Context, r e5e.Request[SumData, any]) (*e5e.Result, error) {
result := r.Data().A + r.Data().B
return &e5e.Result{
Status: 200,
ResponseHeaders: map[string]string{
"x-custom-response-header": "This is a custom response header",
},
Data: result,
}, nil
}func main() {
e5e.AddHandlerFunc("Sum", Sum)
e5e.Start(context.Background())
}```
## List of developers
* Andreas Stocker , Lead Developer
* Patrick Taibel , Developer
* Jasmin Oster , Developer## Links
- [e5e Documentation](https://engine.anexia-it.com/docs/en/module/e5e/)