Versions in this module Expand all Collapse all v0 v0.0.3 Mar 13, 2024 v0.0.2 Feb 16, 2024 v0.0.1 Feb 16, 2024 Changes in this version + func Parse(filename string, b []byte, opts ...Option) (interface{}, error) + func ParseFile(filename string, opts ...Option) (interface{}, error) + func ParseReader(filename string, r io.Reader, opts ...Option) (interface{}, error) + type Annotation struct + Name string + Pos Pos + Value string + type Constant struct + Comment string + Name string + Pos Pos + Type *Type + Value interface{} + type Enum struct + Annotations []*Annotation + Comment string + Name string + Pos Pos + Values map[string]*EnumValue + type EnumValue struct + Annotations []*Annotation + Comment string + Name string + Pos Pos + Value int + type Field struct + Annotations []*Annotation + Comment string + Default interface{} + ID int + Name string + Optional bool + Pos Pos + Type *Type + type Filesystem interface + Abs func(dir, path string) (string, error) + Open func(filename string) (io.ReadCloser, error) + type Identifier string + type KeyValue struct + Key interface{} + Value interface{} + type Method struct + Annotations []*Annotation + Arguments []*Field + Comment string + Exceptions []*Field + Name string + Oneway bool + Pos Pos + ReturnType *Type + type Option func(*parser) Option + func Debug(b bool) Option + func Memoize(b bool) Option + func Recover(b bool) Option + type Parser struct + Files map[string]*Thrift + Filesystem Filesystem + func New() *Parser + func (p *Parser) Parse(r io.Reader, opts ...Option) (*Thrift, error) + func (p *Parser) ParseFile(filename string) (map[string]*Thrift, string, error) + type Pos struct + Col int + Line int + type Service struct + Annotations []*Annotation + Comment string + Extends string + Methods map[string]*Method + Name string + Pos Pos + type Struct struct + Annotations []*Annotation + Comment string + Fields []*Field + Name string + Pos Pos + type Thrift struct + Constants map[string]*Constant + Enums map[string]*Enum + Exceptions map[string]*Struct + Filename string + Imports map[string]*Thrift + Includes map[string]string + Namespaces map[string]string + Services map[string]*Service + Structs map[string]*Struct + Typedefs map[string]*Typedef + Unions map[string]*Struct + type Type struct + Annotations []*Annotation + KeyType *Type + Name string + Pos Pos + ValueType *Type + func (t *Type) String() string + type Typedef struct + Alias string + Annotations []*Annotation + Pos Pos