service

package
v0.0.0-...-a7a92e2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CourseService

type CourseService struct{}

func (*CourseService) CreateCourse

func (c *CourseService) CreateCourse(course *model.Course) (uint, error)

func (*CourseService) DeleteCourse

func (c *CourseService) DeleteCourse(id uint) error

func (*CourseService) ExportFile

func (c *CourseService) ExportFile() (string, error)

func (*CourseService) GetCourseByCode

func (c *CourseService) GetCourseByCode(code string) (json.RawMessage, error)

func (*CourseService) GetCourseList

func (c *CourseService) GetCourseList(page *model.Page, r *model.Course, courses *[]model.Course) error

func (*CourseService) GetCourseListQuery

func (c *CourseService) GetCourseListQuery(page *model.Page, q *string, courses *[]model.Course) error

func (*CourseService) ImportFile

func (c *CourseService) ImportFile(file []byte, sun *uint, errs *[]string) error

func (*CourseService) ReleaseTemplate

func (c *CourseService) ReleaseTemplate() error

func (*CourseService) UpdateCourse

func (c *CourseService) UpdateCourse(id uint, course *model.Course) error

type ProgramService

type ProgramService struct{}

func (*ProgramService) CalculateProgram

func (s *ProgramService) CalculateProgram(id uint, tags *[]string, credit *float64, hours *int) error

func (*ProgramService) CreateProgram

func (s *ProgramService) CreateProgram(program *model.Program) (uint, error)

func (*ProgramService) DeleteProgram

func (s *ProgramService) DeleteProgram(id uint) error

func (*ProgramService) GenerateProgramTags

func (s *ProgramService) GenerateProgramTags(program *model.Program) error

func (*ProgramService) GetProgram

func (s *ProgramService) GetProgram(id uint, program *model.Program) error

func (*ProgramService) GetProgramList

func (s *ProgramService) GetProgramList(programs *[]model.Program) error

func (*ProgramService) GetProgramWithContent

func (s *ProgramService) GetProgramWithContent(id uint, program *model.Program) error

func (*ProgramService) GetProgramWithNoContent

func (s *ProgramService) GetProgramWithNoContent(id uint, program *model.Program) error

func (*ProgramService) UpdateProgram

func (s *ProgramService) UpdateProgram(id uint, program *model.Program) error

type TagService

type TagService struct{}

func (*TagService) CreateTag

func (s *TagService) CreateTag(tag *model.Tag) error

func (*TagService) DeleteTag

func (s *TagService) DeleteTag(id uint64) error

func (*TagService) GetTagList

func (s *TagService) GetTagList() ([]model.Tag, error)

func (*TagService) UpdateTag

func (s *TagService) UpdateTag(tag *model.Tag) error

Jump to

Keyboard shortcuts

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