https://github.com/terrextech/go-common-models
Data models for TerrexTech code.
https://github.com/terrextech/go-common-models
Last synced: 9 months ago
JSON representation
Data models for TerrexTech code.
- Host: GitHub
- URL: https://github.com/terrextech/go-common-models
- Owner: TerrexTech
- License: apache-2.0
- Created: 2018-11-19T01:02:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-26T07:50:31.000Z (over 7 years ago)
- Last Synced: 2024-06-20T05:05:28.687Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository provides the models commonly used across TerrexTech projects.
It also includes [`bootstrap`][0] 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:**
* **[bootstrap][0]**
* **[definition][1]**
* **[model][2]**
### 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`][3] and the [`bootstrap#EventMeta`][4] 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.
[0]: https://godoc.org/github.com/TerrexTech/go-common-models/bootstrap
[1]: https://godoc.org/github.com/TerrexTech/go-common-models/definition
[2]: https://godoc.org/github.com/TerrexTech/go-common-models/model
[3]: https://godoc.org/github.com/TerrexTech/go-common-models/bootstrap#Event
[4]: https://godoc.org/github.com/TerrexTech/go-common-models/bootstrap#EventMeta