blob: ccdc91d3ce4b3fcaed01fa5f70ab6800091c08bc [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 (
Damien Neile89e6242019-05-13 23:55:40 -070015 "google.golang.org/protobuf/internal/fileinit"
16 "google.golang.org/protobuf/internal/impl"
Damien Neil8012b442019-01-18 09:32:24 -080017)
Joe Tsaif9123a32018-11-30 09:04:58 +000018
Joe Tsaie1f8d502018-11-26 18:55:29 -080019// Version is the current minor version of the package.
20// This is incremented every time the API of this package expands.
21const Version = 0 // v2.{Version}.x
22
Joe Tsaif9123a32018-11-30 09:04:58 +000023var X impl.Export
24
Joe Tsaie1f8d502018-11-26 18:55:29 -080025type (
26 // EnforceVersion is used by code generated by protoc-gen-go
27 // to statically enforce a minimum version of this package.
28 // A compilation failure implies that this package is too old and
29 // needs to be updated to a more recent version.
30 //
31 // This package can be upgraded by running:
Damien Neile89e6242019-05-13 23:55:40 -070032 // go get -u google.golang.org/protobuf/...
Joe Tsaie1f8d502018-11-26 18:55:29 -080033 //
34 // Example usage by generated code:
35 // const _ = protoimpl.EnforceVersion(protoimpl.Version - genVersion)
36 //
37 // If genVersion is lower than Version, then this results in a negative
38 // integer overflow failure when evaluating the uint constant.
39 EnforceVersion uint
40
41 MessageType = impl.MessageType
Damien Neil8012b442019-01-18 09:32:24 -080042 FileBuilder = fileinit.FileBuilder
Joe Tsai4fddeba2019-03-20 18:29:32 -070043
Joe Tsai5e71dc92019-04-16 13:22:20 -070044 // TODO: Change these to more efficient data structures.
45 ExtensionFields = map[int32]impl.ExtensionFieldV1
46 UnknownFields = []byte
47 SizeCache = int32
48
Joe Tsai00e50dc2019-04-16 12:39:41 -070049 ExtensionFieldV1 = impl.ExtensionFieldV1
Joe Tsaie1f8d502018-11-26 18:55:29 -080050)