Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 main

import (
"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/)