thriftrw: go.uber.org/thriftrw/gen/internal/tests/set_to_slice Index | Files

package set_to_slice

import "go.uber.org/thriftrw/gen/internal/tests/set_to_slice"

Index

Package Files

set_to_slice.go

Variables

var ConstListStringList [][]string = [][]string{
    []string{
        "hello",
    },
    []string{
        "world",
    },
}
var ConstStringList []string = []string{
    "hello",
}
var ThriftModule = &thriftreflect.ThriftModule{
    Name:     "set_to_slice",
    Package:  "go.uber.org/thriftrw/gen/internal/tests/set_to_slice",
    FilePath: "set_to_slice.thrift",
    SHA1:     "34a394ad873ba45745fa9002fe3625d8162d35e9",
    Raw:      rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

type AnotherStringList Uses

type AnotherStringList MyStringList

func (AnotherStringList) Equals Uses

func (lhs AnotherStringList) Equals(rhs AnotherStringList) bool

Equals returns true if this AnotherStringList is equal to the provided AnotherStringList.

func (*AnotherStringList) FromWire Uses

func (v *AnotherStringList) FromWire(w wire.Value) error

FromWire deserializes AnotherStringList from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (AnotherStringList) MarshalLogArray Uses

func (v AnotherStringList) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (AnotherStringList) String Uses

func (v AnotherStringList) String() string

String returns a readable string representation of AnotherStringList.

func (AnotherStringList) ToWire Uses

func (v AnotherStringList) ToWire() (wire.Value, error)

ToWire translates AnotherStringList into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type Bar Uses

type Bar struct {
    RequiredInt32ListField             []int32        `json:"requiredInt32ListField,required"`
    OptionalStringListField            []string       `json:"optionalStringListField,omitempty"`
    RequiredTypedefStringListField     StringList     `json:"requiredTypedefStringListField,required"`
    OptionalTypedefStringListField     StringList     `json:"optionalTypedefStringListField,omitempty"`
    RequiredFooListField               []*Foo         `json:"requiredFooListField,required"`
    OptionalFooListField               []*Foo         `json:"optionalFooListField,omitempty"`
    RequiredTypedefFooListField        FooList        `json:"requiredTypedefFooListField,required"`
    OptionalTypedefFooListField        FooList        `json:"optionalTypedefFooListField,omitempty"`
    RequiredStringListListField        [][]string     `json:"requiredStringListListField,required"`
    RequiredTypedefStringListListField StringListList `json:"requiredTypedefStringListListField,required"`
}

func (*Bar) Equals Uses

func (v *Bar) Equals(rhs *Bar) bool

Equals returns true if all the fields of this Bar match the provided Bar.

This function performs a deep comparison.

func (*Bar) FromWire Uses

func (v *Bar) FromWire(w wire.Value) error

FromWire deserializes a Bar struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Bar struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Bar
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Bar) GetOptionalFooListField Uses

func (v *Bar) GetOptionalFooListField() (o []*Foo)

GetOptionalFooListField returns the value of OptionalFooListField if it is set or its zero value if it is unset.

func (*Bar) GetOptionalStringListField Uses

func (v *Bar) GetOptionalStringListField() (o []string)

GetOptionalStringListField returns the value of OptionalStringListField if it is set or its zero value if it is unset.

func (*Bar) GetOptionalTypedefFooListField Uses

func (v *Bar) GetOptionalTypedefFooListField() (o FooList)

GetOptionalTypedefFooListField returns the value of OptionalTypedefFooListField if it is set or its zero value if it is unset.

func (*Bar) GetOptionalTypedefStringListField Uses

func (v *Bar) GetOptionalTypedefStringListField() (o StringList)

GetOptionalTypedefStringListField returns the value of OptionalTypedefStringListField if it is set or its zero value if it is unset.

func (*Bar) GetRequiredFooListField Uses

func (v *Bar) GetRequiredFooListField() (o []*Foo)

GetRequiredFooListField returns the value of RequiredFooListField if it is set or its zero value if it is unset.

func (*Bar) GetRequiredInt32ListField Uses

func (v *Bar) GetRequiredInt32ListField() (o []int32)

GetRequiredInt32ListField returns the value of RequiredInt32ListField if it is set or its zero value if it is unset.

func (*Bar) GetRequiredStringListListField Uses

func (v *Bar) GetRequiredStringListListField() (o [][]string)

GetRequiredStringListListField returns the value of RequiredStringListListField if it is set or its zero value if it is unset.

func (*Bar) GetRequiredTypedefFooListField Uses

func (v *Bar) GetRequiredTypedefFooListField() (o FooList)

GetRequiredTypedefFooListField returns the value of RequiredTypedefFooListField if it is set or its zero value if it is unset.

func (*Bar) GetRequiredTypedefStringListField Uses

func (v *Bar) GetRequiredTypedefStringListField() (o StringList)

GetRequiredTypedefStringListField returns the value of RequiredTypedefStringListField if it is set or its zero value if it is unset.

func (*Bar) GetRequiredTypedefStringListListField Uses

func (v *Bar) GetRequiredTypedefStringListListField() (o StringListList)

GetRequiredTypedefStringListListField returns the value of RequiredTypedefStringListListField if it is set or its zero value if it is unset.

func (*Bar) IsSetOptionalFooListField Uses

func (v *Bar) IsSetOptionalFooListField() bool

IsSetOptionalFooListField returns true if OptionalFooListField is not nil.

func (*Bar) IsSetOptionalStringListField Uses

func (v *Bar) IsSetOptionalStringListField() bool

IsSetOptionalStringListField returns true if OptionalStringListField is not nil.

func (*Bar) IsSetOptionalTypedefFooListField Uses

func (v *Bar) IsSetOptionalTypedefFooListField() bool

IsSetOptionalTypedefFooListField returns true if OptionalTypedefFooListField is not nil.

func (*Bar) IsSetOptionalTypedefStringListField Uses

func (v *Bar) IsSetOptionalTypedefStringListField() bool

IsSetOptionalTypedefStringListField returns true if OptionalTypedefStringListField is not nil.

func (*Bar) IsSetRequiredFooListField Uses

func (v *Bar) IsSetRequiredFooListField() bool

IsSetRequiredFooListField returns true if RequiredFooListField is not nil.

func (*Bar) IsSetRequiredInt32ListField Uses

func (v *Bar) IsSetRequiredInt32ListField() bool

IsSetRequiredInt32ListField returns true if RequiredInt32ListField is not nil.

func (*Bar) IsSetRequiredStringListListField Uses

func (v *Bar) IsSetRequiredStringListListField() bool

IsSetRequiredStringListListField returns true if RequiredStringListListField is not nil.

func (*Bar) IsSetRequiredTypedefFooListField Uses

func (v *Bar) IsSetRequiredTypedefFooListField() bool

IsSetRequiredTypedefFooListField returns true if RequiredTypedefFooListField is not nil.

func (*Bar) IsSetRequiredTypedefStringListField Uses

func (v *Bar) IsSetRequiredTypedefStringListField() bool

IsSetRequiredTypedefStringListField returns true if RequiredTypedefStringListField is not nil.

func (*Bar) IsSetRequiredTypedefStringListListField Uses

func (v *Bar) IsSetRequiredTypedefStringListListField() bool

IsSetRequiredTypedefStringListListField returns true if RequiredTypedefStringListListField is not nil.

func (*Bar) MarshalLogObject Uses

func (v *Bar) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Bar.

func (*Bar) String Uses

func (v *Bar) String() string

String returns a readable string representation of a Bar struct.

func (*Bar) ToWire Uses

func (v *Bar) ToWire() (wire.Value, error)

ToWire translates a Bar struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type Foo Uses

type Foo struct {
    StringField string `json:"stringField,required"`
}

func (*Foo) Equals Uses

func (v *Foo) Equals(rhs *Foo) bool

Equals returns true if all the fields of this Foo match the provided Foo.

This function performs a deep comparison.

func (*Foo) FromWire Uses

func (v *Foo) FromWire(w wire.Value) error

FromWire deserializes a Foo struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Foo struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Foo
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Foo) GetStringField Uses

func (v *Foo) GetStringField() (o string)

GetStringField returns the value of StringField if it is set or its zero value if it is unset.

func (*Foo) MarshalLogObject Uses

func (v *Foo) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Foo.

func (*Foo) String Uses

func (v *Foo) String() string

String returns a readable string representation of a Foo struct.

func (*Foo) ToWire Uses

func (v *Foo) ToWire() (wire.Value, error)

ToWire translates a Foo struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type FooList Uses

type FooList []*Foo

func (FooList) Equals Uses

func (lhs FooList) Equals(rhs FooList) bool

Equals returns true if this FooList is equal to the provided FooList.

func (*FooList) FromWire Uses

func (v *FooList) FromWire(w wire.Value) error

FromWire deserializes FooList from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (FooList) MarshalLogArray Uses

func (v FooList) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (FooList) String Uses

func (v FooList) String() string

String returns a readable string representation of FooList.

func (FooList) ToWire Uses

func (v FooList) ToWire() (wire.Value, error)

ToWire translates FooList into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type MyStringList Uses

type MyStringList StringList

func (MyStringList) Equals Uses

func (lhs MyStringList) Equals(rhs MyStringList) bool

Equals returns true if this MyStringList is equal to the provided MyStringList.

func (*MyStringList) FromWire Uses

func (v *MyStringList) FromWire(w wire.Value) error

FromWire deserializes MyStringList from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (MyStringList) MarshalLogArray Uses

func (v MyStringList) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (MyStringList) String Uses

func (v MyStringList) String() string

String returns a readable string representation of MyStringList.

func (MyStringList) ToWire Uses

func (v MyStringList) ToWire() (wire.Value, error)

ToWire translates MyStringList into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type StringList Uses

type StringList []string

func (StringList) Equals Uses

func (lhs StringList) Equals(rhs StringList) bool

Equals returns true if this StringList is equal to the provided StringList.

func (*StringList) FromWire Uses

func (v *StringList) FromWire(w wire.Value) error

FromWire deserializes StringList from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (StringList) MarshalLogArray Uses

func (v StringList) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (StringList) String Uses

func (v StringList) String() string

String returns a readable string representation of StringList.

func (StringList) ToWire Uses

func (v StringList) ToWire() (wire.Value, error)

ToWire translates StringList into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type StringListList Uses

type StringListList [][]string

func (StringListList) Equals Uses

func (lhs StringListList) Equals(rhs StringListList) bool

Equals returns true if this StringListList is equal to the provided StringListList.

func (*StringListList) FromWire Uses

func (v *StringListList) FromWire(w wire.Value) error

FromWire deserializes StringListList from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (StringListList) MarshalLogArray Uses

func (v StringListList) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (StringListList) String Uses

func (v StringListList) String() string

String returns a readable string representation of StringListList.

func (StringListList) ToWire Uses

func (v StringListList) ToWire() (wire.Value, error)

ToWire translates StringListList into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type StringSet Uses

type StringSet map[string]struct{}

func (StringSet) Equals Uses

func (lhs StringSet) Equals(rhs StringSet) bool

Equals returns true if this StringSet is equal to the provided StringSet.

func (*StringSet) FromWire Uses

func (v *StringSet) FromWire(w wire.Value) error

FromWire deserializes StringSet from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (StringSet) MarshalLogArray Uses

func (v StringSet) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (StringSet) String Uses

func (v StringSet) String() string

String returns a readable string representation of StringSet.

func (StringSet) ToWire Uses

func (v StringSet) ToWire() (wire.Value, error)

ToWire translates StringSet into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

Package set_to_slice imports 7 packages (graph). Updated 2020-04-01. Refresh now. Tools for package owners.