Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidPassword = errors.New("Username or password incorrect.")
)
Functions ¶
func RequiredErr ¶
Types ¶
type Assignment ¶
type Assignment struct { ID string `gorethink:"id,omitempty"json:"id"` ClassID string `gorethink:"classId,omitempty"json:"classId"` TermID string `gorethink:"termId,omitempty"json:"termId"` TypeID string `gorethink:"typeId,omitempty"json:"typeId"` Name string `gorethink:"name,omitempty"json:"name"` Type AssignmentType `gorethink:"type,omitempty"json:"type"` DueDate time.Time `gorethink:"dueDate,omitempty"json:"dueDate"` TimeStamp }
Assignment ...
type AssignmentGrade ¶
type AssignmentGrade struct { ID string `gorethink:"id,omitempty"json:"id"` AssignmentID string `gorethink:"assignmentId,omitempty"json:"assignmentId"` PersonID string `gorethink:"personId,omitempty"json:"personId"` Grade string `gorethink:"grade,omitempty"json:"grade"` TimeStamp }
AssignmentGrade ...
func (*AssignmentGrade) FieldMap ¶
func (a *AssignmentGrade) FieldMap() binding.FieldMap
FieldMap ...
type AssignmentType ¶
type AssignmentType struct { ID string `gorethink:"id,omitempty"json:"id"` Name string `gorethink:"name,omitempty"json:"name"` Weight float64 `gorethink:"weight,omitempty"json:"weight"` SubjectIDs []string `gorethink:"subjectIDs,omitempty"json:"subjectIDs,omitempty"` MaxScore int16 `gorethink:"maxScore,omitempty"json:"maxScore"` TimeStamp }
AssignmentType ...
type Class ¶
type Class struct { ID string `gorethink:"id,omitempty"json:"id"` Name string `gorethink:"name,omitempty"json:"name"` GradeLevel string `gorethink:"gradeLevel,omitempty"json:"gradeLevel"` Subject string `gorethink:"subject,omitempty"json:"subject"` MaxStudents int `gorethink:"maxStudents,omitempty"json:"maxStudents"` Terms []string `gorethink:"terms"json:"terms,omitempty"` TimeStamp }
type Enrollment ¶
type Enrollment struct { ID string `gorethink:"id,omitempty"json:"id"` PersonID string `gorethink:"personId,omitempty"json:"personId"` ClassID string `gorethink:"classId,omitempty"json:"classId"` TermID string `gorethink:"termId,omitempty"json:"termId"` TimeStamp }
func (*Enrollment) FieldMap ¶
func (e *Enrollment) FieldMap() binding.FieldMap
type EnrollmentAPIRes ¶
type EnrollmentAPIRes struct { ID string `gorethink:"id,omitempty"json:"id"` PersonID string `gorethink:"personId,omitempty"json:"personId"` ClassID string `gorethink:"classId,omitempty"json:"classId"` TermID string `gorethink:"termId,omitempty"json:"termId"` Person Person `gorethink:"person,omitempty"json:"person"` TimeStamp }
type Person ¶
type Person struct { ID string `gorethink:"id,omitempty"json:"id"` FirstName string `gorethink:"firstName,omitempty"json:"firstName,omitempty"` MiddleName string `gorethink:"middleName,omitempty"json:"middleName,omitempty"` LastName string `gorethink:"lastName,omitempty"json:"lastName,omitempty"` Types []string `gorethink:"types,omitempty"json:"types,omitempty"` GradeLevel string `gorethink:"gradeLevel,omitempty"json:"gradeLevel"` PhoneNumber string `gorethink:"phoneNumber,omitempty"json:"personId"` Email string `gorethink:"email,omitempty"json:"email"` TimeStamp }
type Session ¶
type Session struct { ID string `gorethink:"id,omitempty"json:"id"` Token string `gorethink:"token"json:"token"` UserID string `gorethink:"userId"json:"userId"` ExpiresAt time.Time `gorethink:"expiresAt"json:"expiresAt"` TimeStamp }
func NewSession ¶
Create a token for the user after we verified their password.
type Term ¶
type Term struct { ID string `gorethink:"id,omitempty"json:"id"` Name string `gorethink:"name,omitempty"json:"name"` SchoolYear string `gorethink:"schoolYear,omitempty"json:"schoolYear"` StartDate time.Time `gorethink:"startDate,omitempty"json:"startDate"` EndDate time.Time `gorethink:"endDate,omitempty"json:"endDate"` TimeStamp }
type TimeStamp ¶
type TimeStamp struct { CreatedAt time.Time `gorethink:"createdAt"json:"createdAt"` UpdatedAt time.Time `gorethink:"updatedAt"json:"updatedAt"` }
func (*TimeStamp) UpdateTime ¶
func (a *TimeStamp) UpdateTime()
type User ¶
type User struct { ID string `gorethink:"id,omitempty"json:"id"` Email string `gorethink:"email,omitempty"json:"email"` EmailLower string `gorethink:"emailLower,omitempty"json:"emailLower"` HashedPassword string `gorethink:"hashedPassword,omitempty"json:"-"` PersonID string `gorethink:"personId,omitempty"json:"personId"` Role string `gorethink:"role,omitempty"json:"role"` Disabled bool `gorethink:"disabled,omitempty"json:"disabled"` TimeStamp }
func NewUserFor ¶
func (*User) ComparePassword ¶
func (*User) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.