Documentation ¶
Index ¶
- func NewHandler(c *Config)
- type Config
- type Handler
- func (h *Handler) DeleteImage(c *gin.Context)
- func (h *Handler) Details(c *gin.Context)
- func (h *Handler) Image(c *gin.Context)
- func (h *Handler) Me(c *gin.Context)
- func (h *Handler) Signin(c *gin.Context)
- func (h *Handler) Signout(c *gin.Context)
- func (h *Handler) Signup(c *gin.Context)
- func (h *Handler) Tokens(c *gin.Context)
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.