blob: f58b56934fa52f6605f82a40a7fb6448afe62dba [file] [log] [blame]
Joe Tsaif9123a32018-11-30 09:04:58 +00001// 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
Damien Neil8012b442019-01-18 09:32:24 -080014import (
Joe Tsaid8881392019-06-06 13:01:53 -070015 "google.golang.org/protobuf/internal/filedesc"
Joe Tsaid8881392019-06-06 13:01:53 -070016 "google.golang.org/protobuf/internal/filetype"
Damien Neile89e6242019-05-13 23:55:40 -070017 "google.golang.org/protobuf/internal/impl"
Damien Neilc0f8c0a2019-08-09 09:32:44 -070018 "google.golang.org/protobuf/runtime/protoiface"
Damien Neil8012b442019-01-18 09:32:24 -080019)
Joe Tsaif9123a32018-11-30 09:04:58 +000020
Joe Tsaic0e4bb22019-07-06 13:05:11 -070021// UnsafeEnabled specifies whether package unsafe can be used.
22const UnsafeEnabled = impl.UnsafeEnabled
23
Joe Tsaie1f8d502018-11-26 18:55:29 -080024type (
Damien Neilc0f8c0a2019-08-09 09:32:44 -070025 // 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 = filetype.EnumInfo
31 MessageInfo = impl.MessageInfo
32 ExtensionInfo = protoiface.ExtensionDescV1
33
34 // Types embedded in generated messages.
Joe Tsai82760ce2019-06-20 03:09:57 -070035 MessageState = impl.MessageState
Joe Tsai378c1322019-04-25 23:48:08 -070036 SizeCache = impl.SizeCache
Joe Tsai3d8e3692019-04-08 13:52:14 -070037 WeakFields = impl.WeakFields
Joe Tsai378c1322019-04-25 23:48:08 -070038 UnknownFields = impl.UnknownFields
39 ExtensionFields = impl.ExtensionFields
Joe Tsai89d49632019-06-04 16:20:00 -070040 ExtensionFieldV1 = impl.ExtensionField
Damien Neilc0f8c0a2019-08-09 09:32:44 -070041
42 Pointer = impl.Pointer
Joe Tsaie1f8d502018-11-26 18:55:29 -080043)
Joe Tsai58b42d82019-05-22 16:27:51 -040044
45var X impl.Export