/go-common-models

Data models for TerrexTech code.

Primary LanguageGoApache License 2.0Apache-2.0

This repository provides the models commonly used across TerrexTech projects.
It also includes bootstrap package for conveniently creating Event and EventMeta tables and associated Keyspace in Cassandra.

Included models:

  • Command
  • Document
  • Error
  • Event
  • EventMeta
  • EventStoreQuery
  • LogEntry

The models provided are intended to be imported by any libraries dealing with the respective models, to ensure consistency across structures/schema.

Go Docs:

Usage:

As mentioned above, this library can be used to directly create the tables events, events_meta, and the associated keyspace.

To create the tables, simply call the bootstrap#Event and the bootstrap#EventMeta methods.

The required information (such as Cassandra Hosts, Keyspace/Table names, etc.) is read from the Environemnt.

The default configuration can be found in the .env file at the root.