Documentation ¶
Index ¶
- func CHAndPassword(lH string, lS string) bool
- func GFromPassword(ls string) string
- type TXDBS
- func (sDB *TXDBS) AddAccount(lT *model.Account) *model.Account
- func (sDB *TXDBS) AddAuxFun(lT *model.AuxFun) *model.AuxFun
- func (sDB *TXDBS) AddClient(lT *model.Client) *model.Client
- func (sDB *TXDBS) AddDiagnosis(lT *model.Diagnosis) *model.Diagnosis
- func (sDB *TXDBS) AddFault(lT *model.Fault) *model.Fault
- func (sDB *TXDBS) AddHost(lT *model.Host) *model.Host
- func (sDB *TXDBS) AddIssue(lT *model.Issue) *model.Issue
- func (sDB *TXDBS) AddLayout(lT *model.Layout) *model.Layout
- func (sDB *TXDBS) AddLocation(lT *model.Location) *model.Location
- func (sDB *TXDBS) AddMold(lT *model.Mold) *model.Mold
- func (sDB *TXDBS) AddMoldFun(lT *model.MoldFun) *model.MoldFun
- func (sDB *TXDBS) AddMonitor(lT *model.Monitor) *model.Monitor
- func (sDB *TXDBS) AddNotice(lT *model.Notice) *model.Notice
- func (sDB *TXDBS) AddNoticeFun(lT *model.NoticeFun) *model.NoticeFun
- func (sDB *TXDBS) AddPPLogs(lT *model.PPLogs) *model.PPLogs
- func (sDB *TXDBS) AddPermissions(lT *model.Permissions) *model.Permissions
- func (sDB *TXDBS) AddRole(lT *model.Role) *model.Role
- func (sDB *TXDBS) AddSignin(lT *model.Signin) *model.Signin
- func (sDB *TXDBS) AddStudent(lT *model.Student) *model.Student
- func (sDB *TXDBS) AddSurvey(lT *model.Survey) *model.Survey
- func (sDB *TXDBS) AddTerminal(lT *model.Terminal) *model.Terminal
- func (sDB *TXDBS) AddUniversity(lT *model.University) *model.University
- func (d *TXDBS) Close()
- func (sDB *TXDBS) CountAccount() string
- func (sDB *TXDBS) CountAuxFun() string
- func (sDB *TXDBS) CountClient() string
- func (sDB *TXDBS) CountDiagnosis() string
- func (sDB *TXDBS) CountFault() string
- func (sDB *TXDBS) CountHost() string
- func (sDB *TXDBS) CountIssue() string
- func (sDB *TXDBS) CountLayout() string
- func (sDB *TXDBS) CountLocation() string
- func (sDB *TXDBS) CountMold() string
- func (sDB *TXDBS) CountMoldFun() string
- func (sDB *TXDBS) CountMonitor() string
- func (sDB *TXDBS) CountNotice() string
- func (sDB *TXDBS) CountNoticeFun() string
- func (sDB *TXDBS) CountPPLogs() string
- func (sDB *TXDBS) CountPermissions() string
- func (sDB *TXDBS) CountRole() string
- func (sDB *TXDBS) CountSignin() string
- func (sDB *TXDBS) CountStudent() string
- func (sDB *TXDBS) CountSurvey() string
- func (sDB *TXDBS) CountTerminal() string
- func (sDB *TXDBS) CountUniversity() string
- func (sDB *TXDBS) DeleteAccount(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteAuxFun(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteClient(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteDiagnosis(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteFault(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteHost(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteIssue(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteLayout(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteLocation(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteMold(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteMoldFun(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteMonitor(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteNotice(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteNoticeFun(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeletePPLogs(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeletePermissions(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteRole(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteSignin(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteStudent(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteSurvey(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteTerminal(uid primitive.ObjectID) error
- func (sDB *TXDBS) DeleteUniversity(uid primitive.ObjectID) error
- func (sDB *TXDBS) FindRole(Auth uint) *model.Role
- func (sDB *TXDBS) GetAccount() []*model.Account
- func (sDB *TXDBS) GetAuxFun() []*model.AuxFun
- func (sDB *TXDBS) GetClient() []*model.Client
- func (sDB *TXDBS) GetDiagnosis() []*model.Diagnosis
- func (sDB *TXDBS) GetFault() []*model.Fault
- func (sDB *TXDBS) GetHost() []*model.Host
- func (sDB *TXDBS) GetIssue() []*model.Issue
- func (sDB *TXDBS) GetLayout() []*model.Layout
- func (sDB *TXDBS) GetLocation() []*model.Location
- func (sDB *TXDBS) GetMold() []*model.Mold
- func (sDB *TXDBS) GetMoldFun() []*model.MoldFun
- func (sDB *TXDBS) GetMonitor() []*model.Monitor
- func (sDB *TXDBS) GetNotice() []*model.Notice
- func (sDB *TXDBS) GetNoticeFun() []*model.NoticeFun
- func (sDB *TXDBS) GetPPLogs() []*model.PPLogs
- func (sDB *TXDBS) GetPermissions() []*model.Permissions
- func (sDB *TXDBS) GetRole() []*model.Role
- func (sDB *TXDBS) GetSignin() []*model.Signin
- func (sDB *TXDBS) GetStudent() []*model.Student
- func (sDB *TXDBS) GetSurvey() []*model.Survey
- func (sDB *TXDBS) GetTerminal() []*model.Terminal
- func (sDB *TXDBS) GetUniversity() []*model.University
- func (sDB *TXDBS) ImportStudent(lA []model.Student) []*model.Student
- func (sDB *TXDBS) InitAccount() error
- func (sDB *TXDBS) InitAuxFun() error
- func (sDB *TXDBS) InitDiagnosis() error
- func (sDB *TXDBS) InitHost() error
- func (sDB *TXDBS) InitIssue() error
- func (sDB *TXDBS) InitLayout() error
- func (sDB *TXDBS) InitMold() error
- func (sDB *TXDBS) InitMoldFun() error
- func (sDB *TXDBS) InitNotice() error
- func (sDB *TXDBS) InitNoticeFun() error
- func (sDB *TXDBS) InitPermissions() error
- func (sDB *TXDBS) InitRole() error
- func (sDB *TXDBS) InitSurvey() error
- func (sDB *TXDBS) LoginAccount(account string, password string) *model.Account
- func (sDB *TXDBS) LoginStudent(SNo string, Password string) *model.Student
- func (sDB *TXDBS) LoginTerminal(label string, ip string) *model.Terminal
- func (sDB *TXDBS) Signout(uid primitive.ObjectID) error
- func (sDB *TXDBS) UpdateAccount(lT *model.Account) *model.Account
- func (sDB *TXDBS) UpdateAccountPassword(lT *model.Account) *model.Account
- func (sDB *TXDBS) UpdateAuxFun(lT *model.AuxFun) *model.AuxFun
- func (sDB *TXDBS) UpdateClient(lT *model.Client) *model.Client
- func (sDB *TXDBS) UpdateDiagnosis(lT *model.Diagnosis) *model.Diagnosis
- func (sDB *TXDBS) UpdateFault(lT *model.Fault) *model.Fault
- func (sDB *TXDBS) UpdateHost(lT *model.Host) *model.Host
- func (sDB *TXDBS) UpdateIssue(lT *model.Issue) *model.Issue
- func (sDB *TXDBS) UpdateLayout(lT *model.Layout) *model.Layout
- func (sDB *TXDBS) UpdateLocation(lT *model.Location) *model.Location
- func (sDB *TXDBS) UpdateMold(lT *model.Mold) *model.Mold
- func (sDB *TXDBS) UpdateMoldFun(lT *model.MoldFun) *model.MoldFun
- func (sDB *TXDBS) UpdateMonitor(lT *model.Monitor) *model.Monitor
- func (sDB *TXDBS) UpdateNotice(lT *model.Notice) *model.Notice
- func (sDB *TXDBS) UpdateNoticeFun(lT *model.NoticeFun) *model.NoticeFun
- func (sDB *TXDBS) UpdatePPLogs(lT *model.PPLogs) *model.PPLogs
- func (sDB *TXDBS) UpdatePermissions(lT *model.Permissions) *model.Permissions
- func (sDB *TXDBS) UpdateRole(lT *model.Role) *model.Role
- func (sDB *TXDBS) UpdateStudent(lT *model.Student) *model.Student
- func (sDB *TXDBS) UpdateSurvey(lT *model.Survey) *model.Survey
- func (sDB *TXDBS) UpdateTerminal(lT *model.Terminal) *model.Terminal
- func (sDB *TXDBS) UpdateUniversity(lT *model.University) *model.University
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CHAndPassword ¶
CHAndPassword compares a bcrypt hashed password with its possible plaintext equivalent.
func GFromPassword ¶
GFromPassword returns the bcrypt hash of the password at the given cost.
Types ¶
type TXDBS ¶
TXDBS is a wrapper for the mongo-go-driver.
func (*TXDBS) AddAccount ¶
AddAccount Insert a Account
func (*TXDBS) AddDiagnosis ¶
AddDiagnosis Insert a Diagnosis
func (*TXDBS) AddLocation ¶
AddLocation Insert a Location
func (*TXDBS) AddMoldFun ¶
AddMoldFun Insert a MoldFun
func (*TXDBS) AddMonitor ¶
AddMonitor Insert a Monitor
func (*TXDBS) AddNoticeFun ¶
AddNoticeFun Insert a NoticeFun
func (*TXDBS) AddPermissions ¶
func (sDB *TXDBS) AddPermissions(lT *model.Permissions) *model.Permissions
AddPermissions Insert a Permissions
func (*TXDBS) AddStudent ¶
AddStudent Insert a Student
func (*TXDBS) AddTerminal ¶
AddTerminal Insert a Terminal
func (*TXDBS) AddUniversity ¶
func (sDB *TXDBS) AddUniversity(lT *model.University) *model.University
AddUniversity Insert a University
func (*TXDBS) CountAccount ¶
CountAccount returns the Account counts
func (*TXDBS) CountAuxFun ¶
CountAuxFun returns the AuxFun counts
func (*TXDBS) CountClient ¶
CountClient returns the Client counts
func (*TXDBS) CountDiagnosis ¶
CountDiagnosis returns the Diagnosis counts
func (*TXDBS) CountFault ¶
CountFault returns the Fault counts
func (*TXDBS) CountIssue ¶
CountIssue returns the Issue counts
func (*TXDBS) CountLayout ¶
CountLayout returns the Layout counts
func (*TXDBS) CountLocation ¶
CountLocation returns the Location counts
func (*TXDBS) CountMoldFun ¶
CountMoldFun returns the MoldFun counts
func (*TXDBS) CountMonitor ¶
CountMonitor returns the Monitor counts
func (*TXDBS) CountNotice ¶
CountNotice returns the Notice counts
func (*TXDBS) CountNoticeFun ¶
CountNoticeFun returns the NoticeFun counts
func (*TXDBS) CountPPLogs ¶
CountPPLogs returns the PPLogs counts
func (*TXDBS) CountPermissions ¶
CountPermissions returns the Permissions counts
func (*TXDBS) CountSignin ¶
CountSignin returns the Signin counts
func (*TXDBS) CountStudent ¶
CountStudent returns the Student counts
func (*TXDBS) CountSurvey ¶
CountSurvey returns the Survey counts
func (*TXDBS) CountTerminal ¶
CountTerminal returns the Terminal counts
func (*TXDBS) CountUniversity ¶
CountUniversity returns the University counts
func (*TXDBS) DeleteAccount ¶
DeleteAccount deletes a Account by its id.
func (*TXDBS) DeleteAuxFun ¶
DeleteAuxFun deletes a AuxFun by its id.
func (*TXDBS) DeleteClient ¶
DeleteClient deletes a Client by its id.
func (*TXDBS) DeleteDiagnosis ¶
DeleteDiagnosis deletes a Diagnosis by its id.
func (*TXDBS) DeleteFault ¶
DeleteFault deletes a Fault by its id.
func (*TXDBS) DeleteHost ¶
DeleteHost deletes a Host by its id.
func (*TXDBS) DeleteIssue ¶
DeleteIssue deletes a Issue by its id.
func (*TXDBS) DeleteLayout ¶
DeleteLayout deletes a Layout by its id.
func (*TXDBS) DeleteLocation ¶
DeleteLocation deletes a Location by its id.
func (*TXDBS) DeleteMold ¶
DeleteMold deletes a Mold by its id.
func (*TXDBS) DeleteMoldFun ¶
DeleteMoldFun deletes a MoldFun by its id.
func (*TXDBS) DeleteMonitor ¶
DeleteMonitor deletes a Monitor by its id.
func (*TXDBS) DeleteNotice ¶
DeleteNotice deletes a Notice by its id.
func (*TXDBS) DeleteNoticeFun ¶
DeleteNoticeFun deletes a NoticeFun by its id.
func (*TXDBS) DeletePPLogs ¶
DeletePPLogs deletes a PPLogs by its id.
func (*TXDBS) DeletePermissions ¶
DeletePermissions deletes a Permissions by its id.
func (*TXDBS) DeleteRole ¶
DeleteRole deletes a Role by its id.
func (*TXDBS) DeleteSignin ¶
DeleteSignin deletes a Signin by its id.
func (*TXDBS) DeleteStudent ¶
DeleteStudent deletes a Student by its id.
func (*TXDBS) DeleteSurvey ¶
DeleteSurvey deletes a Survey by its id.
func (*TXDBS) DeleteTerminal ¶
DeleteTerminal deletes a Terminal by its id.
func (*TXDBS) DeleteUniversity ¶
DeleteUniversity deletes a University by its id.
func (*TXDBS) GetAccount ¶
GetAccount returns all Accounts.
func (*TXDBS) GetDiagnosis ¶
GetDiagnosis returns all Diagnosiss.
func (*TXDBS) GetLocation ¶
GetLocation returns all Locations.
func (*TXDBS) GetMoldFun ¶
GetMoldFun returns all MoldFuns.
func (*TXDBS) GetMonitor ¶
GetMonitor returns all Monitors.
func (*TXDBS) GetNoticeFun ¶
GetNoticeFun returns all NoticeFuns.
func (*TXDBS) GetPermissions ¶
func (sDB *TXDBS) GetPermissions() []*model.Permissions
GetPermissions returns all Permissionss.
func (*TXDBS) GetStudent ¶
GetStudent returns all Students.
func (*TXDBS) GetTerminal ¶
GetTerminal returns all Terminals.
func (*TXDBS) GetUniversity ¶
func (sDB *TXDBS) GetUniversity() []*model.University
GetUniversity returns all Universitys.
func (*TXDBS) ImportStudent ¶
ImportStudent Do FindOneAndUpdate and get all Students.
func (*TXDBS) InitDiagnosis ¶
InitDiagnosis InsertMany Diagnosis.
func (*TXDBS) InitNoticeFun ¶
InitNoticeFun InsertMany NoticeFun.
func (*TXDBS) InitPermissions ¶
InitPermissions InsertMany Permissionss.
func (*TXDBS) LoginAccount ¶
LoginAccount returns the Account by the given account and password or nil.
func (*TXDBS) LoginStudent ¶
LoginStudent returns the Student by the given SNo and Password or nil.
func (*TXDBS) LoginTerminal ¶
LoginTerminal returns the Terminal by the given label and ip or nil.
func (*TXDBS) UpdateAccount ¶
UpdateAccount updates a Account.
func (*TXDBS) UpdateAccountPassword ¶
UpdateAccountPassword updates a Account's Password.
func (*TXDBS) UpdateAuxFun ¶
UpdateAuxFun updates a AuxFun.
func (*TXDBS) UpdateClient ¶
UpdateClient updates a Client.
func (*TXDBS) UpdateDiagnosis ¶
UpdateDiagnosis updates a Diagnosis.
func (*TXDBS) UpdateFault ¶
UpdateFault updates a Fault.
func (*TXDBS) UpdateHost ¶
UpdateHost updates a Host.
func (*TXDBS) UpdateIssue ¶
UpdateIssue updates a Issue.
func (*TXDBS) UpdateLayout ¶
UpdateLayout updates a Layout.
func (*TXDBS) UpdateLocation ¶
UpdateLocation updates a Location.
func (*TXDBS) UpdateMold ¶
UpdateMold updates a Mold.
func (*TXDBS) UpdateMoldFun ¶
UpdateMoldFun updates a MoldFun.
func (*TXDBS) UpdateMonitor ¶
UpdateMonitor updates a Monitor.
func (*TXDBS) UpdateNotice ¶
UpdateNotice updates a Notice.
func (*TXDBS) UpdateNoticeFun ¶
UpdateNoticeFun updates a NoticeFun.
func (*TXDBS) UpdatePPLogs ¶
UpdatePPLogs updates a PPLogs.
func (*TXDBS) UpdatePermissions ¶
func (sDB *TXDBS) UpdatePermissions(lT *model.Permissions) *model.Permissions
UpdatePermissions updates a Permissions.
func (*TXDBS) UpdateRole ¶
UpdateRole updates a Role.
func (*TXDBS) UpdateStudent ¶
UpdateStudent updates a Student.
func (*TXDBS) UpdateSurvey ¶
UpdateSurvey updates a Survey.
func (*TXDBS) UpdateTerminal ¶
UpdateTerminal updates a Terminal.
func (*TXDBS) UpdateUniversity ¶
func (sDB *TXDBS) UpdateUniversity(lT *model.University) *model.University
UpdateUniversity updates a University.