Documentation ¶
Index ¶
- type Converter
- func (c *Converter) FetchIDs(m []gorm.Model) []uint
- func (c *Converter) ManyToUserStat(dtos []internal.User) []*internal.UserStatDTO
- func (u *Converter) ToDTO(dto internal.User) (*internal.UserDTO, error)
- func (c *Converter) ToModel(dto *internal.UserDTO) *internal.User
- func (c *Converter) ToUserStat(dto internal.User) *internal.UserStatDTO
- type CourseConverter
- func (c *CourseConverter) ManyToDTO(courses []*internal.Course) ([]internal.CourseDTO, error)
- func (c *CourseConverter) ManyToModel(dtos []internal.CourseDTO) []internal.Course
- func (c *CourseConverter) ToDTO(dto *internal.Course) (*internal.CourseDTO, error)
- func (c *CourseConverter) ToModel(dto *internal.CourseDTO) *internal.Course
- type CourseResultConverter
- func (c *CourseResultConverter) FetchIDs(m []internal.CourseResult) []string
- func (c *CourseResultConverter) ManyToDTO(courses []internal.CourseResult) ([]internal.CourseResultDTO, error)
- func (c *CourseResultConverter) ManyToModel(dtos []internal.CourseResultDTO) []internal.CourseResult
- func (c *CourseResultConverter) ToDTO(dto *internal.CourseResult) (*internal.CourseResultDTO, error)
- func (c *CourseResultConverter) ToModel(dto *internal.CourseResultDTO) *internal.CourseResult
- type TaskConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct { CourseConverter *CourseConverter CourseResultConverter *CourseResultConverter }
func NewConverter ¶
func NewConverter() *Converter
func (*Converter) ManyToUserStat ¶
func (c *Converter) ManyToUserStat(dtos []internal.User) []*internal.UserStatDTO
func (*Converter) ToUserStat ¶
func (c *Converter) ToUserStat(dto internal.User) *internal.UserStatDTO
type CourseConverter ¶
type CourseConverter struct {
TaskConverter *TaskConverter
}
func NewCourseConverter ¶
func NewCourseConverter(taskConverter *TaskConverter) *CourseConverter
func (*CourseConverter) ManyToModel ¶
func (c *CourseConverter) ManyToModel(dtos []internal.CourseDTO) []internal.Course
type CourseResultConverter ¶
type CourseResultConverter struct{}
func NewCourseResultConverter ¶
func NewCourseResultConverter() *CourseResultConverter
func (*CourseResultConverter) FetchIDs ¶
func (c *CourseResultConverter) FetchIDs(m []internal.CourseResult) []string
func (*CourseResultConverter) ManyToDTO ¶
func (c *CourseResultConverter) ManyToDTO(courses []internal.CourseResult) ([]internal.CourseResultDTO, error)
func (*CourseResultConverter) ManyToModel ¶
func (c *CourseResultConverter) ManyToModel(dtos []internal.CourseResultDTO) []internal.CourseResult
func (*CourseResultConverter) ToDTO ¶
func (c *CourseResultConverter) ToDTO(dto *internal.CourseResult) (*internal.CourseResultDTO, error)
func (*CourseResultConverter) ToModel ¶
func (c *CourseResultConverter) ToModel(dto *internal.CourseResultDTO) *internal.CourseResult
type TaskConverter ¶
type TaskConverter struct{}
func (*TaskConverter) ConvertToDTO ¶
func (*TaskConverter) ConvertToDTO(dto internal.Task) internal.TaskDTO
func (*TaskConverter) ConvertToModel ¶
func (*TaskConverter) ConvertToModel(dto internal.TaskDTO) internal.Task
func (*TaskConverter) ManyToDTO ¶
func (t *TaskConverter) ManyToDTO(dto []internal.Task) []internal.TaskDTO
func (*TaskConverter) ManyToModel ¶
func (t *TaskConverter) ManyToModel(dto []internal.TaskDTO) []internal.Task
Click to show internal directories.
Click to hide internal directories.