luci: go.chromium.org/luci/starlark/protohacks Index | Files

package protohacks

import "go.chromium.org/luci/starlark/protohacks"

Package protohacks is temporary.

It will disappear once we stop vendoring "google.golang.org/protobuf".

As of now, only code "close by" to the "vendor" folder can directly import types from "google.golang.org/protobuf".

Index

Package Files

hacks.go

func FileOptions Uses

func FileOptions(d protoreflect.FileDescriptor) ([]byte, error)

FileOptions returns proto-serialized descriptorpb.FileOptions.

Return (nil, nil) if the file has no options.

func UnmarshalFileDescriptorProto Uses

func UnmarshalFileDescriptorProto(m []byte) (*descriptorpb.FileDescriptorProto, error)

UnmarshalFileDescriptorProto unmarshals FileDescriptorProto.

func UnmarshalFileDescriptorSet Uses

func UnmarshalFileDescriptorSet(m []byte) (*descriptorpb.FileDescriptorSet, error)

UnmarshalFileDescriptorSet unmarshals FileDescriptorSet.

type FileDescriptorsList Uses

type FileDescriptorsList struct {
    Descriptors []*descriptorpb.FileDescriptorProto
}

FileDescriptorsList is a wrapper over []*descriptorpb.FileDescriptorProto.

Allows to manipulate []*descriptorpb.FileDescriptorProto without explicitly mentioning its type name anywhere (which may not be importable due to vendoring rules).

func (*FileDescriptorsList) Add Uses

func (fds *FileDescriptorsList) Add(fd *descriptorpb.FileDescriptorProto)

Adds appends a descriptor to the list.

Package protohacks imports 3 packages (graph) and is imported by 2 packages. Updated 2019-11-12. Refresh now. Tools for package owners.