handlers

package
v0.0.0-...-6436baa Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(c *Config)

NewHandler Initializes the handler with the required injected services and the http routes

Types

type Config

type Config struct {
	R               *gin.Engine
	UserService     models.UserService
	TokenService    models.TokenService
	BaseURL         string
	TimeoutDuration time.Duration
	MaxBodyBytes    int64
}

Config Holds services that will be injected into the handler layer on handler initialization

type Handler

type Handler struct {
	UserService  models.UserService
	TokenService models.TokenService
	MaxBodyBytes int64
}

Handler Holds required services for the handler to function

func (*Handler) DeleteImage

func (h *Handler) DeleteImage(c *gin.Context)

DeleteImage handler

func (*Handler) Details

func (h *Handler) Details(c *gin.Context)

Details handler

func (*Handler) Me

func (h *Handler) Me(c *gin.Context)

Me handler calls services to get the users details

func (*Handler) Signin

func (h *Handler) Signin(c *gin.Context)

Signin handler

func (*Handler) Signout

func (h *Handler) Signout(c *gin.Context)

Signout handler

func (*Handler) Signup

func (h *Handler) Signup(c *gin.Context)

Signup handler

func (*Handler) Tokens

func (h *Handler) Tokens(c *gin.Context)

Tokens handler

func (*Handler) UploadImage

func (h *Handler) UploadImage(c *gin.Context)

UploadImage handler

Jump to

Keyboard shortcuts

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