handler

package
v0.0.0-...-e2aafcc Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 9 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 {
	R               *gin.Engine
	UserService     model.UserService
	TokenService    model.TokenService
	BaseURL         string
	TimeoutDuration time.Duration
}

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
}

Handler struct holds required services for handler to function

func (*Handler) Avatar

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

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)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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