1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-21 00:21:15 +00:00
sii/block_delivery_log.go
Knut Ahlers 551cd6682d
Add DeliveryLog / DeliveryLogEntry
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-11-10 15:50:19 +01:00

36 lines
760 B
Go

package sii
func init() {
RegisterBlock(&DeliveryLog{})
RegisterBlock(&DeliveryLogEntry{})
}
type DeliveryLog struct {
Version int `sii:"version"`
Entries []Ptr `sii:"entries"`
CachedJobCount int64 `sii:"cached_jobs_count"`
blockName string
}
func (DeliveryLog) Class() string { return "delivery_log" }
func (d *DeliveryLog) Init(class, name string) {
d.blockName = name
}
func (d DeliveryLog) Name() string { return d.blockName }
type DeliveryLogEntry struct {
Params []RawValue `sii:"params"`
blockName string
}
func (DeliveryLogEntry) Class() string { return "delivery_log_entry" }
func (d *DeliveryLogEntry) Init(class, name string) {
d.blockName = name
}
func (d DeliveryLogEntry) Name() string { return d.blockName }