picotest

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 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

func (*Address) GetStreet added in v0.0.4

func (m *Address) GetStreet() (v string)

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

func (*AllTypes) GetBool added in v0.0.4

func (m *AllTypes) GetBool() (v bool)

func (*AllTypes) GetBools added in v0.0.4

func (m *AllTypes) GetBools() (v []bool)

func (*AllTypes) GetBytes added in v0.0.4

func (m *AllTypes) GetBytes() (v []byte)

func (*AllTypes) GetBytess added in v0.0.4

func (m *AllTypes) GetBytess() (v [][]byte)

func (*AllTypes) GetDouble added in v0.0.4

func (m *AllTypes) GetDouble() (v float64)

func (*AllTypes) GetDoubles added in v0.0.4

func (m *AllTypes) GetDoubles() (v []float64)

func (*AllTypes) GetFixed32 added in v0.0.4

func (m *AllTypes) GetFixed32() (v uint32)

func (*AllTypes) GetFixed32S added in v0.0.4

func (m *AllTypes) GetFixed32S() (v []uint32)

func (*AllTypes) GetFixed64 added in v0.0.4

func (m *AllTypes) GetFixed64() (v uint64)

func (*AllTypes) GetFixed64S added in v0.0.4

func (m *AllTypes) GetFixed64S() (v []uint64)

func (*AllTypes) GetFloat added in v0.0.4

func (m *AllTypes) GetFloat() (v float32)

func (*AllTypes) GetFloats added in v0.0.4

func (m *AllTypes) GetFloats() (v []float32)

func (*AllTypes) GetInt32 added in v0.0.4

func (m *AllTypes) GetInt32() (v int32)

func (*AllTypes) GetInt32S added in v0.0.4

func (m *AllTypes) GetInt32S() (v []int32)

func (*AllTypes) GetInt64 added in v0.0.4

func (m *AllTypes) GetInt64() (v int64)

func (*AllTypes) GetInt64S added in v0.0.4

func (m *AllTypes) GetInt64S() (v []int64)

func (*AllTypes) GetMessage added in v0.0.4

func (m *AllTypes) GetMessage() (v *Message)

func (*AllTypes) GetMessages added in v0.0.4

func (m *AllTypes) GetMessages() (v []*Message)

func (*AllTypes) GetSfixed32 added in v0.0.4

func (m *AllTypes) GetSfixed32() (v int32)

func (*AllTypes) GetSfixed32S added in v0.0.4

func (m *AllTypes) GetSfixed32S() (v []int32)

func (*AllTypes) GetSfixed64 added in v0.0.4

func (m *AllTypes) GetSfixed64() (v int64)

func (*AllTypes) GetSfixed64S added in v0.0.4

func (m *AllTypes) GetSfixed64S() (v []int64)

func (*AllTypes) GetSint32 added in v0.0.4

func (m *AllTypes) GetSint32() (v int32)

func (*AllTypes) GetSint32S added in v0.0.4

func (m *AllTypes) GetSint32S() (v []int32)

func (*AllTypes) GetSint64 added in v0.0.4

func (m *AllTypes) GetSint64() (v int64)

func (*AllTypes) GetSint64S added in v0.0.4

func (m *AllTypes) GetSint64S() (v []int64)

func (*AllTypes) GetString_ added in v0.0.4

func (m *AllTypes) GetString_() (v string)

func (*AllTypes) GetStrings added in v0.0.4

func (m *AllTypes) GetStrings() (v []string)

func (*AllTypes) GetUint32 added in v0.0.4

func (m *AllTypes) GetUint32() (v uint32)

func (*AllTypes) GetUint32S added in v0.0.4

func (m *AllTypes) GetUint32S() (v []uint32)

func (*AllTypes) GetUint64 added in v0.0.4

func (m *AllTypes) GetUint64() (v uint64)

func (*AllTypes) GetUint64S added in v0.0.4

func (m *AllTypes) GetUint64S() (v []uint64)

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

func (*Basic) GetByte0 added in v0.0.4

func (m *Basic) GetByte0() (v int32)

func (*Basic) GetByte1 added in v0.0.4

func (m *Basic) GetByte1() (v int32)

func (*Basic) GetByte100 added in v0.0.4

func (m *Basic) GetByte100() (v int32)

func (*Basic) GetByte255 added in v0.0.4

func (m *Basic) GetByte255() (v int32)

func (*Basic) GetBytesNumbers added in v0.0.4

func (m *Basic) GetBytesNumbers() (v []byte)

func (*Basic) GetBytesZero added in v0.0.4

func (m *Basic) GetBytesZero() (v []byte)

func (*Basic) GetStringEmpty added in v0.0.4

func (m *Basic) GetStringEmpty() (v string)

func (*Basic) GetStringHello added in v0.0.4

func (m *Basic) GetStringHello() (v string)

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

func (*CustomBytes) GetOpt added in v0.0.4

func (m *CustomBytes) GetOpt() (v *pic.ID)

func (*CustomBytes) GetPresentBasic added in v0.0.4

func (m *CustomBytes) GetPresentBasic() (v pic.ID)

func (*CustomBytes) GetPresentOpt added in v0.0.4

func (m *CustomBytes) GetPresentOpt() (v pic.ID)

func (*CustomBytes) GetPresentRep added in v0.0.4

func (m *CustomBytes) GetPresentRep() (v []pic.ID)

func (*CustomBytes) GetRep added in v0.0.4

func (m *CustomBytes) GetRep() (v []pic.ID)

func (*CustomBytes) GetValue added in v0.0.4

func (m *CustomBytes) GetValue() (v pic.ID)

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

func (*CustomMessageTypes) GetCustomType added in v0.0.4

func (m *CustomMessageTypes) GetCustomType() (v *pic.Timestamp)

func (*CustomMessageTypes) GetCustomTypeCast added in v0.0.4

func (m *CustomMessageTypes) GetCustomTypeCast() (v *time.Time)

func (*CustomMessageTypes) GetNormal added in v0.0.4

func (m *CustomMessageTypes) GetNormal() (v *Timestamp)

func (*CustomMessageTypes) GetPresentCustomType added in v0.0.4

func (m *CustomMessageTypes) GetPresentCustomType() (v pic.Timestamp)

func (*CustomMessageTypes) GetPresentCustomTypeCast added in v0.0.4

func (m *CustomMessageTypes) GetPresentCustomTypeCast() (v time.Time)

func (*CustomMessageTypes) GetRepeatedCustomType added in v0.0.4

func (m *CustomMessageTypes) GetRepeatedCustomType() (v []*pic.Timestamp)

func (*CustomMessageTypes) GetRepeatedCustomTypeCast added in v0.0.4

func (m *CustomMessageTypes) GetRepeatedCustomTypeCast() (v []*time.Time)

func (*CustomMessageTypes) GetRepeatedPresentCustomType added in v0.0.4

func (m *CustomMessageTypes) GetRepeatedPresentCustomType() (v []pic.Timestamp)

func (*CustomMessageTypes) GetRepeatedPresentCustomTypeCast added in v0.0.4

func (m *CustomMessageTypes) GetRepeatedPresentCustomTypeCast() (v []time.Time)

type KnownMessage added in v0.0.2

type KnownMessage struct {
	First            int64 `json:"first,omitempty"`
	Second           int64 `json:"second,omitempty"`
	Third            int64 `json:"third,omitempty"`
	Fourth           int64 `json:"fourth,omitempty"`
	XXX_unrecognized []byte
}

func (*KnownMessage) Decode added in v0.0.2

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

func (*KnownMessage) Encode added in v0.0.2

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

func (*KnownMessage) GetFirst added in v0.0.4

func (m *KnownMessage) GetFirst() (v int64)

func (*KnownMessage) GetFourth added in v0.0.4

func (m *KnownMessage) GetFourth() (v int64)

func (*KnownMessage) GetSecond added in v0.0.4

func (m *KnownMessage) GetSecond() (v int64)

func (*KnownMessage) GetThird added in v0.0.4

func (m *KnownMessage) GetThird() (v int64)

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

func (*Map) GetValues added in v0.0.4

func (m *Map) GetValues() (v map[int32]int32)

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

func (*Message) GetInt32 added in v0.0.4

func (m *Message) GetInt32() (v int32)

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

func (*Person) GetAddress added in v0.0.4

func (m *Person) GetAddress() (v *Address)

func (*Person) GetName added in v0.0.4

func (m *Person) GetName() (v string)

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

func (*Piece) GetAlt added in v0.0.4

func (m *Piece) GetAlt() (v string)

func (*Piece) GetId added in v0.0.4

func (m *Piece) GetId() (v pic.ID)

type Tag added in v0.0.2

type Tag struct {
	Key string `json:"key,omitempty"`
	// Types that are assignable to Value:
	//
	//	*Tag_String_
	//	*Tag_Int64
	//	*Tag_Double
	//	*Tag_Bytes
	//	*Tag_Bool
	//	*Tag_DurationNs
	//	*Tag_Timestamp
	Value isTag_Value
}

func (*Tag) Decode added in v0.0.2

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

func (*Tag) Encode added in v0.0.2

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

func (*Tag) GetBool added in v0.0.4

func (m *Tag) GetBool() (v bool)

func (*Tag) GetBytes added in v0.0.4

func (m *Tag) GetBytes() (v []byte)

func (*Tag) GetDouble added in v0.0.4

func (m *Tag) GetDouble() (v float64)

func (*Tag) GetDurationNs added in v0.0.4

func (m *Tag) GetDurationNs() (v int64)

func (*Tag) GetInt64 added in v0.0.4

func (m *Tag) GetInt64() (v int64)

func (*Tag) GetKey added in v0.0.4

func (m *Tag) GetKey() (v string)

func (*Tag) GetString_ added in v0.0.4

func (m *Tag) GetString_() (v []byte)

func (*Tag) GetTimestamp added in v0.0.4

func (m *Tag) GetTimestamp() (v *Timestamp)

func (*Tag) GetValue added in v0.0.4

func (m *Tag) GetValue() (v isTag_Value)

type Tag_Bool added in v0.0.2

type Tag_Bool struct {
	Bool bool
}

type Tag_Bytes added in v0.0.2

type Tag_Bytes struct {
	Bytes []byte
}

type Tag_Double added in v0.0.2

type Tag_Double struct {
	Double float64
}

type Tag_DurationNs added in v0.0.2

type Tag_DurationNs struct {
	DurationNs int64
}

type Tag_Int64 added in v0.0.2

type Tag_Int64 struct {
	Int64 int64
}

type Tag_String_ added in v0.0.2

type Tag_String_ struct {
	String_ []byte
}

type Tag_Timestamp added in v0.0.2

type Tag_Timestamp struct {
	Timestamp *Timestamp
}

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

func (*Timestamp) GetNanos added in v0.0.4

func (m *Timestamp) GetNanos() (v int32)

func (*Timestamp) GetSeconds added in v0.0.4

func (m *Timestamp) GetSeconds() (v int64)

type UnknownMessage added in v0.0.2

type UnknownMessage struct {
	Second           int64 `json:"second,omitempty"`
	Fourth           int64 `json:"fourth,omitempty"`
	XXX_unrecognized []byte
}

func (*UnknownMessage) Decode added in v0.0.2

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

func (*UnknownMessage) Encode added in v0.0.2

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

func (*UnknownMessage) GetFourth added in v0.0.4

func (m *UnknownMessage) GetFourth() (v int64)

func (*UnknownMessage) GetSecond added in v0.0.4

func (m *UnknownMessage) GetSecond() (v int64)

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

func (*VariationsMessage) GetOpt added in v0.0.4

func (m *VariationsMessage) GetOpt() (v *Message)

func (*VariationsMessage) GetPresentBasic added in v0.0.4

func (m *VariationsMessage) GetPresentBasic() (v Message)

func (*VariationsMessage) GetPresentOpt added in v0.0.4

func (m *VariationsMessage) GetPresentOpt() (v Message)

func (*VariationsMessage) GetPresentRep added in v0.0.4

func (m *VariationsMessage) GetPresentRep() (v []Message)

func (*VariationsMessage) GetRep added in v0.0.4

func (m *VariationsMessage) GetRep() (v []*Message)

func (*VariationsMessage) GetValue added in v0.0.4

func (m *VariationsMessage) GetValue() (v *Message)

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

func (*VariationsScalar) GetOpt added in v0.0.4

func (m *VariationsScalar) GetOpt() (v *string)

func (*VariationsScalar) GetOptBytes added in v0.0.4

func (m *VariationsScalar) GetOptBytes() (v *[]byte)

func (*VariationsScalar) GetPresentBasic added in v0.0.4

func (m *VariationsScalar) GetPresentBasic() (v string)

func (*VariationsScalar) GetPresentOpt added in v0.0.4

func (m *VariationsScalar) GetPresentOpt() (v string)

func (*VariationsScalar) GetPresentRep added in v0.0.4

func (m *VariationsScalar) GetPresentRep() (v []string)

func (*VariationsScalar) GetRep added in v0.0.4

func (m *VariationsScalar) GetRep() (v []string)

func (*VariationsScalar) GetValue added in v0.0.4

func (m *VariationsScalar) GetValue() (v string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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