Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/godfather667/backend

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/godfather667/backend

  • v0.0.0-20190520134813-d85fa630774e
  • Source
  • Go
  • Socket score

Version published
Created
Source

backend

A Flexible Database for storing records with mixed Columns

Package backend implements an Rest API that manages a "company" database.

  • This package implements a two level Key/Store Data Base:
  • The Data Records are indexed by ID Number as the Key
  • The Data Records are implemented internally as a Key/Store
  • Data Records are made up of a variable number of TAG Pairs
  • TAGS are identified by the first character which is a "|" ie |TAG
  • The |TAG is followed by any number of Words

Example: |NAME John Smith |AGE 50

Since Records are Key/Stores the Record Format is completely flexible.

Each Record can have Unique Tag Pairs - The User can add special Tag to Any Record: For Example:

** Server is on localhost:3000** Responds to endpoint /backend/<CMD> [ <data list> ]

Syntax Description

<CMD> <Data List>

<CMD> = Single Upper Case Text Word

<Data List> = <Tag Pair> [ <Tag Pair> ... ]

<Tag Pair> = <TAG> <Word> [ <Word> ... ]

<TAG> = <|><Single Upper Case Text Word><space>

<Word> = <space><Text><space>

Commands

     /NEW <data list>                  - Creates a new record (ID # -Automatic)
     /UPDATE <|ID Number> <data list>  - Updates specified ID
     /GET/<ID Record Number>           - Returns spedified ID
     /DELETE/<ID Record Number>        - Deletes specified ID
     /LIST/                            - Lists all records
     /EXIT/                            - Close Database and exit
Example: https://localhost:3000/backend/NEW |NAME John Smith |AGE 50

Example: https://localhost:3000/backend/UPDATE |ID Rec# |NAME Mike Browm

 NOTES:
	- TAGs should be unique ( |NAME <string> |NAME <string> ) Is Wrong!!
	- Commands should be in UPPER CASE (For CLarity)
	- !TAG must be an exact match (TAG and tag are NOT the same)
    - TAGS should be in UPPER CASE (For CLarity)
	- There is no escape for the "|" Character is the TAG Prefix identifier
	- All <data list Tags and Words are strings! Numbers are specified as <strings>

Example of LIST Command

CMD:  LIST

1   |NAME John Jones |AGE 50
2   |NAME Mark Smith |AGE 29
3   |NAME Bob Brown  |AGE 35

Error Messages: "Recoverable Errors are Display and Processing Continues"

Unrecoverable Errors are handled by the "log.Fatal" package function.

FAQs

Package last updated on 20 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc