Skip to main content

API Reference

Complete API documentation for GoatDB.

Core

Classes

  • ConsoleLogStream - A LogStream implementation that writes log entries to the console.
  • DataRegistry - The DataRegistry acts as a registry of known schemas for a given GoatDB
  • Emitter - No description
  • GoatDB - The main database class that manages repositories, synchronization, and data
  • Item - An Item instance represents a snapshot of a data item including all of its
  • JSONLogStream - A LogStream implementation that writes log entries to a JSON file.
  • ManagedItem - A high-level interface for reading, writing, and synchronizing a single item
  • Query - A Query represents a live view over a repository or another query,
  • Repository - No description
  • TrustPool - Each commit in the graph is signed with the private key of the session that

Interfaces

Types

  • AppConfig - A configuration of a Single Page Application built on top GoatDB.
  • AuthConfig - An array of authentication rules for the full DB. The DB scans these rules
  • AuthOp - Denotes the type of the requested operation.
  • AuthRule - A function that determines whether a specific operation is authorized.
  • AuthRuleInfo - Information passed to authentication rules to determine if an operation
  • ConcreteCoreValue - Concrete (non-undefined) values supported by GoatDB
  • CoreArray - A mutable array of CoreValues
  • CoreClassObject - Union type of custom class objects that can be handled by GoatDB
  • CoreDictionary - A dictionary of CoreKeys to CoreValues
  • CoreKey - A string key type for CoreObjects
  • CoreSet - A Set containing CoreValues
  • CoreValue - The complete set of values supported by GoatDB, including undefined
  • FieldDef - A definition of a single field in a schema.
  • FieldValue - A mapping between a schema type and its native variable type.
  • IterableFilterFunc - Function type for filtering iterable values during operations
  • ObjFieldsFilterFunc - Function type for filtering object fields during operations
  • QueryConfig - The configuration for a query, specifying the database, source, predicate,
  • ReadonlyCoreArray - A read-only array of CoreValues
  • ReadonlyCoreObject - A read-only object with string keys and CoreValue values
  • Schema - A Schema defines the structure of a Document. Schemas are also versioned,
  • SchemaDataType - Given a schema, extracts the type of its data.
  • SchemaField - Represents a field in a schema, which can be either a custom field defined
  • SchemaFieldsDef - Mapping between field name and its definition.
  • SchemaNullType - No description
  • SchemaOptionalFields - Given a schema, extracts the names of all optional fields.
  • SchemaRequiredFields - Given a schema, extracts the names of all required fields.
  • SchemaTypeSession - No description
  • SchemaTypeUserStats - No description
  • SchemaValueWithOptional - Given a type (FieldValue) and a required + default function, this generates

Functions

Server

Classes

  • Server - A simple abstraction around an HTTP server. The server is built using two

Interfaces

  • ServerOptions - A server represents a logical DB with some additional configuration options.
  • ServerServices - The services object is accessible to all endpoints and middlewares of the

Types

Functions

React

Interfaces

Types

  • DBReadyState - Represents the state of the loading process.
  • PropsWithPath - Convenience props type for components that accept a DB path as input.
  • UseItemOpts - Options for the useItem hook.

Functions