gopherscom

command module
v0.0.0-...-5ca8ec0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 5 Imported by: 0

README

GophersCom

gopherscom is an example backend service written in Go and planning to use it as a platform for Go Programming Language related areas and also as a knowledge sharing community especially for Golang developers. It is implemented using Go and Go's framework Gin and Postgresql as persistant database. gopherscom provides a RESTful Service and features like Geojson, Email auth, JWT with refreshToken and Redis Performance Caching are currently included and more features and functions will be added soon. Here is a deployed link live on heroku .

API LIST


const PUBLIC_URL = "https://gopherscom.herokuapp.com/public"
const PROTECTED_URL = "https://gopherscom.herokuapp.com/protected"
const BASE_URL = "https://gopherscom.herokuapp.com/"

TEST :: use the default route BASE_URL and ping the server and see the response.

# Methods Path Types Description
1 GET BASE_URL {String} '/' route will allow you to see the response whether the server is [👍up] or [👎down].

User

User is a about authetication and credentials. It primarily has features like createUserAccount, accessToken and refreshToken feature.

User Model

type User struct {
	ID        string    `json:"_id" json:"id"`
	NAME      string    `json:"name"`
	EMAIL     string    `json:"email"`
	PASSWORD  string    `json:"password"`
	CREATEDAT time.Time `json:"created_at" json:"created_at"`
	UPDATEDAT time.Time `json:"updated_at" json:"updated_at"`
}


Profile

Profile route is mostly concerned with user detail information and it provides data from both Postgresql database and Redis cache.

Profile Model

type Profile struct {
	ID         string    `json:"id"`
	USERID     string    `json:"userid"`
	CAREER     string    `json:"career"`
	FRAMEWORKS []string  `json:"frameworks"`
	LANGUAGES  []string  `json:"languages"`
	PLATFORMS  []string  `json:"platforms"`
	DATABASES  []string  `json:"databases"`
	OTHERS     []string  `json:"others"`
	SEX        string    `json:"sex"`
	BIRTHDATE  string    `json:"birthdate"`
	ADDRESS    string    `json:"address"`
	ZIPCODE    string    `json:"zipcode"`
	CITY       string    `json:"city"`
	STATE      string    `json:"state"`
	COUNTRY    string    `json:"country"`
	LAT        float64   `json:"lat"`
	LON        float64   `json:"lon"`
	CREATEDAT  time.Time `json:"created_at"`
	UPDATEDAT  time.Time `json:"updated_at"`
}


Blog

Blog route is mostly concerned with Blog related information and it provides CRUD operations for both Postgresql database and Redis cache. Blog Service is one of the main features of GophersCom.

Blog Model

type Blog struct {
	ID        string    `json:"id"`
	TITLE     string    `json:"title"`
	BODY      string    `json:"body"`
	PUBLIC    bool      `json:"public"`
	APPTYPE   string    `json:"apptype"`
	LANGUAGES []string  `json:"languages"`
	TAGS      []string  `json:"tags"`
	LIBRARIES []string  `json:"libraries"`
	AUTHOR    string    `json:"author"`
	LIKES     []Like    `json:"likes"`
	COMMENTS  []Comment `json:"comments"`
	CREATEDAT time.Time `json:"created_at"`
	UPDATEDAT time.Time `json:"updated_at"`
}


Apptype

Apptype route is mostly concerned with Apptype tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of apptype tag items.

Apptype Model

type Apptype struct {
	ID          string    `json:"id"`
	NAME        string    `json:"name"`
	DESCRIPTION string    `json:"description"`
	AUTHOR      string    `json:"author"`
	CREATEDAT   time.Time `json:"created_at"`
	UPDATEDAT   time.Time `json:"updated_at"`
}


Library

Library route is mostly concerned with Library tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of library tag items.

Library Model

Library := Apptype


Other

Other route is mostly concerned with Other tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of other tag items.

Other Model

Other := Apptype


Platform

Platform route is mostly concerned with Platform tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of platform tag items.

Platform Model

Platform := Apptype


Tag

Tag route is mostly concerned with tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of tag items.

Tag Model

Tag := Apptype


Language

Language route is mostly concerned with language tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of language tag items.

Library Model

Language := Apptype


Framework

Framework route is mostly concerned with framework tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of framework tag items.

Framework Model

Framework := Apptype


Database

Database route is mostly concerned with database tag related information and it provides CRUD operations for both Postgresql database and Redis cache. Its main use case is in Frontend dropdown or list of database tag items.

Database Model

Other := Apptype


Bootcamp

Bootcamp route is mostly concerned with Bootcamp related information and it provides CRUD operations for both Postgresql database and Redis cache. Bootcamp Service is one of the main features of GophersCom.

Bootcamp Model

type Bootcamp struct {
	ID          string     `json:"id"`
	TOPIC       string     `json:"topic"`
	INSTRUCTORS []string   `json:"instructors"`
	ADDRESS     string     `json:"address"`
	LAT         float64    `json:"lat"`
	LON         float64    `json:"lon"`
	STUDENTS    string     `json:"students"`
	ENROLLMENTS []Enroller `json:"enrollments"`
	DESCRIPTION string     `json:"description"`
	AVAILABLE   bool       `json:"available"`
	STARTEDAT   string     `json:"startedat"`
	FINISHEDAT  string     `json:"finishedat"`
	AUTHOR      string     `json:"author"`
	LIKES       []Like     `json:"likes"`
	COMMENTS    []Comment  `json:"comments"`
	CREATEDAT   time.Time  `json:"created_at"`
	UPDATEDAT   time.Time  `json:"updated_at"`
}


Company

Company route is mostly concerned with Company related information and it provides CRUD operations for both Postgresql database and Redis cache. Company Service is one of the main features of GophersCom.

Company Model

type Company struct {
	ID          string    `json:"id"`
	NAME        string    `json:"name"`
	PRODUCTS    []string  `json:"products"`
	EMPLOYEE    string    `json:"employee"`
	BRANCHES    []*Branch `pg:",one2many:company_branches"`
	FRAMEWORKS  []string  `json:"frameworks"`
	LANGUAGES   []string  `json:"languages"`
	PLATFORMS   []string  `json:"platforms"`
	DATABASES   []string  `json:"databases"`
	OTHERS      []string  `json:"others"`
	ADDRESS     string    `json:"address"`
	ZIPCODE     string    `json:"zipcode"`
	CITY        string    `json:"city"`
	STATE       string    `json:"state"`
	COUNTRY     string    `json:"country"`
	LAT         float64   `json:"lat"`
	LON         float64   `json:"lon"`
	FOUNDEDYEAR string    `json:"foundedyear"`
	CREATEDAT   time.Time `json:"created_at"`
	UPDATEDAT   time.Time `json:"updated_at"`
}


Branch

Branch route is mostly concerned with Company Branch related information and it provides CRUD operations for both Postgresql database and Redis cache. Company Service is one of the main features of GophersCom and Company Branch is to provide the connection & relationship between Company and Company Branches and how are related and where are they located with how many people in office.

Company Branch Model

type Branch struct {
	ID          string    `json:"id"`
	CID         string    `json:"cid"`
	NAME        string    `json:"name"`
	ADDRESS     string    `json:"address"`
	ZIPCODE     string    `json:"zipcode"`
	CITY        string    `json:"city"`
	STATE       string    `json:"state"`
	COUNTRY     string    `json:"country"`
	LAT         float64   `json:"lat"`
	LON         float64   `json:"lon"`
	FOUNDEDYEAR string    `json:"foundedyear"`
	CREATEDAT   time.Time `json:"created_at"`
	UPDATEDAT   time.Time `json:"updated_at"`
}



Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL