package
0.25.0
Repository: https://github.com/gravitl/netmaker.git
Documentation: pkg.go.dev

# Functions

CloseDB - closes a database gracefully.
No description provided by the author
DeleteAllRecords - removes a table and remakes.
DeleteRecord - deletes a record from db.
FetchRecord - fetches a record.
FetchRecords - fetches all records in given table.
GetPeers - gets peers for a given network.
InitializeDatabase - initializes database.
Insert - inserts object into db.
InsertPeer - inserts peer into db.
IsConnected - tell if the database is connected or not.
IsEmptyRecord - checks for if it's an empty record error or not.
IsJSONString - checks if valid json.
PeersAreEqual - checks if peers are the same.
SetPeers - sets peers for a network.

# Constants

CACHE_TABLE_NAME - caching table.
CERTS_TABLE_NAME - certificates table.
CLOSE_DB - graceful close of db const.
CREATE_TABLE - create table const.
DATABASE_FILENAME - database file name.
DELETE - delete db record const.
DELETE_ALL - delete a table const.
DELETED_NODES_TABLE_NAME - deleted nodes table.
DNS_TABLE_NAME - dns table.
ENROLLMENT_KEYS_TABLE_NAME - table name for enrollmentkeys.
EXT_CLIENT_TABLE_NAME - ext client table.
FETCH_ALL - fetch table contents const.
GENERATED_TABLE_NAME - stores server generated k/v.
HOST_ACTIONS_TABLE_NAME - table name for enrollmentkeys.
HOSTS_TABLE_NAME - the table name for hosts.
== DB Constants == INIT_DB - initialize db.
INSERT - insert into db const.
INSERT_PEER - insert peer into db const.
METRICS_TABLE_NAME - stores network metrics.
NETWORK_USER_TABLE_NAME - network user table tracks stats for a network user per network.
== Table Names == NETWORKS_TABLE_NAME - networks table.
== ERROR CONSTS == NO_RECORD - no singular result found.
NO_RECORDS - no results found.
NODE_ACLS_TABLE_NAME - stores the node ACL rules.
NODES_TABLE_NAME - nodes table.
PEERS_TABLE_NAME - peers table.
PENDING_USERS_TABLE_NAME - table name for pending users.
SERVER_UUID_RECORD_KEY - telemetry thing.
SERVER_UUID_TABLE_NAME - stores unique netmaker server data.
SERVERCONF_TABLE_NAME - stores server conf.
SSO_STATE_CACHE - holds sso session information for OAuth2 sign-ins.
USER_GROUPS_TABLE_NAME - table for storing usergroups.
USER_INVITES - table for user invites.
USER_PERMISSIONS_TABLE_NAME - user permissions table.
USERS_TABLE_NAME - users table.

# Variables

PG_FUNCTIONS - map of db functions for PostGreSQL.
PGDB - database object for PostGreSQL.
RQLITE_FUNCTIONS - all the functions to run with rqlite.
RQliteDatabase - the rqlite db connection.
SQLITE_FUNCTIONS - contains a map of the functions for sqlite.
SqliteDB is the db object for sqlite database connections.