impl.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. // Package protoimpl contains the default implementation for messages
  5. // generated by protoc-gen-go.
  6. //
  7. // WARNING: This package should only ever be imported by generated messages.
  8. // The compatibility agreement covers nothing except for functionality needed
  9. // to keep existing generated messages operational. Breakages that occur due
  10. // to unauthorized usages of this package are not the author's responsibility.
  11. package protoimpl
  12. import (
  13. "google.golang.org/protobuf/internal/filedesc"
  14. "google.golang.org/protobuf/internal/filetype"
  15. "google.golang.org/protobuf/internal/impl"
  16. "google.golang.org/protobuf/internal/protolazy"
  17. )
  18. // UnsafeEnabled specifies whether package unsafe can be used.
  19. const UnsafeEnabled = impl.UnsafeEnabled
  20. type (
  21. // Types used by generated code in init functions.
  22. DescBuilder = filedesc.Builder
  23. TypeBuilder = filetype.Builder
  24. // Types used by generated code to implement EnumType, MessageType, and ExtensionType.
  25. EnumInfo = impl.EnumInfo
  26. MessageInfo = impl.MessageInfo
  27. ExtensionInfo = impl.ExtensionInfo
  28. // Types embedded in generated messages.
  29. MessageState = impl.MessageState
  30. SizeCache = impl.SizeCache
  31. WeakFields = impl.WeakFields
  32. UnknownFields = impl.UnknownFields
  33. ExtensionFields = impl.ExtensionFields
  34. ExtensionFieldV1 = impl.ExtensionField
  35. Pointer = impl.Pointer
  36. LazyUnmarshalInfo = *protolazy.XXX_lazyUnmarshalInfo
  37. RaceDetectHookData = impl.RaceDetectHookData
  38. )
  39. var X impl.Export