Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarkLog ¶
type BarkLog struct { Id int64 `db:"id" json:"id"` LogTime time.Time `db:"log_time" json:"logTime"` LogLevel string `db:"log_level" json:"logLevel"` ServiceName string `db:"service_name" json:"serviceName"` ServiceInstanceName string `db:"service_instance_name" json:"serviceInstanceName"` Code string `db:"code" json:"code"` Message string `db:"msg" json:"msg"` MoreData jsonObject.Typ `db:"more_data" json:"moreData"` }
BarkLog is a struct representing a log in Bark
func (BarkLog) ValidateForInsert ¶
ValidateForInsert checks for missing values in the incoming BarkLog's fields. In case a missing value is encountered, a default value is assigned to it.
type BarkLogDao ¶
type BarkLogDao struct{}
func NewBarkLogDao ¶
func NewBarkLogDao() *BarkLogDao
func (*BarkLogDao) Insert ¶
func (bld *BarkLogDao) Insert(l BarkLog) error
Insert inserts a Bark log in the database
func (*BarkLogDao) InsertBatch ¶
func (bld *BarkLogDao) InsertBatch(l []BarkLog) error
InsertBatch sends a batch of logs to the DB.
func (*BarkLogDao) InsertServerStartedLog ¶
func (bld *BarkLogDao) InsertServerStartedLog() error
InsertServerStartedLog inserts a log entry in the postgres DB stating that bark server has started successfully. This acts as a checkpoint that everything is working as expected in the DB connection department.
Click to show internal directories.
Click to hide internal directories.