package
0.2.0
Repository: https://github.com/itsabot/abot.git
Documentation: pkg.go.dev

# Functions

CallPlugin sends a plugin the user's preprocessed message.
GetMsg returns a message for a given message ID.
GetUser from an HTTP request.
NewHandlerMap builds a HandlerMap from a slice of RouteHandlers.
NewStateMachine initializes a stateMachine to its starting state.

# Constants

1.
2.
3.
Define constants for all possible sexes for the purpose of maintaining context in sentences across requests.
Define constants for all possible sexes for the purpose of maintaining context in sentences across requests.
Define constants for all possible sexes for the purpose of maintaining context in sentences across requests.
Define constants for all possible sexes for the purpose of maintaining context in sentences across requests.
StateKey is a reserved key in the state of a plugin that tracks which state the plugin is currently in for each user.

# Variables

ErrInvalidFlexIDType is returned when a FlexIDType is invalid not matching one of the pre-defined FlexIDTypes for email (1) or phone (2).
ErrMissingFlexID is returned when a FlexID is expected, but none found.
ErrMissingFlexIDType is returned when a FlexIDType is expected, but none found.
ErrNoAddress signals that no address could be found when one was expected.
QuoteEscapeRegex replaces escaped quotes except if it is preceded by a literal backslash, e.g.

# Structs

Address holds all relevant information in an address for presentation to the user and communication to external services, including the USPS address validation tool.
Card represents a credit card.
CardParams is used when saving a new card.
City represents a city within a specific country.
HTTPRoute defines a route to be used within a HandlerMap.
KeywordHandler maintains sets of Commands and Objects recognized by plugins as well as the functions to be performed when such Commands or Objects are found.
Keywords maintains sets of Commands and Objects recognized by plugins as well as the functions to be performed when such Commands or Objects are found.
Location represents some location saved for a user or plugin.
Memory holds a generic "memory" of Ava's usually set by a plugin, such as the current state of a plugin, selected products, results of a search, current offset in those search results, etc.
Msg is a message received by a user.
Person is a human being discussed.
Phone represents a phone as a flexid from the database.
Plugin is a self-contained unit that holds everything an Abot plugin developer needs.
PluginConfig holds options for a plugin.
PluginEvents allow plugins to listen to events as they happen in Abot core.
PluginSetting defines whether a plugin's setting is required (empty values panic on boot), and whether there's a default value.
Request for Abot to perform some command.
RouteHandler is a complete struct containing both an HTTPRoute and a handler.
ScheduledEvent for Abot to send a message at some point in the future.
State is a collection of pre-defined functions that are run when a user reaches the appropriate state within a stateMachine.
StateMachine enables plugin developers to easily build complex state machines given the constraints and use-cases of an A.I.
StructuredInput is generated by Abot and sent to plugins as a helper tool.
TimeRange defines a range of time.
User represents a user, which is usually the user that sent a message to Abot.

# Type aliases

EventRequest is sent to the state machine to request safely jumping between states (directly to a specific Label) with guards checking that each new state is valid.
FlexIDType is used to identify a user when only an email, phone, or other "flexible" ID is available.
HandlerMap maps HTTPRoutes (the method and URL path) to a echo router handler.
KeywordFn is a function run when the user sends a matched keyword as defined by a plugin.
Sex represents the sex of the person being discussed.
SIT is a Structured Input Type.
StringSlice replaces []string, adding custom sql support for arrays in lieu of pq.
Uint64Slice extends []uint64 with support for arrays in pq.