handler

package
v0.0.0-...-dcedfe7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT 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 required injected services along with http routes Does not return as it deals directly with a reference to the gin Engine

Types

type Config

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

Config will hold services that will eventually be injected into this handler layer on handler initialization

type Handler

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

Handler struct holds required services for 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) Image

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

Image handler

func (*Handler) Me

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

Me handler calls services for getting current login user's details

func (*Handler) Signin

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

Signin used to authenticate extant user

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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