Documentation ¶
Index ¶
- Constants
- Variables
- func NewWorkbookObject(workbookID WorkbookID) userD.RBACObject
- func NewWorkbookReader(workbookID WorkbookID) userD.RBACRole
- func NewWorkbookWriter(workbookID WorkbookID) userD.RBACRole
- type AudioID
- type AudioModel
- type ErrorType
- type GuestModel
- type Lang2
- type PluginError
- type ProblemID
- type ProblemModel
- type ProblemType
- type StudentModel
- type StudyRecord
- type StudyRecordWithProblemID
- type StudyResultParameter
- type StudyType
- type SystemStudentModel
- type WorkbookID
- type WorkbookModel
Constants ¶
View Source
const Lang2Len = 2
View Source
const StudyMaxLevel = 10
View Source
const StudyMinLevel = 0
Variables ¶
View Source
var ErrPluginError = errors.New("plugin error")
View Source
var ErrorTypeClient = "client"
View Source
var PrivilegeRead = userD.RBACAction("read")
View Source
var PrivilegeRemove = userD.RBACAction("remove")
View Source
var PrivilegeUpdate = userD.RBACAction("update")
View Source
var WorkbookObjectPrefix = "workbook_"
Functions ¶
func NewWorkbookObject ¶
func NewWorkbookObject(workbookID WorkbookID) userD.RBACObject
func NewWorkbookReader ¶
func NewWorkbookReader(workbookID WorkbookID) userD.RBACRole
func NewWorkbookWriter ¶
func NewWorkbookWriter(workbookID WorkbookID) userD.RBACRole
Types ¶
type AudioModel ¶
func NewAudioModel ¶
func NewAudioModel(id uint, lang2 Lang2, text, content string) (AudioModel, error)
type GuestModel ¶
type GuestModel interface { userD.AppUserModel }
func NewGuestModel ¶
func NewGuestModel(appUser userD.AppUserModel) (GuestModel, error)
type PluginError ¶
type PluginError struct { ErrorType ErrorType ErrorCode string ErrorMessages []string OrgError error }
func NewPluginError ¶
func NewPluginError(errorType ErrorType, errorCode string, errorMessages []string, err error) *PluginError
func (*PluginError) Error ¶
func (e *PluginError) Error() string
type ProblemModel ¶
type ProblemModel interface { userD.Model GetNumber() int GetProblemType() string GetProperties(ctx context.Context) map[string]interface{} }
func NewProblemModel ¶
type ProblemType ¶
func NewProblemType ¶
func NewProblemType(id uint, name string) (ProblemType, error)
type StudentModel ¶
type StudentModel interface { userD.AppUserModel }
func NewStudentModel ¶
func NewStudentModel(appUserModel userD.AppUserModel) (StudentModel, error)
type StudyRecord ¶
type StudyRecordWithProblemID ¶
type StudyRecordWithProblemID struct { ProblemID ProblemID StudyRecord StudyRecord }
type StudyResultParameter ¶
type StudyResultParameter struct {
Result bool
}
type SystemStudentModel ¶
type SystemStudentModel interface { userD.AppUserModel }
func NewSystemStudentModel ¶
func NewSystemStudentModel(appUser userD.AppUserModel) (SystemStudentModel, error)
type WorkbookID ¶
type WorkbookID uint
Source Files ¶
Click to show internal directories.
Click to hide internal directories.