Documentation
¶
Index ¶
- Constants
- func AuditC(s *MgoSession) *mgo.Collection
- func ConvertIDToBsonID(id string) (bson.ObjectId, bool)
- func DoctorC(s *MgoSession) *mgo.Collection
- func Must(sc StoreChannel) interface{}
- func SystemC(s *MgoSession) *mgo.Collection
- func UnactivatedAccountC(s *MgoSession) *mgo.Collection
- type AuditStore
- type DoctorStore
- type MgoAuditStore
- type MgoDoctorStore
- type MgoSession
- type MgoStore
- func (s *MgoStore) Audit() AuditStore
- func (s *MgoStore) Close()
- func (s *MgoStore) Doctor() DoctorStore
- func (s *MgoStore) GetCurrentSchemaVersion() string
- func (s *MgoStore) GetWorkerSession() *MgoSession
- func (s *MgoStore) MarkSystemRanUnitTests()
- func (s *MgoStore) System() SystemStore
- func (s *MgoStore) UnactivatedAccount() UnactivatedAccountStore
- type MgoSystemStore
- func (s MgoSystemStore) CreateIndexesIfNotExists()
- func (s MgoSystemStore) Get() StoreChannel
- func (s MgoSystemStore) GetByName(name string) StoreChannel
- func (s MgoSystemStore) Save(system *model.System) StoreChannel
- func (s MgoSystemStore) SaveOrUpdate(system *model.System) StoreChannel
- func (s MgoSystemStore) Update(system *model.System) StoreChannel
- type MgoUnactivatedAccountStore
- type Store
- type StoreChannel
- type StoreResult
- type SystemStore
- type UnactivatedAccountStore
Constants ¶
View Source
const (
EXIT_DB_OPEN = 101
)
View Source
const (
MISSING_DOCTOR_ERROR = "store.mgo_doctor.missing_doctor.const"
)
Variables ¶
This section is empty.
Functions ¶
func AuditC ¶
func AuditC(s *MgoSession) *mgo.Collection
func DoctorC ¶
func DoctorC(s *MgoSession) *mgo.Collection
func Must ¶
func Must(sc StoreChannel) interface{}
func SystemC ¶
func SystemC(s *MgoSession) *mgo.Collection
func UnactivatedAccountC ¶
func UnactivatedAccountC(s *MgoSession) *mgo.Collection
Types ¶
type AuditStore ¶
type AuditStore interface {
Save(audit *model.Audit) StoreChannel
Get(user_id string, offset int, limit int) StoreChannel
PermanentDeleteByUser(userId string) StoreChannel
}
func NewMgoAuditStore ¶
func NewMgoAuditStore(mgoStore *MgoStore) AuditStore
type DoctorStore ¶
type DoctorStore interface {
Save(doctor *model.Doctor) StoreChannel
Get(id string) StoreChannel
SearchDoctors(term string, offset, limit int) StoreChannel
}
func NewMgoDoctorStore ¶
func NewMgoDoctorStore(mgoStore *MgoStore) DoctorStore
type MgoAuditStore ¶
type MgoAuditStore struct {
*MgoStore
}
func (MgoAuditStore) CreateIndexesIfNotExists ¶
func (s MgoAuditStore) CreateIndexesIfNotExists()
func (MgoAuditStore) Get ¶
func (s MgoAuditStore) Get(userId string, offset int, limit int) StoreChannel
func (MgoAuditStore) PermanentDeleteByUser ¶
func (s MgoAuditStore) PermanentDeleteByUser(userId string) StoreChannel
func (MgoAuditStore) Save ¶
func (s MgoAuditStore) Save(audit *model.Audit) StoreChannel
type MgoDoctorStore ¶
type MgoDoctorStore struct {
*MgoStore
}
func (MgoDoctorStore) CreateIndexesIfNotExists ¶
func (s MgoDoctorStore) CreateIndexesIfNotExists()
func (MgoDoctorStore) Get ¶
func (s MgoDoctorStore) Get(id string) StoreChannel
func (MgoDoctorStore) Save ¶
func (s MgoDoctorStore) Save(doctor *model.Doctor) StoreChannel
func (MgoDoctorStore) SearchDoctors ¶
func (s MgoDoctorStore) SearchDoctors(term string, offset, limit int) StoreChannel
type MgoSession ¶
type MgoSession struct {
// contains filtered or unexported fields
}
func (*MgoSession) Close ¶
func (ms *MgoSession) Close()
func (*MgoSession) Copy ¶
func (ms *MgoSession) Copy() *MgoSession
func (*MgoSession) DB ¶
func (ms *MgoSession) DB() *mgo.Database
type MgoStore ¶
type MgoStore struct {
SchemaVersion string
// contains filtered or unexported fields
}
func (*MgoStore) Audit ¶
func (s *MgoStore) Audit() AuditStore
func (*MgoStore) Doctor ¶
func (s *MgoStore) Doctor() DoctorStore
func (*MgoStore) GetCurrentSchemaVersion ¶
func (*MgoStore) GetWorkerSession ¶
func (s *MgoStore) GetWorkerSession() *MgoSession
func (*MgoStore) MarkSystemRanUnitTests ¶
func (s *MgoStore) MarkSystemRanUnitTests()
func (*MgoStore) System ¶
func (s *MgoStore) System() SystemStore
func (*MgoStore) UnactivatedAccount ¶
func (s *MgoStore) UnactivatedAccount() UnactivatedAccountStore
type MgoSystemStore ¶
type MgoSystemStore struct {
*MgoStore
}
func (MgoSystemStore) CreateIndexesIfNotExists ¶
func (s MgoSystemStore) CreateIndexesIfNotExists()
func (MgoSystemStore) Get ¶
func (s MgoSystemStore) Get() StoreChannel
func (MgoSystemStore) GetByName ¶
func (s MgoSystemStore) GetByName(name string) StoreChannel
func (MgoSystemStore) Save ¶
func (s MgoSystemStore) Save(system *model.System) StoreChannel
func (MgoSystemStore) SaveOrUpdate ¶
func (s MgoSystemStore) SaveOrUpdate(system *model.System) StoreChannel
func (MgoSystemStore) Update ¶
func (s MgoSystemStore) Update(system *model.System) StoreChannel
type MgoUnactivatedAccountStore ¶
type MgoUnactivatedAccountStore struct {
*MgoStore
}
func (MgoUnactivatedAccountStore) CreateIndexesIfNotExists ¶
func (s MgoUnactivatedAccountStore) CreateIndexesIfNotExists()
func (MgoUnactivatedAccountStore) Get ¶
func (s MgoUnactivatedAccountStore) Get(doctorId string) StoreChannel
func (MgoUnactivatedAccountStore) Save ¶
func (s MgoUnactivatedAccountStore) Save(unactivatedAccount *model.UnactivatedAccount) StoreChannel
type Store ¶
type Store interface {
Audit() AuditStore
System() SystemStore
Doctor() DoctorStore
UnactivatedAccount() UnactivatedAccountStore
MarkSystemRanUnitTests()
Close()
}
func NewMgoStore ¶
func NewMgoStore() Store
type StoreChannel ¶
type StoreChannel chan StoreResult
type StoreResult ¶
type SystemStore ¶
type SystemStore interface {
Save(system *model.System) StoreChannel
SaveOrUpdate(system *model.System) StoreChannel
Update(system *model.System) StoreChannel
Get() StoreChannel
GetByName(name string) StoreChannel
}
func NewMgoSystemStore ¶
func NewMgoSystemStore(mgoStore *MgoStore) SystemStore
type UnactivatedAccountStore ¶
type UnactivatedAccountStore interface {
Save(unactivatedAccount *model.UnactivatedAccount) StoreChannel
Get(doctorId string) StoreChannel
}
func NewMgoUnactivatedAccountStore ¶
func NewMgoUnactivatedAccountStore(mgoStore *MgoStore) UnactivatedAccountStore
Click to show internal directories.
Click to hide internal directories.