handler

package
v0.0.0-...-59258b7 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserHandler

func NewUserHandler(c *Config)

NewArticleHandler will initialize the articles/ resources endpoint func NewUserHandler(app *fiber.App, us domain.UserUseCase) {

Types

type Config

type Config struct {
	F               *fiber.App
	UserUseCase     domain.UserUseCase
	TokenUseCase    domain.TokenUseCase
	BaseURL         string
	TimeoutDuration time.Duration
	MaxBodyBytes    int64
}

type Handler

type Handler struct {
	UserUseCase  domain.UserUseCase
	TokenUseCase domain.TokenUseCase
}

ArticleHandler represent the httphandler for article

func (*Handler) GetByID

func (uh *Handler) GetByID(c *fiber.Ctx) error

GetByID will get article by given id

func (*Handler) Login

func (h *Handler) Login(c *fiber.Ctx) error

Signin used to authenticate extant user

type ResponseError

type ResponseError struct {
	Message string `json:"message"`
}

ResponseError represent the reseponse error struct

Jump to

Keyboard shortcuts

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