store

package
v0.0.0-...-1dfef78 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

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) Create

func (as *AccessStore) Create(u *models.Account) (err error)

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) GetByID

func (as *AccessStore) GetByID(id int64) (*models.Account, error)

func (*AccessStore) GetTeacherByEmail

func (as *AccessStore) GetTeacherByEmail(e string) (*models.Teacher, error)

func (*AccessStore) GetUser

func (as *AccessStore) GetUser(a *models.Account) (*models.User, error)

func (*AccessStore) Update

func (as *AccessStore) Update(u *models.Account) 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"`
}

func (*UserRegisterReq) Bind

func (r *UserRegisterReq) Bind(c echo.Context, u *models.User) error

Jump to

Keyboard shortcuts

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