1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-21 00:21:15 +00:00

Add DeliveryLog / DeliveryLogEntry

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-11-10 15:50:19 +01:00
parent a40e9a5c6e
commit 551cd6682d
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

36
block_delivery_log.go Normal file
View file

@ -0,0 +1,36 @@
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 }