From 2ed153f8d287b3ffb5e8d1667ab51c922d82c504 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 19 Sep 2016 02:09:29 -0700 Subject: reorganizing files and dir structure. adding initial (incomplete) management, types, system and db functionality. --- system/admin.go | 2 ++ system/db/item.go | 8 ++++++++ system/db/query.go | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 system/admin.go create mode 100644 system/db/item.go create mode 100644 system/db/query.go (limited to 'system') diff --git a/system/admin.go b/system/admin.go new file mode 100644 index 0000000..7fa156a --- /dev/null +++ b/system/admin.go @@ -0,0 +1,2 @@ +// Package system exposes all interfaces to admin and api components +package system diff --git a/system/db/item.go b/system/db/item.go new file mode 100644 index 0000000..23e8553 --- /dev/null +++ b/system/db/item.go @@ -0,0 +1,8 @@ +// Package db ... +package db + +// Item should only be embedded into content type structs. +// Helper for DB-related actions +type Item struct { + ID int `json:"_id"` +} diff --git a/system/db/query.go b/system/db/query.go new file mode 100644 index 0000000..c9cf37c --- /dev/null +++ b/system/db/query.go @@ -0,0 +1,21 @@ +package db + +// Set inserts or updates values in the database. +// The `key` argument is a string made up of namespace:id (string:int) +func Set(key string) error { + + return nil +} + +// Get retrives one item from the database. Non-existent values will return an empty []byte +// The `key` argument is a string made up of namespace:id (string:int) +func Get(key string) []byte { + + return nil +} + +// GetAll retrives all items from the database within the provided namespace +func GetAll(namespace string) [][]byte { + + return nil +} -- cgit v1.2.3