pb

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2025 License: Apache-2.0, MIT Imports: 4 Imported by: 5

Documentation

Overview

These commands work around namespace conflicts that occur when multiple repositories depend on .proto files with generic filenames. Due to the way protobuf registers files (e.g., foo.proto or pb/foo.proto), naming collisions can occur when the same filename is used across different packages.

The only way to generate a *.pb.go file that includes the full package path (e.g., github.com/org/repo/pb/foo.proto) is to place the .proto file in a directory structure that mirrors its package path.

References:

Index

Constants

View Source
const DoNotUpgradeFileEverItWillChangeYourHashes = `` /* 161-byte string literal not displayed */

DoNotUpgradeFileEverItWillChangeYourHashes warns users about not breaking their file hashes.

Variables

View Source
var File_github_com_ipfs_boxo_ipld_merkledag_pb_merkledag_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PBLink struct {

	// multihash of the target object
	Hash []byte `protobuf:"bytes,1,opt,name=Hash" json:"Hash,omitempty"`
	// utf string name. should be unique per object
	Name *string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"`
	// cumulative size of target object
	Tsize *uint64 `protobuf:"varint,3,opt,name=Tsize" json:"Tsize,omitempty"`
	// contains filtered or unexported fields
}

An IPFS MerkleDAG Link

func (*PBLink) Descriptor deprecated

func (*PBLink) Descriptor() ([]byte, []int)

Deprecated: Use PBLink.ProtoReflect.Descriptor instead.

func (*PBLink) GetHash

func (x *PBLink) GetHash() []byte

func (*PBLink) GetName

func (x *PBLink) GetName() string

func (*PBLink) GetTsize

func (x *PBLink) GetTsize() uint64

func (*PBLink) ProtoMessage

func (*PBLink) ProtoMessage()

func (*PBLink) ProtoReflect added in v0.28.0

func (x *PBLink) ProtoReflect() protoreflect.Message

func (*PBLink) Reset

func (x *PBLink) Reset()

func (*PBLink) String

func (x *PBLink) String() string

type PBNode

type PBNode struct {

	// opaque user data
	Data []byte `protobuf:"bytes,1,opt,name=Data" json:"Data,omitempty"`
	// refs to other objects
	Links []*PBLink `protobuf:"bytes,2,rep,name=Links" json:"Links,omitempty"`
	// contains filtered or unexported fields
}

An IPFS MerkleDAG Node

func (*PBNode) Descriptor deprecated

func (*PBNode) Descriptor() ([]byte, []int)

Deprecated: Use PBNode.ProtoReflect.Descriptor instead.

func (*PBNode) GetData

func (x *PBNode) GetData() []byte
func (x *PBNode) GetLinks() []*PBLink

func (*PBNode) ProtoMessage

func (*PBNode) ProtoMessage()

func (*PBNode) ProtoReflect added in v0.28.0

func (x *PBNode) ProtoReflect() protoreflect.Message

func (*PBNode) Reset

func (x *PBNode) Reset()

func (*PBNode) String

func (x *PBNode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL