package
0.0.0-20240115022734-de3484d97ac7
Repository: https://github.com/wasabee-project/wasabee-server.git
Documentation: pkg.go.dev

# Functions

AddToChatMemberList notes a telegramID has been seen in a given telegram chat.
AppleIDtoGID returns a GoogleID for a given AppleID for now this is very dumb and doesn't try to do anything other than ensure the database doesn't throw an error if we want to manually map.
ChatToTeam takes a chatID and returns a linked teamID.
CommunityNameToGID takes a community name and returns a GoogleID.
Connect tries to establish a connection to a MySQL/MariaDB database under the given URI and initializes the tables if they don"t exist yet.
Disconnect closes the database connection called only at server shutdown.
DrawInsert parses a raw op sent from the IITC plugin and stores it in the database use ONLY for initial op creation All assignment data and key count data is assumed to be correct.
DrawUpdate is called to UPDATE an existing draw Links & Markers are added/removed as necessary -- assignments are properly updated as necessary (including notifications on change) Key count data is left untouched (unless the portal is no longer listed in the portals list).
FactionFromString takes a string and returns the int.
FetchAgent populates the minimal Agent struct with data anyone can see.
FirebaseBroadcastList returns all known firebase tokens for messaging all agents Firebase Multicast messages are limited to 500 tokens each, the caller must break the list up if necessary.
GenerateSafeName generates a slug (like GenerateName()) that doesn't exist in the database yet.
No description provided by the author
GetAllTelegramIDs is used by the telegram cleanup function.
GetGIDFromEnlID looks up an agent's GoogleID by V EnlID.
GetTeamsByVID returns all wasabee teams which match the V team ID.
IngressName is used for templates.
IsChatMember reports if a given telegramID has been seen in a given telegram chat.
LoadRevokedJWT does nothing yet.
LocationClean is called from the background process to remove out-dated agent locations.
NewMarkerType is used to change from the old to the new marker type names.
RemoveFirebaseToken removes a given token from the database.
RemoveFromChatMemberList removes the agent from the list for the telegram chat.
RocksCommunityToTeam returns a TeamID from a Rocks Community.
RocksFromDB returns a rocks agent from the database.
RocksToDB writes a rocks agent to the database.
SearchAgentName gets a GoogleID from an Agent's name, searching local name, V name (if known), Rocks name (if known) and telegram name (if known) returns "" on no match.
StoreRevokedJWT does nothing yet.
ToGid takes a string and returns a Gid for it -- for reasonable values of a string; it must look like a GoogleID otherwise it defaults to agent name.
VFromDB pulls a V agent from the database.
VTeamExists checks if a v-team/role pair exists for a specific googleID.
VToDB updates the database to reflect an agent's current status at V.
ZoneFromString takes a string and returns a valid zone or zonePrimary if invalid input.

# Constants

These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
These error values are error strings visible to users, they need to be migrated to the translation system.
ZoneAll is a reserved name for the wildcard zone.
ZoneAll is a reserved name for the wildcard zone.

# Structs

AdOperation is a sub-struct of Agent.
AdTeam is a sub-struct of Agent.
Agent is the complete agent struct, used for the /me page.
AgentLocation is the lite version used for the team location pull.
Attribute is per-marker-type data.
DefensiveKey is a sub-struct of DefensiveKeyList.
DefensiveKeyList is the list of all defensive keys.
KeyOnHand describes the already in possession for the op.
Link is the basic link data structure.
Marker is defined by the Wasabee IITC plugin.
Operation is defined by the Wasabee IITC plugin.
OpPermission is the form of permission.
OpStat is a minimal struct to determine if the op has been updated.
Portal is defined by the Wasabee IITC plugin.
RocksAgent is defined by enlightened.rocks.
Task is the imported things for markers and links.
TeamData is the wrapper type containing all the team info.
TeamMember is the light version of AgentData, containing visible information exported to teams.
TeamToken is the returned struct from FirebaseLocationTokens.
VAgent is set by the V API most of these fields are empty unless filled in by a team query.
ZoneListElement is used to map display names to zones.

# Interfaces

AgentID is anything that can be converted to a GoogleID or a string.
UnspecifiedTask is the type for tasks which could be either markers or links.

# Type aliases

AttributeID is the attribute ID.
GoogleID is the primary location for interfacing with the agent type.
IntelFaction is stored as an in in the database.
LinkID wrapper to ensure type safety.
MarkerID wrapper to ensure type safety.
MarkerType will be an enum once we figure out the full list.
OneTimeToken - used to authenticate users in IITC when GAPI doesn't work for them.
OperationID wrapper to ensure type safety.
OpPermRole is just a convenience class for the permission string.
PortalID wrapper to ensure type safety.
TaskID is the basic type for a task identifier.
TeamID is the primary means for interfacing with teams.
TelegramID is a user ID from telegram.
Zone is the sub-operation zone identifer.