handlers

package
v0.0.0-...-228e6a4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginInput

type LoginInput struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type NewGrocery

type NewGrocery struct {
	Name     string `json:"name" binding:"required"`
	Quantity int    `json:"quantity" binding:"required"`
}

type RegisterInput

type RegisterInput struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db *gorm.DB) *Server

func (*Server) CurrentUser

func (s *Server) CurrentUser(c *gin.Context)

func (*Server) GetGroceries

func (s *Server) GetGroceries(c *gin.Context)

func (*Server) GetUserById

func (s *Server) GetUserById(c *gin.Context)

func (*Server) Login

func (s *Server) Login(c *gin.Context)

func (*Server) LoginCheck

func (s *Server) LoginCheck(username, password string) (string, error)

func (*Server) PostGrocery

func (s *Server) PostGrocery(c *gin.Context)

func (*Server) Register

func (s *Server) Register(c *gin.Context)

Jump to

Keyboard shortcuts

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