...

Package protoadapt

import "google.golang.org/protobuf/protoadapt"
Overview
Index

Overview ▾

Package protoadapt bridges the original and new proto APIs.

type MessageV1

MessageV1 is the original github.com/golang/protobuf/proto.Message type.

type MessageV1 = protoiface.MessageV1

func MessageV1Of

func MessageV1Of(m MessageV2) MessageV1

MessageV1Of converts a v2 message to a v1 message. It returns nil if m is nil.

type MessageV2

MessageV2 is the google.golang.org/protobuf/proto.Message type used by the current google.golang.org/protobuf module, adding support for reflection.

type MessageV2 = proto.Message

func MessageV2Of

func MessageV2Of(m MessageV1) MessageV2

MessageV2Of converts a v1 message to a v2 message. It returns nil if m is nil.