base

package
v2.0.17 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BazResponse

type BazResponse struct {
	Message string `json:"message,required"`
}

func (*BazResponse) Decode

func (v *BazResponse) Decode(sr stream.Reader) error

Decode deserializes a BazResponse struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a BazResponse struct could not be generated from the wire representation.

func (*BazResponse) Encode

func (v *BazResponse) Encode(sw stream.Writer) error

Encode serializes a BazResponse struct directly into bytes, without going through an intermediary type.

An error is returned if a BazResponse struct could not be encoded.

func (*BazResponse) Equals

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

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

This function performs a deep comparison.

func (*BazResponse) FromWire

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

FromWire deserializes a BazResponse 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 BazResponse struct from the provided intermediate representation.

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

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

func (*BazResponse) GetMessage

func (v *BazResponse) GetMessage() (o string)

GetMessage returns the value of Message if it is set or its zero value if it is unset.

func (*BazResponse) MarshalLogObject

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

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

func (*BazResponse) String

func (v *BazResponse) String() string

String returns a readable string representation of a BazResponse struct.

func (*BazResponse) ToWire

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

ToWire translates a BazResponse 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 NestHeaders

type NestHeaders struct {
	UUID  string  `json:"UUID,required"`
	Token *string `json:"token,omitempty"`
}

func (*NestHeaders) Decode

func (v *NestHeaders) Decode(sr stream.Reader) error

Decode deserializes a NestHeaders struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a NestHeaders struct could not be generated from the wire representation.

func (*NestHeaders) Encode

func (v *NestHeaders) Encode(sw stream.Writer) error

Encode serializes a NestHeaders struct directly into bytes, without going through an intermediary type.

An error is returned if a NestHeaders struct could not be encoded.

func (*NestHeaders) Equals

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

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

This function performs a deep comparison.

func (*NestHeaders) FromWire

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

FromWire deserializes a NestHeaders 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 NestHeaders struct from the provided intermediate representation.

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

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

func (*NestHeaders) GetToken

func (v *NestHeaders) GetToken() (o string)

GetToken returns the value of Token if it is set or its zero value if it is unset.

func (*NestHeaders) GetUUID

func (v *NestHeaders) GetUUID() (o string)

GetUUID returns the value of UUID if it is set or its zero value if it is unset.

func (*NestHeaders) IsSetToken

func (v *NestHeaders) IsSetToken() bool

IsSetToken returns true if Token is not nil.

func (*NestHeaders) MarshalLogObject

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

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

func (*NestHeaders) String

func (v *NestHeaders) String() string

String returns a readable string representation of a NestHeaders struct.

func (*NestHeaders) ToWire

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

ToWire translates a NestHeaders 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 NestedStruct

type NestedStruct struct {
	Msg   string `json:"msg,required"`
	Check *int32 `json:"check,omitempty"`
}

func (*NestedStruct) Decode

func (v *NestedStruct) Decode(sr stream.Reader) error

Decode deserializes a NestedStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a NestedStruct struct could not be generated from the wire representation.

func (*NestedStruct) Encode

func (v *NestedStruct) Encode(sw stream.Writer) error

Encode serializes a NestedStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a NestedStruct struct could not be encoded.

func (*NestedStruct) Equals

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

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

This function performs a deep comparison.

func (*NestedStruct) FromWire

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

FromWire deserializes a NestedStruct 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 NestedStruct struct from the provided intermediate representation.

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

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

func (*NestedStruct) GetCheck

func (v *NestedStruct) GetCheck() (o int32)

GetCheck returns the value of Check if it is set or its zero value if it is unset.

func (*NestedStruct) GetMsg

func (v *NestedStruct) GetMsg() (o string)

GetMsg returns the value of Msg if it is set or its zero value if it is unset.

func (*NestedStruct) IsSetCheck

func (v *NestedStruct) IsSetCheck() bool

IsSetCheck returns true if Check is not nil.

func (*NestedStruct) MarshalLogObject

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

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

func (*NestedStruct) String

func (v *NestedStruct) String() string

String returns a readable string representation of a NestedStruct struct.

func (*NestedStruct) ToWire

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

ToWire translates a NestedStruct 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 ServerErr

type ServerErr struct {
	Message string `json:"message,required"`
}

func (*ServerErr) Decode

func (v *ServerErr) Decode(sr stream.Reader) error

Decode deserializes a ServerErr struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a ServerErr struct could not be generated from the wire representation.

func (*ServerErr) Encode

func (v *ServerErr) Encode(sw stream.Writer) error

Encode serializes a ServerErr struct directly into bytes, without going through an intermediary type.

An error is returned if a ServerErr struct could not be encoded.

func (*ServerErr) Equals

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

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

This function performs a deep comparison.

func (*ServerErr) Error

func (v *ServerErr) Error() string

func (*ServerErr) ErrorName

func (*ServerErr) ErrorName() string

ErrorName is the name of this type as defined in the Thrift file.

func (*ServerErr) FromWire

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

FromWire deserializes a ServerErr 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 ServerErr struct from the provided intermediate representation.

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

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

func (*ServerErr) GetMessage

func (v *ServerErr) GetMessage() (o string)

GetMessage returns the value of Message if it is set or its zero value if it is unset.

func (*ServerErr) MarshalLogObject

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

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

func (*ServerErr) String

func (v *ServerErr) String() string

String returns a readable string representation of a ServerErr struct.

func (*ServerErr) ToWire

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

ToWire translates a ServerErr 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 TransHeaders

type TransHeaders struct {
	W1 *Wrapped `json:"w1,required"`
	W2 *Wrapped `json:"w2,omitempty"`
}

func (*TransHeaders) Decode

func (v *TransHeaders) Decode(sr stream.Reader) error

Decode deserializes a TransHeaders struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a TransHeaders struct could not be generated from the wire representation.

func (*TransHeaders) Encode

func (v *TransHeaders) Encode(sw stream.Writer) error

Encode serializes a TransHeaders struct directly into bytes, without going through an intermediary type.

An error is returned if a TransHeaders struct could not be encoded.

func (*TransHeaders) Equals

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

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

This function performs a deep comparison.

func (*TransHeaders) FromWire

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

FromWire deserializes a TransHeaders 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 TransHeaders struct from the provided intermediate representation.

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

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

func (*TransHeaders) GetW1

func (v *TransHeaders) GetW1() (o *Wrapped)

GetW1 returns the value of W1 if it is set or its zero value if it is unset.

func (*TransHeaders) GetW2

func (v *TransHeaders) GetW2() (o *Wrapped)

GetW2 returns the value of W2 if it is set or its zero value if it is unset.

func (*TransHeaders) IsSetW1

func (v *TransHeaders) IsSetW1() bool

IsSetW1 returns true if W1 is not nil.

func (*TransHeaders) IsSetW2

func (v *TransHeaders) IsSetW2() bool

IsSetW2 returns true if W2 is not nil.

func (*TransHeaders) MarshalLogObject

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

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

func (*TransHeaders) String

func (v *TransHeaders) String() string

String returns a readable string representation of a TransHeaders struct.

func (*TransHeaders) ToWire

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

ToWire translates a TransHeaders 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 TransStruct

type TransStruct struct {
	Message string        `json:"message,required"`
	Driver  *NestedStruct `json:"driver,omitempty"`
	Rider   *NestedStruct `json:"rider,required"`
}

func (*TransStruct) Decode

func (v *TransStruct) Decode(sr stream.Reader) error

Decode deserializes a TransStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a TransStruct struct could not be generated from the wire representation.

func (*TransStruct) Encode

func (v *TransStruct) Encode(sw stream.Writer) error

Encode serializes a TransStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a TransStruct struct could not be encoded.

func (*TransStruct) Equals

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

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

This function performs a deep comparison.

func (*TransStruct) FromWire

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

FromWire deserializes a TransStruct 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 TransStruct struct from the provided intermediate representation.

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

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

func (*TransStruct) GetDriver

func (v *TransStruct) GetDriver() (o *NestedStruct)

GetDriver returns the value of Driver if it is set or its zero value if it is unset.

func (*TransStruct) GetMessage

func (v *TransStruct) GetMessage() (o string)

GetMessage returns the value of Message if it is set or its zero value if it is unset.

func (*TransStruct) GetRider

func (v *TransStruct) GetRider() (o *NestedStruct)

GetRider returns the value of Rider if it is set or its zero value if it is unset.

func (*TransStruct) IsSetDriver

func (v *TransStruct) IsSetDriver() bool

IsSetDriver returns true if Driver is not nil.

func (*TransStruct) IsSetRider

func (v *TransStruct) IsSetRider() bool

IsSetRider returns true if Rider is not nil.

func (*TransStruct) MarshalLogObject

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

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

func (*TransStruct) String

func (v *TransStruct) String() string

String returns a readable string representation of a TransStruct struct.

func (*TransStruct) ToWire

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

ToWire translates a TransStruct 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 UUID

type UUID string

func (*UUID) Decode

func (v *UUID) Decode(sr stream.Reader) error

Decode deserializes UUID directly off the wire.

func (UUID) Encode

func (v UUID) Encode(sw stream.Writer) error

func (UUID) Equals

func (lhs UUID) Equals(rhs UUID) bool

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

func (*UUID) FromWire

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

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

func (UUID) Ptr

func (v UUID) Ptr() *UUID

UUIDPtr returns a pointer to a UUID

func (UUID) String

func (v UUID) String() string

String returns a readable string representation of UUID.

func (UUID) ToWire

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

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

type Wrapped

type Wrapped struct {
	N1 *NestHeaders `json:"n1,required"`
	N2 *NestHeaders `json:"n2,omitempty"`
}

func (*Wrapped) Decode

func (v *Wrapped) Decode(sr stream.Reader) error

Decode deserializes a Wrapped struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Wrapped struct could not be generated from the wire representation.

func (*Wrapped) Encode

func (v *Wrapped) Encode(sw stream.Writer) error

Encode serializes a Wrapped struct directly into bytes, without going through an intermediary type.

An error is returned if a Wrapped struct could not be encoded.

func (*Wrapped) Equals

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

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

This function performs a deep comparison.

func (*Wrapped) FromWire

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

FromWire deserializes a Wrapped 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 Wrapped struct from the provided intermediate representation.

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

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

func (*Wrapped) GetN1

func (v *Wrapped) GetN1() (o *NestHeaders)

GetN1 returns the value of N1 if it is set or its zero value if it is unset.

func (*Wrapped) GetN2

func (v *Wrapped) GetN2() (o *NestHeaders)

GetN2 returns the value of N2 if it is set or its zero value if it is unset.

func (*Wrapped) IsSetN1

func (v *Wrapped) IsSetN1() bool

IsSetN1 returns true if N1 is not nil.

func (*Wrapped) IsSetN2

func (v *Wrapped) IsSetN2() bool

IsSetN2 returns true if N2 is not nil.

func (*Wrapped) MarshalLogObject

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

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

func (*Wrapped) String

func (v *Wrapped) String() string

String returns a readable string representation of a Wrapped struct.

func (*Wrapped) ToWire

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

ToWire translates a Wrapped 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
}

Jump to

Keyboard shortcuts

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