api

package
v10.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Follow

func Follow(res http.ResponseWriter, r *http.Request)

func GetConnString

func GetConnString() string

func Get_latest

func Get_latest(res http.ResponseWriter, r *http.Request)

Get_latest godoc @Summary Get latest accepted id @Produce json @Success 200 "Returns latest accepted id by api" @Router /latest [get]

func Messages

func Messages(res http.ResponseWriter, r *http.Request)

func Messages_per_user

func Messages_per_user(res http.ResponseWriter, r *http.Request)

func Not_req_from_simulator

func Not_req_from_simulator(res http.ResponseWriter, r *http.Request)

func Register

func Register(res http.ResponseWriter, r *http.Request)

Register godoc @Summary Post new user to register @Produce json @Param name path string true "User Name" @Param email path string true "Email" @Param password path string true "Password" @Success 204 "User registered" @Failure 400 "Error on insert with description" @Router /register [post]

func Update_latest

func Update_latest(res http.ResponseWriter, req *http.Request)

Types

type FollowUser

type FollowUser struct {
	Follows_username  string `json:"follow"`
	Unfollow_username string `json:"unfollow"`
}

type Message

type Message struct {
	Username string `json:"username"`
	Text     string `json:"content"`
}

type Post

type Post struct {
	Text     string `json:"content"`
	Pub_date string `json:"pub_date"`
	Username string `json:"user"`
}

type User

type User struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Pwd      string `json:"pwd"`
}

Jump to

Keyboard shortcuts

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