Skip to content

Releases: anexia/go-e5e

v2.1.0

11 Mar 09:17
Compare
Choose a tag to compare

Added

  • Binary file API

v2.0.1

11 Jan 16:33
39d08e2
Compare
Choose a tag to compare

Fixed

  • Documentation fixes

v2.0.0

10 Jan 10:28
03b6068
Compare
Choose a tag to compare

Changed

  • Set minimum Go version to 1.18.
  • Rewritten the library to follow the Mux pattern of the net/http library.
    This ensures that there are no longer runtime errors for wrong entrypoint signatures, since everything
    needs to implement the new e5e.Handler interface now.
  • Add support for cancellation using context.Context.
  • Add support for strongly-typed request parameters, using the generics of Go 1.18.

A possible migration looks like this (old version first, new version second).

package main

import (
  "go.anx.io/e5e"
)

type SumEventData struct {
  A int `json:"a,omitempty"`
  B int `json:"b,omitempty"`
}
type entrypoints struct{}

func (e entrypoints) Sum(d SumEventData, _ e5e.Context) (e5e.Result, error) {
  return e5e.Result{Data: d.A + d.B}, nil
}

func main() {
  e5e.Start(&entrypoints{})
}
package main

import (
  "context"
  "log"
  "go.anx.io/e5e/v2"
)

type SumEventData struct {
  A int `json:"a,omitempty"`
  B int `json:"b,omitempty"`
}

func Sum(ctx context.Context, request e5e.Request[SumEventData, any]) (*e5e.Result, error) {
  d := request.Data()
  return &e5e.Result{Data: d.A + d.B}, nil
}

func main() {
  e5e.AddHandlerFunc("Sum", Sum)
  e5e.Start(context.Background())
}

Added

  • Table-driven tests for tests
  • Add detailed documentation for all public types

v1.2.1

10 Aug 11:49
7a2c233
Compare
Choose a tag to compare

Fixed

  • Allow value nil for Data in e5e.Result

v1.2.0

30 Aug 11:31
f430cb5
Compare
Choose a tag to compare

Changed

  • Reimplemented with new binary runtime support (breaks support with previous custom runtime)
  • Moved repository to https://github.com/anexia/go-e5e
  • Use the Anexia vanity import path in the documentation