_generated

package
v0.513.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasContainer

type AliasContainer struct {
	Fast FastAlias
}

type Block

type Block [32]byte

type Bunny added in v0.120.0

type Bunny struct {
	Carrots []int             `msg:",omitempty"`
	Sayings map[string]string `msg:",omitempty"`
	BunnyId int               `msg:",omitempty"`
}

type Commit added in v0.506.0

type Commit struct {
	Events []*Event `zid:"0",msg:"events"`
}

type Custom

type Custom struct {
	Bts   CustomBytes          `msg:"bts"`
	Mp    map[string]*Embedded `msg:"mp"`
	Enums []MyEnum             `msg:"enums"` // test explicit enum shim
	Some  FileHandle           `msg:file_handle`
}

type CustomBytes

type CustomBytes []byte

type CustomInt

type CustomInt int

type Embedded

type Embedded struct {
	*Embedded   // test embedded field
	Children    []Embedded
	PtrChildren []*Embedded
	Other       string
}

type Event added in v0.506.0

type Event struct {
	ID          []byte    `zid:"0",msg:"id"`
	AggregateID []byte    `zid:"1",msg:"aggregate_id"`
	Type        string    `zid:"2",msg:"type"`
	Time        time.Time `zid:"3",msg:"time"`
}

greenpack Issue 6: must be big enough to *NOT* inline.

type FastAlias

type FastAlias TestFast

Test nested aliases

type FileHandle

type FileHandle struct {
	Relevent Files  `msg:"files"`
	Name     string `msg:"name"`
}

type Files

type Files []*os.File

type Fixed

type Fixed struct {
	A float64
	B bool
}

test fixed-size struct size compilation

type Greeter added in v0.500.0

type Greeter struct {
	Style int
}

func (*Greeter) Hi added in v0.500.0

func (t *Greeter) Hi()

type Greeter2 added in v0.505.0

type Greeter2 struct {
	Style int
}

func (*Greeter2) DecodeMsg added in v0.505.0

func (z *Greeter2) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable We treat empty fields as if we read a Nil from the wire.

func (Greeter2) EncodeMsg added in v0.505.0

func (z Greeter2) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Greeter2) Hi added in v0.505.0

func (t *Greeter2) Hi()

func (Greeter2) MarshalMsg added in v0.505.0

func (z Greeter2) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Greeter2) Msgsize added in v0.505.0

func (z Greeter2) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Greeter2) UnmarshalMsg added in v0.505.0

func (z *Greeter2) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Greeter2) UnmarshalMsgWithCfg added in v0.505.0

func (z *Greeter2) UnmarshalMsgWithCfg(bts []byte, cfg *msgp.RuntimeConfig) (o []byte, err error)

type Hello added in v0.500.0

type Hello interface {
	Hi()
	msgp.Serz
}

type Hello2 added in v0.505.0

type Hello2 interface {
	Hi()
	msgp.Serz
}

type Imid added in v0.503.0

type Imid interface {
	Yowza()
	msgp.Serz
}

type Imid2 added in v0.505.0

type Imid2 interface {
	Yowza()
	msgp.Serz
}

type Inner added in v0.503.0

type Inner struct {
	Bubbles int
}

func (*Inner) Shout added in v0.503.0

func (in *Inner) Shout()

type Inner2 added in v0.505.0

type Inner2 struct {
	Bubbles int
}

func (*Inner2) DecodeMsg added in v0.505.0

func (z *Inner2) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable We treat empty fields as if we read a Nil from the wire.

func (Inner2) EncodeMsg added in v0.505.0

func (z Inner2) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Inner2) MarshalMsg added in v0.505.0

func (z Inner2) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Inner2) Msgsize added in v0.505.0

func (z Inner2) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Inner2) Shout added in v0.505.0

func (in *Inner2) Shout()

func (*Inner2) UnmarshalMsg added in v0.505.0

func (z *Inner2) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Inner2) UnmarshalMsgWithCfg added in v0.505.0

func (z *Inner2) UnmarshalMsgWithCfg(bts []byte, cfg *msgp.RuntimeConfig) (o []byte, err error)

type Insane

type Insane [3]map[string]InsaneInner

anonymous structs can't be serialized with greenpack, because the fieldsempty/everything omitempty by default logic requires named types when we define the helper method fieldsNotEmpty().

type InsaneInner added in v0.360.0

type InsaneInner struct{ A, B CustomInt }

type IntA

type IntA int

Test dependency resolution

type IntB

type IntB IntA

type IntC

type IntC IntB

type Middle added in v0.503.0

type Middle struct {
	Children []Shouter `msg:",iface"`
}

func (*Middle) NewValueAsInterface added in v0.503.0

func (nd *Middle) NewValueAsInterface(zid int64, typename string) interface{}

func (*Middle) Yowza added in v0.503.0

func (s *Middle) Yowza()

type Middle2 added in v0.505.0

type Middle2 struct {
	Children []Shouter2 `msg:",iface"`
}

func (*Middle2) DecodeMsg added in v0.505.0

func (z *Middle2) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable We treat empty fields as if we read a Nil from the wire.

func (*Middle2) EncodeMsg added in v0.505.0

func (z *Middle2) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Middle2) MarshalMsg added in v0.505.0

func (z *Middle2) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Middle2) Msgsize added in v0.505.0

func (z *Middle2) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Middle2) NewValueAsInterface added in v0.505.0

func (nd *Middle2) NewValueAsInterface(zid int64, typename string) interface{}

func (*Middle2) UnmarshalMsg added in v0.505.0

func (z *Middle2) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Middle2) UnmarshalMsgWithCfg added in v0.505.0

func (z *Middle2) UnmarshalMsgWithCfg(bts []byte, cfg *msgp.RuntimeConfig) (o []byte, err error)

func (*Middle2) Yowza added in v0.505.0

func (s *Middle2) Yowza()

type Moose added in v0.120.0

type Moose struct {
	Trees   []int             `msg:",omitempty"`
	Sayings map[string]string `msg:",omitempty"`
	Id      int
}

type MyEnum

type MyEnum byte
const (
	A MyEnum = iota
	B
	C
	D
)

func (MyEnum) String

func (m MyEnum) String() string

type NeedsDedup added in v0.500.0

type NeedsDedup struct {
	MyPtr0 *Target
	MyPtr1 *Target

	MyIface0 Hello `msg:",iface"`
	MyIface1 Hello `msg:",iface"`

	Slice    []Hello `msg:",iface"`
	SlicePtr []*Greeter
}

func (*NeedsDedup) NewValueAsInterface added in v0.500.0

func (nd *NeedsDedup) NewValueAsInterface(zid int64, typename string) interface{}

type NoDedup added in v0.505.0

type NoDedup struct {
	MyPtr0 *Target2
	MyPtr1 *Target2

	MyIface0 Hello2 `msg:",iface"`
	MyIface1 Hello2 `msg:",iface"`

	Slice    []Hello2 `msg:",iface"`
	SlicePtr []*Greeter2
}

func (*NoDedup) DecodeMsg added in v0.505.0

func (z *NoDedup) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable We treat empty fields as if we read a Nil from the wire.

func (*NoDedup) EncodeMsg added in v0.505.0

func (z *NoDedup) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*NoDedup) MarshalMsg added in v0.505.0

func (z *NoDedup) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*NoDedup) Msgsize added in v0.505.0

func (z *NoDedup) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*NoDedup) NewValueAsInterface added in v0.505.0

func (nd *NoDedup) NewValueAsInterface(zid int64, typename string) interface{}

func (*NoDedup) UnmarshalMsg added in v0.505.0

func (z *NoDedup) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*NoDedup) UnmarshalMsgWithCfg added in v0.505.0

func (z *NoDedup) UnmarshalMsgWithCfg(bts []byte, cfg *msgp.RuntimeConfig) (o []byte, err error)

type Object

type Object struct {
	ObjectNo string   `msg:"objno"`
	Slice1   []string `msg:"slice1"`
	Slice2   []string `msg:"slice2"`
	MapMap   map[string]map[string]string
}

type OmitEmptyInside1 added in v0.120.0

type OmitEmptyInside1 struct {
	CountOfMonteCrisco int
	Name               string           `msg:"name,omitempty"`
	Inside2            OmitEmptyInside2 `msg:",omitempty"`
}

type OmitEmptyInside2 added in v0.120.0

type OmitEmptyInside2 struct {
	NameSuey string `msg:",omitempty"`
}

type OmitSimple added in v0.120.0

type OmitSimple struct {
	CountDrocula int
	Inside1      OmitEmptyInside1 `msg:",omitempty"`
}

type Outer added in v0.503.0

type Outer struct {
	Slc []Imid `msg:"slc,iface" json:"slc" zid:"0"`
}

func (*Outer) NewValueAsInterface added in v0.503.0

func (nd *Outer) NewValueAsInterface(zid int64, typename string) interface{}

type Outer2 added in v0.505.0

type Outer2 struct {
	Slc []Imid2 `msg:"slc,iface" json:"slc" zid:"0"`
}

func (*Outer2) DecodeMsg added in v0.505.0

func (z *Outer2) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable We treat empty fields as if we read a Nil from the wire.

func (*Outer2) EncodeMsg added in v0.505.0

func (z *Outer2) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Outer2) MarshalMsg added in v0.505.0

func (z *Outer2) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Outer2) Msgsize added in v0.505.0

func (z *Outer2) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Outer2) NewValueAsInterface added in v0.505.0

func (nd *Outer2) NewValueAsInterface(zid int64, typename string) interface{}

func (*Outer2) UnmarshalMsg added in v0.505.0

func (z *Outer2) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Outer2) UnmarshalMsgWithCfg added in v0.505.0

func (z *Outer2) UnmarshalMsgWithCfg(bts []byte, cfg *msgp.RuntimeConfig) (o []byte, err error)

type PreviouslyAnon added in v0.360.0

type PreviouslyAnon struct {
	ValueA string `msg:"value_a"`
	ValueB []byte `msg:"value_b"`
}

type Rocky added in v0.120.0

type Rocky struct {
	Bugs  *Bunny `msg:",omitempty"`
	Road  string `msg:",omitempty"`
	Moose *Moose `msg:",omitempty"`
}

type Shouter added in v0.503.0

type Shouter interface {
	Shout()
	msgp.Serz
}

type Shouter2 added in v0.505.0

type Shouter2 interface {
	Shout()
	msgp.Serz
}

type SimpleTestType added in v0.360.0

type SimpleTestType struct {
	F   *float64          `msg:"float"`
	Els map[string]string `msg:"elements"`
	Obj *PreviouslyAnon   `msg:"object"`
}

type SpecialID

type SpecialID string

type T

type T struct {
	T time.Time
}

type Target added in v0.500.0

type Target struct {
	ID int
}

type Target2 added in v0.505.0

type Target2 struct {
	ID int
}

func (*Target2) DecodeMsg added in v0.505.0

func (z *Target2) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable We treat empty fields as if we read a Nil from the wire.

func (Target2) EncodeMsg added in v0.505.0

func (z Target2) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Target2) MarshalMsg added in v0.505.0

func (z Target2) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Target2) Msgsize added in v0.505.0

func (z Target2) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Target2) UnmarshalMsg added in v0.505.0

func (z *Target2) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Target2) UnmarshalMsgWithCfg added in v0.505.0

func (z *Target2) UnmarshalMsgWithCfg(bts []byte, cfg *msgp.RuntimeConfig) (o []byte, err error)

type TestBench

type TestBench struct {
	Name     string
	BirthDay time.Time
	Phone    string
	Siblings int
	Spouse   bool
	Money    float64
}

type TestFast

type TestFast struct {
	Lat, Long, Alt float64 // test inline decl
	Data           []byte
}

type TestHidden

type TestHidden struct {
	A   string
	B   []float64
	Bad func(string) bool // This results in a warning: field "Bad" unsupported
}

type TestObj

type TestObj struct{ ID1, ID2 SpecialID }

type TestOmitEmpty added in v0.120.0

type TestOmitEmpty struct {

	// scalars
	Name     string    `msg:",omitempty"`
	BirthDay time.Time `msg:",omitempty"`
	Phone    string    `msg:",omitempty"`
	Siblings int       `msg:",omitempty"`
	Spouse   bool      `msg:",omitempty"`
	Money    float64   `msg:",omitempty"`

	// slices
	SliceName     []string    `msg:",omitempty"`
	SliceBirthDay []time.Time `msg:",omitempty"`
	SlicePhone    []string    `msg:",omitempty"`
	SliceSiblings []int       `msg:",omitempty"`
	SliceSpouse   []bool      `msg:",omitempty"`
	SliceMoney    []float64   `msg:",omitempty"`

	// arrays
	ArrayName     [3]string    `msg:",omitempty"`
	ArrayBirthDay [3]time.Time `msg:",omitempty"`
	ArrayPhone    [3]string    `msg:",omitempty"`
	ArraySiblings [3]int       `msg:",omitempty"`
	ArraySpouse   [3]bool      `msg:",omitempty"`
	ArrayMoney    [3]float64   `msg:",omitempty"`

	// maps
	MapStringString map[string]string      `msg:",omitempty"`
	MapStringIface  map[string]interface{} `msg:",omitempty"`

	// pointers
	PtrName     *string    `msg:",omitempty"`
	PtrBirthDay *time.Time `msg:",omitempty"`
	PtrPhone    *string    `msg:",omitempty"`
	PtrSiblings *int       `msg:",omitempty"`
	PtrSpouse   *bool      `msg:",omitempty"`
	PtrMoney    *float64   `msg:",omitempty"`

	Inside1    OmitEmptyInside1 `msg:",omitempty"`
	Greetings  string           `msg:",omitempty"`
	Bullwinkle *Rocky           `msg:",omitempty"`
}

Test omitempty tag

type TestType

type TestType struct {
	F        *float64          `msg:"float"`
	Els      map[string]string `msg:"elements"`
	Obj      PreviouslyAnon    `msg:"object"`
	Child    *TestType         `msg:"child"`
	Time     time.Time         `msg:"time"`
	Any      interface{}       `msg:"any"`
	Appended msgp.Raw          `msg:"appended"`
	Num      msgp.Number       `msg:"num"`
	Slice1   []string
	Slice2   []string
	SlicePtr *[]string
	Dur      time.Duration
}

type Things

type Things struct {
	Cmplx complex64 `msg:"complex"` // test slices
	Vals  []int32   `msg:"values"`
	//Arr   [msgp.ExtensionPrefixSize]float64 `msg:"arr"`            // test const array and *ast.SelectorExpr as array size
	Arr  [6]float64         `msg:"arr"`            // test const array and *ast.SelectorExpr as array size
	Arr2 [4]float64         `msg:"arr2"`           // test basic lit array
	Ext  *msgp.RawExtension `msg:"ext,extension"`  // test extension
	Oext msgp.RawExtension  `msg:"oext,extension"` // test extension reference
}

type TopNester added in v0.120.0

type TopNester struct {
	TopId      int
	Greetings  string `msg:",omitempty"`
	Bullwinkle *Rocky `msg:",omitempty"`

	MyIntArray  [3]int               `msg:",omitempty"`
	MyByteArray [3]byte              `msg:",omitempty"`
	MyMap       map[string]string    `msg:",omitempty"`
	MyArrayMap  [3]map[string]string `msg:",omitempty"`

	// the time.Time extension
	TopTime time.Time  `msg:",omitempty"`
	PtrTime *time.Time `msg:",omitempty"`
}

type Tree added in v0.305.0

type Tree struct {
	Children []Tree
	Element  int
	Parent   *Wrapper
}

type Wrapper added in v0.305.0

type Wrapper struct {
	Tree *Tree
}

type X

type X struct {
	Values    [32]byte    // should compile to 32*msgp.ByteSize; encoded as Bin
	More      Block       // should be identical to the above
	Others    [][32]int32 // should compile to len(x.Others)*32*msgp.Int32Size
	Matrix    [][]int32   // should not optimize
	ManyFixed []Fixed
}

tests edge-cases with compiling size compilation.

type ZError added in v0.509.0

type ZError struct {
	What int `zid:"0"`
}

struct-valued fields having problems?

type ZResponse added in v0.509.0

type ZResponse struct {
	ProblemFieldIfStructValue ZError `zid:"0"`
}

Jump to

Keyboard shortcuts

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