Go to file
2019-05-21 11:43:06 +02:00
bin preparing repo persistence for fast startups and more fault tolerance 2015-06-30 11:22:30 +02:00
client code cleanup, grouping declarations 2019-05-21 11:17:03 +02:00
content code cleanup, grouping declarations 2019-05-21 11:17:03 +02:00
log added level in logging 2018-11-27 12:51:19 +01:00
metrics merged metrics branch 2019-05-21 09:49:48 +02:00
pkg flattened project structure and listened to golint 2016-03-07 15:36:34 +01:00
repo repo code cleanup 2019-05-21 11:10:05 +02:00
requests added DataFields to content request 2018-11-28 11:56:11 +01:00
responses Fixes #5: added status 500 to each error reply + pumped version number 2016-05-19 17:15:44 +02:00
server code cleanup, grouping declarations 2019-05-21 11:17:03 +02:00
status code cleanup, grouping declarations 2019-05-21 11:17:03 +02:00
.gitignore git ignore profiling files 2019-05-21 11:10:33 +02:00
.travis.yml feat: add prometheus handler and go-modules 2019-05-08 17:51:51 +02:00
contentserver.go added free-os-mem flag to contentserver 2019-05-21 11:43:06 +02:00
Dockerfile chore: add correct expose file and better makefile 2019-05-08 18:04:58 +02:00
go.mod chore: update modules & testing 2019-05-08 17:57:08 +02:00
go.sum chore: update modules & testing 2019-05-08 17:57:08 +02:00
LICENSE Initial commit 2013-12-26 15:37:02 -08:00
Makefile added profile-test target to makefile 2019-05-21 11:09:51 +02:00
README.md cleaned up readme 2016-03-07 17:59:14 +01:00

Travis CI

Content Server

Serves content tree structures very quickly through a json socket api

Concept

A Server written in GoLang to mix and resolve content from different content sources, e.g. CMS, Blog, Shop and many other more. The server provides a simple to use API for non blocking content repository updates, to resolve site content by an URI or to get deep-linking multilingual URIs for a given contentID.

It's up to you how you use it and which data you want to export to the server. Our intention was to write a fast and cache hazzle-free content server to mix different content sources.

Export Data

All you have to do is to provide a tree of content nodes as a JSON encoded RepoNode.

Attribute Type Usage
Id string unique id to identify the node
MimeType string mime-type of the node, e.g. text/html, image/png, ...
LinkId string (symbolic) link/alias to another node
Groups []string access control
URI string URI
Name string name
Hidden bool hide in menu
DestinationId string alias / symlink handling
Data map[string]interface{} payload data
Nodes map[string]*RepoNode child nodes
Index []string contains the order of of nodes

Tips

  • If you do not want to build a multi-market website define a generic market, e.g. call it universe
  • keep it lean and do not export content which should not be accessible at all, e.g. you are working on a super secret fancy new category of your website
  • Hidden nodes can be resolved by their uri, but are hidden on nodes
  • To avoid duplicate content provide a DestinationId ( = ContentId of the node you want to reference) instead of URIs

Request Data

There is a PHP Proxy implementation for foomo in Foomo.ContentServer. Feel free to use it or to implement your own proxy in the language you love. The API should be easily to implement in every other framework and language, too.

Usage

$ contentserver --help
Usage of contentserver:
  -address string
    	address to bind host:port (default "127.0.0.1:8081")
  -log-level string
    	one of error, record, warning, notice, debug (default "record")
  -var-dir string
    	where to put my data (default "/var/lib/contentserver")
  -version
    	version info

License

Copyright (c) foomo under the LGPL 3.0 license.