picotest

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package picotest holds generated types for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street string `json:"street,omitempty"`
}

func (*Address) Decode

func (m *Address) Decode(c *picobuf.Decoder)

func (*Address) Encode

func (m *Address) Encode(c *picobuf.Encoder) bool

type AllTypes

type AllTypes struct {
	Int32     int32      `json:"int32,omitempty"`
	Int64     int64      `json:"int64,omitempty"`
	Uint32    uint32     `json:"uint32,omitempty"`
	Uint64    uint64     `json:"uint64,omitempty"`
	Sint32    int32      `json:"sint32,omitempty"`
	Sint64    int64      `json:"sint64,omitempty"`
	Fixed32   uint32     `json:"fixed32,omitempty"`
	Fixed64   uint64     `json:"fixed64,omitempty"`
	Sfixed32  int32      `json:"sfixed32,omitempty"`
	Sfixed64  int64      `json:"sfixed64,omitempty"`
	Float     float32    `json:"float,omitempty"`
	Double    float64    `json:"double,omitempty"`
	Bool      bool       `json:"bool,omitempty"`
	String_   string     `json:"string,omitempty"`
	Bytes     []byte     `json:"bytes,omitempty"`
	Message   *Message   `json:"message,omitempty"`
	Int32S    []int32    `json:"int32s,omitempty"`
	Int64S    []int64    `json:"int64s,omitempty"`
	Uint32S   []uint32   `json:"uint32s,omitempty"`
	Uint64S   []uint64   `json:"uint64s,omitempty"`
	Sint32S   []int32    `json:"sint32s,omitempty"`
	Sint64S   []int64    `json:"sint64s,omitempty"`
	Fixed32S  []uint32   `json:"fixed32s,omitempty"`
	Fixed64S  []uint64   `json:"fixed64s,omitempty"`
	Sfixed32S []int32    `json:"sfixed32s,omitempty"`
	Sfixed64S []int64    `json:"sfixed64s,omitempty"`
	Floats    []float32  `json:"floats,omitempty"`
	Doubles   []float64  `json:"doubles,omitempty"`
	Bools     []bool     `json:"bools,omitempty"`
	Strings   []string   `json:"strings,omitempty"`
	Bytess    [][]byte   `json:"bytess,omitempty"`
	Messages  []*Message `json:"messages,omitempty"`
}

func (*AllTypes) Decode

func (m *AllTypes) Decode(c *picobuf.Decoder)

func (*AllTypes) Encode

func (m *AllTypes) Encode(c *picobuf.Encoder) bool

type Basic

type Basic struct {
	Byte0        int32  `json:"byte0,omitempty"`
	Byte1        int32  `json:"byte1,omitempty"`
	Byte100      int32  `json:"byte100,omitempty"`
	Byte255      int32  `json:"byte255,omitempty"`
	StringEmpty  string `json:"string_empty,omitempty"`
	StringHello  string `json:"string_hello,omitempty"`
	BytesZero    []byte `json:"bytes_zero,omitempty"`
	BytesNumbers []byte `json:"bytes_numbers,omitempty"`
}

func (*Basic) Decode

func (m *Basic) Decode(c *picobuf.Decoder)

func (*Basic) Encode

func (m *Basic) Encode(c *picobuf.Encoder) bool

type CustomBytes

type CustomBytes struct {
	Value        pic.ID   `json:"value,omitempty"`
	Opt          *pic.ID  `json:"opt,omitempty"`
	Rep          []pic.ID `json:"rep,omitempty"`
	PresentBasic pic.ID   `json:"present_basic,omitempty"`
	PresentOpt   pic.ID   `json:"present_opt,omitempty"`
	PresentRep   []pic.ID `json:"present_rep,omitempty"`
}

func (*CustomBytes) Decode

func (m *CustomBytes) Decode(c *picobuf.Decoder)

func (*CustomBytes) Encode

func (m *CustomBytes) Encode(c *picobuf.Encoder) bool

type CustomMessageTypes

type CustomMessageTypes struct {
	Normal                        *Timestamp       `json:"normal,omitempty"`
	CustomType                    *pic.Timestamp   `json:"custom_type,omitempty"`
	PresentCustomType             pic.Timestamp    `json:"present_custom_type,omitempty"`
	CustomTypeCast                *time.Time       `json:"custom_type_cast,omitempty"`
	PresentCustomTypeCast         time.Time        `json:"present_custom_type_cast,omitempty"`
	RepeatedCustomType            []*pic.Timestamp `json:"repeated_custom_type,omitempty"`
	RepeatedPresentCustomType     []pic.Timestamp  `json:"repeated_present_custom_type,omitempty"`
	RepeatedCustomTypeCast        []*time.Time     `json:"repeated_custom_type_cast,omitempty"`
	RepeatedPresentCustomTypeCast []time.Time      `json:"repeated_present_custom_type_cast,omitempty"`
}

func (*CustomMessageTypes) Decode

func (m *CustomMessageTypes) Decode(c *picobuf.Decoder)

func (*CustomMessageTypes) Encode

func (m *CustomMessageTypes) Encode(c *picobuf.Encoder) bool

type Map

type Map struct {
	Values map[int32]int32 `json:"values,omitempty"`
}

func (*Map) Decode

func (m *Map) Decode(c *picobuf.Decoder)

func (*Map) Encode

func (m *Map) Encode(c *picobuf.Encoder) bool

type Message

type Message struct {
	Int32 int32 `json:"int32,omitempty"`
}

func (*Message) Decode

func (m *Message) Decode(c *picobuf.Decoder)

func (*Message) Encode

func (m *Message) Encode(c *picobuf.Encoder) bool

type Person

type Person struct {
	Name    string   `json:"name,omitempty"`
	Address *Address `json:"address,omitempty"`
}

func (*Person) Decode

func (m *Person) Decode(c *picobuf.Decoder)

func (*Person) Encode

func (m *Person) Encode(c *picobuf.Encoder) bool

type Piece

type Piece struct {
	Id  pic.ID `json:"id,omitempty"`
	Alt string `json:"alt,omitempty"`
}

func (*Piece) Decode

func (m *Piece) Decode(c *picobuf.Decoder)

func (*Piece) Encode

func (m *Piece) Encode(c *picobuf.Encoder) bool

type Timestamp

type Timestamp struct {
	Seconds int64 `json:"seconds,omitempty"`
	Nanos   int32 `json:"nanos,omitempty"`
}

func (*Timestamp) Decode

func (m *Timestamp) Decode(c *picobuf.Decoder)

func (*Timestamp) Encode

func (m *Timestamp) Encode(c *picobuf.Encoder) bool

type VariationsMessage

type VariationsMessage struct {
	Value        *Message   `json:"value,omitempty"`
	Opt          *Message   `json:"opt,omitempty"`
	Rep          []*Message `json:"rep,omitempty"`
	PresentBasic Message    `json:"present_basic,omitempty"`
	PresentOpt   Message    `json:"present_opt,omitempty"`
	PresentRep   []Message  `json:"present_rep,omitempty"`
}

func (*VariationsMessage) Decode

func (m *VariationsMessage) Decode(c *picobuf.Decoder)

func (*VariationsMessage) Encode

func (m *VariationsMessage) Encode(c *picobuf.Encoder) bool

type VariationsScalar

type VariationsScalar struct {
	Value        string   `json:"value,omitempty"`
	Opt          *string  `json:"opt,omitempty"`
	Rep          []string `json:"rep,omitempty"`
	PresentBasic string   `json:"present_basic,omitempty"`
	PresentOpt   string   `json:"present_opt,omitempty"`
	PresentRep   []string `json:"present_rep,omitempty"`
	OptBytes     *[]byte  `json:"opt_bytes,omitempty"`
}

func (*VariationsScalar) Decode

func (m *VariationsScalar) Decode(c *picobuf.Decoder)

func (*VariationsScalar) Encode

func (m *VariationsScalar) Encode(c *picobuf.Encoder) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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