Documentation
¶
Index ¶
- type AccessStore
- func (as *AccessStore) Create(u *models.Account) (err error)
- func (as *AccessStore) CreateAdmin(a *models.Admin) (err error)
- func (as *AccessStore) CreateTeacher(t *models.Teacher) (err error)
- func (as *AccessStore) CreateUser(form RegisterForm, u *models.User) (*models.User, error)
- func (as *AccessStore) GetAdminByEmail(e string) (*models.Admin, error)
- func (as *AccessStore) GetByEmail(e string) (*models.Account, error)
- func (as *AccessStore) GetByID(id int64) (*models.Account, error)
- func (as *AccessStore) GetTeacherByEmail(e string) (*models.Teacher, error)
- func (as *AccessStore) GetUser(a *models.Account) (*models.User, error)
- func (as *AccessStore) Update(u *models.Account) error
- func (as *AccessStore) UpdateTeacher(t *models.Teacher) error
- type EducationStore
- type ProjectStore
- type RegisterForm
- type UserRegisterReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessStore ¶
type AccessStore struct {
Account *services.CRUDHandler
Related []*services.CRUDHandler
// contains filtered or unexported fields
}
func NewAccessStore ¶
func NewAccessStore(db *gorm.DB) *AccessStore
func (*AccessStore) CreateAdmin ¶
func (as *AccessStore) CreateAdmin(a *models.Admin) (err error)
func (*AccessStore) CreateTeacher ¶
func (as *AccessStore) CreateTeacher(t *models.Teacher) (err error)
func (*AccessStore) CreateUser ¶
func (as *AccessStore) CreateUser(form RegisterForm, u *models.User) (*models.User, error)
func (*AccessStore) GetAdminByEmail ¶
func (as *AccessStore) GetAdminByEmail(e string) (*models.Admin, error)
func (*AccessStore) GetByEmail ¶
func (as *AccessStore) GetByEmail(e string) (*models.Account, error)
func (*AccessStore) GetTeacherByEmail ¶
func (as *AccessStore) GetTeacherByEmail(e string) (*models.Teacher, error)
func (*AccessStore) UpdateTeacher ¶
func (as *AccessStore) UpdateTeacher(t *models.Teacher) error
type EducationStore ¶
type EducationStore struct {
Related []*services.CRUDHandler
// contains filtered or unexported fields
}
func NewEducationStore ¶
func NewEducationStore(db *gorm.DB) *EducationStore
type ProjectStore ¶
type ProjectStore struct {
Project *services.ProjectHandler
Related []*services.CRUDHandler
// contains filtered or unexported fields
}
func NewProjectStore ¶
func NewProjectStore(db *gorm.DB) *ProjectStore
type RegisterForm ¶
type RegisterForm struct {
FirstName string `json:"first_name" validated:"required"`
LastName string `json:"last_name" validated:"required"`
Nick string `json:"nick" validated:"required"`
RUT string `json:"rut" validated:"required"`
Email string `json:"email" gorm:"unique" validated:"required, email"`
Password string `json:"password" validated:"required"`
AccountType string `json:"account_type" validated:"required"`
}
type UserRegisterReq ¶
type UserRegisterReq struct {
Form RegisterForm `json:"user"`
}
Click to show internal directories.
Click to hide internal directories.