_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c17600
// RootTypeSpec returns the TypeSpec that the given linked TypeSpec points to. // // For most types, this is the type itself. For Typedefs, it is the root // TypeSpec of the Typedef's target.
c17601
// Link replaces the typeSpecReference with an actual linked TypeSpec.
c17602
// ForEachTypeReference on an unresolved typeSpecReference will cause a system // panic.
c17603
// compileTypeReference compiles the given AST type reference into a TypeSpec. // // The returned TypeSpec may need to be linked eventually.
c17604
// NewServer builds a new server.
c17605
// Handle handles the given binary payload.
c17606
// Helper to build TApplicationException wire.Values
c17607
// Name is the combined name of this plugin
c17608
// Close closes all Handles associated with this MultiHandle.
c17609
// ServiceGenerator returns a ServiceGenerator which calls into the // ServiceGenerators of all plugins associated with this MultiHandle and // consolidates their results.
c17610
// Handle returns a reference to the Handle that owns this ServiceGenerator.
c17611
// Generate calls all the service generators associated with this plugin and // consolidates their output. // // Any conflicts in the generated files will result in a failure.
c17612
// NewTransportHandle builds a new Handle which speaks to the given transport. // // If the transport is an io.Closer, it will be closed when the handle is closed.
c17613
// Service generates code for the given service. // // Returns a map from file name to contents for that file. The file names are // relative to the package directory for the service.
c17614
// ServiceFunction generates code for the given function of the given service.
c17615
// functionParams returns a named parameter list for the given function.
c17616
// functionNewArgs generates an expression which provides the NewArgs function // for the given Thrift function.
c17617
// BorrowWriter fetches a Writer from the system that will write its output to // the given io.Writer. // // This Writer must be returned back using ReturnWriter.
c17618
// WriteValue writes the given Thrift value to the underlying stream using the // Thrift Binary Protocol.
c17619
// Info for Constant
c17620
// Info for Typedef.
c17621
// Info for Enum.
c17622
// Info for Struct.
c17623
// Info for Service.
c17624
// curryGenerator adds g as the first argument to f if f accepts it. Otherwise f // is returned unmodified.
c17625
// NewGenerator sets up a new generator for Go code.
c17626
// checkNoZap returns whether the NoZap flag is passed.
c17627
// TextTemplate renders the given template with the given template context.
c17628
// appendDecl appends a new declaration to the generator.
c17629
// Generate generates code based on the given options.
c17630
// Visit the given node and its descendants.
c17631
// Handle gets a Handle to this plugin specification. // // The returned handle MUST be closed by the caller if error was nil.
c17632
// UnmarshalFlag parses a string specification of a plugin.
c17633
// Handle gets a MultiHandle to all the plugins in this list or nil if the // list is empty. // // The returned handle MUST be closed by the caller if error was nil.
c17634
// ToWirePtr is the same as ToWire expect `varName` is expected to be a // reference to a value of the given type.
c17635
// FromWirePtr generates a string assigning the given Value to the given lhs, // which is a pointer to a value of the given type. // // A variable err of type error MUST be in scope and will be assigned the // parse error, if any.
c17636
// TypeCode gets an expression of type 'wire.Type' that represents the // over-the-wire type code for the given TypeSpec.
c17637
// isRequired checks if a field should be required based on the // fieldRequiredness setting. An error is returned if the specified requiredness // is disallowed by this configuration.
c17638
// compileField compiles the given Field source into a FieldSpec.
c17639
// Link links together any references made by the FieldSpec.
c17640
// compileFields compiles a collection of AST fields into a FieldGroup.
c17641
// FindByName retrieves the FieldSpec for the field with the given name.
c17642
// Link resolves references made by fields inside the FieldGroup.
c17643
// ForEachTypeReference applies the given function on each TypeSpec in the // FieldGroup.
c17644
// LookupType for Module.
c17645
// LookupConstant for Module.
c17646
// LookupService for Module.
c17647
// LookupInclude for Module.
c17648
// Walk the module tree starting at the given module. This module and all its // direct and transitive dependencies will be visited exactly once in an // unspecified order. The walk will stop on the first error returned by `f`.
c17649
// compileConstantValue compiles a constant value AST into a ConstantValue.
c17650
// Link for ConstantBool
c17651
// Link for ConstantInt.
c17652
// Link for ConstantString.
c17653
// Link for ConstantDouble.
c17654
// buildConstantStruct builds a constant struct from a ConstantMap.
c17655
// Link for ConstantStruct
c17656
// Link for ConstantMap.
c17657
// Link for ConstantSet.
c17658
// Link for ConstantList.
c17659
// Link for ConstReference.
c17660
// Link for EnumItemReference.
c17661
// Link a constantReference. // // This resolves the reference to a ConstReference or an EnumItemReference.
c17662
// lookupEnum looks up an enum with the given name in the given scope.
c17663
// NewClient starts up the given external process and communicates with it over // stdin and stdout using framed requests and responses. // // The Cmd MUST NOT have Stdout or Stdin set.
c17664
// Send sends the given frame to the external process and returns the response. // // Panics if Close was already called.
c17665
// Close detaches from the external process and waits for it to exit.
c17666
// Equals returns true if all the fields of this Plugin_Goodbye_Args match the // provided Plugin_Goodbye_Args. // // This function performs a deep comparison.
c17667
// Equals returns true if all the fields of this Plugin_Goodbye_Result match the // provided Plugin_Goodbye_Result. // // This function performs a deep comparison.
c17668
// LineNumber returns the line in the file at which the given node was defined // or 0 if the Node does not record its line number.
c17669
// Read reads the next frame from the Reader.
c17670
// Close closes the given Reader.
c17671
// unsafeStringToBytes converts a string into a byte slice without allocating // new memory for it with the assumption that the resulting byte slice will not // be mutated.
c17672
// typedef generates code for the given typedef.
c17673
// EncodeResponse writes the response to the writer using a non-strict // envelope.
c17674
// visited returns true if the given TypeSpec has already been visited. // Otherwise it returns false, and marks the TypeSpec as visited.
c17675
// cloneWithPart creates a copy of this typeCycleFinder with the given // TypeSpec added to the chain.
c17676
// newImporter builds a new importer.
c17677
// AddImportSpec allows adding existing import specs to the importer. // // An error is returned if there's a naming conflict.
c17678
// Import ensures that the generated module has the given module imported and // returns the name that should be used by the generated code to reference items // defined in the module.
c17679
// importDecl builds an import declation from the given list of imports.
c17680
// Write writes an Envelope to the given writer.
c17681
// ReadReply reads enveloped responses from the given reader.
c17682
// compileMapType compiles the given MapType AST into a MapSpec.
c17683
// Link resolves the type references in the MapSpec.
c17684
// ThriftName for MapSpec
c17685
// ForEachTypeReference for MapSpec
c17686
// compileListSpec compiles the given ListType AST into a ListSpec.
c17687
// Link resolves the type references in the ListSpec.
c17688
// ForEachTypeReference for ListSpec
c17689
// compileSetSpec compiles the given SetType AST into a SetSpec.
c17690
// Link resolves the type references in the SetSpec.
c17691
// ForEachTypeReference for SetSpec
c17692
// compileStruct compiles a struct AST into a StructSpec.
c17693
// Link links together all references in the StructSpec.
c17694
// ForEachTypeReference for StructSpec
c17695
// verifyAncestry verifies that the Thrift file for the given module and the // Thrift files for all imported modules are contained within the directory // tree rooted at the given path.
c17696
// findCommonAncestor finds the deepest common ancestor for the given module // and all modules imported by it.
c17697
// commonPrefix finds the shortest common prefix for the two lists. // // An empty slice may be returned if the two lists don't have a common prefix.
c17698
// determinePackagePrefix determines the package prefix for Go packages // generated in this file. // // dir must be an absolute path.
c17699
// Parse a semantic version string.