encoders

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AAEncoder = func() encoding.Encoder { return events.AA{} }
View Source
var BBEncoder = func() encoding.Encoder { return events.BB{} }
View Source
var CCEncoder = func() encoding.Encoder { return events.CC{} }
View Source
var CommonABEncoder = func() encoding.Encoder { return CommonEncoder{} }
View Source
var StringEncoder = func() encoding.Encoder { return encoding.StringEncoder{} }

var KeyEncoder = func() encoding.Encoder { return Int64Encoder{} }

Functions

This section is empty.

Types

type CommonEncoder

type CommonEncoder struct {
	ID        string      `json:"id"`
	Type      string      `json:"type"`
	Body      interface{} `json:"body"`
	Timestamp int64       `json:"timestamp"`
}

func (CommonEncoder) Decode

func (t CommonEncoder) Decode(data []byte) (interface{}, error)

func (CommonEncoder) Encode

func (t CommonEncoder) Encode(data interface{}) ([]byte, error)

type Int64Encoder

type Int64Encoder struct{}

func (Int64Encoder) Decode

func (Int64Encoder) Decode(data []byte) (interface{}, error)

func (Int64Encoder) Encode

func (Int64Encoder) Encode(v interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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