All Projects → philips-software → gino-keva

philips-software / gino-keva

Licence: MIT License
A simple Git Notes Key Value store

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to gino-keva

ganggo
MOVED TO https://git.feneas.org/ganggo
Stars: ✭ 32 (+39.13%)
Mutual labels:  golang-application
agent
Store sensitive data such as API tokens
Stars: ✭ 19 (-17.39%)
Mutual labels:  key-value-store
authz0
🔑 Authz0 is an automated authorization test tool. Unauthorized access can be identified based on URLs and Roles & Credentials.
Stars: ✭ 248 (+978.26%)
Mutual labels:  golang-application
urlredir
Educational URL redirector service in Go
Stars: ✭ 26 (+13.04%)
Mutual labels:  golang-application
cannyls
An embedded persistent key-value storage for Rust that is optimized for random-access workload and huge-capacity HDD
Stars: ✭ 104 (+352.17%)
Mutual labels:  key-value-store
go-evepraisal
the code that powers evepraisal.com
Stars: ✭ 61 (+165.22%)
Mutual labels:  golang-application
worker
Worker for Vela (Target's official Pipeline Automation Framework)
Stars: ✭ 27 (+17.39%)
Mutual labels:  golang-application
smtp-dkim-signer
SMTP-proxy that DKIM-signs e-mails before submission to an upstream SMTP-server.
Stars: ✭ 28 (+21.74%)
Mutual labels:  golang-application
zauth
2FA (Two-Factor Authentication) application for CLI terminal with support to import/export andOTP files.
Stars: ✭ 74 (+221.74%)
Mutual labels:  golang-application
go-mux-jwt-boilerplate
Golang REST API using MUX, GORM, and JWT for authentication
Stars: ✭ 41 (+78.26%)
Mutual labels:  golang-application
server
Server/API for Vela (Target's official Pipeline Automation Framework)
Stars: ✭ 74 (+221.74%)
Mutual labels:  golang-application
Morpheus
A Matrix client written in Go-QT
Stars: ✭ 20 (-13.04%)
Mutual labels:  golang-application
pigger
A cross-platform note taking and static blog writing system in golang
Stars: ✭ 16 (-30.43%)
Mutual labels:  golang-application
DBMSology
The Paper List on Design and Implmentation of System Software
Stars: ✭ 67 (+191.3%)
Mutual labels:  key-value-store
gin-rest-api
Example golang using gin framework everything you need, i create this tutorial special for beginner.
Stars: ✭ 56 (+143.48%)
Mutual labels:  golang-application
gosearch
a fast, real-time file searching program for linux
Stars: ✭ 68 (+195.65%)
Mutual labels:  golang-application
rss2email
Convert RSS feeds to emails
Stars: ✭ 72 (+213.04%)
Mutual labels:  golang-application
toggler
toggler is a feature flag service to decouple deployment, feature enrollment and experiments
Stars: ✭ 27 (+17.39%)
Mutual labels:  golang-application
jump-jump
开箱即用,Golang 开发的一个功能完善的短链接系统。URL shortener service developed with golang.
Stars: ✭ 110 (+378.26%)
Mutual labels:  golang-application
breakglass
A command line tool to provide login credentials from Hashicorp Vault
Stars: ✭ 33 (+43.48%)
Mutual labels:  golang-application

Build and Test Go Report Card

Gino Keva - Git Notes Key Values

Gino Keva works as a simple Key Value store built on top of Git Notes, using an event sourcing architecture.

  • Events are added to the current commit when manipulating key/values via get or unset actions
  • Gino Keva compiles a snapshot of all historical key/values by replaying all events up to the current commit

Table of Contents

Use case

Although Gino Keva was written with the below use case in mind, it intends to be a generic tool. Don't get discouraged if your intended use is very different. Instead feel free to open a ticket, so we can discuss if we can make it work.

The need for Gino Keva was born in an environment where ~20 components (some would call micro-services) live together in a single repository. Every component is deployed in a docker container; together they form an application/service. There's a single build pipeline that triggers upon any change. The pipeline will then fan out and trigger an independent build (and test) for each component impacted by the change. For each component, this results in a new docker container which is versioned and pushed to the registry. Once all components are rebuilt, the set of containers (of which some newly built) can be deployed and tested and eventually be promoted to production.

Due to the selective build mechanism, the versions of components are not coupled. Some will rarely change, others frequently. Now how to keep track of the set of containers that make up the application? It makes sense to keep this build metadata inside the version control system, so we have it available for each commit that was built. But we'd hate to see the build pipeline polluting the git history with artificial commits. This is where Gino Keva was born.

Use case - Store new component version

Gino Keva is used to store the newly built version of any component as a key/value pair in git notes, linked to commit it was built from: COMPONENT_foo=1.1.0.

Use case - List all component versions corresponding for a certain commit

For each deployment, the list of containers which make up the application is simply collected based on the output of gino-keva list:

Before After
COMPONENT_foo=1.0.0 COMPONENT_foo=1.1.0 (updated)
COMPONENT_BAR=1.2.3 COMPONENT_BAR=1.2.3 (untouched)
.... ....

Requirements

  • Git CLI: Gino Keva uses the git CLI as installed on the host. Tested with version 2.32.0, however any recent version should do.

How to use

See below examples on how to use gino-keva, or run gino-keva --help for help.

Warning: Push your changes

By default, gino-keva will not push your changes to the upstream. You likely would like to change this behaviour by specifying --push, or setting the environment variable GINO_KEVA_PUSH=1. If you do not do this, subsequent fetches will overwrite any local changes made.

Set key/value pairs

foo@bar (f10b970d):~$ gino-keva set key my_value
foo@bar (f10b970d):~$ gino-keva set counter 12
foo@bar (f10b970d):~$ gino-keva set foo bar

List all key/value pairs

foo@bar (f10b970d):~$ gino-keva list
counter=12
foo=bar
key=my_value

foo@bar (f10b970d):$ git commit --allow-empty -m "Dummy commit" foo@bar (a8517558):$ gino-keva set pi 3.14 foo@bar (a8517558):~$ gino-keva list --output=json { "counter": "12", "foo": "bar", "key": "my_value", "pi": "3.14" }


### Unset keys

Finally, you can unset keys using `unset`:

```console
foo@bar (a8517558):~$ gino-keva unset foo
foo@bar (a8517558):~$ gino-keva list
counter=12
key=my_value
pi=3.14

Use custom notes reference

By default the notes are saved to refs/notes/gino-keva, but this can be changed with the --ref command-line switch. To store your key/value under refs/notes/banana:

foo@bar (a8517558):~$ gino-keva --ref=banana set color yellow

FAQ

I need additional git configuration? How can I do that?

Since Gino Keva simply uses the git CLI, you can use (most of) the options it provides to set/override the configuration. You could either use git config to setup the system is desired, or use environment variables to achieve the same.

Example: Add a key/value pair as the "whatever <[email protected]>" user

GIT_CONFIG_COUNT=2 \
GIT_CONFIG_KEY_0="user.name" GIT_CONFIG_VALUE_0="whatever" \
GIT_CONFIG_KEY_1="user.email" GIT_CONFIG_VALUE_1="[email protected]" \
gino-keva set foo bar

I need a custom output format

Gino Keva supports just simple key=value format (default), or json (--output=json). However, you can parse the output in any format you'd like.

Example: Use gino-keva as part of a GitHub action:

foo@bar:~$ gino-keva list | awk -F= '{print "::set-output name="$1"::"$2}'
::set-output name=COUNTER::12
::set-output name=key::my_value
::set-output name=PI::3.14

Example: Use gino-keva as part of an Azure Devops pipeline:

foo@bar:~$ gino-keva list | awk -F= '{print "##vso[task.setvariable variable="$1"]"$2}'
##vso[task.setvariable variable=COUNTER]12
##vso[task.setvariable variable=key]my_value
##vso[task.setvariable variable=PI]3.14
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].