proto

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

Protobuf Registry

The well-known Protobuf definitions are pulled from Buf Build Registry. This makes firehose-core able to decode some well-known block files directly.

Re-generate

To re-generate the well-known types, simply do:

go generate ./protoregistry

While being at the root of the project (if you run from this directory here, adjust ./protoregistry to .). Before re-generating, ensure you have push to Buf Registry the latest version of the definitions.

Add new well-known types

Push your definitions to the Buf Registry. Edit file ./generator/generator.go and add the Buf Registry path of the package in wellKnownProtoRepos variables.

Then re-generate Protobuf definitions and send a PR with the changes.

Documentation

Overview

Code generated by 'go run github.com/streamingfast/firehose-core/protoregistry/generator well_known.go protoregistry', DO NOT EDIT!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWellKnownFileDescriptors

func RegisterWellKnownFileDescriptors(registry *Registry) error

Types

type Registry

type Registry struct {
	Types *protoregistry.Types
	Files *protoregistry.Files
}

func NewRegistry

func NewRegistry(chainFileDescriptor protoreflect.FileDescriptor, protoPaths ...string) (*Registry, error)

func (*Registry) RegisterFileDescriptor

func (r *Registry) RegisterFileDescriptor(fd protoreflect.FileDescriptor) error

func (*Registry) RegisterFileDescriptors

func (r *Registry) RegisterFileDescriptors(fds []protoreflect.FileDescriptor) error

func (*Registry) RegisterFiles

func (r *Registry) RegisterFiles(files []string) error

func (*Registry) Unmarshal

func (r *Registry) Unmarshal(a *anypb.Any) (*dynamicpb.Message, error)

type WellKnownType

type WellKnownType struct {
	BytesEncoding string
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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