controllers

package
v0.0.0-...-870aec1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPosts

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

func GetSecretPosts

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

func GetToken

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

Types

type Post

type Post struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Likes       int32  `json:"likes"`
	Comments    int32  `json:"comments"`
	ShareLink   string `json:"shareLink"`
}

type TokenSchema

type TokenSchema struct {
	Token string `json:"token"`
	Error error  `json:"error"`
}

type User

type User struct {
	Uname    string `json:"uname"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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