store

package
v0.2.42 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 ConvertIDToBsonID

func ConvertIDToBsonID(id string) (bson.ObjectId, bool)

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 (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) Close

func (s *MgoStore) Close()

func (*MgoStore) Doctor

func (s *MgoStore) Doctor() DoctorStore

func (*MgoStore) GetCurrentSchemaVersion

func (s *MgoStore) GetCurrentSchemaVersion() string

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 (MgoUnactivatedAccountStore) Save

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 StoreResult struct {
	Data interface{}
	Err  *model.AppError
}

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

Jump to

Keyboard shortcuts

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