Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/golang/protobuf
/ functions
Functions
1,635 in github.com/golang/protobuf
⨍
Functions
1,635
◇
Types & classes
204
↓ 101 callers
Method
Marshal
Marshal formats the encoded bytes of the message. It should be deterministic and emit valid protobuf wire data. The caller takes ownership of the retu
proto/proto.go:79
↓ 86 callers
Method
Unmarshal
Unmarshal parses the encoded bytes of the protobuf wire input. The provided buffer is only valid for during method call. It should not reset the recei
proto/proto.go:91
↓ 71 callers
Function
CompactTextString
CompactTextString returns a compact proto text formatted string of m.
proto/text_encode.go:106
↓ 69 callers
Method
Merge
Merge merges the contents of src into the receiver message. It clones all data structures in src such that it aliases no mutable memory referenced by
proto/proto.go:102
↓ 68 callers
Method
Size
Deprecated: Do not use; this method existed for intenal-use only.
proto/deprecated.go:106
↓ 67 callers
Method
DiscardUnknown
Deprecated: Do not use; this method existed for intenal-use only.
proto/deprecated.go:91
↓ 52 callers
Function
Marshal
Marshal returns the wire-format encoding of m.
proto/wire.go:22
↓ 47 callers
Function
String
String stores v in a new string value and returns a pointer to it.
proto/wrappers.go:34
↓ 44 callers
Function
Unmarshal
Unmarshal parses a wire-format message in b and places the decoded results in m. Unmarshal resets m before starting to unmarshal, so any existing dat
proto/wire.go:56
↓ 43 callers
Function
Equal
Equal reports whether two messages are equal. If two messages marshal to the same bytes under deterministic serialization, then Equal is guaranteed to
proto/proto.go:160
↓ 40 callers
Function
Int32
Int32 stores v in a new int32 value and returns a pointer to it.
proto/wrappers.go:16
↓ 30 callers
Method
New
()
ptypes/any.go:165
↓ 26 callers
Method
Error
()
proto/text_decode.go:32
↓ 26 callers
Method
GetName
()
internal/testprotos/proto3_proto/test.pb.go:106
↓ 26 callers
Function
SetExtension
SetExtension sets an extension field in m to the provided value.
proto/extensions.go:223
↓ 25 callers
Method
Bytes
Bytes returns the internal buffer.
proto/buffer.go:99
↓ 25 callers
Method
Interface
()
ptypes/any.go:168
↓ 23 callers
Method
P
P prints the arguments to the generated output. It handles strings and int32s, plus handling indirections because they may be *string, etc. Any inpu
protoc-gen-go/generator/generator.go:1008
↓ 22 callers
Method
Descriptor
()
descriptor/descriptor.go:34
↓ 17 callers
Function
Bool
Bool stores v in a new bool value and returns a pointer to it.
proto/wrappers.go:8
↓ 17 callers
Method
GetUnion
()
internal/testprotos/proto2_proto/test.pb.go:3209
↓ 16 callers
Method
Enum
()
internal/testprotos/proto2_proto/test.pb.go:37
↓ 16 callers
Function
Int64
Int64 stores v in a new int64 value and returns a pointer to it.
proto/wrappers.go:19
↓ 15 callers
Method
Name
Name identifies the plugin.
protoc-gen-go/generator/generator.go:59
↓ 14 callers
Function
initGoTest
(setdefaults bool)
proto/proto_test.go:58
↓ 13 callers
Method
Fail
Fail reports a problem and exits the program.
protoc-gen-go/generator/generator.go:439
↓ 13 callers
Method
Len
()
proto/properties.go:304
↓ 13 callers
Function
MessageReflect
MessageReflect returns a reflective view for a message. It returns nil if m is nil.
proto/proto.go:66
↓ 12 callers
Function
CamelCase
CamelCase returns the CamelCased name. If there is an interior underscore followed by a lower case letter, drop the underscore and convert the letter
protoc-gen-go/generator/generator.go:2648
↓ 12 callers
Function
Float64
Float64 stores v in a new float64 value and returns a pointer to it.
proto/wrappers.go:31
↓ 12 callers
Function
UnmarshalText
UnmarshalText parses a proto text formatted string into m.
proto/text_decode.go:43
↓ 11 callers
Function
MessageV2
MessageV2 converts either a v1 or v2 message to a v2 message. It returns nil if m is nil.
proto/proto.go:60
↓ 11 callers
Method
P
P forwards to g.gen.P.
protoc-gen-go/grpc/grpc.go:78
↓ 11 callers
Method
TypeName
()
protoc-gen-go/generator/generator.go:379
↓ 10 callers
Method
Has
(n2 protoreflect.FieldNumber)
proto/extensions.go:354
↓ 10 callers
Method
String
()
proto/proto_test.go:1304
↓ 10 callers
Method
Write
(p []byte)
proto/text_encode.go:125
↓ 9 callers
Function
Clone
Clone returns a deep copy of src.
proto/proto.go:129
↓ 9 callers
Function
EnumName
Deprecated: Do not use.
proto/deprecated.go:57
↓ 9 callers
Function
Float32
Float32 stores v in a new float32 value and returns a pointer to it.
proto/wrappers.go:28
↓ 9 callers
Function
GetExtension
GetExtension retrieves a proto2 extended field from m. If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), then GetExt
proto/extensions.go:120
↓ 9 callers
Function
MessageName
MessageName returns the full protobuf name for the given message type. Deprecated: Use protoreflect.MessageDescriptor.FullName instead.
proto/registry.go:264
↓ 9 callers
Method
ProtoReflect
()
ptypes/any.go:153
↓ 9 callers
Function
Uint32
Uint32 stores v in a new uint32 value and returns a pointer to it.
proto/wrappers.go:22
↓ 8 callers
Method
MarshalToString
MarshalToString serializes a protobuf message as JSON in string form.
jsonpb/encode.go:77
↓ 8 callers
Method
ObjectNamed
ObjectNamed, given a fully-qualified input type name as it appears in the input data, returns the descriptor for the message or enum with that name.
protoc-gen-go/generator/generator.go:953
↓ 8 callers
Function
Uint64
Uint64 stores v in a new uint64 value and returns a pointer to it.
proto/wrappers.go:25
↓ 8 callers
Method
errorf
(format string, a ...interface{})
proto/text_decode.go:534
↓ 8 callers
Method
next
Advances the parser and returns the new current token.
proto/text_decode.go:620
↓ 7 callers
Method
String
()
proto/text_test.go:300
↓ 7 callers
Function
UnmarshalJSONEnum
Deprecated: Do not use.
proto/deprecated.go:66
↓ 7 callers
Method
WriteByte
(c byte)
proto/text_encode.go:164
↓ 7 callers
Method
write
(s string)
jsonpb/encode.go:126
↓ 6 callers
Function
Annotate
Annotate records the file name and proto AST path of a list of atoms so that a later call to P can emit a link from each atom to its origin.
protoc-gen-go/generator/generator.go:970
↓ 6 callers
Function
CamelCaseSlice
CamelCaseSlice is like CamelCase, but the argument is a slice of strings to be joined with "_".
protoc-gen-go/generator/generator.go:2689
↓ 6 callers
Method
GetUnion
()
internal/testprotos/jsonpb_proto/test2.pb.go:661
↓ 6 callers
Method
GetUnion
()
internal/testprotos/proto2_proto/test.pb.go:3511
↓ 6 callers
Function
MarshalAny
MarshalAny marshals the given message m into an anypb.Any message. Deprecated: Call the anypb.New function instead.
ptypes/any.go:45
↓ 6 callers
Method
Reset
Reset clears the internal buffer of all written and unread data.
proto/buffer.go:93
↓ 6 callers
Method
Reset
()
proto/proto_test.go:1303
↓ 6 callers
Function
SetDefaults
SetDefaults sets unpopulated scalar fields to their default values. Fields within a oneof are not set even if they have a default value. SetDefaults i
proto/defaults.go:14
↓ 6 callers
Function
Size
Size returns the size in bytes of the wire-format encoding of m.
proto/wire.go:13
↓ 6 callers
Method
Type
()
ptypes/any.go:162
↓ 6 callers
Function
overify
(t *testing.T, pb *pb2.GoTest, want []byte)
proto/proto_test.go:100
↓ 5 callers
Method
FindMessageByURL
(url string)
jsonpb/json.go:35
↓ 5 callers
Method
Marshal
Marshal appends the wire-format encoding of m to the buffer.
proto/buffer.go:109
↓ 5 callers
Function
MarshalText
MarshalText writes the proto text format of m to w.
proto/text_encode.go:97
↓ 5 callers
Function
MarshalTextString
MarshalTextString returns a proto text formatted string of m.
proto/text_encode.go:100
↓ 5 callers
Function
RegisterType
map[messageName]reflect.Type RegisterType is called from generated code to register the message Go type for a message of the given name. Deprecated:
proto/registry.go:179
↓ 5 callers
Method
Text
Text returns a proto text formatted string of m.
proto/text_encode.go:43
↓ 5 callers
Function
UnmarshalMerge
UnmarshalMerge parses a wire-format message in b and places the decoded results in m.
proto/wire.go:62
↓ 5 callers
Function
cleanPackageName
(name string)
protoc-gen-go/generator/generator.go:622
↓ 5 callers
Function
initGoTestField
()
proto/proto_test.go:30
↓ 5 callers
Method
typeName
Given a type name defined in a .proto, return its name as we will print it.
protoc-gen-go/grpc/grpc.go:73
↓ 4 callers
Function
ClearExtension
ClearExtension removes the extension field from m either as an explicitly populated field or as an unknown field.
proto/extensions.go:73
↓ 4 callers
Method
EncodeVarint
EncodeVarint appends an unsigned varint encoding to the buffer.
proto/buffer.go:140
↓ 4 callers
Method
GoImportPath
()
protoc-gen-go/generator/generator.go:378
↓ 4 callers
Method
GoPackageName
GoPackageName returns the name used for a package.
protoc-gen-go/generator/generator.go:515
↓ 4 callers
Method
Init
Init is called once after data structures are built but before code generation begins.
protoc-gen-go/generator/generator.go:62
↓ 4 callers
Function
MessageV1
MessageV1 converts either a v1 or v2 message to a v1 message. It returns nil if m is nil.
proto/proto.go:54
↓ 4 callers
Method
Parse
Parse populates p by parsing a string in the protobuf struct field tag style.
proto/properties.go:137
↓ 4 callers
Method
PrintComments
PrintComments prints any comments from the source .proto file. The path is a comma-separated list of integers. It returns an indication of whether any
protoc-gen-go/generator/generator.go:1227
↓ 4 callers
Function
RegisterEnum
map[protoreflect.FullName]int RegisterEnum is called from the generated code to register the mapping of enum value names to enum numbers for the enum
proto/registry.go:96
↓ 4 callers
Function
RegisterFile
map[filePath]fileDescGZIP RegisterFile is called from generated code to register the compressed FileDescriptorProto with the file path for a proto sou
proto/registry.go:34
↓ 4 callers
Function
RegisterMapType
RegisterMapType is called from generated code to register the Go map type for a protobuf message representing a map entry. Deprecated: Do not use.
proto/registry.go:191
↓ 4 callers
Method
String
()
proto/buffer.go:126
↓ 4 callers
Method
String
()
protoc-gen-go/generator/generator.go:82
↓ 4 callers
Function
Unmarshal
Unmarshal unmarshals a JSON object from r into m.
jsonpb/decode.go:33
↓ 4 callers
Function
UnmarshalString
UnmarshalString unmarshals a JSON object from s into m.
jsonpb/decode.go:38
↓ 4 callers
Method
addExport
(obj Object, sym symbol)
protoc-gen-go/generator/generator.go:317
↓ 4 callers
Method
back
Back off the parser by one token. Can only be done between calls to next(). It makes the next advance() a no-op.
proto/text_decode.go:617
↓ 4 callers
Function
clearUnknown
clearUnknown removes unknown fields from m where remover.Has reports true.
proto/extensions.go:336
↓ 4 callers
Function
isRequiredNotSetError
When hooks are enabled, RequiredNotSetError is typed alias to internal/proto package. Binary serialization has not been wrapped yet and hence produces
proto/proto_test.go:132
↓ 4 callers
Function
isValidExtension
isValidExtension reports whether xtd is a valid extension descriptor for md.
proto/extensions.go:319
↓ 4 callers
Method
proto3
()
protoc-gen-go/generator/generator.go:109
↓ 3 callers
Method
AddImport
AddImport adds a package to the generated file's import section. It returns the name used for the package.
protoc-gen-go/generator/generator.go:530
↓ 3 callers
Function
Compute
Compute constructs a location mapping from input to output. An error is reported if any of the tokens of output cannot be mapped.
protoc-gen-go/generator/internal/remap/remap.go:44
↓ 3 callers
Method
DecodeVarint
DecodeVarint consumes an encoded unsigned varint from the buffer.
proto/buffer.go:189
↓ 3 callers
Method
DefaultPackageName
DefaultPackageName returns the package name printed for the object. If its file is in a different package, it returns the package name we're using for
protoc-gen-go/generator/generator.go:506
↓ 3 callers
Function
DiscardUnknown
DiscardUnknown recursively discards all unknown fields from this message and all embedded messages. When unmarshaling a message with unrecognized fie
proto/discard.go:19
next →
1–100 of 1,635, ranked by callers