Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmtpyRootDocument = RootDocument{ Events: make(map[string]*Event), Components: make(map[string]*Component), }
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDBFromFilePath ¶
func (*Database) EnsureInitialized ¶
func (*Database) Load ¶
func (db *Database) Load() (*RootDocument, error)
func (*Database) Store ¶
func (db *Database) Store(document *RootDocument) error
type Event ¶
type Event struct { ID string `json:"id"` UpdatedAt time.Time `json:"updated"` MessageReference tb.StoredMessage `json:"message_reference"` }
An Event is either a incident or a scheduled maintenance, associated with a Telegram message.
type RootDocument ¶
type Storage ¶
type Storage struct {
FilePath string
}
A Storage backed by JSON, simplistic
func (*Storage) EnsureInitialized ¶
Click to show internal directories.
Click to hide internal directories.