package
0.0.0-20241029013314-06af37cb7d44
Repository: https://github.com/rogue-syntax/rs-goapiserver.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

No description provided by the author
External method to call the event action **IMPORTANT**: Dont forget to add it to the register in the 'Init' function in the ev_register package if you want to be able to call this event with recalled data # External because we cant do generic class methods This function takes an EVEvent and calls the 'Do' method of the action returns EVEventExecError: - ActionError: error from the action : check for nil to see if the action was successful( nil means success ) - StreamError: error from streaming the event : check for nil to see if the event was streamed successfully - StoreError: error from storing the event to the database : check for nil to see if the event was stored successfully.
No description provided by the author
intialize the package with the database connection and the event names see the EVEventNames map in this package for an example.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
need to differentiate propagated error to application callers did the action complete successfully? ERRORFLAG_ACTION did the event stream to the file? ERRORFLAG_STREAM_EVENT_1 etc.
need to differentiate propagated error to application callers did the action complete successfully? ERRORFLAG_ACTION did the event stream to the file? ERRORFLAG_STREAM_EVENT_1 etc.
need to differentiate propagated error to application callers did the action complete successfully? ERRORFLAG_ACTION did the event stream to the file? ERRORFLAG_STREAM_EVENT_1 etc.
need to differentiate propagated error to application callers did the action complete successfully? ERRORFLAG_ACTION did the event stream to the file? ERRORFLAG_STREAM_EVENT_1 etc.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

SetDBCONN sets the global variable DBCONN to the database connection.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
func (e *EVEvent[DATATYPE, CONTEXTTYPE]) StreamEvent(ev ISerializableEvent) error { streamToGOBFile(ev) return err } */.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

EXAMPLE FUNCTION AND DATA WE WANT TO RUN AS AN EVENT Some Data Types, Context Types, and Functions we dont want to just run our function 'UpdateATestDataType' willy nilly, we want to dispatch is as an event, with its data, and its context, and its success or failure, and log it, or queue it, or replay it , etc We want to package these into an actionable event! */.
The action event class EVEvent Class associates types and interfaces are: - UnixTimeMilliseconds - EVTypes_int - IEVAction (interface).
No description provided by the author
No description provided by the author
NoMetaData: keep some empty struct around for the places where you dont need events to have meta data we've included 'NoMetaData' in this package.
Here is an example of how to make an IEVAction for the event class # Make a struct that implements the IEVAction interface Make a method called 'Do' that takes the data type of the event and returns an error This is where you put the function you want to run as an event!.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
The action interface The action interface is a generic interface that can be implemented by any struct The struct must have a method called "Do" that takes one argument of any type and returns an error.

# Type aliases

No description provided by the author
No description provided by the author
MAP OF ACTION NAMES TO ACTION HANDLERS HANDLERS ARE : ANONYMOUS FUNCTIONS THAT WRAP DoEVEventAction DoEVEventAction TAKES THE ARGUMENT TYPE AND THE EVEvent WHICH CONTAIN THE ACTION AND ITS DATA var EVActionMap = map[string]EVHandler{}.
No description provided by the author
No description provided by the author
CONST MAP KEYS FOR MAPPED EVENTS.
No description provided by the author