Documentation ¶
Index ¶
- func DecodeCursor(after *string) (*string, error)
- func EncodeCursor(i *string) graphql.ID
- func NewLogger(config *context.Config) *logging.Logger
- func Transact(db *sqlx.DB, txFunc func(*sqlx.Tx) error) (err error)
- type AuthService
- type CaseService
- type DiagnosisAndActionService
- type ReportService
- type RoleService
- type SchoolService
- func (s *SchoolService) Count() (int, error)
- func (s *SchoolService) CreateSchool(school *model.School) (*model.School, error)
- func (s *SchoolService) FindByID(id string) (*model.School, error)
- func (s *SchoolService) FindByName(name string) (*model.School, error)
- func (s *SchoolService) List(first *int32, after *string) ([]*model.School, error)
- type StudentService
- func (s *StudentService) Count(schoolID *string, keyword *string) (int, error)
- func (s *StudentService) CreateStudent(student *model.Student) (*model.Student, error)
- func (s *StudentService) FindByID(id string) (*model.Student, error)
- func (s *StudentService) FindBySchoolID(schoolID *string, keyword *string) (students []*model.Student, err error)
- func (s *StudentService) List(first *int32, after *string, schoolID *string, keyword *string) ([]*model.Student, error)
- type SurveyService
- func (s *SurveyService) Count(studentID *string) (int, error)
- func (s *SurveyService) FindByID(id string) (*model.Survey, error)
- func (s *SurveyService) List(first *int32, after *string, studentID *string) ([]*model.Survey, error)
- func (s *SurveyService) TransactionalCreateSurvey(survey *model.Survey) (*model.Survey, error)
- type UserService
- func (u *UserService) ComparePassword(userCredentials *model.UserCredentials) (*model.User, error)
- func (u *UserService) Count() (int, error)
- func (u *UserService) CreateUser(user *model.User) (*model.User, error)
- func (u *UserService) FindByEmail(email string) (*model.User, error)
- func (u *UserService) List(first *int32, after *string) ([]*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeCursor ¶
func EncodeCursor ¶
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(config *context.Config, log *logging.Logger) *AuthService
func (*AuthService) ValidateJWT ¶
func (a *AuthService) ValidateJWT(tokenString *string) (*jwt.Token, error)
type CaseService ¶
type CaseService struct {
// contains filtered or unexported fields
}
func NewCaseService ¶
func NewCaseService(db *sqlx.DB, log *logging.Logger) *CaseService
func (*CaseService) FindBySurveyID ¶
func (c *CaseService) FindBySurveyID(surveyID *string) ([]*model.Case, error)
type DiagnosisAndActionService ¶
type DiagnosisAndActionService struct {
// contains filtered or unexported fields
}
func NewDiagnosisAndActionService ¶
func NewDiagnosisAndActionService(db *sqlx.DB, log *logging.Logger) *DiagnosisAndActionService
func (*DiagnosisAndActionService) Count ¶
func (d *DiagnosisAndActionService) Count() (int, error)
func (*DiagnosisAndActionService) FindByID ¶
func (d *DiagnosisAndActionService) FindByID(id string) (*model.DiagnosisAndAction, error)
func (*DiagnosisAndActionService) List ¶
func (d *DiagnosisAndActionService) List(first *int32, after *string) ([]*model.DiagnosisAndAction, error)
type ReportService ¶
type ReportService struct {
// contains filtered or unexported fields
}
func NewReportService ¶
func NewReportService(db *sqlx.DB, log *logging.Logger) *ReportService
func (*ReportService) CostBreakdownBySchoolAndDateRange ¶
func (s *ReportService) CostBreakdownBySchoolAndDateRange(schoolID string, startDate string, endDate string) ([]*model.CostReport, error)
func (*ReportService) GenerateSurveyPDF ¶
type RoleService ¶
type RoleService struct {
// contains filtered or unexported fields
}
func NewRoleService ¶
func NewRoleService(db *sqlx.DB, log *logging.Logger) *RoleService
func (*RoleService) FindByUserId ¶
func (r *RoleService) FindByUserId(userId *string) ([]*model.Role, error)
type SchoolService ¶
type SchoolService struct {
// contains filtered or unexported fields
}
func NewSchoolService ¶
func NewSchoolService(db *sqlx.DB, log *logging.Logger) *SchoolService
func (*SchoolService) Count ¶
func (s *SchoolService) Count() (int, error)
func (*SchoolService) CreateSchool ¶
func (*SchoolService) FindByName ¶
func (s *SchoolService) FindByName(name string) (*model.School, error)
type StudentService ¶
type StudentService struct {
// contains filtered or unexported fields
}
func NewStudentService ¶
func NewStudentService(db *sqlx.DB, log *logging.Logger) *StudentService
func (*StudentService) Count ¶
func (s *StudentService) Count(schoolID *string, keyword *string) (int, error)
func (*StudentService) CreateStudent ¶
func (*StudentService) FindByID ¶
func (s *StudentService) FindByID(id string) (*model.Student, error)
func (*StudentService) FindBySchoolID ¶
type SurveyService ¶
type SurveyService struct {
// contains filtered or unexported fields
}
func NewSurveyService ¶
func NewSurveyService(db *sqlx.DB, caseService *CaseService, log *logging.Logger) *SurveyService
func (*SurveyService) TransactionalCreateSurvey ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *sqlx.DB, roleService *RoleService, log *logging.Logger) *UserService
func (*UserService) ComparePassword ¶
func (u *UserService) ComparePassword(userCredentials *model.UserCredentials) (*model.User, error)
func (*UserService) Count ¶
func (u *UserService) Count() (int, error)
func (*UserService) CreateUser ¶
func (*UserService) FindByEmail ¶
func (u *UserService) FindByEmail(email string) (*model.User, error)
Click to show internal directories.
Click to hide internal directories.