Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DemoApi ¶
type DemoApi struct {
// contains filtered or unexported fields
}
func NewDemoApi ¶
func NewDemoApi() *DemoApi
func (*DemoApi) Demo ¶
Demo godoc @Summary 获取所有用户 @Description 获取所有用户 @Produce json @Tags demo @Success 200 array []UserDTO @Router /demo/demo [get]
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
type User ¶
type User struct { ID uint Name string Email *string Age uint8 Birthday *time.Time MemberNumber sql.NullString ActivatedAt sql.NullTime CreatedAt time.Time UpdatedAt time.Time }
User is gorm model
type UserDTO ¶
func StudentsToUserDTOs ¶
func StudentsToUserDTOs(students []demoService.Student) []UserDTO
func UserModelsToUserDTOs ¶
Click to show internal directories.
Click to hide internal directories.