response

package
v0.0.0-...-003a2e9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR        = 7
	SUCCESS      = 0
	NOT_FIND     = 404
	ClientError  = 400
	ServiceError = 500
)

Variables

This section is empty.

Functions

func CheckHandle

func CheckHandle(c *gin.Context, err error)

func ErrorHandle

func ErrorHandle(c *gin.Context, err error)

func NotFind

func NotFind(c *gin.Context)

func OkWithDetailed

func OkWithDetailed(data interface{}, message string, c *gin.Context)

func OkWithMessage

func OkWithMessage(message string, c *gin.Context)

func Result

func Result(code int, data interface{}, msg string, c *gin.Context)

Types

type Answer

type Answer struct {
	Answer string `json:"answer"`
}

type Compile

type Compile struct {
	FileId         string    `json:"fileId"`
	ExpirationTime time.Time `json:"expirationTime"`
}

type Execute

type Execute struct {
	Output string `json:"output"` // 标准输出
	ojBo.ExecuteSituation
}

type JudgePractice

type JudgePractice struct {
	questionBankBo.PracticeModel
}

type JudgeSimple

type JudgeSimple struct {
	global.GVA_MODEL
	questionBankPo.SimpleModel
}

type MultipleChoiceExam

type MultipleChoiceExam struct {
	questionBankBo.PracticeModel
	MostOptions  int `json:"mostOptions" form:"mostOptions" gorm:"column:most_options;comment:最多可选项;"`
	IsIndefinite int `json:"isIndefinite" form:"isIndefinite" gorm:"column:is_indefinite"`
}

type MultipleChoicePractice

type MultipleChoicePractice struct {
	questionBankBo.PracticeModel
	MostOptions int `json:"mostOptions" form:"mostOptions" gorm:"column:most_options;comment:最多可选项;"`
}

type MultipleChoiceSimple

type MultipleChoiceSimple struct {
	global.GVA_MODEL
	questionBank.SimpleModel
}

type ProgramPractice

type ProgramPractice struct {
	questionBankBo.PracticeModel
	questionBankBo.DefaultCodes `json:"defaultCodes"`
}

func (*ProgramPractice) Convert

func (p *ProgramPractice) Convert(practice *questionBankBo.ProgramPractice) error

type ProgramSimple

type ProgramSimple struct {
	global.GVA_MODEL
	questionBank.SimpleModel
}

type PublicProgramDetail

type PublicProgramDetail struct {
	global.GVA_MODEL
	questionBank.BasicModel
	questionBankBo.LanguageSupports `json:"languageSupports"`
	questionBankBo.ProgramCases     `json:"programCases"`
	questionBankBo.DefaultCodes     `json:"defaultCodes"`
	questionBankBo.ReferenceAnswers `json:"referenceAnswers"`
}

type PublicProgramSimple

type PublicProgramSimple struct {
	global.GVA_MODEL
	questionBank.SimpleModel
}

type QuestionSituation

type QuestionSituation struct {
	StudentId     uint
	Name          string
	Score         uint
	RecordCount   uint
	QuestionCount uint
}

type RankingListItem

type RankingListItem struct {
	Rank         uint `json:"rank" gorm:"-"`
	ProblemCount uint
	TotalScore   uint
	StudentId    uint
	Name         string
}

type Response

type Response struct {
	Code int         `json:"code"`
	Data interface{} `json:"data"`
	Msg  string      `json:"msg"`
}

type SituationDetail

type SituationDetail struct {
	*questionBank.BasicModelWith `gorm:"-"`
	Id                           uint
	QuestionType                 questionType.QuestionType
	QuestionId                   uint
	Score                        uint
	CommitTime                   time.Time
}

type SubmitResponse

type SubmitResponse struct {
	Score  uint           `json:"score"`
	Submit []*ojBo.Submit `json:"submit"`
}

type SupplyBlankPractice

type SupplyBlankPractice struct {
	questionBankBo.PracticeModel
	Num int `json:"num" form:"num" gorm:"column:num;comment:可填项;"`
}

type SupplyBlankSimple

type SupplyBlankSimple struct {
	global.GVA_MODEL
	questionBankPo.SimpleModel
}

type TargetDetail

type TargetDetail struct {
	*questionBankBo.TargetDetail
	IsGenerateAddress bool
	Address           string
	IsDone            bool
	HistoryScore      int
}

type TargetGenerateInstance

type TargetGenerateInstance struct {
	DeployAddress string
	Address       string
	Salt          string
}

type TargetSimple

type TargetSimple struct {
	global.GVA_MODEL
	questionBank.SimpleModel
}

type TargetSimplePractice

type TargetSimplePractice struct {
	global.GVA_MODEL
	questionBank.SimpleModel
	IsDone       bool `gorm:"-"`
	HistoryScore uint `gorm:"-"`
}

Jump to

Keyboard shortcuts

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