guiconfiguration.pb.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/config/guiconfiguration.proto
  3. package config
  4. import (
  5. fmt "fmt"
  6. proto "github.com/gogo/protobuf/proto"
  7. _ "github.com/syncthing/syncthing/proto/ext"
  8. io "io"
  9. math "math"
  10. math_bits "math/bits"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  21. type GUIConfiguration struct {
  22. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled" xml:"enabled,attr" default:"true"`
  23. RawAddress string `protobuf:"bytes,2,opt,name=address,proto3" json:"address" xml:"address" default:"127.0.0.1:8384"`
  24. RawUnixSocketPermissions string `protobuf:"bytes,3,opt,name=unix_socket_permissions,json=unixSocketPermissions,proto3" json:"unixSocketPermissions" xml:"unixSocketPermissions,omitempty"`
  25. User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user" xml:"user,omitempty"`
  26. Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password" xml:"password,omitempty"`
  27. AuthMode AuthMode `protobuf:"varint,6,opt,name=auth_mode,json=authMode,proto3,enum=config.AuthMode" json:"authMode" xml:"authMode,omitempty"`
  28. RawUseTLS bool `protobuf:"varint,7,opt,name=use_tls,json=useTls,proto3" json:"useTLS" xml:"tls,attr"`
  29. APIKey string `protobuf:"bytes,8,opt,name=api_key,json=apiKey,proto3" json:"apiKey" xml:"apikey,omitempty"`
  30. InsecureAdminAccess bool `protobuf:"varint,9,opt,name=insecure_admin_access,json=insecureAdminAccess,proto3" json:"insecureAdminAccess" xml:"insecureAdminAccess,omitempty"`
  31. Theme string `protobuf:"bytes,10,opt,name=theme,proto3" json:"theme" xml:"theme" default:"default"`
  32. Debugging bool `protobuf:"varint,11,opt,name=debugging,proto3" json:"debugging" xml:"debugging,attr"`
  33. InsecureSkipHostCheck bool `protobuf:"varint,12,opt,name=insecure_skip_host_check,json=insecureSkipHostCheck,proto3" json:"insecureSkipHostcheck" xml:"insecureSkipHostcheck,omitempty"`
  34. InsecureAllowFrameLoading bool `protobuf:"varint,13,opt,name=insecure_allow_frame_loading,json=insecureAllowFrameLoading,proto3" json:"insecureAllowFrameLoading" xml:"insecureAllowFrameLoading,omitempty"`
  35. SendBasicAuthPrompt bool `protobuf:"varint,14,opt,name=send_basic_auth_prompt,json=sendBasicAuthPrompt,proto3" json:"sendBasicAuthPrompt" xml:"sendBasicAuthPrompt,attr"`
  36. }
  37. func (m *GUIConfiguration) Reset() { *m = GUIConfiguration{} }
  38. func (m *GUIConfiguration) String() string { return proto.CompactTextString(m) }
  39. func (*GUIConfiguration) ProtoMessage() {}
  40. func (*GUIConfiguration) Descriptor() ([]byte, []int) {
  41. return fileDescriptor_2a9586d611855d64, []int{0}
  42. }
  43. func (m *GUIConfiguration) XXX_Unmarshal(b []byte) error {
  44. return m.Unmarshal(b)
  45. }
  46. func (m *GUIConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  47. if deterministic {
  48. return xxx_messageInfo_GUIConfiguration.Marshal(b, m, deterministic)
  49. } else {
  50. b = b[:cap(b)]
  51. n, err := m.MarshalToSizedBuffer(b)
  52. if err != nil {
  53. return nil, err
  54. }
  55. return b[:n], nil
  56. }
  57. }
  58. func (m *GUIConfiguration) XXX_Merge(src proto.Message) {
  59. xxx_messageInfo_GUIConfiguration.Merge(m, src)
  60. }
  61. func (m *GUIConfiguration) XXX_Size() int {
  62. return m.ProtoSize()
  63. }
  64. func (m *GUIConfiguration) XXX_DiscardUnknown() {
  65. xxx_messageInfo_GUIConfiguration.DiscardUnknown(m)
  66. }
  67. var xxx_messageInfo_GUIConfiguration proto.InternalMessageInfo
  68. func init() {
  69. proto.RegisterType((*GUIConfiguration)(nil), "config.GUIConfiguration")
  70. }
  71. func init() { proto.RegisterFile("lib/config/guiconfiguration.proto", fileDescriptor_2a9586d611855d64) }
  72. var fileDescriptor_2a9586d611855d64 = []byte{
  73. // 888 bytes of a gzipped FileDescriptorProto
  74. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0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0x89, 0x9d, 0x84, 0x43, 0x69,
  97. 0xa7, 0x1c, 0x7e, 0x96, 0x95, 0x45, 0x71, 0x54, 0xad, 0xa2, 0x53, 0x85, 0x4c, 0xc9, 0x57, 0x5f,
  98. 0x83, 0xf5, 0x10, 0x51, 0x7a, 0x1a, 0x44, 0x8e, 0x76, 0x4d, 0xe6, 0xfa, 0x36, 0xe1, 0xb0, 0xc4,
  99. 0x52, 0x0e, 0x35, 0x99, 0xaf, 0x00, 0xaa, 0x39, 0xd5, 0xcb, 0xb0, 0x59, 0xc6, 0xaa, 0x1e, 0x68,
  100. 0x8b, 0x8d, 0xb4, 0xc4, 0x4a, 0x6a, 0xcd, 0x4d, 0x65, 0xab, 0xb3, 0xb3, 0xd1, 0xcb, 0x56, 0xb5,
  101. 0xd7, 0x8f, 0xd9, 0xe8, 0xfb, 0xc0, 0xc1, 0x99, 0x1c, 0xca, 0xad, 0x52, 0xae, 0x00, 0x56, 0xe4,
  102. 0x2e, 0xc3, 0x66, 0x19, 0xab, 0x62, 0xd0, 0x8a, 0x29, 0xb6, 0x98, 0x4b, 0xb5, 0x96, 0x5c, 0xe7,
  103. 0x83, 0x39, 0x87, 0x6d, 0x31, 0x58, 0x8a, 0x7f, 0x38, 0x38, 0x4a, 0x38, 0x6c, 0xc6, 0xf2, 0x95,
  104. 0x72, 0xd8, 0x91, 0x2a, 0xcc, 0xa5, 0xd9, 0x5a, 0x27, 0x53, 0x63, 0xbd, 0x30, 0xd2, 0xa9, 0x91,
  105. 0xf3, 0xce, 0x67, 0xc6, 0x22, 0xdc, 0x94, 0xa0, 0x4b, 0x85, 0x0c, 0x0a, 0x89, 0x35, 0xc6, 0x13,
  106. 0x6d, 0x5d, 0x0e, 0x4c, 0xc8, 0x34, 0xfb, 0x87, 0xaf, 0xf6, 0xf1, 0x44, 0x68, 0xa0, 0x90, 0xec,
  107. 0xe3, 0x49, 0xca, 0xe1, 0xad, 0xac, 0x93, 0x90, 0x8c, 0xf1, 0xa4, 0xda, 0xc7, 0xc6, 0x2a, 0x78,
  108. 0x3e, 0x33, 0xf2, 0x0c, 0x66, 0x1e, 0xaf, 0xfe, 0xa6, 0x80, 0x9b, 0xc4, 0xa7, 0xd8, 0x8e, 0x23,
  109. 0x6c, 0x21, 0xc7, 0x23, 0xbe, 0x85, 0x6c, 0x5b, 0xdc, 0x51, 0x5b, 0x36, 0x67, 0x25, 0x1c, 0x7e,
  110. 0x5a, 0x10, 0xfa, 0xc2, 0xdf, 0x97, 0xee, 0x94, 0xc3, 0xfb, 0x52, 0xb8, 0xc6, 0x57, 0xad, 0xe2,
  111. 0xee, 0xff, 0x32, 0xcc, 0xba, 0xe4, 0xea, 0x3e, 0xb8, 0xc6, 0x46, 0xd8, 0xc3, 0x1a, 0x90, 0xad,
  112. 0x7f, 0x93, 0x70, 0x98, 0x01, 0x29, 0x87, 0x77, 0xb3, 0x99, 0x0a, 0x6b, 0xe9, 0x74, 0xf3, 0x87,
  113. 0xb8, 0xd9, 0x56, 0xfe, 0x36, 0xb3, 0x10, 0xf5, 0x18, 0xb4, 0x1d, 0x3c, 0x88, 0x87, 0x43, 0xe2,
  114. 0x0f, 0xb5, 0x4f, 0x64, 0x57, 0x4f, 0x13, 0x0e, 0x17, 0x60, 0xb9, 0xcd, 0x25, 0x52, 0x7e, 0xae,
  115. 0x4e, 0x15, 0x32, 0x17, 0x41, 0xea, 0x5f, 0x0a, 0xd0, 0xca, 0xc9, 0xd1, 0x31, 0x09, 0xad, 0x51,
  116. 0x40, 0x99, 0x65, 0x8f, 0xb0, 0x3d, 0xd6, 0xae, 0x4b, 0x99, 0x9f, 0xc5, 0x5d, 0x17, 0x9c, 0xa3,
  117. 0x31, 0x09, 0x5f, 0x06, 0x94, 0x49, 0x42, 0x79, 0xd7, 0xb5, 0xde, 0x95, 0xbb, 0x7e, 0x0f, 0x27,
  118. 0x9d, 0x1a, 0xf5, 0x22, 0xe6, 0x25, 0xf8, 0xb9, 0x80, 0xd5, 0x3f, 0x15, 0xf0, 0xc5, 0xe2, 0x9b,
  119. 0xbb, 0x6e, 0x70, 0x6a, 0x9d, 0x44, 0xc8, 0xc3, 0x96, 0x1b, 0x20, 0x47, 0x0c, 0xe9, 0x86, 0xac,
  120. 0xfe, 0xc7, 0x84, 0xc3, 0xdb, 0xe5, 0xd7, 0x11, 0xb4, 0x17, 0x82, 0x75, 0x90, 0x91, 0x52, 0x0e,
  121. 0x1f, 0x54, 0x17, 0x60, 0x95, 0x51, 0xed, 0xe2, 0xfe, 0x07, 0xf0, 0xcc, 0xab, 0xe5, 0xd4, 0x5f,
  122. 0x14, 0x70, 0x8b, 0x62, 0xdf, 0xb1, 0x06, 0x88, 0x12, 0xdb, 0x92, 0x17, 0x1f, 0x46, 0x81, 0x17,
  123. 0x32, 0xad, 0x23, 0xcb, 0x3d, 0x16, 0x9b, 0x2a, 0x18, 0x7b, 0x82, 0x20, 0x0e, 0xff, 0x50, 0xba,
  124. 0x53, 0x0e, 0x75, 0x59, 0x68, 0x8d, 0xaf, 0xfc, 0xce, 0xda, 0x55, 0x4e, 0xb3, 0x2e, 0xe5, 0xde,
  125. 0xfe, 0x9b, 0xb7, 0x7a, 0x63, 0xf6, 0x56, 0x6f, 0xbc, 0x99, 0xeb, 0xca, 0x6c, 0xae, 0x2b, 0xbf,
  126. 0x5e, 0xe8, 0x8d, 0x3f, 0x2e, 0x74, 0x65, 0x76, 0xa1, 0x37, 0xfe, 0xb9, 0xd0, 0x1b, 0xaf, 0x1f,
  127. 0x0c, 0x09, 0x1b, 0xc5, 0x83, 0x9e, 0x1d, 0x78, 0xdb, 0x74, 0xe2, 0xdb, 0x6c, 0x44, 0xfc, 0xe1,
  128. 0xd2, 0x6b, 0xf1, 0x3b, 0x1d, 0x34, 0xe5, 0xbf, 0xf3, 0xc9, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff,
  129. 0xfe, 0x19, 0xb2, 0x3c, 0x8e, 0x07, 0x00, 0x00,
  130. }
  131. func (m *GUIConfiguration) Marshal() (dAtA []byte, err error) {
  132. size := m.ProtoSize()
  133. dAtA = make([]byte, size)
  134. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  135. if err != nil {
  136. return nil, err
  137. }
  138. return dAtA[:n], nil
  139. }
  140. func (m *GUIConfiguration) MarshalTo(dAtA []byte) (int, error) {
  141. size := m.ProtoSize()
  142. return m.MarshalToSizedBuffer(dAtA[:size])
  143. }
  144. func (m *GUIConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  145. i := len(dAtA)
  146. _ = i
  147. var l int
  148. _ = l
  149. if m.SendBasicAuthPrompt {
  150. i--
  151. if m.SendBasicAuthPrompt {
  152. dAtA[i] = 1
  153. } else {
  154. dAtA[i] = 0
  155. }
  156. i--
  157. dAtA[i] = 0x70
  158. }
  159. if m.InsecureAllowFrameLoading {
  160. i--
  161. if m.InsecureAllowFrameLoading {
  162. dAtA[i] = 1
  163. } else {
  164. dAtA[i] = 0
  165. }
  166. i--
  167. dAtA[i] = 0x68
  168. }
  169. if m.InsecureSkipHostCheck {
  170. i--
  171. if m.InsecureSkipHostCheck {
  172. dAtA[i] = 1
  173. } else {
  174. dAtA[i] = 0
  175. }
  176. i--
  177. dAtA[i] = 0x60
  178. }
  179. if m.Debugging {
  180. i--
  181. if m.Debugging {
  182. dAtA[i] = 1
  183. } else {
  184. dAtA[i] = 0
  185. }
  186. i--
  187. dAtA[i] = 0x58
  188. }
  189. if len(m.Theme) > 0 {
  190. i -= len(m.Theme)
  191. copy(dAtA[i:], m.Theme)
  192. i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.Theme)))
  193. i--
  194. dAtA[i] = 0x52
  195. }
  196. if m.InsecureAdminAccess {
  197. i--
  198. if m.InsecureAdminAccess {
  199. dAtA[i] = 1
  200. } else {
  201. dAtA[i] = 0
  202. }
  203. i--
  204. dAtA[i] = 0x48
  205. }
  206. if len(m.APIKey) > 0 {
  207. i -= len(m.APIKey)
  208. copy(dAtA[i:], m.APIKey)
  209. i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.APIKey)))
  210. i--
  211. dAtA[i] = 0x42
  212. }
  213. if m.RawUseTLS {
  214. i--
  215. if m.RawUseTLS {
  216. dAtA[i] = 1
  217. } else {
  218. dAtA[i] = 0
  219. }
  220. i--
  221. dAtA[i] = 0x38
  222. }
  223. if m.AuthMode != 0 {
  224. i = encodeVarintGuiconfiguration(dAtA, i, uint64(m.AuthMode))
  225. i--
  226. dAtA[i] = 0x30
  227. }
  228. if len(m.Password) > 0 {
  229. i -= len(m.Password)
  230. copy(dAtA[i:], m.Password)
  231. i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.Password)))
  232. i--
  233. dAtA[i] = 0x2a
  234. }
  235. if len(m.User) > 0 {
  236. i -= len(m.User)
  237. copy(dAtA[i:], m.User)
  238. i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.User)))
  239. i--
  240. dAtA[i] = 0x22
  241. }
  242. if len(m.RawUnixSocketPermissions) > 0 {
  243. i -= len(m.RawUnixSocketPermissions)
  244. copy(dAtA[i:], m.RawUnixSocketPermissions)
  245. i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.RawUnixSocketPermissions)))
  246. i--
  247. dAtA[i] = 0x1a
  248. }
  249. if len(m.RawAddress) > 0 {
  250. i -= len(m.RawAddress)
  251. copy(dAtA[i:], m.RawAddress)
  252. i = encodeVarintGuiconfiguration(dAtA, i, uint64(len(m.RawAddress)))
  253. i--
  254. dAtA[i] = 0x12
  255. }
  256. if m.Enabled {
  257. i--
  258. if m.Enabled {
  259. dAtA[i] = 1
  260. } else {
  261. dAtA[i] = 0
  262. }
  263. i--
  264. dAtA[i] = 0x8
  265. }
  266. return len(dAtA) - i, nil
  267. }
  268. func encodeVarintGuiconfiguration(dAtA []byte, offset int, v uint64) int {
  269. offset -= sovGuiconfiguration(v)
  270. base := offset
  271. for v >= 1<<7 {
  272. dAtA[offset] = uint8(v&0x7f | 0x80)
  273. v >>= 7
  274. offset++
  275. }
  276. dAtA[offset] = uint8(v)
  277. return base
  278. }
  279. func (m *GUIConfiguration) ProtoSize() (n int) {
  280. if m == nil {
  281. return 0
  282. }
  283. var l int
  284. _ = l
  285. if m.Enabled {
  286. n += 2
  287. }
  288. l = len(m.RawAddress)
  289. if l > 0 {
  290. n += 1 + l + sovGuiconfiguration(uint64(l))
  291. }
  292. l = len(m.RawUnixSocketPermissions)
  293. if l > 0 {
  294. n += 1 + l + sovGuiconfiguration(uint64(l))
  295. }
  296. l = len(m.User)
  297. if l > 0 {
  298. n += 1 + l + sovGuiconfiguration(uint64(l))
  299. }
  300. l = len(m.Password)
  301. if l > 0 {
  302. n += 1 + l + sovGuiconfiguration(uint64(l))
  303. }
  304. if m.AuthMode != 0 {
  305. n += 1 + sovGuiconfiguration(uint64(m.AuthMode))
  306. }
  307. if m.RawUseTLS {
  308. n += 2
  309. }
  310. l = len(m.APIKey)
  311. if l > 0 {
  312. n += 1 + l + sovGuiconfiguration(uint64(l))
  313. }
  314. if m.InsecureAdminAccess {
  315. n += 2
  316. }
  317. l = len(m.Theme)
  318. if l > 0 {
  319. n += 1 + l + sovGuiconfiguration(uint64(l))
  320. }
  321. if m.Debugging {
  322. n += 2
  323. }
  324. if m.InsecureSkipHostCheck {
  325. n += 2
  326. }
  327. if m.InsecureAllowFrameLoading {
  328. n += 2
  329. }
  330. if m.SendBasicAuthPrompt {
  331. n += 2
  332. }
  333. return n
  334. }
  335. func sovGuiconfiguration(x uint64) (n int) {
  336. return (math_bits.Len64(x|1) + 6) / 7
  337. }
  338. func sozGuiconfiguration(x uint64) (n int) {
  339. return sovGuiconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  340. }
  341. func (m *GUIConfiguration) Unmarshal(dAtA []byte) error {
  342. l := len(dAtA)
  343. iNdEx := 0
  344. for iNdEx < l {
  345. preIndex := iNdEx
  346. var wire uint64
  347. for shift := uint(0); ; shift += 7 {
  348. if shift >= 64 {
  349. return ErrIntOverflowGuiconfiguration
  350. }
  351. if iNdEx >= l {
  352. return io.ErrUnexpectedEOF
  353. }
  354. b := dAtA[iNdEx]
  355. iNdEx++
  356. wire |= uint64(b&0x7F) << shift
  357. if b < 0x80 {
  358. break
  359. }
  360. }
  361. fieldNum := int32(wire >> 3)
  362. wireType := int(wire & 0x7)
  363. if wireType == 4 {
  364. return fmt.Errorf("proto: GUIConfiguration: wiretype end group for non-group")
  365. }
  366. if fieldNum <= 0 {
  367. return fmt.Errorf("proto: GUIConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
  368. }
  369. switch fieldNum {
  370. case 1:
  371. if wireType != 0 {
  372. return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
  373. }
  374. var v int
  375. for shift := uint(0); ; shift += 7 {
  376. if shift >= 64 {
  377. return ErrIntOverflowGuiconfiguration
  378. }
  379. if iNdEx >= l {
  380. return io.ErrUnexpectedEOF
  381. }
  382. b := dAtA[iNdEx]
  383. iNdEx++
  384. v |= int(b&0x7F) << shift
  385. if b < 0x80 {
  386. break
  387. }
  388. }
  389. m.Enabled = bool(v != 0)
  390. case 2:
  391. if wireType != 2 {
  392. return fmt.Errorf("proto: wrong wireType = %d for field RawAddress", wireType)
  393. }
  394. var stringLen uint64
  395. for shift := uint(0); ; shift += 7 {
  396. if shift >= 64 {
  397. return ErrIntOverflowGuiconfiguration
  398. }
  399. if iNdEx >= l {
  400. return io.ErrUnexpectedEOF
  401. }
  402. b := dAtA[iNdEx]
  403. iNdEx++
  404. stringLen |= uint64(b&0x7F) << shift
  405. if b < 0x80 {
  406. break
  407. }
  408. }
  409. intStringLen := int(stringLen)
  410. if intStringLen < 0 {
  411. return ErrInvalidLengthGuiconfiguration
  412. }
  413. postIndex := iNdEx + intStringLen
  414. if postIndex < 0 {
  415. return ErrInvalidLengthGuiconfiguration
  416. }
  417. if postIndex > l {
  418. return io.ErrUnexpectedEOF
  419. }
  420. m.RawAddress = string(dAtA[iNdEx:postIndex])
  421. iNdEx = postIndex
  422. case 3:
  423. if wireType != 2 {
  424. return fmt.Errorf("proto: wrong wireType = %d for field RawUnixSocketPermissions", wireType)
  425. }
  426. var stringLen uint64
  427. for shift := uint(0); ; shift += 7 {
  428. if shift >= 64 {
  429. return ErrIntOverflowGuiconfiguration
  430. }
  431. if iNdEx >= l {
  432. return io.ErrUnexpectedEOF
  433. }
  434. b := dAtA[iNdEx]
  435. iNdEx++
  436. stringLen |= uint64(b&0x7F) << shift
  437. if b < 0x80 {
  438. break
  439. }
  440. }
  441. intStringLen := int(stringLen)
  442. if intStringLen < 0 {
  443. return ErrInvalidLengthGuiconfiguration
  444. }
  445. postIndex := iNdEx + intStringLen
  446. if postIndex < 0 {
  447. return ErrInvalidLengthGuiconfiguration
  448. }
  449. if postIndex > l {
  450. return io.ErrUnexpectedEOF
  451. }
  452. m.RawUnixSocketPermissions = string(dAtA[iNdEx:postIndex])
  453. iNdEx = postIndex
  454. case 4:
  455. if wireType != 2 {
  456. return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
  457. }
  458. var stringLen uint64
  459. for shift := uint(0); ; shift += 7 {
  460. if shift >= 64 {
  461. return ErrIntOverflowGuiconfiguration
  462. }
  463. if iNdEx >= l {
  464. return io.ErrUnexpectedEOF
  465. }
  466. b := dAtA[iNdEx]
  467. iNdEx++
  468. stringLen |= uint64(b&0x7F) << shift
  469. if b < 0x80 {
  470. break
  471. }
  472. }
  473. intStringLen := int(stringLen)
  474. if intStringLen < 0 {
  475. return ErrInvalidLengthGuiconfiguration
  476. }
  477. postIndex := iNdEx + intStringLen
  478. if postIndex < 0 {
  479. return ErrInvalidLengthGuiconfiguration
  480. }
  481. if postIndex > l {
  482. return io.ErrUnexpectedEOF
  483. }
  484. m.User = string(dAtA[iNdEx:postIndex])
  485. iNdEx = postIndex
  486. case 5:
  487. if wireType != 2 {
  488. return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  489. }
  490. var stringLen uint64
  491. for shift := uint(0); ; shift += 7 {
  492. if shift >= 64 {
  493. return ErrIntOverflowGuiconfiguration
  494. }
  495. if iNdEx >= l {
  496. return io.ErrUnexpectedEOF
  497. }
  498. b := dAtA[iNdEx]
  499. iNdEx++
  500. stringLen |= uint64(b&0x7F) << shift
  501. if b < 0x80 {
  502. break
  503. }
  504. }
  505. intStringLen := int(stringLen)
  506. if intStringLen < 0 {
  507. return ErrInvalidLengthGuiconfiguration
  508. }
  509. postIndex := iNdEx + intStringLen
  510. if postIndex < 0 {
  511. return ErrInvalidLengthGuiconfiguration
  512. }
  513. if postIndex > l {
  514. return io.ErrUnexpectedEOF
  515. }
  516. m.Password = string(dAtA[iNdEx:postIndex])
  517. iNdEx = postIndex
  518. case 6:
  519. if wireType != 0 {
  520. return fmt.Errorf("proto: wrong wireType = %d for field AuthMode", wireType)
  521. }
  522. m.AuthMode = 0
  523. for shift := uint(0); ; shift += 7 {
  524. if shift >= 64 {
  525. return ErrIntOverflowGuiconfiguration
  526. }
  527. if iNdEx >= l {
  528. return io.ErrUnexpectedEOF
  529. }
  530. b := dAtA[iNdEx]
  531. iNdEx++
  532. m.AuthMode |= AuthMode(b&0x7F) << shift
  533. if b < 0x80 {
  534. break
  535. }
  536. }
  537. case 7:
  538. if wireType != 0 {
  539. return fmt.Errorf("proto: wrong wireType = %d for field RawUseTLS", wireType)
  540. }
  541. var v int
  542. for shift := uint(0); ; shift += 7 {
  543. if shift >= 64 {
  544. return ErrIntOverflowGuiconfiguration
  545. }
  546. if iNdEx >= l {
  547. return io.ErrUnexpectedEOF
  548. }
  549. b := dAtA[iNdEx]
  550. iNdEx++
  551. v |= int(b&0x7F) << shift
  552. if b < 0x80 {
  553. break
  554. }
  555. }
  556. m.RawUseTLS = bool(v != 0)
  557. case 8:
  558. if wireType != 2 {
  559. return fmt.Errorf("proto: wrong wireType = %d for field APIKey", wireType)
  560. }
  561. var stringLen uint64
  562. for shift := uint(0); ; shift += 7 {
  563. if shift >= 64 {
  564. return ErrIntOverflowGuiconfiguration
  565. }
  566. if iNdEx >= l {
  567. return io.ErrUnexpectedEOF
  568. }
  569. b := dAtA[iNdEx]
  570. iNdEx++
  571. stringLen |= uint64(b&0x7F) << shift
  572. if b < 0x80 {
  573. break
  574. }
  575. }
  576. intStringLen := int(stringLen)
  577. if intStringLen < 0 {
  578. return ErrInvalidLengthGuiconfiguration
  579. }
  580. postIndex := iNdEx + intStringLen
  581. if postIndex < 0 {
  582. return ErrInvalidLengthGuiconfiguration
  583. }
  584. if postIndex > l {
  585. return io.ErrUnexpectedEOF
  586. }
  587. m.APIKey = string(dAtA[iNdEx:postIndex])
  588. iNdEx = postIndex
  589. case 9:
  590. if wireType != 0 {
  591. return fmt.Errorf("proto: wrong wireType = %d for field InsecureAdminAccess", wireType)
  592. }
  593. var v int
  594. for shift := uint(0); ; shift += 7 {
  595. if shift >= 64 {
  596. return ErrIntOverflowGuiconfiguration
  597. }
  598. if iNdEx >= l {
  599. return io.ErrUnexpectedEOF
  600. }
  601. b := dAtA[iNdEx]
  602. iNdEx++
  603. v |= int(b&0x7F) << shift
  604. if b < 0x80 {
  605. break
  606. }
  607. }
  608. m.InsecureAdminAccess = bool(v != 0)
  609. case 10:
  610. if wireType != 2 {
  611. return fmt.Errorf("proto: wrong wireType = %d for field Theme", wireType)
  612. }
  613. var stringLen uint64
  614. for shift := uint(0); ; shift += 7 {
  615. if shift >= 64 {
  616. return ErrIntOverflowGuiconfiguration
  617. }
  618. if iNdEx >= l {
  619. return io.ErrUnexpectedEOF
  620. }
  621. b := dAtA[iNdEx]
  622. iNdEx++
  623. stringLen |= uint64(b&0x7F) << shift
  624. if b < 0x80 {
  625. break
  626. }
  627. }
  628. intStringLen := int(stringLen)
  629. if intStringLen < 0 {
  630. return ErrInvalidLengthGuiconfiguration
  631. }
  632. postIndex := iNdEx + intStringLen
  633. if postIndex < 0 {
  634. return ErrInvalidLengthGuiconfiguration
  635. }
  636. if postIndex > l {
  637. return io.ErrUnexpectedEOF
  638. }
  639. m.Theme = string(dAtA[iNdEx:postIndex])
  640. iNdEx = postIndex
  641. case 11:
  642. if wireType != 0 {
  643. return fmt.Errorf("proto: wrong wireType = %d for field Debugging", wireType)
  644. }
  645. var v int
  646. for shift := uint(0); ; shift += 7 {
  647. if shift >= 64 {
  648. return ErrIntOverflowGuiconfiguration
  649. }
  650. if iNdEx >= l {
  651. return io.ErrUnexpectedEOF
  652. }
  653. b := dAtA[iNdEx]
  654. iNdEx++
  655. v |= int(b&0x7F) << shift
  656. if b < 0x80 {
  657. break
  658. }
  659. }
  660. m.Debugging = bool(v != 0)
  661. case 12:
  662. if wireType != 0 {
  663. return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipHostCheck", wireType)
  664. }
  665. var v int
  666. for shift := uint(0); ; shift += 7 {
  667. if shift >= 64 {
  668. return ErrIntOverflowGuiconfiguration
  669. }
  670. if iNdEx >= l {
  671. return io.ErrUnexpectedEOF
  672. }
  673. b := dAtA[iNdEx]
  674. iNdEx++
  675. v |= int(b&0x7F) << shift
  676. if b < 0x80 {
  677. break
  678. }
  679. }
  680. m.InsecureSkipHostCheck = bool(v != 0)
  681. case 13:
  682. if wireType != 0 {
  683. return fmt.Errorf("proto: wrong wireType = %d for field InsecureAllowFrameLoading", wireType)
  684. }
  685. var v int
  686. for shift := uint(0); ; shift += 7 {
  687. if shift >= 64 {
  688. return ErrIntOverflowGuiconfiguration
  689. }
  690. if iNdEx >= l {
  691. return io.ErrUnexpectedEOF
  692. }
  693. b := dAtA[iNdEx]
  694. iNdEx++
  695. v |= int(b&0x7F) << shift
  696. if b < 0x80 {
  697. break
  698. }
  699. }
  700. m.InsecureAllowFrameLoading = bool(v != 0)
  701. case 14:
  702. if wireType != 0 {
  703. return fmt.Errorf("proto: wrong wireType = %d for field SendBasicAuthPrompt", wireType)
  704. }
  705. var v int
  706. for shift := uint(0); ; shift += 7 {
  707. if shift >= 64 {
  708. return ErrIntOverflowGuiconfiguration
  709. }
  710. if iNdEx >= l {
  711. return io.ErrUnexpectedEOF
  712. }
  713. b := dAtA[iNdEx]
  714. iNdEx++
  715. v |= int(b&0x7F) << shift
  716. if b < 0x80 {
  717. break
  718. }
  719. }
  720. m.SendBasicAuthPrompt = bool(v != 0)
  721. default:
  722. iNdEx = preIndex
  723. skippy, err := skipGuiconfiguration(dAtA[iNdEx:])
  724. if err != nil {
  725. return err
  726. }
  727. if (skippy < 0) || (iNdEx+skippy) < 0 {
  728. return ErrInvalidLengthGuiconfiguration
  729. }
  730. if (iNdEx + skippy) > l {
  731. return io.ErrUnexpectedEOF
  732. }
  733. iNdEx += skippy
  734. }
  735. }
  736. if iNdEx > l {
  737. return io.ErrUnexpectedEOF
  738. }
  739. return nil
  740. }
  741. func skipGuiconfiguration(dAtA []byte) (n int, err error) {
  742. l := len(dAtA)
  743. iNdEx := 0
  744. depth := 0
  745. for iNdEx < l {
  746. var wire uint64
  747. for shift := uint(0); ; shift += 7 {
  748. if shift >= 64 {
  749. return 0, ErrIntOverflowGuiconfiguration
  750. }
  751. if iNdEx >= l {
  752. return 0, io.ErrUnexpectedEOF
  753. }
  754. b := dAtA[iNdEx]
  755. iNdEx++
  756. wire |= (uint64(b) & 0x7F) << shift
  757. if b < 0x80 {
  758. break
  759. }
  760. }
  761. wireType := int(wire & 0x7)
  762. switch wireType {
  763. case 0:
  764. for shift := uint(0); ; shift += 7 {
  765. if shift >= 64 {
  766. return 0, ErrIntOverflowGuiconfiguration
  767. }
  768. if iNdEx >= l {
  769. return 0, io.ErrUnexpectedEOF
  770. }
  771. iNdEx++
  772. if dAtA[iNdEx-1] < 0x80 {
  773. break
  774. }
  775. }
  776. case 1:
  777. iNdEx += 8
  778. case 2:
  779. var length int
  780. for shift := uint(0); ; shift += 7 {
  781. if shift >= 64 {
  782. return 0, ErrIntOverflowGuiconfiguration
  783. }
  784. if iNdEx >= l {
  785. return 0, io.ErrUnexpectedEOF
  786. }
  787. b := dAtA[iNdEx]
  788. iNdEx++
  789. length |= (int(b) & 0x7F) << shift
  790. if b < 0x80 {
  791. break
  792. }
  793. }
  794. if length < 0 {
  795. return 0, ErrInvalidLengthGuiconfiguration
  796. }
  797. iNdEx += length
  798. case 3:
  799. depth++
  800. case 4:
  801. if depth == 0 {
  802. return 0, ErrUnexpectedEndOfGroupGuiconfiguration
  803. }
  804. depth--
  805. case 5:
  806. iNdEx += 4
  807. default:
  808. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  809. }
  810. if iNdEx < 0 {
  811. return 0, ErrInvalidLengthGuiconfiguration
  812. }
  813. if depth == 0 {
  814. return iNdEx, nil
  815. }
  816. }
  817. return 0, io.ErrUnexpectedEOF
  818. }
  819. var (
  820. ErrInvalidLengthGuiconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
  821. ErrIntOverflowGuiconfiguration = fmt.Errorf("proto: integer overflow")
  822. ErrUnexpectedEndOfGroupGuiconfiguration = fmt.Errorf("proto: unexpected end of group")
  823. )