controller

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController struct {
	kernel.BaseController
}

func (*AuthController) BasicAuthentication

func (c *AuthController) BasicAuthentication(db *gorm.DB, session *sessions.CookieStore, req kernel.Request)

BasicAuthentication perform basic authentication method

func (*AuthController) JWTAuthentication

func (c *AuthController) JWTAuthentication(db *gorm.DB, conf *kernel.ServerConf, req kernel.Request)

JWTAuthentication provides user authentication with JWT

type HomeController

type HomeController struct {
	kernel.BaseController
}

func (*HomeController) Main

func (c *HomeController) Main()

Main returns the Go-Web welcome page. This is just an example of Go-Web controller. With the "c" parameter you've access to the method/properties declared in BaseController (controller.go). Of course you can edit this method with a custom logic.

type UserController

type UserController struct {
	kernel.BaseController
}

func (*UserController) Insert

func (c *UserController) Insert(db *gorm.DB)

Insert this method will be used to insert a new user in main DB (SQL)

func (*UserController) Profile

func (c *UserController) Profile(conf *kernel.ServerConf)

Profile method return information about the authenticated user.

Jump to

Keyboard shortcuts

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