controller

package
v0.0.0-...-eced9c5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewUserController

func NewUserController(userRepository repository.UserRepository) *userController

Types

type AppController

type AppController struct {
	User interface{ UserController }
}

func NewAppController

func NewAppController(user UserController) *AppController

type Context

type Context interface {
	JSON(code int, obj interface{})
}

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func NewError

func NewError(code int, message string) *Error

type RespUser

type RespUser struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

func ParseUser

func ParseUser(user entity.User) *RespUser

func ParseUsers

func ParseUsers(users []entity.User) []*RespUser

type UserController

type UserController interface {
	GetUsers(c Context)
}

Jump to

Keyboard shortcuts

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