impl.go

 1// Copyright 2018 The Go Authors. All rights reserved.
 2// Use of this source code is governed by a BSD-style
 3// license that can be found in the LICENSE file.
 4
 5// Package protoimpl contains the default implementation for messages
 6// generated by protoc-gen-go.
 7//
 8// WARNING: This package should only ever be imported by generated messages.
 9// The compatibility agreement covers nothing except for functionality needed
10// to keep existing generated messages operational. Breakages that occur due
11// to unauthorized usages of this package are not the author's responsibility.
12package protoimpl
13
14import (
15	"google.golang.org/protobuf/internal/filedesc"
16	"google.golang.org/protobuf/internal/filetype"
17	"google.golang.org/protobuf/internal/impl"
18	"google.golang.org/protobuf/internal/protolazy"
19)
20
21// UnsafeEnabled specifies whether package unsafe can be used.
22const UnsafeEnabled = impl.UnsafeEnabled
23
24type (
25	// Types used by generated code in init functions.
26	DescBuilder = filedesc.Builder
27	TypeBuilder = filetype.Builder
28
29	// Types used by generated code to implement EnumType, MessageType, and ExtensionType.
30	EnumInfo      = impl.EnumInfo
31	MessageInfo   = impl.MessageInfo
32	ExtensionInfo = impl.ExtensionInfo
33
34	// Types embedded in generated messages.
35	MessageState     = impl.MessageState
36	SizeCache        = impl.SizeCache
37	WeakFields       = impl.WeakFields
38	UnknownFields    = impl.UnknownFields
39	ExtensionFields  = impl.ExtensionFields
40	ExtensionFieldV1 = impl.ExtensionField
41
42	Pointer = impl.Pointer
43
44	LazyUnmarshalInfo  = *protolazy.XXX_lazyUnmarshalInfo
45	RaceDetectHookData = impl.RaceDetectHookData
46)
47
48var X impl.Export