Skip to content

Support library to help Go developers develop Anexia e5e functions

License

Notifications You must be signed in to change notification settings

anexia-it/go-e5e

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

This version of the library is designed for the old custom e5e runtime. The new version for the binary runtime is published in the repository: https://github.com/anexia/go-e5e/

go-e5e

PkgGoDev Build Status codecov Go Report Card

go-e5e is a support library to help Go developers develop Anexia e5e functions.

Install

With a correctly configured Go toolchain:

go get -u github.com/anexia-it/go-e5e

Getting started

package main

import (
	"runtime"

	"github.com/anexia-it/go-e5e"
)

type entrypoints struct{}

func (f *entrypoints) MyEntrypoint(event e5e.Event, context e5e.Context) (*e5e.Return, error) {
	return &e5e.Return{
		Status: 200,
		ResponseHeaders: map[string]string{
			"x-custom-response-header": "This is a custom response header",
		},
		Data: map[string]interface{}{
			"version": runtime.Version(),
		},
	}, nil
}

func main() {
	if err := e5e.Start(&entrypoints{}); err != nil {
		panic(err)
	}
}

List of developers

About

Support library to help Go developers develop Anexia e5e functions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages