Documentation ¶
Index ¶
- type Record
- func (r Record) Check() validation.ErrorGroup
- func (r Record) Equals(v any) bool
- func (Record) Generate(rand *rand.Rand, size int) reflect.Value
- func (r Record) MarshalBinary() (data []byte, err error)
- func (r Record) MarshalBinaryWriter(w io.Writer) error
- func (r Record) String() string
- func (r *Record) UnmarshalBinary(data []byte) error
- func (r *Record) UnmarshalBinaryReader(rd io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct { Headers headers.Headers `json:"headers"` Metadata metadata.Metadata `json:"metadata"` Key key.Key `json:"key"` Val val.Val `json:"val"` }
func New ¶
func New( k key.Key, v val.Val, m metadata.Metadata, h headers.Headers, ) (Record, validation.ErrorGroup)
New creates and validates new Record from the given values.
func (Record) Check ¶
func (r Record) Check() validation.ErrorGroup
Check runs default validation checks for the Record.
func (Record) Equals ¶
Equals compares two Record instances for equality.
Interface: comparison.Equaler
func (Record) MarshalBinary ¶
MarshalBinary coverts the Record instance to binary form.
Interface: encoding.BinaryMarshaler
func (Record) MarshalBinaryWriter ¶
MarshalBinaryWriter populates the io.Writer with Record fields in its binary form.
func (*Record) UnmarshalBinary ¶
UnmarshalBinary converts the binary form to a Record instance.
Interface: encoding.BinaryUnmarshaler
Click to show internal directories.
Click to hide internal directories.