plugin.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. // Code generated by protoc-gen-gogo.
  2. // source: plugin.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package plugin is a generated protocol buffer package.
  6. It is generated from these files:
  7. plugin.proto
  8. It has these top-level messages:
  9. TLSAuthorization
  10. */
  11. package plugin
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
  16. import strings "strings"
  17. import reflect "reflect"
  18. import io "io"
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ = proto.Marshal
  21. var _ = fmt.Errorf
  22. var _ = math.Inf
  23. // This is a compile-time assertion to ensure that this generated file
  24. // is compatible with the proto package it is being compiled against.
  25. // A compilation error at this line likely means your copy of the
  26. // proto package needs to be updated.
  27. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  28. type TLSAuthorization struct {
  29. // Roles contains the acceptable TLS OU roles for the handler.
  30. Roles []string `protobuf:"bytes,1,rep,name=roles" json:"roles,omitempty"`
  31. // Insecure is set to true if this method does not require
  32. // authorization. NOTE: Specifying both "insecure" and a nonempty
  33. // list of roles is invalid. This would fail at codegen time.
  34. Insecure *bool `protobuf:"varint,2,opt,name=insecure" json:"insecure,omitempty"`
  35. XXX_unrecognized []byte `json:"-"`
  36. }
  37. func (m *TLSAuthorization) Reset() { *m = TLSAuthorization{} }
  38. func (*TLSAuthorization) ProtoMessage() {}
  39. func (*TLSAuthorization) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} }
  40. var E_Deepcopy = &proto.ExtensionDesc{
  41. ExtendedType: (*google_protobuf.MessageOptions)(nil),
  42. ExtensionType: (*bool)(nil),
  43. Field: 70000,
  44. Name: "docker.protobuf.plugin.deepcopy",
  45. Tag: "varint,70000,opt,name=deepcopy,def=1",
  46. }
  47. var E_TlsAuthorization = &proto.ExtensionDesc{
  48. ExtendedType: (*google_protobuf.MethodOptions)(nil),
  49. ExtensionType: (*TLSAuthorization)(nil),
  50. Field: 73626345,
  51. Name: "docker.protobuf.plugin.tls_authorization",
  52. Tag: "bytes,73626345,opt,name=tls_authorization,json=tlsAuthorization",
  53. }
  54. func init() {
  55. proto.RegisterType((*TLSAuthorization)(nil), "docker.protobuf.plugin.TLSAuthorization")
  56. proto.RegisterExtension(E_Deepcopy)
  57. proto.RegisterExtension(E_TlsAuthorization)
  58. }
  59. func (m *TLSAuthorization) Marshal() (dAtA []byte, err error) {
  60. size := m.Size()
  61. dAtA = make([]byte, size)
  62. n, err := m.MarshalTo(dAtA)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return dAtA[:n], nil
  67. }
  68. func (m *TLSAuthorization) MarshalTo(dAtA []byte) (int, error) {
  69. var i int
  70. _ = i
  71. var l int
  72. _ = l
  73. if len(m.Roles) > 0 {
  74. for _, s := range m.Roles {
  75. dAtA[i] = 0xa
  76. i++
  77. l = len(s)
  78. for l >= 1<<7 {
  79. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  80. l >>= 7
  81. i++
  82. }
  83. dAtA[i] = uint8(l)
  84. i++
  85. i += copy(dAtA[i:], s)
  86. }
  87. }
  88. if m.Insecure != nil {
  89. dAtA[i] = 0x10
  90. i++
  91. if *m.Insecure {
  92. dAtA[i] = 1
  93. } else {
  94. dAtA[i] = 0
  95. }
  96. i++
  97. }
  98. if m.XXX_unrecognized != nil {
  99. i += copy(dAtA[i:], m.XXX_unrecognized)
  100. }
  101. return i, nil
  102. }
  103. func encodeFixed64Plugin(dAtA []byte, offset int, v uint64) int {
  104. dAtA[offset] = uint8(v)
  105. dAtA[offset+1] = uint8(v >> 8)
  106. dAtA[offset+2] = uint8(v >> 16)
  107. dAtA[offset+3] = uint8(v >> 24)
  108. dAtA[offset+4] = uint8(v >> 32)
  109. dAtA[offset+5] = uint8(v >> 40)
  110. dAtA[offset+6] = uint8(v >> 48)
  111. dAtA[offset+7] = uint8(v >> 56)
  112. return offset + 8
  113. }
  114. func encodeFixed32Plugin(dAtA []byte, offset int, v uint32) int {
  115. dAtA[offset] = uint8(v)
  116. dAtA[offset+1] = uint8(v >> 8)
  117. dAtA[offset+2] = uint8(v >> 16)
  118. dAtA[offset+3] = uint8(v >> 24)
  119. return offset + 4
  120. }
  121. func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int {
  122. for v >= 1<<7 {
  123. dAtA[offset] = uint8(v&0x7f | 0x80)
  124. v >>= 7
  125. offset++
  126. }
  127. dAtA[offset] = uint8(v)
  128. return offset + 1
  129. }
  130. func (m *TLSAuthorization) Size() (n int) {
  131. var l int
  132. _ = l
  133. if len(m.Roles) > 0 {
  134. for _, s := range m.Roles {
  135. l = len(s)
  136. n += 1 + l + sovPlugin(uint64(l))
  137. }
  138. }
  139. if m.Insecure != nil {
  140. n += 2
  141. }
  142. if m.XXX_unrecognized != nil {
  143. n += len(m.XXX_unrecognized)
  144. }
  145. return n
  146. }
  147. func sovPlugin(x uint64) (n int) {
  148. for {
  149. n++
  150. x >>= 7
  151. if x == 0 {
  152. break
  153. }
  154. }
  155. return n
  156. }
  157. func sozPlugin(x uint64) (n int) {
  158. return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  159. }
  160. func (this *TLSAuthorization) String() string {
  161. if this == nil {
  162. return "nil"
  163. }
  164. s := strings.Join([]string{`&TLSAuthorization{`,
  165. `Roles:` + fmt.Sprintf("%v", this.Roles) + `,`,
  166. `Insecure:` + valueToStringPlugin(this.Insecure) + `,`,
  167. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  168. `}`,
  169. }, "")
  170. return s
  171. }
  172. func valueToStringPlugin(v interface{}) string {
  173. rv := reflect.ValueOf(v)
  174. if rv.IsNil() {
  175. return "nil"
  176. }
  177. pv := reflect.Indirect(rv).Interface()
  178. return fmt.Sprintf("*%v", pv)
  179. }
  180. func (m *TLSAuthorization) Unmarshal(dAtA []byte) error {
  181. l := len(dAtA)
  182. iNdEx := 0
  183. for iNdEx < l {
  184. preIndex := iNdEx
  185. var wire uint64
  186. for shift := uint(0); ; shift += 7 {
  187. if shift >= 64 {
  188. return ErrIntOverflowPlugin
  189. }
  190. if iNdEx >= l {
  191. return io.ErrUnexpectedEOF
  192. }
  193. b := dAtA[iNdEx]
  194. iNdEx++
  195. wire |= (uint64(b) & 0x7F) << shift
  196. if b < 0x80 {
  197. break
  198. }
  199. }
  200. fieldNum := int32(wire >> 3)
  201. wireType := int(wire & 0x7)
  202. if wireType == 4 {
  203. return fmt.Errorf("proto: TLSAuthorization: wiretype end group for non-group")
  204. }
  205. if fieldNum <= 0 {
  206. return fmt.Errorf("proto: TLSAuthorization: illegal tag %d (wire type %d)", fieldNum, wire)
  207. }
  208. switch fieldNum {
  209. case 1:
  210. if wireType != 2 {
  211. return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
  212. }
  213. var stringLen uint64
  214. for shift := uint(0); ; shift += 7 {
  215. if shift >= 64 {
  216. return ErrIntOverflowPlugin
  217. }
  218. if iNdEx >= l {
  219. return io.ErrUnexpectedEOF
  220. }
  221. b := dAtA[iNdEx]
  222. iNdEx++
  223. stringLen |= (uint64(b) & 0x7F) << shift
  224. if b < 0x80 {
  225. break
  226. }
  227. }
  228. intStringLen := int(stringLen)
  229. if intStringLen < 0 {
  230. return ErrInvalidLengthPlugin
  231. }
  232. postIndex := iNdEx + intStringLen
  233. if postIndex > l {
  234. return io.ErrUnexpectedEOF
  235. }
  236. m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
  237. iNdEx = postIndex
  238. case 2:
  239. if wireType != 0 {
  240. return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType)
  241. }
  242. var v int
  243. for shift := uint(0); ; shift += 7 {
  244. if shift >= 64 {
  245. return ErrIntOverflowPlugin
  246. }
  247. if iNdEx >= l {
  248. return io.ErrUnexpectedEOF
  249. }
  250. b := dAtA[iNdEx]
  251. iNdEx++
  252. v |= (int(b) & 0x7F) << shift
  253. if b < 0x80 {
  254. break
  255. }
  256. }
  257. b := bool(v != 0)
  258. m.Insecure = &b
  259. default:
  260. iNdEx = preIndex
  261. skippy, err := skipPlugin(dAtA[iNdEx:])
  262. if err != nil {
  263. return err
  264. }
  265. if skippy < 0 {
  266. return ErrInvalidLengthPlugin
  267. }
  268. if (iNdEx + skippy) > l {
  269. return io.ErrUnexpectedEOF
  270. }
  271. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  272. iNdEx += skippy
  273. }
  274. }
  275. if iNdEx > l {
  276. return io.ErrUnexpectedEOF
  277. }
  278. return nil
  279. }
  280. func skipPlugin(dAtA []byte) (n int, err error) {
  281. l := len(dAtA)
  282. iNdEx := 0
  283. for iNdEx < l {
  284. var wire uint64
  285. for shift := uint(0); ; shift += 7 {
  286. if shift >= 64 {
  287. return 0, ErrIntOverflowPlugin
  288. }
  289. if iNdEx >= l {
  290. return 0, io.ErrUnexpectedEOF
  291. }
  292. b := dAtA[iNdEx]
  293. iNdEx++
  294. wire |= (uint64(b) & 0x7F) << shift
  295. if b < 0x80 {
  296. break
  297. }
  298. }
  299. wireType := int(wire & 0x7)
  300. switch wireType {
  301. case 0:
  302. for shift := uint(0); ; shift += 7 {
  303. if shift >= 64 {
  304. return 0, ErrIntOverflowPlugin
  305. }
  306. if iNdEx >= l {
  307. return 0, io.ErrUnexpectedEOF
  308. }
  309. iNdEx++
  310. if dAtA[iNdEx-1] < 0x80 {
  311. break
  312. }
  313. }
  314. return iNdEx, nil
  315. case 1:
  316. iNdEx += 8
  317. return iNdEx, nil
  318. case 2:
  319. var length int
  320. for shift := uint(0); ; shift += 7 {
  321. if shift >= 64 {
  322. return 0, ErrIntOverflowPlugin
  323. }
  324. if iNdEx >= l {
  325. return 0, io.ErrUnexpectedEOF
  326. }
  327. b := dAtA[iNdEx]
  328. iNdEx++
  329. length |= (int(b) & 0x7F) << shift
  330. if b < 0x80 {
  331. break
  332. }
  333. }
  334. iNdEx += length
  335. if length < 0 {
  336. return 0, ErrInvalidLengthPlugin
  337. }
  338. return iNdEx, nil
  339. case 3:
  340. for {
  341. var innerWire uint64
  342. var start int = iNdEx
  343. for shift := uint(0); ; shift += 7 {
  344. if shift >= 64 {
  345. return 0, ErrIntOverflowPlugin
  346. }
  347. if iNdEx >= l {
  348. return 0, io.ErrUnexpectedEOF
  349. }
  350. b := dAtA[iNdEx]
  351. iNdEx++
  352. innerWire |= (uint64(b) & 0x7F) << shift
  353. if b < 0x80 {
  354. break
  355. }
  356. }
  357. innerWireType := int(innerWire & 0x7)
  358. if innerWireType == 4 {
  359. break
  360. }
  361. next, err := skipPlugin(dAtA[start:])
  362. if err != nil {
  363. return 0, err
  364. }
  365. iNdEx = start + next
  366. }
  367. return iNdEx, nil
  368. case 4:
  369. return iNdEx, nil
  370. case 5:
  371. iNdEx += 4
  372. return iNdEx, nil
  373. default:
  374. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  375. }
  376. }
  377. panic("unreachable")
  378. }
  379. var (
  380. ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling")
  381. ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow")
  382. )
  383. func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) }
  384. var fileDescriptorPlugin = []byte{
  385. // 254 bytes of a gzipped FileDescriptorProto
  386. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d,
  387. 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4b, 0xc9, 0x4f, 0xce, 0x4e, 0x2d,
  388. 0x82, 0xf0, 0x92, 0x4a, 0xd3, 0xf4, 0x20, 0xb2, 0x52, 0x0a, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9,
  389. 0xfa, 0x30, 0x71, 0xfd, 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0x7c, 0xa8, 0x5a, 0x25,
  390. 0x17, 0x2e, 0x81, 0x10, 0x9f, 0x60, 0xc7, 0xd2, 0x92, 0x8c, 0xfc, 0xa2, 0xcc, 0xaa, 0xc4, 0x92,
  391. 0xcc, 0xfc, 0x3c, 0x21, 0x11, 0x2e, 0xd6, 0xa2, 0xfc, 0x9c, 0xd4, 0x62, 0x09, 0x46, 0x05, 0x66,
  392. 0x0d, 0xce, 0x20, 0x08, 0x47, 0x48, 0x8a, 0x8b, 0x23, 0x33, 0xaf, 0x38, 0x35, 0xb9, 0xb4, 0x28,
  393. 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x23, 0x08, 0xce, 0xb7, 0x72, 0xe6, 0xe2, 0x48, 0x49, 0x4d,
  394. 0x2d, 0x48, 0xce, 0x2f, 0xa8, 0x14, 0x92, 0xd7, 0x83, 0x58, 0x8a, 0x70, 0x8c, 0x6f, 0x6a, 0x71,
  395. 0x71, 0x62, 0x7a, 0xaa, 0x7f, 0x01, 0xc8, 0xf4, 0x62, 0x89, 0x0f, 0x8b, 0x58, 0x40, 0xda, 0xad,
  396. 0x58, 0x4a, 0x8a, 0x4a, 0x53, 0x83, 0xe0, 0x1a, 0xad, 0x2a, 0xb8, 0x04, 0x4b, 0x72, 0x8a, 0xe3,
  397. 0x13, 0x51, 0xdc, 0x22, 0x87, 0xc5, 0xb4, 0x92, 0x8c, 0xfc, 0x14, 0x98, 0x61, 0x2f, 0x9f, 0xf6,
  398. 0x2a, 0x2b, 0x30, 0x6a, 0x70, 0x1b, 0x69, 0xe8, 0x61, 0x0f, 0x03, 0x3d, 0x74, 0xef, 0x05, 0x09,
  399. 0x94, 0xe4, 0x14, 0xa3, 0x88, 0x38, 0x49, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0x43,
  400. 0xc3, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e,
  401. 0x11, 0x10, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x4c, 0x2c, 0xf3, 0x67, 0x01, 0x00, 0x00,
  402. }