MCPcopy
hub / github.com/golang/protobuf

github.com/golang/protobuf @v1.5.4 sqlite

repository ↗ · DeepWiki ↗ · release v1.5.4 ↗
1,839 symbols 4,590 edges 51 files 360 documented · 20%
README

Go support for Protocol Buffers

GoDev Build Status

This module (github.com/golang/protobuf) contains Go bindings for protocol buffers.

It has been superseded by the google.golang.org/protobuf module, which contains an updated and simplified API, support for protobuf reflection, and many other improvements. We recommend that new code use the google.golang.org/protobuf module.

Versions v1.4 and later of github.com/golang/protobuf are implemented in terms of google.golang.org/protobuf. Programs which use both modules must use at least version v1.4 of this one.

See the developer guide for protocol buffers in Go for a general guide for how to get started using protobufs in Go.

See release note documentation for more information about individual releases of this project.

See documentation for the next major revision for more information about the purpose, usage, and history of this project.

Package index

Summary of the packages provided by this module:

  • proto: Package proto provides functions operating on protobuf messages such as cloning, merging, and checking equality, as well as binary serialization and text serialization.
  • jsonpb: Package jsonpb serializes protobuf messages as JSON.
  • ptypes: Package ptypes provides helper functionality for protobuf well-known types.
  • ptypes/any: Package any is the generated package for google/protobuf/any.proto.
  • ptypes/empty: Package empty is the generated package for google/protobuf/empty.proto.
  • ptypes/timestamp: Package timestamp is the generated package for google/protobuf/timestamp.proto.
  • ptypes/duration: Package duration is the generated package for google/protobuf/duration.proto.
  • ptypes/wrappers: Package wrappers is the generated package for google/protobuf/wrappers.proto.
  • ptypes/struct: Package structpb is the generated package for google/protobuf/struct.proto.
  • protoc-gen-go/descriptor: Package descriptor is the generated package for google/protobuf/descriptor.proto.
  • protoc-gen-go/plugin: Package plugin is the generated package for google/protobuf/compiler/plugin.proto.
  • protoc-gen-go: The protoc-gen-go binary is a protoc plugin to generate a Go protocol buffer package.

Reporting issues

The issue tracker for this project is located here.

Please report any issues with a sufficient description of the bug or feature request. Bug reports should ideally be accompanied by a minimal reproduction of the issue. Irreproducible bugs are difficult to diagnose and fix (and likely to be closed after some period of time). Bug reports must specify the version of the Go protocol buffer module and also the version of the protocol buffer toolchain being used.

Contributing

This project is open-source and accepts contributions. See the contribution guide for more information.

Compatibility

This module and the generated code are expected to be stable over time. However, we reserve the right to make breaking changes without notice for the following reasons:

  • Security: A security issue in the specification or implementation may come to light whose resolution requires breaking compatibility. We reserve the right to address such issues.
  • Unspecified behavior: There are some aspects of the protocol buffer specification that are undefined. Programs that depend on unspecified behavior may break in future releases.
  • Specification changes: It may become necessary to address an inconsistency, incompleteness, or change in the protocol buffer specification, which may affect the behavior of existing programs. We reserve the right to address such changes.
  • Bugs: If a package has a bug that violates correctness, a program depending on the buggy behavior may break if the bug is fixed. We reserve the right to fix such bugs.
  • Generated additions: We reserve the right to add new declarations to generated Go packages of .proto files. This includes declared constants, variables, functions, types, fields in structs, and methods on types. This may break attempts at injecting additional code on top of what is generated by protoc-gen-go. Such practice is not supported by this project.
  • Internal changes: We reserve the right to add, modify, and remove internal code, which includes all unexported declarations, the generator package, and all packages under internal.

Any breaking changes outside of these will be announced 6 months in advance to protobuf@googlegroups.com.

Extension points exported contracts — how you extend this code

Marshaler (Interface)
Marshaler is implemented by messages that can marshal themselves. This interface is used by the following functions: Siz [6 …
proto/proto.go
Message (Interface)
Message is proto.Message with a method to return its descriptor. Deprecated: The Descriptor method may not be generated [70 …
descriptor/descriptor.go
JSONPBUnmarshaler (Interface)
JSONPBUnmarshaler is implemented by protobuf messages that customize the way they are unmarshaled from JSON. Messages th [2 …
jsonpb/decode.go
Plugin (Interface)
A Plugin provides functionality to add to the output during Go code generation, such as to produce RPC stubs. [1 implementers]
protoc-gen-go/generator/generator.go
JSONPBMarshaler (Interface)
JSONPBMarshaler is implemented by protobuf messages that customize the way they are marshaled to JSON. Messages that imp [1 …
jsonpb/encode.go
AnyResolver (Interface)
AnyResolver takes a type URL, present in an Any message, and resolves it into an instance of the associated message.
jsonpb/json.go
Unmarshaler (Interface)
Unmarshaler is implemented by messages that can unmarshal themselves. This interface is used by the following functions: [3 …
proto/proto.go
Object (Interface)
Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects.
protoc-gen-go/generator/generator.go

Core symbols most depended-on inside this repo

P
called by 322
protoc-gen-go/grpc/grpc.go
P
called by 189
protoc-gen-go/generator/generator.go
Int32
called by 144
proto/wrappers.go
String
called by 132
proto/wrappers.go
Marshal
called by 106
proto/proto.go
Unmarshal
called by 93
proto/proto.go
Error
called by 92
proto/text_decode.go
CompactTextString
called by 71
proto/text_encode.go

Shape

Method 1,280
Function 355
Struct 166
Interface 20
TypeAlias 17
FuncType 1

Languages

Go100%

Modules by API surface

internal/testprotos/proto2_proto/test.pb.go737 symbols
internal/testprotos/jsonpb_proto/test2.pb.go227 symbols
protoc-gen-go/generator/generator.go154 symbols
proto/proto_test.go114 symbols
internal/testprotos/proto3_proto/test.pb.go99 symbols
internal/testprotos/jsonpb_proto/test3.pb.go68 symbols
proto/text_test.go41 symbols
jsonpb/json_test.go38 symbols
proto/buffer.go35 symbols
proto/text_decode.go24 symbols
proto/text_encode.go23 symbols
proto/proto.go19 symbols

Dependencies from manifests, versioned

google.golang.org/protobufv1.33.0 · 1×

For agents

$ claude mcp add protobuf \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact