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
↓ 3 callers
Function
Empty
Empty returns a new message of the type specified in an anypb.Any message. It returns protoregistry.NotFound if the corresponding message type could n
ptypes/any.go:68
↓ 3 callers
Method
Error
Error reports a problem, including an error, and exits the program.
protoc-gen-go/generator/generator.go:432
↓ 3 callers
Method
File
()
protoc-gen-go/generator/generator.go:380
↓ 3 callers
Method
FindMessageByName
(message protoreflect.FullName)
jsonpb/json.go:31
↓ 3 callers
Function
HasExtension
HasExtension reports whether the extension field is present in m either as an explicitly populated field or as an unknown field.
proto/extensions.go:45
↓ 3 callers
Function
Is
Is reports whether the Any message contains a message of the specified type. Deprecated: Call the any.MessageIs method instead.
ptypes/any.go:114
↓ 3 callers
Method
RecordTypeUse
(t string)
protoc-gen-go/generator/generator.go:1640
↓ 3 callers
Method
Resolve
(typeURL string)
jsonpb/json.go:26
↓ 3 callers
Function
Timestamp
Timestamp converts a timestamppb.Timestamp to a time.Time. It returns an error if the argument is invalid. Unlike most Go functions, if Timestamp ret
ptypes/timestamp.go:38
↓ 3 callers
Function
UnmarshalAny
UnmarshalAny unmarshals the encoded value contained in the anypb.Any message into the provided message m. It returns an error if the target message do
ptypes/any.go:88
↓ 3 callers
Method
UnmarshalNext
UnmarshalNext unmarshals the next JSON object from d into m.
jsonpb/decode.go:72
↓ 3 callers
Method
VarName
VarName is the variable name we'll use in the generated code to refer to the compressed bytes of this descriptor. It is not exported, so it is only va
protoc-gen-go/generator/generator.go:266
↓ 3 callers
Method
Zero
()
ptypes/any.go:177
↓ 3 callers
Method
addInitf
addInitf stores the given statement to be printed inside the file's init function. The statement is given as a format specifier and arguments.
protoc-gen-go/generator/generator.go:1046
↓ 3 callers
Method
checkForColon
Consume a ':' from the input stream (if the next token is a colon), returning an error if a colon is needed but not present.
proto/text_decode.go:475
↓ 3 callers
Function
checkRequiredNotSet
(m protoV2.Message)
proto/proto.go:121
↓ 3 callers
Method
consumeOptionalSeparator
consumeOptionalSeparator consumes an optional semicolon or comma. It is used in unmarshalMessage to provide backward compatibility.
proto/text_decode.go:523
↓ 3 callers
Method
goPackageOption
goPackageOption interprets the file's go_package option. If there is no go_package, it returns ("", "", false). If there's a simple name, it returns (
protoc-gen-go/generator/generator.go:275
↓ 3 callers
Function
isQuote
(c byte)
proto/text_decode.go:795
↓ 3 callers
Function
isRepeated
Is this field repeated?
protoc-gen-go/generator/generator.go:2705
↓ 3 callers
Function
marshalAppend
(buf []byte, m Message, deterministic bool)
proto/wire.go:32
↓ 3 callers
Method
marshalMessage
(m protoreflect.Message, indent, typeURL string)
jsonpb/encode.go:130
↓ 3 callers
Function
newTestMessage
()
proto/text_test.go:303
↓ 3 callers
Method
prefix
Everything but the last element of the full type name, CamelCased. The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... .
protoc-gen-go/generator/generator.go:176
↓ 3 callers
Function
unexport
(s string)
internal/gengogrpc/grpc.go:398
↓ 3 callers
Function
unexport
(s string)
protoc-gen-go/grpc/grpc.go:114
↓ 3 callers
Method
unmarshalMessage
(m protoreflect.Message, terminator string)
proto/text_decode.go:91
↓ 3 callers
Function
validateTimestamp
validateTimestamp determines whether a Timestamp is valid. A valid timestamp represents a time in the range [0001-01-01, 10000-01-01) and has a Nanos
ptypes/timestamp.go:98
↓ 3 callers
Function
wellKnownType
(s protoreflect.FullName)
jsonpb/json.go:51
↓ 3 callers
Method
writeIndent
()
proto/text_encode.go:552
↓ 3 callers
Method
writeMessage
(m protoreflect.Message)
proto/text_encode.go:261
↓ 2 callers
Function
ClearAllExtensions
ClearAllExtensions clears all extensions from m. This includes populated fields and unknown fields in the extension range.
proto/extensions.go:96
↓ 2 callers
Method
DecodeRawBytes
DecodeRawBytes consumes a length-prefixed raw bytes from the buffer. If alloc is specified, it returns a copy the raw bytes rather than a sub-slice of
proto/buffer.go:239
↓ 2 callers
Method
EncodeRawBytes
EncodeRawBytes appends a length-prefixed raw bytes to the buffer.
proto/buffer.go:168
↓ 2 callers
Function
EncodeVarint
EncodeVarint returns the varint encoded bytes of v.
proto/buffer.go:26
↓ 2 callers
Function
EnumRawDescriptor
EnumRawDescriptor returns the GZIP'd raw file descriptor representing the enum and the index path to reach the enum declaration. The returned slices m
descriptor/descriptor.go:100
↓ 2 callers
Function
ExtensionDescs
ExtensionDescs returns a list of extension descriptors found in m, containing descriptors for both populated extension fields in m and also unknown fi
proto/extensions.go:279
↓ 2 callers
Function
GenerateFileContent
GenerateFileContent generates the gRPC service definitions, excluding the package statement.
internal/gengogrpc/grpc.go:41
↓ 2 callers
Function
GetExtensions
GetExtensions returns a list of the extensions values present in m, corresponding with the provided list of extension descriptors, xts. If an extensio
proto/extensions.go:202
↓ 2 callers
Method
GetNumber
()
internal/testprotos/proto2_proto/test.pb.go:3518
↓ 2 callers
Method
GoType
GoType returns a string representing the type name, and the wire type
protoc-gen-go/generator/generator.go:1583
↓ 2 callers
Function
Int
Int stores v in a new int32 value and returns a pointer to it. Deprecated: Use Int32 instead.
proto/wrappers.go:13
↓ 2 callers
Method
Len
()
protoc-gen-go/generator/generator.go:2430
↓ 2 callers
Method
MarshalJSONPB
(*Marshaler)
jsonpb/encode.go:62
↓ 2 callers
Method
MarshalText
()
proto/text_test.go:288
↓ 2 callers
Function
Merge
Merge merges src into dst, which must be messages of the same type. Populated scalar fields in src are copied to dst, while populated singular messag
proto/proto.go:141
↓ 2 callers
Function
MessageDescriptorProto
MessageDescriptorProto returns the file descriptor proto representing the message and the message descriptor proto for the message itself. The returne
descriptor/descriptor.go:169
↓ 2 callers
Function
MessageRawDescriptor
MessageRawDescriptor returns the GZIP'd raw file descriptor representing the message and the index path to reach the message declaration. The returned
descriptor/descriptor.go:111
↓ 2 callers
Function
NewBuffer
NewBuffer allocates a new Buffer initialized with buf, where the contents of buf are considered the unread portion of the buffer.
proto/buffer.go:57
↓ 2 callers
Function
RegisterExtension
RegisterExtension is called from the generated code to register the extension descriptor. Deprecated: Use protoregistry.GlobalTypes.RegisterExtension
proto/registry.go:278
↓ 2 callers
Method
SetBuf
SetBuf sets buf as the internal buffer, where the contents of buf are considered the unread portion of the buffer.
proto/buffer.go:87
↓ 2 callers
Method
SetDeterministic
SetDeterministic specifies whether to use deterministic serialization. Deterministic serialization guarantees that for a given binary, equal messages
proto/buffer.go:81
↓ 2 callers
Function
SetRawExtension
SetRawExtension inserts b into the unknown fields of m. Deprecated: Use Message.ProtoReflect.SetUnknown instead.
proto/extensions.go:254
↓ 2 callers
Method
String
()
jsonpb/json_test.go:1076
↓ 2 callers
Function
TimestampProto
TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. It returns an error if the resulting Timestamp is invalid. Deprecated: Ca
ptypes/timestamp.go:65
↓ 2 callers
Method
TypeName
TypeName is the printed name appropriate for an item. If the object is in the current file, TypeName drops the package name and underscores the rest.
protoc-gen-go/generator/generator.go:1578
↓ 2 callers
Method
UnmarshalJSONPB
(*Unmarshaler, []byte)
jsonpb/decode.go:63
↓ 2 callers
Function
anyMessageName
(any *anypb.Any)
ptypes/any.go:28
↓ 2 callers
Function
baseName
baseName returns the last path element of the name, with the last dotted suffix removed.
protoc-gen-go/generator/generator.go:2746
↓ 2 callers
Function
benchmarkMarshal
(b *testing.B, pb proto.Message, marshal func(proto.Message) ([]byte, error))
proto/proto_test.go:2235
↓ 2 callers
Function
check
(err error)
internal/cmd/generate-alias/main.go:128
↓ 2 callers
Function
clientSignature
(g *protogen.GeneratedFile, method *protogen.Method)
internal/gengogrpc/grpc.go:205
↓ 2 callers
Function
compact
(src string)
proto/text_test.go:468
↓ 2 callers
Method
consumeToken
(s string)
proto/text_decode.go:650
↓ 2 callers
Method
defaultConstantName
defaultConstantName builds the name of the default constant from the message type name and the untouched field name, e.g. "Default_MessageType_FieldNa
protoc-gen-go/generator/generator.go:1734
↓ 2 callers
Function
deriveFileDescriptor
map[*byte]*descriptorpb.FileDescriptorProto
descriptor/descriptor.go:121
↓ 2 callers
Function
deriveRawDescriptor
map[protoreflect.Descriptor]*rawDesc
descriptor/descriptor.go:56
↓ 2 callers
Method
fileByName
(filename string)
protoc-gen-go/generator/generator.go:1253
↓ 2 callers
Function
fileIsProto3
(file *descriptor.FileDescriptorProto)
protoc-gen-go/generator/generator.go:105
↓ 2 callers
Method
generateClientSignature
generateClientSignature returns the client-side signature for a method.
protoc-gen-go/grpc/grpc.go:294
↓ 2 callers
Method
generateExtension
(ext *ExtensionDescriptor)
protoc-gen-go/generator/generator.go:2505
↓ 2 callers
Method
goTag
The tag is a string like "varint,2,opt,name=fieldname,def=7" that identifies details of the field for the protocol buffer marshaling and unmarshaling
protoc-gen-go/generator/generator.go:1447
↓ 2 callers
Function
hasPrefixAndSuffix
(prefix byte, in []byte, suffix byte)
jsonpb/decode.go:516
↓ 2 callers
Function
initGoTest_RepeatedGroup
()
proto/proto_test.go:52
↓ 2 callers
Function
isMessageSet
(md protoreflect.MessageDescriptor)
proto/proto.go:164
↓ 2 callers
Function
isMessageSet
(md protoreflect.MessageDescriptor)
jsonpb/json.go:66
↓ 2 callers
Function
isScalarKind
isScalarKind reports whether k is a protobuf scalar kind (except bytes). This function exists for historical reasons since the representation of scala
proto/extensions.go:326
↓ 2 callers
Method
makeComments
makeComments generates the comment string for the field, no "\n" at the end
protoc-gen-go/generator/generator.go:1239
↓ 2 callers
Method
marshal
(m Message)
proto/text_encode.go:48
↓ 2 callers
Method
marshal
(m proto.Message)
jsonpb/encode.go:85
↓ 2 callers
Method
marshalTypeURL
(indent, typeURL string)
jsonpb/encode.go:371
↓ 2 callers
Method
marshalValue
(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string)
jsonpb/encode.go:420
↓ 2 callers
Function
messageGoType
(mt protoreflect.MessageType)
proto/registry.go:257
↓ 2 callers
Function
needsStar
(typ descriptor.FieldDescriptorProto_Type)
protoc-gen-go/generator/generator.go:1561
↓ 2 callers
Method
skipWhitespace
()
proto/text_decode.go:541
↓ 2 callers
Method
unmarshalMessage
(m protoreflect.Message, in []byte)
jsonpb/decode.go:134
↓ 2 callers
Method
unmarshalValue
(v protoreflect.Value, fd protoreflect.FieldDescriptor)
proto/text_decode.go:258
↓ 2 callers
Function
unquoteC
(s string, quote rune)
proto/text_decode.go:664
↓ 2 callers
Function
validateDuration
validateDuration determines whether the durationpb.Duration is valid according to the definition in google/protobuf/duration.proto. A valid durpb.Dura
ptypes/duration.go:61
↓ 2 callers
Method
writeComma
()
jsonpb/encode.go:305
↓ 2 callers
Method
writeQuotedString
writeQuotedString writes a quoted string in the protocol buffer text format.
proto/text_encode.go:407
↓ 2 callers
Method
writeSingularValue
(v protoreflect.Value, fd protoreflect.FieldDescriptor)
proto/text_encode.go:354
↓ 1 callers
Function
AnyMessageName
AnyMessageName returns the message name contained in an anypb.Any message. Most type assertions should use the Is function instead. Deprecated: Call
ptypes/any.go:24
↓ 1 callers
Method
DecodeFixed32
DecodeFixed32 consumes a 32-bit little-endian integer from the buffer.
proto/buffer.go:217
↓ 1 callers
Method
DecodeFixed64
DecodeFixed64 consumes a 64-bit little-endian integer from the buffer.
proto/buffer.go:227
↓ 1 callers
Method
DecodeStringBytes
DecodeStringBytes consumes a length-prefixed raw bytes from the buffer. It does not validate whether the raw bytes contain valid UTF-8.
proto/buffer.go:253
↓ 1 callers
Method
DecodeZigzag32
DecodeZigzag32 consumes an encoded 32-bit zig-zag varint from the buffer.
proto/buffer.go:199
↓ 1 callers
Method
DecodeZigzag64
DecodeZigzag64 consumes an encoded 64-bit zig-zag varint from the buffer.
proto/buffer.go:208
↓ 1 callers
Method
DescName
DescName returns the variable name used for the generated descriptor.
protoc-gen-go/generator/generator.go:221
↓ 1 callers
Function
Duration
Duration converts a durationpb.Duration to a time.Duration. Duration returns an error if dur is invalid or overflows a time.Duration. Deprecated: Cal
ptypes/duration.go:26
← previous
next →
101–200 of 1,635, ranked by callers