blob: 5dfa3d299a4deb6a84e21ecc400643c44e5b4100 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package v1
import "github.com/icinga/icingadb/pkg/contracts"
// EntityWithoutChecksum represents entities without a checksum.
type EntityWithoutChecksum struct {
IdMeta `json:",inline"`
}
// Fingerprint implements the contracts.Fingerprinter interface.
func (e EntityWithoutChecksum) Fingerprint() contracts.Fingerprinter {
return e
}
// EntityWithChecksum represents entities with a checksum.
type EntityWithChecksum struct {
EntityWithoutChecksum `json:",inline"`
ChecksumMeta `json:",inline"`
}
// Fingerprint implements the contracts.Fingerprinter interface.
func (e EntityWithChecksum) Fingerprint() contracts.Fingerprinter {
return e
}
func NewEntityWithChecksum() contracts.Entity {
return &EntityWithChecksum{}
}
|