api

package
v0.0.0-...-39fca43 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Engineers []Engineer

Engineers represents the list of engineers and authenticated users

Functions

func AddNewEngineer

func AddNewEngineer(w http.ResponseWriter, r *http.Request)

func AssignValues

func AssignValues(host, port string)

func CreateInitialEngineerProfile

func CreateInitialEngineerProfile()

CreateInitialEngineerProfile Creating initial engineer profiles

func DeleteEngineer

func DeleteEngineer(w http.ResponseWriter, r *http.Request)

func Error

func Error(w http.ResponseWriter, r *http.Request, code int, err error)

func JSON

func JSON(w http.ResponseWriter, r *http.Request, code int, output interface{})

func ShowAllEngineers

func ShowAllEngineers(w http.ResponseWriter, r *http.Request)

func ShowSingleEngineer

func ShowSingleEngineer(w http.ResponseWriter, r *http.Request)

func StartTheApp

func StartTheApp()

func StartXormEngine

func StartXormEngine()

func UpdateEngineerProfile

func UpdateEngineerProfile(w http.ResponseWriter, r *http.Request)

func UserCtx

func UserCtx(next http.Handler) http.Handler

func Welcome

func Welcome(w http.ResponseWriter, r *http.Request)

Types

type Engineer

type Engineer struct {
	Username string `json:"username" xorm:"pk not null unique"`

	FirstName string `json:"firstname"`
	LastName  string `json:"lastname"`

	City     string `json:"city"`
	Division string `json:"division"`

	Position string `json:"position"`

	CreatedAt time.Time `xorm:"created"`
	UpdatedAt time.Time `xorm:"updated"`
	DeletedAt time.Time `xorm:"deleted"`
	Version   int       `xorm:"version"`
}

Jump to

Keyboard shortcuts

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