package thrift

Import Path
	github.com/parquet-go/parquet-go/encoding/thrift (on go.dev)

Dependency Relation
	imports 15 packages, and imported by one package


Package-Level Type Names (total 17)
/* sort by: | */
BinaryProtocol is a Protocol implementation for the binary thrift protocol. https://github.com/apache/thrift/blob/master/doc/specs/thrift-binary-protocol.md NonStrict bool (*BinaryProtocol) Features() Features (*BinaryProtocol) NewReader(r io.Reader) Reader (*BinaryProtocol) NewWriter(w io.Writer) Writer *BinaryProtocol : Protocol
CompactProtocol is a Protocol implementation for the compact thrift protocol. https://github.com/apache/thrift/blob/master/doc/specs/thrift-compact-protocol.md#integer-encoding (*CompactProtocol) Features() Features (*CompactProtocol) NewReader(r io.Reader) Reader (*CompactProtocol) NewWriter(w io.Writer) Writer *CompactProtocol : Protocol
(*Decoder) Decode(v interface{}) error (*Decoder) Reset(r Reader) (*Decoder) SetStrict(enabled bool) *Decoder : github.com/grpc-ecosystem/grpc-gateway/v2/runtime.Decoder func NewDecoder(r Reader) *Decoder
(*Encoder) Encode(v interface{}) error (*Encoder) Reset(w Writer) *Encoder : github.com/grpc-ecosystem/grpc-gateway/v2/runtime.Encoder *Encoder : go.uber.org/zap/zapcore.ReflectedEncoder func NewEncoder(w Writer) *Encoder
Features is a bitset describing the thrift encoding features supported by protocol implementations. func (*BinaryProtocol).Features() Features func (*CompactProtocol).Features() Features func Protocol.Features() Features const CoalesceBoolFields const UseDeltaEncoding
// whether the field id is a delta ID int16 Type Type ( Field) String() string Field : expvar.Var Field : fmt.Stringer func Reader.ReadField() (Field, error) func Writer.WriteField(Field) error
Size int32 Type Type ( List) String() string List : expvar.Var List : fmt.Stringer func Reader.ReadList() (List, error) func Writer.WriteList(List) error
Key Type Size int32 Value Type ( Map) String() string Map : expvar.Var Map : fmt.Stringer func Reader.ReadMap() (Map, error) func Writer.WriteMap(Map) error
Name string SeqID int32 Type MessageType func Reader.ReadMessage() (Message, error) func Writer.WriteMessage(Message) error
( MessageType) String() string MessageType : expvar.Var MessageType : fmt.Stringer const Call const Exception const Oneway const Reply
Field Field (*MissingField) Error() string *MissingField : error
The Protocol interface abstracts the creation of low-level thrift readers and writers implementing the various protocols that the encoding supports. Protocol instances must be safe to use concurrently from multiple gourintes. However, the readers and writer that they instantiates are intended to be used by a single goroutine. ( Protocol) Features() Features ( Protocol) NewReader(r io.Reader) Reader ( Protocol) NewWriter(w io.Writer) Writer *BinaryProtocol *CompactProtocol func Reader.Protocol() Protocol func Writer.Protocol() Protocol func Marshal(p Protocol, v interface{}) ([]byte, error) func Unmarshal(p Protocol, b []byte, v interface{}) error
Reader represents a low-level reader of values encoded according to one of the thrift protocols. ( Reader) Protocol() Protocol ( Reader) ReadBool() (bool, error) ( Reader) ReadBytes() ([]byte, error) ( Reader) ReadField() (Field, error) ( Reader) ReadFloat64() (float64, error) ( Reader) ReadInt16() (int16, error) ( Reader) ReadInt32() (int32, error) ( Reader) ReadInt64() (int64, error) ( Reader) ReadInt8() (int8, error) ( Reader) ReadLength() (int, error) ( Reader) ReadList() (List, error) ( Reader) ReadMap() (Map, error) ( Reader) ReadMessage() (Message, error) ( Reader) ReadSet() (Set, error) ( Reader) ReadString() (string, error) ( Reader) Reader() io.Reader func NewDebugReader(r Reader, l *log.Logger) Reader func (*BinaryProtocol).NewReader(r io.Reader) Reader func (*CompactProtocol).NewReader(r io.Reader) Reader func Protocol.NewReader(r io.Reader) Reader func NewDebugReader(r Reader, l *log.Logger) Reader func NewDecoder(r Reader) *Decoder func (*Decoder).Reset(r Reader)
Size int32 Type Type ( Set) String() string Set : expvar.Var Set : fmt.Stringer func Reader.ReadSet() (Set, error) func Writer.WriteSet(Set) error
( Type) GoString() string ( Type) String() string Type : expvar.Var Type : fmt.GoStringer Type : fmt.Stringer func TypeOf(t reflect.Type) Type const BINARY const BOOL const DOUBLE const FALSE const I16 const I32 const I64 const I8 const LIST const MAP const SET const STOP const STRUCT const TRUE
Expect Type Found Type (*TypeMismatch) Error() string *TypeMismatch : error
Writer represents a low-level writer of values encoded according to one of the thrift protocols. ( Writer) Protocol() Protocol ( Writer) WriteBool(bool) error ( Writer) WriteBytes([]byte) error ( Writer) WriteField(Field) error ( Writer) WriteFloat64(float64) error ( Writer) WriteInt16(int16) error ( Writer) WriteInt32(int32) error ( Writer) WriteInt64(int64) error ( Writer) WriteInt8(int8) error ( Writer) WriteLength(int) error ( Writer) WriteList(List) error ( Writer) WriteMap(Map) error ( Writer) WriteMessage(Message) error ( Writer) WriteSet(Set) error ( Writer) WriteString(string) error ( Writer) Writer() io.Writer func NewDebugWriter(w Writer, l *log.Logger) Writer func (*BinaryProtocol).NewWriter(w io.Writer) Writer func (*CompactProtocol).NewWriter(w io.Writer) Writer func Protocol.NewWriter(w io.Writer) Writer func NewDebugWriter(w Writer, l *log.Logger) Writer func NewEncoder(w Writer) *Encoder func (*Encoder).Reset(w Writer)
Package-Level Functions (total 7)
Marshal serializes v into a thrift representation according to the the protocol p. The function panics if v cannot be converted to a thrift representation.
Unmarshal deserializes the thrift data from b to v using to the protocol p. The function errors if the data in b does not match the type of v. The function panics if v cannot be converted to a thrift representation. As an optimization, the value passed in v may be reused across multiple calls to Unmarshal, allowing the function to reuse objects referenced by pointer fields of struct values. When reusing objects, the application is responsible for resetting the state of v before calling Unmarshal again.
Package-Level Constants (total 20)
const BINARY Type = 8
const BOOL Type = 2
const Call MessageType = 0
CoalesceBoolFields is advertised by protocols that allow encoders to coalesce boolean values into field types.
const DOUBLE Type = 7
const FALSE Type = 2
const I16 Type = 4
const I32 Type = 5
const I64 Type = 6
const I8 Type = 3
const LIST Type = 9
const MAP Type = 11
const Oneway MessageType = 3
const Reply MessageType = 1
const SET Type = 10
const STOP Type = 0
const STRUCT Type = 12
const TRUE Type = 1
DeltaEncoding is advertised by protocols that allow encoders to apply delta encoding on struct fields.