Skip to content

luisguve/cheroapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Server for the cheroAPI service

This repository contains the implementation for the gRPC services, as defined in cheroapi.proto and userapi.proto, using Bolt, an embedded key/value store as the underlying database.

Table of contents

  1. Installation
  2. Services architecture overview
  3. Users service
  4. General service
  5. Section service

Installation

  1. run go get github.com/luisguve/cherosite and go get github.com/luisguve/cheroapi. Then run go install github.com/luisguve/cherosite/cmd/cherosite and go install github.com/luisguve/cheroapi/cmd/.... The following binaries will be installed in your $GOBIN: cherosite, userapi, general and contents. On setup, all of these must be running.
  2. You will need to write two .toml files in order to configure the users service and general service and at least one .toml file for a section. Each section should be running on it's own copy of contents binary and have it's own .toml file. See userapi.toml, general.toml and section_mylife.toml at the project root for an example.
  3. Follow the installation instructions for the http server in the cherosite project.

Services architecture overview

For the application to work properly, there must be two services running: the users service and the general service, and at least one section service.

Users service

This service handles everything related to users on a single Bolt database file.

It's definition can be found at userapi.proto.

General service

This service handles requests that involve getting contents from multiple sections and multiple users, such as the "/explore" page or the dashboard. It does not store any data, but requests it from the APIs of each section and the API of the users service.

It's definition can be fond at cheroapi.proto.

Section service

This service handles requests of a single section and stores data on a single Bolt database file. It performs one Quality Assurance every day automatically, if the variable schedule_qa is set to true in the .toml config file for the section.

It's definition can be fond at cheroapi.proto.

About

grpc api server for cheropatilla site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages