# README
Events Protocol Go
Implementação do protocolo de eventos base. Este pacote não incluirá nem o transporte nem as ferramentas de log, mas apenas uma abstração
Problema
Gerar o pacote do protocolo de eventos que possa ser enviado independente do transporte ou do ecossistema
Como usar
import (
events "github.com/guiabolso/events-protocol-go
guuid "github.com/google/uuid"
)
func main() {
session := events.GenerateEventSession(<UUIDGenerator>)
eventTemplate := session.RegisterEvent("uuid:event", "1").WithPayload(payload)
event := eventTemplate.Prepare()
}
Licença
Apache 2.0 em Guiabolso (r) 2020
# Packages
No description provided by the author
# Functions
FromJSON directly converts JSON package into an Event Use it only if you just want the Event object If you want to handle the event, use ImportEventSession instead.
GenerateEventSession generates an session.
ImportEventSession use an event to generate the ID and reuse maximum of its resources as flowID and ID.
ImportJSONEventSession use an JSON event to generate the ID and reuse maximum of its resources as flowID and ID.
# Structs
Event is the main package, applying Guiabolso's events protocol.
EventSession is the base structure for sessions to be used in a couple of events and to be trace through its sessionID.
EventTemplate is used to create a base template to be easyly replicated.
# Type aliases
SessionIDGenerator is a basic contract to be used as an session identifier generator.