Instead of a services module, we can just have a timestampers module, and a TimestampService interface of:
type TimestampService interface {
// Get an ordered list of timestamp IDs
GetTimestamps(topic string) []string
}
If we just treat timestamps as strings, rather than objects, it makes implementations of TimestampService a lot more flexible, and completely obviates the need for TimestampManagers. It also allows us to abstract all the high-level validation and traversal logic into an external system, so that none of the Document or DocState internals need to care about it.
Instead of a services module, we can just have a timestampers module, and a TimestampService interface of:
If we just treat timestamps as strings, rather than objects, it makes implementations of TimestampService a lot more flexible, and completely obviates the need for TimestampManagers. It also allows us to abstract all the high-level validation and traversal logic into an external system, so that none of the Document or DocState internals need to care about it.