Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 8 days 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T09:36:23.000Z (11 months ago)
- Last Synced: 2024-11-17T16:11:47.791Z (2 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
======[![PkgGoDev](https://pkg.go.dev/badge/go.anx.io/e5e/v2)](https://pkg.go.dev/go.anx.io/e5e/v2)
[![Build Status](https://github.com/anexia/go-e5e/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/anexia/go-e5e/actions/?query=workflow%3Atest)
[![Test Coverage](https://api.codeclimate.com/v1/badges/7f8797e3ad79f5e03a0d/test_coverage)](https://codeclimate.com/github/anexia/go-e5e/test_coverage)
[![Go Report Card](https://goreportcard.com/badge/go.anx.io/e5e/v2)](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/)