service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service struct of service.

func New

func New(c *conf.Config) (s *Service)

New create service instance and return.

func (*Service) BatchUpdateState

func (s *Service) BatchUpdateState(c context.Context, qids []int64, state int8, operator string) (err error)

BatchUpdateState bacth update question state.

func (*Service) Close

func (s *Service) Close()

Close dao.

func (*Service) CreateBFSImg

func (s *Service) CreateBFSImg(c context.Context, ids []int64)

CreateBFSImg .

func (*Service) GenerateImage

func (s *Service) GenerateImage(c context.Context)

GenerateImage .

func (*Service) History

func (s *Service) History(c context.Context, arg *model.ArgHistory) (res *model.HistoryPage, err error)

History .

func (*Service) LoadImg

func (s *Service) LoadImg(c context.Context) (err error)

LoadImg .

func (*Service) LoadTypes

func (s *Service) LoadTypes(c context.Context) (err error)

LoadTypes .

func (*Service) QueHistory

func (s *Service) QueHistory(c context.Context, arg *model.ArgHistory) (res *model.HistoryPage, err error)

QueHistory .

func (*Service) QuestionAdd

func (s *Service) QuestionAdd(c context.Context, q *model.QuestionDB) (err error)

QuestionAdd add register question

func (*Service) QuestionEdit

func (s *Service) QuestionEdit(c context.Context, arg *model.QuestionDB) (aff int64, err error)

QuestionEdit .

func (*Service) QuestionList

func (s *Service) QuestionList(c context.Context, arg *model.ArgQue) (res *model.QuestionPage, err error)

QuestionList .

func (*Service) ReadCsv

func (s *Service) ReadCsv(f multipart.File, h *multipart.FileHeader) (rs [][]string, err error)

ReadCsv read csv file

func (*Service) Types

func (s *Service) Types(c context.Context) (res []*model.TypeInfo, err error)

Types question type

func (*Service) UpdateStatus

func (s *Service) UpdateStatus(c context.Context, qid int64, state int8, operator string) (err error)

UpdateStatus update question state

func (*Service) UploadQsts

func (s *Service) UploadQsts(c context.Context, f multipart.File, h *multipart.FileHeader, operator string) (msg string, err error)

UploadQsts upload questions

Jump to

Keyboard shortcuts

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