Thrift v1.3.0 Thrift.Parser
This module provides functions for parsing .thrift
files.
Summary
Functions
Parses a Thrift document and returns the schema that it represents
Parses a Thrift document and returns a component to the caller
Types
path_element :: String.t | atom
Functions
Specs
parse(String.t) :: %Thrift.Parser.Models.Schema{constants: term, enums: term, exceptions: term, includes: term, namespaces: term, services: term, structs: term, thrift_namespace: term, typedefs: term, unions: term}
Parses a Thrift document and returns the schema that it represents.
Specs
parse(String.t, [path_element]) :: Thrift.Parser.Models.all
Parses a Thrift document and returns a component to the caller.
The part of the Thrift document that’s returned is determined by
the path
parameter. It works a lot like the find_in
function,
which takes a map and can pull out nested pieces.
For example, this makes it easy to get to a service definition:
parse(doc, [:services, :MyService])
Will return the “MyService” service.