demo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(r *gin.Engine) error

Types

type DemoApi

type DemoApi struct {
	// contains filtered or unexported fields
}

func NewDemoApi

func NewDemoApi() *DemoApi

func (*DemoApi) Demo

func (api *DemoApi) Demo(c *gin.Context)

func (*DemoApi) Demo2

func (api *DemoApi) Demo2(c *gin.Context)

func (*DemoApi) DemoPost

func (api *DemoApi) DemoPost(c *gin.Context)

type Repository

type Repository struct {
}

func NewRepository

func NewRepository() *Repository

func (*Repository) GetUserByIds

func (r *Repository) GetUserByIds([]int) []UserModel

func (*Repository) GetUserIds

func (r *Repository) GetUserIds() []int

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) GetUsers

func (s *Service) GetUsers() []UserModel

type UserDTO

type UserDTO struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

func StudentsToUserDTOs

func StudentsToUserDTOs(students []demoService.Student) []UserDTO

func UserModelsToUserDTOs

func UserModelsToUserDTOs(models []UserModel) []UserDTO

type UserModel

type UserModel struct {
	UserId int
	Name   string
	Age    int
}

Jump to

Keyboard shortcuts

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