router

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootRoute              = "/"
	APIRoute               = "/api"
	RegisterRoute          = "/register"
	LoginRoute             = "/login"
	LogoutRoute            = "/logout"
	UsersRoute             = "/users"
	PictureRoute           = "/picture/"
	PictureRouteWithParams = PictureRoute + ":" + UUIDParam
	MessageRoute           = "/message"
)
View Source
const (
	SessionVariable = "SESSION"
)
View Source
const (
	UUIDParam = "uuid"
)

Variables

View Source
var (
	UnauthorizedResponse = Response{Result: "unauthorized"}
	SucceedResponse      = Response{Result: "succeed"}
)

Functions

This section is empty.

Types

type Response

type Response struct {
	Result string `json:"result"`
}

type Router

type Router struct {
	*controller.Controller
	*gin.Engine
}

func New

func New(c *controller.Controller, e *gin.Engine) *Router

func NewMem

func NewMem() *Router

func NewTest

func NewTest(t *testing.T) (serverClose func(), r *Router, e *httpexpect.Expect)

func (*Router) Authenticate

func (r *Router) Authenticate(ctx *gin.Context)

func (*Router) DownloadPicture added in v0.0.5

func (r *Router) DownloadPicture(ctx *gin.Context)

func (*Router) Login

func (r *Router) Login(ctx *gin.Context)

func (*Router) Logout

func (r *Router) Logout(ctx *gin.Context)

func (*Router) Register

func (r *Router) Register(ctx *gin.Context)

func (*Router) SendMessage

func (r *Router) SendMessage(ctx *gin.Context)

func (*Router) Users

func (r *Router) Users(ctx *gin.Context)

Jump to

Keyboard shortcuts

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