Giter Club home page Giter Club logo

logdb's Introduction

Build Status

This is a command line application.

This application maintains no state, every time a view is requested by the get command it rebuilds the view with the state from the file.

to run the application from a linux machine simple execute the binary, or install go on your machine and execute go run logdb.go

Example:

goudsbloem@goudsbloem-MS-7597 ~/go/src/sample $ ./logdb  
welcome to logDB

> add an entry:                   put={"key":"<entry name>","value":<integer value>}`  
> get the sum of the values:      get{"key":"<entry name>", "value":"sum"}  
> get the last entry value:       get{"key":"<entry name>", "value":"last"}  

> put={"key":"mydb","value":123}  
ok {"key":"position","value":0}  
> put={"key":"mydb","value":27}  
ok {"key":"position","value":4}  
> get={"key":"mydb","value":"sum"}  
ok {"key":"sum","value":150}  
> put={"key":"mydb","value":-100}  
ok {"key":"position","value":7}  
> get={"key":"mydb","value":"sum"}  
ok {"key":"sum","value":50}  
> get={"key":"mydb","value":"last"}  
ok {"key":"last","value":-100}


the mydb file contains:

goudsbloem@goudsbloem-MS-7597 ~/go/src/sample $ cat mydb  
123  
27  
-100

code is hosted on https://github.com/wgoudsbloem/logdb

logdb's People

Contributors

wgoudsbloem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.