meta

package
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(m1, m2 metaapi.ObjectMeta) bool

Types

type Object

type Object interface {
	// Meta returns the object metadata
	Meta() ObjectMeta
}

Object is an interface for objects

type ObjectMeta

type ObjectMeta struct {
	Revision  Revision
	Timestamp time.Timestamp
	Tombstone bool
}

ObjectMeta contains metadata about an object

func FromProto

func FromProto(meta metaapi.ObjectMeta) ObjectMeta

FromProto creates new object metadata from the given proto metadata

func NewRevision

func NewRevision(revision Revision) ObjectMeta

NewRevision creates a new object metadata with the given revision

func NewTimestamped

func NewTimestamped(timestamp time.Timestamp) ObjectMeta

NewTimestamped creates a new object metadata with the given timestamp

func (ObjectMeta) After

func (m ObjectMeta) After(meta ObjectMeta) bool

func (ObjectMeta) AsObject

func (m ObjectMeta) AsObject() ObjectMeta

AsObject returns the metadata as a non-tombstone

func (ObjectMeta) AsTombstone

func (m ObjectMeta) AsTombstone() ObjectMeta

AsTombstone returns the metadata as a tombstone

func (ObjectMeta) Before

func (m ObjectMeta) Before(meta ObjectMeta) bool

func (ObjectMeta) Equal

func (m ObjectMeta) Equal(meta ObjectMeta) bool

func (ObjectMeta) Meta

func (m ObjectMeta) Meta() ObjectMeta

Meta implements the Object interface

func (ObjectMeta) Proto

func (m ObjectMeta) Proto() metaapi.ObjectMeta

Proto returns the metadata in Protobuf format

type Revision

type Revision uint64

Revision is a revision number

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL