Documentation
¶
Index ¶
Constants ¶
View Source
const ( // OverwriteJournal is used to keep track of emergency-duty-overwrites. OverwriteJournal = "dutyRosterOverwrites" // InboundNumberCollection is the name of the MongoDB collection that // stores inbound numbers. InboundNumberCollection = "inboundNumbers" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { // CreateOverwrite configures an emergency doctor-on-duty overwrite for the // given date. CreateOverwrite(ctx context.Context, creatorId string, from, to time.Time, user, phone, displayName, inboundNumber string) (structs.Overwrite, error) // GetOverwrite returns the currently active overwrite for the given date/time. GetActiveOverwrite(ctx context.Context, date time.Time, inboundNumbers []string) (*structs.Overwrite, error) // GetOverwrite returns a single overwrite identified by id. Even entries that are marked as deleted // will be returned. GetOverwrite(ctx context.Context, id string) (*structs.Overwrite, error) // GetOverwrites returns all overwrites that have start or time between from and to. GetOverwrites(ctx context.Context, from, to time.Time, includeDeleted bool, inboundNumbers []string) ([]*structs.Overwrite, error) // DeleteOverwrite deletes the roster overwrite for the given // day. DeleteActiveOverwrite(ctx context.Context, date time.Time, inboundNumber []string) (*structs.Overwrite, error) // DeleteOverwrite deletes the roster overwrite with the given ID DeleteOverwrite(ctx context.Context, id string) (*structs.Overwrite, error) // CreateInboundNumber creates a new inbound number CreateInboundNumber(ctx context.Context, model structs.InboundNumber) error // DeleteInboundNumber deletes an existing inbound number. DeleteInboundNumber(ctx context.Context, number string) error // UpdateInboundNumber updates the display name of an existing inbound number UpdateInboundNumber(ctx context.Context, model structs.InboundNumber) error // ListInboundNumbers returns a list of existing inbound numbers. ListInboundNumbers(ctx context.Context) ([]structs.InboundNumber, error) // GetInboundNumber returns the inbound number for the given number. GetInboundNumber(ctx context.Context, number string) (structs.InboundNumber, error) }
Database is the database interface for the duty rosters.
Click to show internal directories.
Click to hide internal directories.