Compare commits
285 Commits
85567c24a5
...
bb7184c480
| Author | SHA1 | Date | |
|---|---|---|---|
| bb7184c480 | |||
| 633c903f33 | |||
| eea1b146eb | |||
| 6848e73ac6 | |||
| f0c81cc22f | |||
| 6406396d75 | |||
| b8e9353a99 | |||
| 58abfab434 | |||
| 8f5caf80bf | |||
| d1181e4460 | |||
| d71d77647f | |||
| 7934b253b0 | |||
| 5caf271d18 | |||
| 06e764dfd1 | |||
| 23ef741181 | |||
| ef16bf69f9 | |||
| 24fe5e3760 | |||
| 7ea988ccc5 | |||
| 7735b710dd | |||
| 9546978e3c | |||
| bbf093e104 | |||
| 4af106da5d | |||
| 2fc8ee5cb2 | |||
| fe9f4dcc95 | |||
| 62efe6a80d | |||
| ab135ed80e | |||
| f583a771d6 | |||
| cd40e1c9ca | |||
| 2ea9d6bc45 | |||
| 23cf374c95 | |||
| b46286c584 | |||
| 9e3445319b | |||
| 0d529d47db | |||
| 44bff5db82 | |||
| a3703f1d52 | |||
| 786347f0d5 | |||
| a30636b387 | |||
| a8f0107656 | |||
| 090538be0d | |||
| a6a04bf263 | |||
| 4344f1ff2c | |||
| beb0ab72ab | |||
| 382a32bec4 | |||
| 94cf7ba83e | |||
| 0788c6a770 | |||
| a3f38b8377 | |||
| e53d3decd7 | |||
| 81115cee52 | |||
| 42eac3d70b | |||
| cf413538fa | |||
| 051f4d9f1d | |||
| c20c6871c9 | |||
| 383f8bef10 | |||
| 87e9701f72 | |||
| acf472f1ef | |||
| 7c6edab53d | |||
| 320e110f8c | |||
| 736e3b1bd0 | |||
| 8cfcbf345e | |||
| a6e83c162d | |||
| c0be49a610 | |||
| dff14a45be | |||
| 2facb5c0fb | |||
| 686a57ebc5 | |||
| bc17428bd6 | |||
| 301e94808d | |||
| 6eb8e2cef8 | |||
| 293f3e5c09 | |||
| d96222ba1e | |||
| d1d305a638 | |||
| 3a94e21ab3 | |||
| 2757de0f03 | |||
| e1d750c24a | |||
| a9474f1a3d | |||
| 17e3b6513f | |||
| e97bd859fc | |||
| eaf04ae02d | |||
| 03adb50fee | |||
| bf28865012 | |||
| 48a47a8681 | |||
| 65c14cc10c | |||
| 0c682db6e8 | |||
| 543514dae9 | |||
| e1fbbfce04 | |||
| 42b6c1262d | |||
| 1ba87f9c30 | |||
| d42b82381e | |||
| 62a0a2c0af | |||
| 65f12cc019 | |||
| 5c84210272 | |||
| ac79481ec5 | |||
| 039cd019e9 | |||
| b39f315ac2 | |||
| be6d4dbb63 | |||
| 1424e76f54 | |||
| 613057182e | |||
| ac5fe7a266 | |||
| ef2a15879c | |||
| a4e8774077 | |||
| 70fe9ae034 | |||
| eebaada8f6 | |||
| 4495e996cb | |||
| 8ba1cd7101 | |||
| c98591b2bb | |||
| e250a5dbc9 | |||
| 096f691067 | |||
| d00a4d48ad | |||
| 661eb9c72a | |||
| 5aaf8d92bf | |||
| 8f8e28ca3d | |||
| e2fb31e67d | |||
| 7b76dd5142 | |||
| 28cd572cbd | |||
| 8d28627e5f | |||
| 5ad6d318e0 | |||
| 1fc1ea9285 | |||
| e1df94bb5e | |||
| 0a5cb9f175 | |||
| d14dbaaf99 | |||
| 3fa1bfcb2a | |||
| 4643de4f6e | |||
| cd2d8863a7 | |||
| ef5362e1c4 | |||
| c796d3f507 | |||
| 9460473581 | |||
| 73537c1a21 | |||
| 6558e373c6 | |||
| 6f52c9ff98 | |||
| 9f5948a253 | |||
| 3e5d70a8a3 | |||
| 1d62e95910 | |||
| 980880533c | |||
| 58eb0d0b52 | |||
| cee0d67de1 | |||
| 55c74ea17c | |||
| f064802fcb | |||
| 31d401e213 | |||
| c1dc0821e9 | |||
| 80fd028885 | |||
| d0a51000d0 | |||
| 8a13754309 | |||
| eb99e251bf | |||
| 7bc66c7107 | |||
| b29c2fcad3 | |||
| c07d4a3abb | |||
| de1ad8e06e | |||
| 87fed2c831 | |||
| af9a59227f | |||
| 4d8b89c68c | |||
| 0fb393e9ed | |||
| 21f6837fec | |||
| e9120402af | |||
| 6c194a0646 | |||
| cde4488548 | |||
| 638f2a9554 | |||
| aac5d05d13 | |||
| d415621631 | |||
| f9921d2ba0 | |||
| 549b5f05c6 | |||
| c1ad440e83 | |||
| 7b2b64e8f6 | |||
| ff25d74c61 | |||
| 16a7f5ed78 | |||
| f65fe9d5aa | |||
| 156e127776 | |||
| e370308b10 | |||
| cf18598b96 | |||
| f3e0ae8672 | |||
| 9839f3b358 | |||
| 0fbc4a4f87 | |||
| 98168623b1 | |||
| 6f16137b43 | |||
| 905d2077d3 | |||
| 057565b0aa | |||
| bf21a5b906 | |||
| f10b996656 | |||
| 32cf742fa8 | |||
| 9ecc24cbbe | |||
| de4389b6f1 | |||
| f90be904e4 | |||
| 2827c3a921 | |||
| 4269f34670 | |||
| cc591a2e04 | |||
| d47c033d7b | |||
| 3e16c413e5 | |||
| cb84e6195d | |||
| 59ed859aae | |||
| e5efa596d9 | |||
| bfef9134b7 | |||
| 3c4375964e | |||
| e26c9f0c51 | |||
| 3533242855 | |||
| d3b16ace79 | |||
| b991b6f7d8 | |||
| f41e053e08 | |||
| b75a07c4dd | |||
| 48c27ae476 | |||
| cb7e875f2d | |||
| 025d64087f | |||
| 8d56ba48f6 | |||
| 3c5f500c6d | |||
| dd7b217748 | |||
| 6fd82f1770 | |||
| 9402bad9fd | |||
| 19e1ce9182 | |||
| f86d6b5db6 | |||
| f2277fa337 | |||
| 39fc87c859 | |||
| 637fc47188 | |||
| 1bab9a17e6 | |||
| f36758d8ac | |||
| ba65fbe5b7 | |||
| 0907469573 | |||
| ae0c5f0c84 | |||
| 625ed25b67 | |||
| d6216c1103 | |||
| e01ea1d9c2 | |||
| 94f01d2ee1 | |||
| c81b87d824 | |||
| ed8844be34 | |||
| ae7b87aa17 | |||
| bef40ad0f1 | |||
| a41962ba8d | |||
| bb36d88c98 | |||
| 0d28141f65 | |||
| 73ad76501c | |||
| e447ff1d42 | |||
| b71fef10ef | |||
| b979be1484 | |||
| cd79fe7319 | |||
| 8d9260aca5 | |||
| 34a724268a | |||
| 11b0192a23 | |||
| fb076dd4db | |||
| a63b001e5b | |||
| 76e30e9211 | |||
| 63da647619 | |||
| a92cca188d | |||
| 49a935d6c6 | |||
| af0fefc3bd | |||
| 44d5704606 | |||
| 816d1e108e | |||
| 72c1ad35b7 | |||
| 586d28119a | |||
| cc328eee8d | |||
| d621faa3ca | |||
| 47c77fcdbb | |||
| 3a47be645f | |||
| fb48a52910 | |||
| 78246a5b2a | |||
| 7b228e0c03 | |||
| 48365942d1 | |||
| 83c218564f | |||
| 908c7cba05 | |||
| 9120e6acfd | |||
| 60111dac43 | |||
| 463404d774 | |||
| 99f4ca986a | |||
| df6a9db80b | |||
| dc54b70b59 | |||
| 8e8cc16853 | |||
| 272d59af4c | |||
| d067c785fb | |||
| 4b443be4e3 | |||
| bd540ad262 | |||
| 5a8bb4216c | |||
| c250930722 | |||
| ed7b95d707 | |||
| 5bbf97eaf2 | |||
| c1978c9ee7 | |||
| 73f269f847 | |||
| 60caecc1b9 | |||
| a23504c746 | |||
| d0cf3bb208 | |||
| 8d43eaf18d | |||
| 8e30f6c984 | |||
| 2d0a24100e | |||
| ef50c8626a | |||
| db0a50ed33 | |||
| b4c173df5f | |||
| a6919e8396 | |||
| 2779dcc5bd | |||
| 8562d64dd5 | |||
| 2de0d9dc9b | |||
| a357389fac |
File diff suppressed because it is too large
Load Diff
@ -11442,7 +11442,7 @@ var file_api_accountFiee_accountFiee_proto_rawDesc = []byte{
|
||||
0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x75, 0x64,
|
||||
0x69, 0x6f, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x56,
|
||||
0x69, 0x64, 0x65, 0x6f, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x10, 0x04, 0x12, 0x0c, 0x0a,
|
||||
0x08, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x10, 0x05, 0x32, 0xeb, 0x2b, 0x0a, 0x0b,
|
||||
0x08, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x10, 0x05, 0x32, 0xcd, 0x2c, 0x0a, 0x0b,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x12, 0x3c, 0x0a, 0x05, 0x4c,
|
||||
0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
@ -11645,157 +11645,163 @@ var file_api_accountFiee_accountFiee_proto_rawDesc = []byte{
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x6c, 0x69,
|
||||
0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69,
|
||||
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a,
|
||||
0x1f, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a,
|
||||
0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x53, 0x61, 0x76,
|
||||
0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x4e,
|
||||
0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
0x12, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x55,
|
||||
0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65,
|
||||
0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49,
|
||||
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44,
|
||||
0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74,
|
||||
0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73,
|
||||
0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43,
|
||||
0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||
0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x32, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x1a, 0x21, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
|
||||
0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0x22, 0x00,
|
||||
0x12, 0x57, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x61, 0x69, 0x74,
|
||||
0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x21, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4e,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x75, 0x62,
|
||||
0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68,
|
||||
0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74,
|
||||
0x61, 0x1a, 0x1f, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68,
|
||||
0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74,
|
||||
0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x53,
|
||||
0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73,
|
||||
0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00,
|
||||
0x12, 0x4e, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73,
|
||||
0x65, 0x72, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65,
|
||||
0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x61, 0x69, 0x74, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x46, 0x69, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x61, 0x69,
|
||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x10, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x21, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43,
|
||||
0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
|
||||
0x49, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x12, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65,
|
||||
0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61,
|
||||
0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0e, 0x53, 0x61,
|
||||
0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73,
|
||||
0x67, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61,
|
||||
0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68,
|
||||
0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x25,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00,
|
||||
0x12, 0x55, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44,
|
||||
0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42,
|
||||
0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65,
|
||||
0x72, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68,
|
||||
0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74,
|
||||
0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x20, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73,
|
||||
0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65,
|
||||
0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x1a, 0x21, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43,
|
||||
0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x32,
|
||||
0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x61,
|
||||
0x69, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x61, 0x69, 0x74, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57,
|
||||
0x61, 0x69, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x10, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12,
|
||||
0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68,
|
||||
0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x21, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||
0x00, 0x12, 0x49, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x61,
|
||||
0x74, 0x61, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69,
|
||||
0x61, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x20, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0f, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x1a, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d,
|
||||
0x65, 0x64, 0x69, 0x61, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67,
|
||||
0x22, 0x00, 0x12, 0x45, 0x0a, 0x0d, 0x53, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65,
|
||||
0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x61, 0x74, 0x61, 0x1a,
|
||||
0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0e,
|
||||
0x53, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1b,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61,
|
||||
0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43,
|
||||
0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68,
|
||||
0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0f, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x23, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x12, 0x47,
|
||||
0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x65, 0x74, 0x61, 0x69,
|
||||
0x6c, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x42, 0x79, 0x49, 0x64,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44,
|
||||
0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74,
|
||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4d,
|
||||
0x65, 0x64, 0x69, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x13, 0x47, 0x65, 0x74,
|
||||
0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
|
||||
0x12, 0x25, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x49, 0x64,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
|
||||
0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
|
||||
0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x20, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0f, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x1a,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61,
|
||||
0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d,
|
||||
0x73, 0x67, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0d, 0x53, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x61, 0x74,
|
||||
0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0f, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x23,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65,
|
||||
0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x58, 0x0a,
|
||||
0x12, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65,
|
||||
0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x42, 0x79,
|
||||
0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69,
|
||||
0x61, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68,
|
||||
0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
|
||||
0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65,
|
||||
0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x29, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68,
|
||||
0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43,
|
||||
0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65,
|
||||
0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x29, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75,
|
||||
0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x59, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74,
|
||||
0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x23,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61,
|
||||
0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x44,
|
||||
0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65,
|
||||
0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x57, 0x0a,
|
||||
0x16, 0x53, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70,
|
||||
0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65,
|
||||
0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x12, 0x2c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52,
|
||||
0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x1b, 0x47, 0x65,
|
||||
0x74, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x41,
|
||||
0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x42, 0x79, 0x49,
|
||||
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52,
|
||||
0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12,
|
||||
0x78, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65,
|
||||
0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68,
|
||||
0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x63,
|
||||
0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46,
|
||||
0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12,
|
||||
0x57, 0x0a, 0x16, 0x53, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52,
|
||||
0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f,
|
||||
0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69,
|
||||
0x65, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74,
|
||||
0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x1b,
|
||||
0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
||||
0x52, 0x75, 0x6c, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
|
||||
0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x3b,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x42,
|
||||
0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74,
|
||||
0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x22,
|
||||
0x00, 0x12, 0x78, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f,
|
||||
0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x43, 0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43,
|
||||
0x68, 0x61, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x75, 0x6c, 0x65,
|
||||
0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e,
|
||||
0x2f, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x65, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -12021,101 +12027,103 @@ var file_api_accountFiee_accountFiee_proto_depIdxs = []int32{
|
||||
5, // 73: accountFiee.AccountFiee.VerifySliderCaptcha:input_type -> accountFiee.VerifySliderCaptchaRequest
|
||||
3, // 74: accountFiee.AccountFiee.SendNationMsg:input_type -> accountFiee.SendNationMsgRequest
|
||||
1, // 75: accountFiee.AccountFiee.VerifySliderStatus:input_type -> accountFiee.VerifySliderStatusRequest
|
||||
99, // 76: accountFiee.AccountFiee.SaveSubmitInfo:input_type -> accountFiee.SubmitInfoRequest
|
||||
124, // 77: accountFiee.AccountFiee.CreateChatUser:input_type -> accountFiee.ChatUserData
|
||||
124, // 78: accountFiee.AccountFiee.UpdateChatUser:input_type -> accountFiee.ChatUserData
|
||||
124, // 79: accountFiee.AccountFiee.SaveChatUser:input_type -> accountFiee.ChatUserData
|
||||
126, // 80: accountFiee.AccountFiee.DeleteChatUser:input_type -> accountFiee.DeleteChatUserRequest
|
||||
127, // 81: accountFiee.AccountFiee.GetChatUserDetail:input_type -> accountFiee.GetChatUserByIdRequest
|
||||
128, // 82: accountFiee.AccountFiee.GetChatUserList:input_type -> accountFiee.GetChatUserListRequest
|
||||
115, // 83: accountFiee.AccountFiee.GetChatUserList2:input_type -> accountFiee.GetChatUserListRequest2
|
||||
107, // 84: accountFiee.AccountFiee.RegisterWaiter:input_type -> accountFiee.RegisterWaiterRequest
|
||||
101, // 85: accountFiee.AccountFiee.CreateChatRecord:input_type -> accountFiee.ChatRecordData
|
||||
101, // 86: accountFiee.AccountFiee.UpdateChatRecord:input_type -> accountFiee.ChatRecordData
|
||||
101, // 87: accountFiee.AccountFiee.SaveChatRecord:input_type -> accountFiee.ChatRecordData
|
||||
103, // 88: accountFiee.AccountFiee.DeleteChatRecord:input_type -> accountFiee.DeleteChatRecordRequest
|
||||
104, // 89: accountFiee.AccountFiee.GetChatRecordDetail:input_type -> accountFiee.GetChatRecordByIdRequest
|
||||
105, // 90: accountFiee.AccountFiee.GetChatRecordList:input_type -> accountFiee.GetChatRecordListRequest
|
||||
109, // 91: accountFiee.AccountFiee.CreateChatMedia:input_type -> accountFiee.ChatMediaData
|
||||
109, // 92: accountFiee.AccountFiee.UpdateChatMedia:input_type -> accountFiee.ChatMediaData
|
||||
109, // 93: accountFiee.AccountFiee.SaveChatMedia:input_type -> accountFiee.ChatMediaData
|
||||
111, // 94: accountFiee.AccountFiee.DeleteChatMedia:input_type -> accountFiee.DeleteChatMediaRequest
|
||||
112, // 95: accountFiee.AccountFiee.GetChatMediaDetail:input_type -> accountFiee.GetChatMediaByIdRequest
|
||||
113, // 96: accountFiee.AccountFiee.GetChatMediaList:input_type -> accountFiee.GetChatMediaListRequest
|
||||
118, // 97: accountFiee.AccountFiee.CreateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||
118, // 98: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||
118, // 99: accountFiee.AccountFiee.SaveChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||
120, // 100: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:input_type -> accountFiee.DeleteChatAutoReplyRulerRequest
|
||||
121, // 101: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:input_type -> accountFiee.GetChatAutoReplyRulerByIdRequest
|
||||
122, // 102: accountFiee.AccountFiee.GetChatAutoReplyRulerList:input_type -> accountFiee.GetChatAutoReplyRulerListRequest
|
||||
74, // 103: accountFiee.AccountFiee.Login:output_type -> accountFiee.TokenInfo
|
||||
74, // 104: accountFiee.AccountFiee.RefreshToken:output_type -> accountFiee.TokenInfo
|
||||
45, // 105: accountFiee.AccountFiee.Logout:output_type -> accountFiee.CommonResponse
|
||||
45, // 106: accountFiee.AccountFiee.OffLine:output_type -> accountFiee.CommonResponse
|
||||
39, // 107: accountFiee.AccountFiee.OnlineLog:output_type -> accountFiee.LoginLogsResponse
|
||||
40, // 108: accountFiee.AccountFiee.OnlineLogById:output_type -> accountFiee.LoginLog
|
||||
61, // 109: accountFiee.AccountFiee.CheckPwd:output_type -> accountFiee.UpdateResponse
|
||||
51, // 110: accountFiee.AccountFiee.SendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 111: accountFiee.AccountFiee.SendCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 112: accountFiee.AccountFiee.SendExCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 113: accountFiee.AccountFiee.SendMsgRegister:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 114: accountFiee.AccountFiee.CheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 115: accountFiee.AccountFiee.SendNewTelNumMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 116: accountFiee.AccountFiee.UpdateTelNum:output_type -> accountFiee.SendMsgStatusResponse
|
||||
71, // 117: accountFiee.AccountFiee.Authentication:output_type -> accountFiee.RequestStatus
|
||||
67, // 118: accountFiee.AccountFiee.DecryptJwt:output_type -> accountFiee.DecryptJwtResponse
|
||||
13, // 119: accountFiee.AccountFiee.Info:output_type -> accountFiee.UserInfoResponse
|
||||
66, // 120: accountFiee.AccountFiee.JobNumGetInfo:output_type -> accountFiee.InfoResponse
|
||||
64, // 121: accountFiee.AccountFiee.List:output_type -> accountFiee.ListResponse
|
||||
64, // 122: accountFiee.AccountFiee.RandList:output_type -> accountFiee.ListResponse
|
||||
64, // 123: accountFiee.AccountFiee.ListByIDs:output_type -> accountFiee.ListResponse
|
||||
57, // 124: accountFiee.AccountFiee.Remove:output_type -> accountFiee.RemoveResponse
|
||||
61, // 125: accountFiee.AccountFiee.Update:output_type -> accountFiee.UpdateResponse
|
||||
64, // 126: accountFiee.AccountFiee.UsersByTel:output_type -> accountFiee.ListResponse
|
||||
13, // 127: accountFiee.AccountFiee.UserByTel:output_type -> accountFiee.UserInfoResponse
|
||||
51, // 128: accountFiee.AccountFiee.OnlySendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 129: accountFiee.AccountFiee.OnlyCheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
24, // 130: accountFiee.AccountFiee.MailAccountByNickName:output_type -> accountFiee.MaiAccountResponse
|
||||
64, // 131: accountFiee.AccountFiee.ListV2:output_type -> accountFiee.ListResponse
|
||||
19, // 132: accountFiee.AccountFiee.QueryPersonnelWithTheSameName:output_type -> accountFiee.QueryPersonnelWithTheSameNameResponse
|
||||
64, // 133: accountFiee.AccountFiee.UsersByJobNum:output_type -> accountFiee.ListResponse
|
||||
14, // 134: accountFiee.AccountFiee.RealName:output_type -> accountFiee.RealNameResponse
|
||||
16, // 135: accountFiee.AccountFiee.Register:output_type -> accountFiee.RegisterResponse
|
||||
10, // 136: accountFiee.AccountFiee.UserList:output_type -> accountFiee.UserListResponse
|
||||
8, // 137: accountFiee.AccountFiee.CheckRealName:output_type -> accountFiee.CheckRealNameResponse
|
||||
6, // 138: accountFiee.AccountFiee.GenerateSliderCaptcha:output_type -> accountFiee.GenerateSliderCaptchaResponse
|
||||
4, // 139: accountFiee.AccountFiee.VerifySliderCaptcha:output_type -> accountFiee.VerifySliderCaptchaResponse
|
||||
51, // 140: accountFiee.AccountFiee.SendNationMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
2, // 141: accountFiee.AccountFiee.VerifySliderStatus:output_type -> accountFiee.VerifySliderStatusResponse
|
||||
45, // 142: accountFiee.AccountFiee.SaveSubmitInfo:output_type -> accountFiee.CommonResponse
|
||||
125, // 143: accountFiee.AccountFiee.CreateChatUser:output_type -> accountFiee.CreateChatUserResp
|
||||
100, // 144: accountFiee.AccountFiee.UpdateChatUser:output_type -> accountFiee.CommonMsg
|
||||
100, // 145: accountFiee.AccountFiee.SaveChatUser:output_type -> accountFiee.CommonMsg
|
||||
100, // 146: accountFiee.AccountFiee.DeleteChatUser:output_type -> accountFiee.CommonMsg
|
||||
124, // 147: accountFiee.AccountFiee.GetChatUserDetail:output_type -> accountFiee.ChatUserData
|
||||
129, // 148: accountFiee.AccountFiee.GetChatUserList:output_type -> accountFiee.GetChatUserListResp
|
||||
117, // 149: accountFiee.AccountFiee.GetChatUserList2:output_type -> accountFiee.GetChatUserListResp2
|
||||
108, // 150: accountFiee.AccountFiee.RegisterWaiter:output_type -> accountFiee.RegisterWaiterResp
|
||||
102, // 151: accountFiee.AccountFiee.CreateChatRecord:output_type -> accountFiee.CreateChatRecordResp
|
||||
100, // 152: accountFiee.AccountFiee.UpdateChatRecord:output_type -> accountFiee.CommonMsg
|
||||
100, // 153: accountFiee.AccountFiee.SaveChatRecord:output_type -> accountFiee.CommonMsg
|
||||
100, // 154: accountFiee.AccountFiee.DeleteChatRecord:output_type -> accountFiee.CommonMsg
|
||||
101, // 155: accountFiee.AccountFiee.GetChatRecordDetail:output_type -> accountFiee.ChatRecordData
|
||||
106, // 156: accountFiee.AccountFiee.GetChatRecordList:output_type -> accountFiee.GetChatRecordListResp
|
||||
110, // 157: accountFiee.AccountFiee.CreateChatMedia:output_type -> accountFiee.CreateChatMediaResp
|
||||
100, // 158: accountFiee.AccountFiee.UpdateChatMedia:output_type -> accountFiee.CommonMsg
|
||||
100, // 159: accountFiee.AccountFiee.SaveChatMedia:output_type -> accountFiee.CommonMsg
|
||||
100, // 160: accountFiee.AccountFiee.DeleteChatMedia:output_type -> accountFiee.CommonMsg
|
||||
109, // 161: accountFiee.AccountFiee.GetChatMediaDetail:output_type -> accountFiee.ChatMediaData
|
||||
114, // 162: accountFiee.AccountFiee.GetChatMediaList:output_type -> accountFiee.GetChatMediaListResp
|
||||
119, // 163: accountFiee.AccountFiee.CreateChatAutoReplyRuler:output_type -> accountFiee.CreateChatAutoReplyRulerResp
|
||||
100, // 164: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||
100, // 165: accountFiee.AccountFiee.SaveChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||
100, // 166: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||
118, // 167: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:output_type -> accountFiee.ChatAutoReplyRulerData
|
||||
123, // 168: accountFiee.AccountFiee.GetChatAutoReplyRulerList:output_type -> accountFiee.GetChatAutoReplyRulerListResp
|
||||
103, // [103:169] is the sub-list for method output_type
|
||||
37, // [37:103] is the sub-list for method input_type
|
||||
3, // 76: accountFiee.AccountFiee.SendNationTemplateMsg:input_type -> accountFiee.SendNationMsgRequest
|
||||
99, // 77: accountFiee.AccountFiee.SaveSubmitInfo:input_type -> accountFiee.SubmitInfoRequest
|
||||
124, // 78: accountFiee.AccountFiee.CreateChatUser:input_type -> accountFiee.ChatUserData
|
||||
124, // 79: accountFiee.AccountFiee.UpdateChatUser:input_type -> accountFiee.ChatUserData
|
||||
124, // 80: accountFiee.AccountFiee.SaveChatUser:input_type -> accountFiee.ChatUserData
|
||||
126, // 81: accountFiee.AccountFiee.DeleteChatUser:input_type -> accountFiee.DeleteChatUserRequest
|
||||
127, // 82: accountFiee.AccountFiee.GetChatUserDetail:input_type -> accountFiee.GetChatUserByIdRequest
|
||||
128, // 83: accountFiee.AccountFiee.GetChatUserList:input_type -> accountFiee.GetChatUserListRequest
|
||||
115, // 84: accountFiee.AccountFiee.GetChatUserList2:input_type -> accountFiee.GetChatUserListRequest2
|
||||
107, // 85: accountFiee.AccountFiee.RegisterWaiter:input_type -> accountFiee.RegisterWaiterRequest
|
||||
101, // 86: accountFiee.AccountFiee.CreateChatRecord:input_type -> accountFiee.ChatRecordData
|
||||
101, // 87: accountFiee.AccountFiee.UpdateChatRecord:input_type -> accountFiee.ChatRecordData
|
||||
101, // 88: accountFiee.AccountFiee.SaveChatRecord:input_type -> accountFiee.ChatRecordData
|
||||
103, // 89: accountFiee.AccountFiee.DeleteChatRecord:input_type -> accountFiee.DeleteChatRecordRequest
|
||||
104, // 90: accountFiee.AccountFiee.GetChatRecordDetail:input_type -> accountFiee.GetChatRecordByIdRequest
|
||||
105, // 91: accountFiee.AccountFiee.GetChatRecordList:input_type -> accountFiee.GetChatRecordListRequest
|
||||
109, // 92: accountFiee.AccountFiee.CreateChatMedia:input_type -> accountFiee.ChatMediaData
|
||||
109, // 93: accountFiee.AccountFiee.UpdateChatMedia:input_type -> accountFiee.ChatMediaData
|
||||
109, // 94: accountFiee.AccountFiee.SaveChatMedia:input_type -> accountFiee.ChatMediaData
|
||||
111, // 95: accountFiee.AccountFiee.DeleteChatMedia:input_type -> accountFiee.DeleteChatMediaRequest
|
||||
112, // 96: accountFiee.AccountFiee.GetChatMediaDetail:input_type -> accountFiee.GetChatMediaByIdRequest
|
||||
113, // 97: accountFiee.AccountFiee.GetChatMediaList:input_type -> accountFiee.GetChatMediaListRequest
|
||||
118, // 98: accountFiee.AccountFiee.CreateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||
118, // 99: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||
118, // 100: accountFiee.AccountFiee.SaveChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||
120, // 101: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:input_type -> accountFiee.DeleteChatAutoReplyRulerRequest
|
||||
121, // 102: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:input_type -> accountFiee.GetChatAutoReplyRulerByIdRequest
|
||||
122, // 103: accountFiee.AccountFiee.GetChatAutoReplyRulerList:input_type -> accountFiee.GetChatAutoReplyRulerListRequest
|
||||
74, // 104: accountFiee.AccountFiee.Login:output_type -> accountFiee.TokenInfo
|
||||
74, // 105: accountFiee.AccountFiee.RefreshToken:output_type -> accountFiee.TokenInfo
|
||||
45, // 106: accountFiee.AccountFiee.Logout:output_type -> accountFiee.CommonResponse
|
||||
45, // 107: accountFiee.AccountFiee.OffLine:output_type -> accountFiee.CommonResponse
|
||||
39, // 108: accountFiee.AccountFiee.OnlineLog:output_type -> accountFiee.LoginLogsResponse
|
||||
40, // 109: accountFiee.AccountFiee.OnlineLogById:output_type -> accountFiee.LoginLog
|
||||
61, // 110: accountFiee.AccountFiee.CheckPwd:output_type -> accountFiee.UpdateResponse
|
||||
51, // 111: accountFiee.AccountFiee.SendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 112: accountFiee.AccountFiee.SendCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 113: accountFiee.AccountFiee.SendExCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 114: accountFiee.AccountFiee.SendMsgRegister:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 115: accountFiee.AccountFiee.CheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 116: accountFiee.AccountFiee.SendNewTelNumMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 117: accountFiee.AccountFiee.UpdateTelNum:output_type -> accountFiee.SendMsgStatusResponse
|
||||
71, // 118: accountFiee.AccountFiee.Authentication:output_type -> accountFiee.RequestStatus
|
||||
67, // 119: accountFiee.AccountFiee.DecryptJwt:output_type -> accountFiee.DecryptJwtResponse
|
||||
13, // 120: accountFiee.AccountFiee.Info:output_type -> accountFiee.UserInfoResponse
|
||||
66, // 121: accountFiee.AccountFiee.JobNumGetInfo:output_type -> accountFiee.InfoResponse
|
||||
64, // 122: accountFiee.AccountFiee.List:output_type -> accountFiee.ListResponse
|
||||
64, // 123: accountFiee.AccountFiee.RandList:output_type -> accountFiee.ListResponse
|
||||
64, // 124: accountFiee.AccountFiee.ListByIDs:output_type -> accountFiee.ListResponse
|
||||
57, // 125: accountFiee.AccountFiee.Remove:output_type -> accountFiee.RemoveResponse
|
||||
61, // 126: accountFiee.AccountFiee.Update:output_type -> accountFiee.UpdateResponse
|
||||
64, // 127: accountFiee.AccountFiee.UsersByTel:output_type -> accountFiee.ListResponse
|
||||
13, // 128: accountFiee.AccountFiee.UserByTel:output_type -> accountFiee.UserInfoResponse
|
||||
51, // 129: accountFiee.AccountFiee.OnlySendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
51, // 130: accountFiee.AccountFiee.OnlyCheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
24, // 131: accountFiee.AccountFiee.MailAccountByNickName:output_type -> accountFiee.MaiAccountResponse
|
||||
64, // 132: accountFiee.AccountFiee.ListV2:output_type -> accountFiee.ListResponse
|
||||
19, // 133: accountFiee.AccountFiee.QueryPersonnelWithTheSameName:output_type -> accountFiee.QueryPersonnelWithTheSameNameResponse
|
||||
64, // 134: accountFiee.AccountFiee.UsersByJobNum:output_type -> accountFiee.ListResponse
|
||||
14, // 135: accountFiee.AccountFiee.RealName:output_type -> accountFiee.RealNameResponse
|
||||
16, // 136: accountFiee.AccountFiee.Register:output_type -> accountFiee.RegisterResponse
|
||||
10, // 137: accountFiee.AccountFiee.UserList:output_type -> accountFiee.UserListResponse
|
||||
8, // 138: accountFiee.AccountFiee.CheckRealName:output_type -> accountFiee.CheckRealNameResponse
|
||||
6, // 139: accountFiee.AccountFiee.GenerateSliderCaptcha:output_type -> accountFiee.GenerateSliderCaptchaResponse
|
||||
4, // 140: accountFiee.AccountFiee.VerifySliderCaptcha:output_type -> accountFiee.VerifySliderCaptchaResponse
|
||||
51, // 141: accountFiee.AccountFiee.SendNationMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
2, // 142: accountFiee.AccountFiee.VerifySliderStatus:output_type -> accountFiee.VerifySliderStatusResponse
|
||||
51, // 143: accountFiee.AccountFiee.SendNationTemplateMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||
45, // 144: accountFiee.AccountFiee.SaveSubmitInfo:output_type -> accountFiee.CommonResponse
|
||||
125, // 145: accountFiee.AccountFiee.CreateChatUser:output_type -> accountFiee.CreateChatUserResp
|
||||
100, // 146: accountFiee.AccountFiee.UpdateChatUser:output_type -> accountFiee.CommonMsg
|
||||
100, // 147: accountFiee.AccountFiee.SaveChatUser:output_type -> accountFiee.CommonMsg
|
||||
100, // 148: accountFiee.AccountFiee.DeleteChatUser:output_type -> accountFiee.CommonMsg
|
||||
124, // 149: accountFiee.AccountFiee.GetChatUserDetail:output_type -> accountFiee.ChatUserData
|
||||
129, // 150: accountFiee.AccountFiee.GetChatUserList:output_type -> accountFiee.GetChatUserListResp
|
||||
117, // 151: accountFiee.AccountFiee.GetChatUserList2:output_type -> accountFiee.GetChatUserListResp2
|
||||
108, // 152: accountFiee.AccountFiee.RegisterWaiter:output_type -> accountFiee.RegisterWaiterResp
|
||||
102, // 153: accountFiee.AccountFiee.CreateChatRecord:output_type -> accountFiee.CreateChatRecordResp
|
||||
100, // 154: accountFiee.AccountFiee.UpdateChatRecord:output_type -> accountFiee.CommonMsg
|
||||
100, // 155: accountFiee.AccountFiee.SaveChatRecord:output_type -> accountFiee.CommonMsg
|
||||
100, // 156: accountFiee.AccountFiee.DeleteChatRecord:output_type -> accountFiee.CommonMsg
|
||||
101, // 157: accountFiee.AccountFiee.GetChatRecordDetail:output_type -> accountFiee.ChatRecordData
|
||||
106, // 158: accountFiee.AccountFiee.GetChatRecordList:output_type -> accountFiee.GetChatRecordListResp
|
||||
110, // 159: accountFiee.AccountFiee.CreateChatMedia:output_type -> accountFiee.CreateChatMediaResp
|
||||
100, // 160: accountFiee.AccountFiee.UpdateChatMedia:output_type -> accountFiee.CommonMsg
|
||||
100, // 161: accountFiee.AccountFiee.SaveChatMedia:output_type -> accountFiee.CommonMsg
|
||||
100, // 162: accountFiee.AccountFiee.DeleteChatMedia:output_type -> accountFiee.CommonMsg
|
||||
109, // 163: accountFiee.AccountFiee.GetChatMediaDetail:output_type -> accountFiee.ChatMediaData
|
||||
114, // 164: accountFiee.AccountFiee.GetChatMediaList:output_type -> accountFiee.GetChatMediaListResp
|
||||
119, // 165: accountFiee.AccountFiee.CreateChatAutoReplyRuler:output_type -> accountFiee.CreateChatAutoReplyRulerResp
|
||||
100, // 166: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||
100, // 167: accountFiee.AccountFiee.SaveChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||
100, // 168: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||
118, // 169: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:output_type -> accountFiee.ChatAutoReplyRulerData
|
||||
123, // 170: accountFiee.AccountFiee.GetChatAutoReplyRulerList:output_type -> accountFiee.GetChatAutoReplyRulerListResp
|
||||
104, // [104:171] is the sub-list for method output_type
|
||||
37, // [37:104] is the sub-list for method input_type
|
||||
37, // [37:37] is the sub-list for extension type_name
|
||||
37, // [37:37] is the sub-list for extension extendee
|
||||
0, // [0:37] is the sub-list for field type_name
|
||||
|
||||
@ -62,6 +62,7 @@ service AccountFiee {
|
||||
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置
|
||||
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态
|
||||
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||
|
||||
// submit info
|
||||
rpc SaveSubmitInfo(SubmitInfoRequest) returns (CommonResponse);
|
||||
|
||||
@ -68,6 +68,7 @@ type AccountFieeClient interface {
|
||||
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
|
||||
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
|
||||
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
// submit info
|
||||
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
//-----------------------------客服聊天系统--------------------------------
|
||||
@ -143,6 +144,7 @@ type AccountFieeClientImpl struct {
|
||||
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
||||
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
|
||||
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
|
||||
UpdateChatUser func(ctx context.Context, in *ChatUserData) (*CommonMsg, error)
|
||||
@ -418,6 +420,12 @@ func (c *accountFieeClient) VerifySliderStatus(ctx context.Context, in *VerifySl
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/VerifySliderStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *accountFieeClient) SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment) {
|
||||
out := new(SendMsgStatusResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationTemplateMsg", in, out)
|
||||
}
|
||||
|
||||
func (c *accountFieeClient) SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -624,6 +632,7 @@ type AccountFieeServer interface {
|
||||
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
||||
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
// submit info
|
||||
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
||||
//-----------------------------客服聊天系统--------------------------------
|
||||
@ -778,6 +787,9 @@ func (UnimplementedAccountFieeServer) SendNationMsg(context.Context, *SendNation
|
||||
func (UnimplementedAccountFieeServer) VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VerifySliderStatus not implemented")
|
||||
}
|
||||
func (UnimplementedAccountFieeServer) SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendNationTemplateMsg not implemented")
|
||||
}
|
||||
func (UnimplementedAccountFieeServer) SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SaveSubmitInfo not implemented")
|
||||
}
|
||||
@ -2018,6 +2030,35 @@ func _AccountFiee_VerifySliderStatus_Handler(srv interface{}, ctx context.Contex
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountFiee_SendNationTemplateMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendNationMsgRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("SendNationTemplateMsg", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountFiee_SaveSubmitInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SubmitInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -2964,6 +3005,10 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "VerifySliderStatus",
|
||||
Handler: _AccountFiee_VerifySliderStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendNationTemplateMsg",
|
||||
Handler: _AccountFiee_SendNationTemplateMsg_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SaveSubmitInfo",
|
||||
Handler: _AccountFiee_SaveSubmitInfo_Handler,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,11 +5,11 @@ package bundle
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||
_ "github.com/mwitkow/go-proto-validators"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -17,6 +17,9 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *DeleteValueAddServiceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetReconciliationListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -303,6 +306,19 @@ func (this *CalculatePriceRequest) Validate() error {
|
||||
func (this *CalculatePriceResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BatchGetValueAddServiceLangRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BatchGetValueAddServiceLangResponse) Validate() error {
|
||||
for _, item := range this.ValueAddServiceLangList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddServiceLangList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -425,3 +441,9 @@ func (this *AddBundleInfo) Validate() error {
|
||||
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ConfirmWorkReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ConfirmWorkResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v5.26.1
|
||||
// - protoc v4.24.0--rc1
|
||||
// source: pb/bundle.proto
|
||||
|
||||
package bundle
|
||||
@ -35,6 +35,8 @@ type BundleClient interface {
|
||||
SaveBundle(ctx context.Context, in *BundleProfile, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
|
||||
BundleListV2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||
BundleDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponseV2, common.ErrorWithAttachment)
|
||||
BundleListH5V2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||
BundleLangDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleProfileLang, common.ErrorWithAttachment)
|
||||
BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||
BundleDetail(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponse, common.ErrorWithAttachment)
|
||||
CreateOrderRecord(ctx context.Context, in *OrderCreateRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
@ -48,16 +50,18 @@ type BundleClient interface {
|
||||
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
||||
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
||||
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
||||
// 增值套餐
|
||||
//增值套餐
|
||||
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
||||
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||
ValueAddBundleDetail(ctx context.Context, in *ValueAddBundleDetailRequest, opts ...grpc_go.CallOption) (*ValueAddBundleDetailResponse, common.ErrorWithAttachment)
|
||||
// 新增值服务
|
||||
//新增值服务
|
||||
SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
|
||||
ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment)
|
||||
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
|
||||
ValueAddServiceLangByUuidAndLanguage(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceLang, common.ErrorWithAttachment)
|
||||
CalculatePrice(ctx context.Context, in *CalculatePriceRequest, opts ...grpc_go.CallOption) (*CalculatePriceResponse, common.ErrorWithAttachment)
|
||||
BatchGetValueAddServiceLang(ctx context.Context, in *BatchGetValueAddServiceLangRequest, opts ...grpc_go.CallOption) (*BatchGetValueAddServiceLangResponse, common.ErrorWithAttachment)
|
||||
DeleteValueAddService(ctx context.Context, in *DeleteValueAddServiceRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
// 余量管理
|
||||
BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment)
|
||||
BundleExtendRecordsList(ctx context.Context, in *BundleExtendRecordsListRequest, opts ...grpc_go.CallOption) (*BundleExtendRecordsListResponse, common.ErrorWithAttachment)
|
||||
@ -70,7 +74,8 @@ type BundleClient interface {
|
||||
GetImageWorkDetail(ctx context.Context, in *GetImageWorkDetailReq, opts ...grpc_go.CallOption) (*GetImageWorkDetailResp, common.ErrorWithAttachment)
|
||||
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
|
||||
ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmedWorksReq, opts ...grpc_go.CallOption) (*ToBeComfirmedWorksResp, common.ErrorWithAttachment)
|
||||
// 对账单
|
||||
ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment)
|
||||
//对账单
|
||||
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment)
|
||||
CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
@ -89,6 +94,8 @@ type BundleClientImpl struct {
|
||||
SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error)
|
||||
BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||
BundleListH5V2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleLangDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleProfileLang, error)
|
||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecord func(ctx context.Context, in *OrderCreateRecord) (*CommonResponse, error)
|
||||
@ -110,6 +117,8 @@ type BundleClientImpl struct {
|
||||
ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||
ValueAddServiceLangByUuidAndLanguage func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
||||
CalculatePrice func(ctx context.Context, in *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
||||
BatchGetValueAddServiceLang func(ctx context.Context, in *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error)
|
||||
DeleteValueAddService func(ctx context.Context, in *DeleteValueAddServiceRequest) (*CommonResponse, error)
|
||||
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
||||
@ -120,6 +129,7 @@ type BundleClientImpl struct {
|
||||
GetImageWorkDetail func(ctx context.Context, in *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
||||
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||
ToBeComfirmedWorks func(ctx context.Context, in *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||
ConfirmWork func(ctx context.Context, in *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||
CreateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||
@ -180,6 +190,18 @@ func (c *bundleClient) BundleDetailV2(ctx context.Context, in *BundleDetailReque
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetailV2", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) BundleListH5V2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment) {
|
||||
out := new(BundleListResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleListH5V2", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) BundleLangDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleProfileLang, common.ErrorWithAttachment) {
|
||||
out := new(BundleProfileLang)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleLangDetailV2", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment) {
|
||||
out := new(BundleListResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -306,6 +328,18 @@ func (c *bundleClient) CalculatePrice(ctx context.Context, in *CalculatePriceReq
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CalculatePrice", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) BatchGetValueAddServiceLang(ctx context.Context, in *BatchGetValueAddServiceLangRequest, opts ...grpc_go.CallOption) (*BatchGetValueAddServiceLangResponse, common.ErrorWithAttachment) {
|
||||
out := new(BatchGetValueAddServiceLangResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchGetValueAddServiceLang", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) DeleteValueAddService(ctx context.Context, in *DeleteValueAddServiceRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteValueAddService", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment) {
|
||||
out := new(BundleExtendResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -366,6 +400,12 @@ func (c *bundleClient) ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmed
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ToBeComfirmedWorks", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment) {
|
||||
out := new(ConfirmWorkResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ConfirmWork", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment) {
|
||||
out := new(GetReconciliationListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -401,6 +441,8 @@ type BundleServer interface {
|
||||
SaveBundle(context.Context, *BundleProfile) (*SaveResponse, error)
|
||||
BundleListV2(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||
BundleListH5V2(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleLangDetailV2(context.Context, *BundleDetailRequest) (*BundleProfileLang, error)
|
||||
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecord(context.Context, *OrderCreateRecord) (*CommonResponse, error)
|
||||
@ -414,16 +456,18 @@ type BundleServer interface {
|
||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||
// 增值套餐
|
||||
//增值套餐
|
||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
ValueAddBundleDetail(context.Context, *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||
// 新增值服务
|
||||
//新增值服务
|
||||
SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error)
|
||||
ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
||||
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||
ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
||||
CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
||||
BatchGetValueAddServiceLang(context.Context, *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error)
|
||||
DeleteValueAddService(context.Context, *DeleteValueAddServiceRequest) (*CommonResponse, error)
|
||||
// 余量管理
|
||||
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
@ -436,7 +480,8 @@ type BundleServer interface {
|
||||
GetImageWorkDetail(context.Context, *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
||||
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||
ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||
// 对账单
|
||||
ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||
//对账单
|
||||
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||
@ -470,6 +515,12 @@ func (UnimplementedBundleServer) BundleListV2(context.Context, *BundleListReques
|
||||
func (UnimplementedBundleServer) BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleDetailV2 not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) BundleListH5V2(context.Context, *BundleListRequest) (*BundleListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleListH5V2 not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) BundleLangDetailV2(context.Context, *BundleDetailRequest) (*BundleProfileLang, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleLangDetailV2 not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleList not implemented")
|
||||
}
|
||||
@ -533,6 +584,12 @@ func (UnimplementedBundleServer) ValueAddServiceLangByUuidAndLanguage(context.Co
|
||||
func (UnimplementedBundleServer) CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CalculatePrice not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) BatchGetValueAddServiceLang(context.Context, *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BatchGetValueAddServiceLang not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) DeleteValueAddService(context.Context, *DeleteValueAddServiceRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteValueAddService not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleExtend not implemented")
|
||||
}
|
||||
@ -563,6 +620,9 @@ func (UnimplementedBundleServer) GetVedioWorkDetail(context.Context, *GetVedioWo
|
||||
func (UnimplementedBundleServer) ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ToBeComfirmedWorks not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ConfirmWork not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetReconciliationList not implemented")
|
||||
}
|
||||
@ -806,6 +866,64 @@ func _Bundle_BundleDetailV2_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_BundleListH5V2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BundleListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BundleListH5V2", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_BundleLangDetailV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BundleDetailRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BundleLangDetailV2", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_BundleList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BundleListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1415,6 +1533,64 @@ func _Bundle_CalculatePrice_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_BatchGetValueAddServiceLang_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BatchGetValueAddServiceLangRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BatchGetValueAddServiceLang", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_DeleteValueAddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteValueAddServiceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteValueAddService", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_BundleExtend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BundleExtendRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1705,6 +1881,35 @@ func _Bundle_ToBeComfirmedWorks_Handler(srv interface{}, ctx context.Context, de
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_ConfirmWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ConfirmWorkReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ConfirmWork", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_GetReconciliationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetReconciliationListReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1856,6 +2061,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "BundleDetailV2",
|
||||
Handler: _Bundle_BundleDetailV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BundleListH5V2",
|
||||
Handler: _Bundle_BundleListH5V2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BundleLangDetailV2",
|
||||
Handler: _Bundle_BundleLangDetailV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BundleList",
|
||||
Handler: _Bundle_BundleList_Handler,
|
||||
@ -1940,6 +2153,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "CalculatePrice",
|
||||
Handler: _Bundle_CalculatePrice_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BatchGetValueAddServiceLang",
|
||||
Handler: _Bundle_BatchGetValueAddServiceLang_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteValueAddService",
|
||||
Handler: _Bundle_DeleteValueAddService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BundleExtend",
|
||||
Handler: _Bundle_BundleExtend_Handler,
|
||||
@ -1980,6 +2201,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "ToBeComfirmedWorks",
|
||||
Handler: _Bundle_ToBeComfirmedWorks_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ConfirmWork",
|
||||
Handler: _Bundle_ConfirmWork_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetReconciliationList",
|
||||
Handler: _Bundle_GetReconciliationList_Handler,
|
||||
|
||||
@ -1199,18 +1199,20 @@ type WorkListReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ArtistVal string `protobuf:"bytes,1,opt,name=artistVal,proto3" json:"artistVal"`
|
||||
PlatformID uint32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
|
||||
WorkCategory uint32 `protobuf:"varint,3,opt,name=workCategory,proto3" json:"workCategory"`
|
||||
SubmitStartTime string `protobuf:"bytes,4,opt,name=submitStartTime,proto3" json:"submitStartTime"`
|
||||
SubmitEndTime string `protobuf:"bytes,5,opt,name=submitEndTime,proto3" json:"submitEndTime"`
|
||||
StatusUpdateTimeStart string `protobuf:"bytes,6,opt,name=statusUpdateTimeStart,proto3" json:"statusUpdateTimeStart"`
|
||||
StatusUpdateTimeEnd string `protobuf:"bytes,7,opt,name=statusUpdateTimeEnd,proto3" json:"statusUpdateTimeEnd"`
|
||||
Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title"`
|
||||
WorkStatus uint32 `protobuf:"varint,9,opt,name=workStatus,proto3" json:"workStatus"`
|
||||
MediaAccountUuid string `protobuf:"bytes,10,opt,name=mediaAccountUuid,proto3" json:"mediaAccountUuid"`
|
||||
Page int32 `protobuf:"varint,11,opt,name=page,proto3" json:"page"`
|
||||
PageSize int32 `protobuf:"varint,12,opt,name=pageSize,proto3" json:"pageSize"`
|
||||
ArtistVal string `protobuf:"bytes,1,opt,name=artistVal,proto3" json:"artistVal"`
|
||||
PlatformID uint32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
|
||||
WorkCategory uint32 `protobuf:"varint,3,opt,name=workCategory,proto3" json:"workCategory"`
|
||||
SubmitStartTime string `protobuf:"bytes,4,opt,name=submitStartTime,proto3" json:"submitStartTime"`
|
||||
SubmitEndTime string `protobuf:"bytes,5,opt,name=submitEndTime,proto3" json:"submitEndTime"`
|
||||
StatusUpdateTimeStart string `protobuf:"bytes,6,opt,name=statusUpdateTimeStart,proto3" json:"statusUpdateTimeStart"`
|
||||
StatusUpdateTimeEnd string `protobuf:"bytes,7,opt,name=statusUpdateTimeEnd,proto3" json:"statusUpdateTimeEnd"`
|
||||
Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title"`
|
||||
WorkStatus uint32 `protobuf:"varint,9,opt,name=workStatus,proto3" json:"workStatus"`
|
||||
MediaAccountUuid string `protobuf:"bytes,10,opt,name=mediaAccountUuid,proto3" json:"mediaAccountUuid"`
|
||||
ManagerUserVal string `protobuf:"bytes,11,opt,name=managerUserVal,proto3" json:"managerUserVal"`
|
||||
Page int32 `protobuf:"varint,12,opt,name=page,proto3" json:"page"`
|
||||
PageSize int32 `protobuf:"varint,13,opt,name=pageSize,proto3" json:"pageSize"`
|
||||
MediaAccountUuids []string `protobuf:"bytes,14,rep,name=mediaAccountUuids,proto3" json:"mediaAccountUuids"`
|
||||
}
|
||||
|
||||
func (x *WorkListReq) Reset() {
|
||||
@ -1313,6 +1315,13 @@ func (x *WorkListReq) GetMediaAccountUuid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WorkListReq) GetManagerUserVal() string {
|
||||
if x != nil {
|
||||
return x.ManagerUserVal
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WorkListReq) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
@ -1327,6 +1336,13 @@ func (x *WorkListReq) GetPageSize() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkListReq) GetMediaAccountUuids() []string {
|
||||
if x != nil {
|
||||
return x.MediaAccountUuids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type WorkListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -2489,9 +2505,10 @@ type WorkListResp_Info struct {
|
||||
StatusUpdateTime string `protobuf:"bytes,8,opt,name=statusUpdateTime,proto3" json:"statusUpdateTime"`
|
||||
PlatformIDs []uint32 `protobuf:"varint,9,rep,packed,name=platformIDs,proto3" json:"platformIDs"`
|
||||
MediaAccountNames []string `protobuf:"bytes,10,rep,name=mediaAccountNames,proto3" json:"mediaAccountNames"`
|
||||
ManagerUserNames []string `protobuf:"bytes,11,rep,name=managerUserNames,proto3" json:"managerUserNames"`
|
||||
ManagerUuids []string `protobuf:"bytes,12,rep,name=managerUuids,proto3" json:"managerUuids"`
|
||||
ApprovalID string `protobuf:"bytes,13,opt,name=approvalID,proto3" json:"approvalID"`
|
||||
MediaAccountUuids []string `protobuf:"bytes,11,rep,name=mediaAccountUuids,proto3" json:"mediaAccountUuids"`
|
||||
ManagerUserNames []string `protobuf:"bytes,12,rep,name=managerUserNames,proto3" json:"managerUserNames"`
|
||||
ManagerUuids []string `protobuf:"bytes,13,rep,name=managerUuids,proto3" json:"managerUuids"`
|
||||
ApprovalID string `protobuf:"bytes,14,opt,name=approvalID,proto3" json:"approvalID"`
|
||||
}
|
||||
|
||||
func (x *WorkListResp_Info) Reset() {
|
||||
@ -2594,6 +2611,13 @@ func (x *WorkListResp_Info) GetMediaAccountNames() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WorkListResp_Info) GetMediaAccountUuids() []string {
|
||||
if x != nil {
|
||||
return x.MediaAccountUuids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WorkListResp_Info) GetManagerUserNames() []string {
|
||||
if x != nil {
|
||||
return x.ManagerUserNames
|
||||
@ -3017,7 +3041,7 @@ var file_pb_fiee_cast_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65,
|
||||
0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69,
|
||||
0x64, 0x22, 0xb9, 0x03, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x64, 0x22, 0x8f, 0x04, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20,
|
||||
@ -3041,313 +3065,321 @@ var file_pb_fiee_cast_proto_rawDesc = []byte{
|
||||
0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67,
|
||||
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x9e, 0x04,
|
||||
0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x1a, 0xca, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
||||
0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x73, 0x18, 0x09, 0x20,
|
||||
0x03, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x73,
|
||||
0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a,
|
||||
0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||
0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61,
|
||||
0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x73, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x22, 0x2b,
|
||||
0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a,
|
||||
0x0e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x73,
|
||||
0x65, 0x72, 0x56, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67,
|
||||
0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67,
|
||||
0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75,
|
||||
0x69, 0x64, 0x73, 0x22, 0xcc, 0x04, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74,
|
||||
0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xf8, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
|
||||
0x69, 0x74, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65,
|
||||
0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6d,
|
||||
0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75,
|
||||
0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x49, 0x44, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x49, 0x44, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x73, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61,
|
||||
0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x0d,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x75, 0x69,
|
||||
0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44,
|
||||
0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
|
||||
0x49, 0x44, 0x22, 0x2b, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22,
|
||||
0xfb, 0x01, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0xfb, 0x01, 0x0a, 0x0b,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x77,
|
||||
0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74,
|
||||
0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9c, 0x06,
|
||||
0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
|
||||
0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d,
|
||||
0x61, 0x67, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d,
|
||||
0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x73, 0x18,
|
||||
0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49,
|
||||
0x44, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x31, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x61, 0x73,
|
||||
0x74, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
|
||||
0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x31, 0x12,
|
||||
0x3b, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x32, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x50,
|
||||
0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x12, 0x3b, 0x0a, 0x0e,
|
||||
0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x33, 0x18, 0x0b,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69,
|
||||
0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x33, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x69, 0x64,
|
||||
0x65, 0x6f, 0x55, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x69, 0x64,
|
||||
0x65, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72,
|
||||
0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72,
|
||||
0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x18,
|
||||
0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49,
|
||||
0x44, 0x12, 0x33, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61,
|
||||
0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c,
|
||||
0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61,
|
||||
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x44, 0x61, 0x74, 0x61, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x26, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61,
|
||||
0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41,
|
||||
0x63, 0x63, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x54, 0x0a, 0x11, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41,
|
||||
0x63, 0x63, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf5, 0x01, 0x0a,
|
||||
0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71,
|
||||
0x12, 0x34, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x4e, 0x55, 0x4d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75,
|
||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75,
|
||||
0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
|
||||
0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x6d,
|
||||
0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x72, 0x6d, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52,
|
||||
0x65, 0x70, 0x6c, 0x79, 0x22, 0x32, 0x0a, 0x10, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x4d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x1a, 0xda, 0x01, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x61, 0x6e,
|
||||
0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x66, 0x61,
|
||||
0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55,
|
||||
0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6b, 0x0a,
|
||||
0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x2a,
|
||||
0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
|
||||
0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8a, 0x03, 0x0a, 0x0e, 0x4d,
|
||||
0x65, 0x64, 0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x1a, 0xb2, 0x02, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65,
|
||||
0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9c, 0x06, 0x0a, 0x0e, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67,
|
||||
0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73,
|
||||
0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x73, 0x12, 0x2c,
|
||||
0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
|
||||
0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x73, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b,
|
||||
0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x31,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x50, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x75, 0x62,
|
||||
0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x31, 0x12, 0x3b, 0x0a, 0x0e, 0x70,
|
||||
0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x18, 0x0a, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69,
|
||||
0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73,
|
||||
0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x12, 0x3b, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x33, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x33, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x55, 0x72,
|
||||
0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x55, 0x72,
|
||||
0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x0d, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x33, 0x0a,
|
||||
0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x0f, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x6f,
|
||||
0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x67, 0x44, 0x61,
|
||||
0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
||||
0x72, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61,
|
||||
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41,
|
||||
0x63, 0x63, 0x44, 0x61, 0x74, 0x61, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||
0x73, 0x70, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x44, 0x61, 0x74, 0x61, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x1a, 0x54, 0x0a, 0x11, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e,
|
||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf5, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x34, 0x0a, 0x0a,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x45, 0x4e, 0x55, 0x4d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65,
|
||||
0x6d, 0x61, 0x72, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x70,
|
||||
0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
||||
0x22, 0x32, 0x0a, 0x10, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x55, 0x75, 0x69, 0x64, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e,
|
||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xda, 0x01, 0x0a,
|
||||
0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x61, 0x6e, 0x73, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x66, 0x61, 0x6e, 0x73, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a,
|
||||
0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6b, 0x0a, 0x0d, 0x4d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
|
||||
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61,
|
||||
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8a, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x64, 0x69, 0x61,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||
0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
|
||||
0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xb2,
|
||||
0x02, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55,
|
||||
0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55,
|
||||
0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67,
|
||||
0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43,
|
||||
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69,
|
||||
0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62,
|
||||
0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x76,
|
||||
0x69, 0x64, 0x65, 0x6f, 0x55, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76,
|
||||
0x69, 0x64, 0x65, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x55, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x55, 0x72, 0x6c, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73,
|
||||
0x68, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64,
|
||||
0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x73, 0x12, 0x2c,
|
||||
0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x0d,
|
||||
0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
|
||||
0x79, 0x22, 0x28, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x0b, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x41, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68,
|
||||
0x6f, 0x6e, 0x65, 0x41, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x40, 0x0a, 0x12, 0x4f,
|
||||
0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65,
|
||||
0x71, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a,
|
||||
0x13, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55, 0x72, 0x6c,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x56, 0x0a, 0x14, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59,
|
||||
0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x2a,
|
||||
0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x7d,
|
||||
0x0a, 0x15, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66,
|
||||
0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x2a, 0x3f, 0x0a,
|
||||
0x0e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x45, 0x4e, 0x55, 0x4d, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x54, 0x49, 0x4b, 0x54, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x59, 0x4f, 0x55, 0x54,
|
||||
0x55, 0x42, 0x45, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x53, 0x10, 0x03, 0x2a, 0x77,
|
||||
0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x4e, 0x55, 0x4d,
|
||||
0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08,
|
||||
0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50,
|
||||
0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x10, 0x03, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54,
|
||||
0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x44,
|
||||
0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x32, 0xa2, 0x08, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x74,
|
||||
0x12, 0x42, 0x0a, 0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73,
|
||||
0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74,
|
||||
0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x61, 0x73,
|
||||
0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x55, 0x6e, 0x62, 0x69, 0x6e,
|
||||
0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e,
|
||||
0x55, 0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61,
|
||||
0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0b, 0x42,
|
||||
0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x43, 0x61, 0x73,
|
||||
0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x2e,
|
||||
0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49,
|
||||
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x18, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65,
|
||||
0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33,
|
||||
0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x43, 0x61, 0x73,
|
||||
0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e,
|
||||
0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69,
|
||||
0x6c, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3f,
|
||||
0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15,
|
||||
0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12,
|
||||
0x42, 0x0a, 0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e,
|
||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x36,
|
||||
0x0a, 0x09, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x12, 0x2e, 0x43, 0x61,
|
||||
0x73, 0x74, 0x2e, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x07, 0x44, 0x65, 0x6c, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x12, 0x10, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a,
|
||||
0x08, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x11, 0x2e, 0x43, 0x61, 0x73, 0x74,
|
||||
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75,
|
||||
0x62, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x18, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75,
|
||||
0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74,
|
||||
0x75, 0x62, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x11,
|
||||
0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x12, 0x1a, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f,
|
||||
0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e,
|
||||
0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62,
|
||||
0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b,
|
||||
0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43,
|
||||
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73,
|
||||
0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65,
|
||||
0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x55, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x50, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x55, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6d,
|
||||
0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x22, 0x53, 0x0a, 0x0d, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
|
||||
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74,
|
||||
0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x28, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22,
|
||||
0x29, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x30, 0x0a,
|
||||
0x13, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x41, 0x72, 0x65, 0x61,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x41, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x22,
|
||||
0x40, 0x0a, 0x12, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55,
|
||||
0x72, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69,
|
||||
0x64, 0x22, 0x27, 0x0a, 0x13, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62,
|
||||
0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x56, 0x0a, 0x14, 0x4f, 0x41,
|
||||
0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65,
|
||||
0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x22, 0x7d, 0x0a, 0x15, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75,
|
||||
0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x2a, 0x3f, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x45,
|
||||
0x4e, 0x55, 0x4d, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00,
|
||||
0x12, 0x0a, 0x0a, 0x06, 0x54, 0x49, 0x4b, 0x54, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x59, 0x4f, 0x55, 0x54, 0x55, 0x42, 0x45, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x53,
|
||||
0x10, 0x03, 0x2a, 0x77, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x45, 0x4e, 0x55, 0x4d, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x10, 0x01,
|
||||
0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x10,
|
||||
0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x52, 0x45,
|
||||
0x4a, 0x45, 0x43, 0x54, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56,
|
||||
0x41, 0x4c, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x32, 0xa2, 0x08, 0x0a, 0x04,
|
||||
0x43, 0x61, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65,
|
||||
0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e,
|
||||
0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b,
|
||||
0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69,
|
||||
0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x43, 0x61,
|
||||
0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x55,
|
||||
0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x62, 0x69,
|
||||
0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
|
||||
0x3d, 0x0a, 0x0b, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x14,
|
||||
0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x48,
|
||||
0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67,
|
||||
0x65, 0x12, 0x18, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61,
|
||||
0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x18, 0x2e, 0x43, 0x61,
|
||||
0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64,
|
||||
0x65, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x33, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x11,
|
||||
0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x1a, 0x12, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x44,
|
||||
0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73,
|
||||
0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x15, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
|
||||
0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69,
|
||||
0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x43,
|
||||
0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x4d, 0x65, 0x64, 0x69, 0x61,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73,
|
||||
0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x36, 0x0a, 0x09, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12,
|
||||
0x12, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x50, 0x75, 0x62,
|
||||
0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x07, 0x44, 0x65,
|
||||
0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x12, 0x10, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
|
||||
0x00, 0x12, 0x33, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x11, 0x2e,
|
||||
0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x12, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59,
|
||||
0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x18, 0x2e, 0x43, 0x61, 0x73, 0x74,
|
||||
0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55, 0x72, 0x6c,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68,
|
||||
0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
|
||||
0x12, 0x4e, 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65,
|
||||
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75,
|
||||
0x74, 0x68, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x1a, 0x1b, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x59, 0x6f,
|
||||
0x75, 0x74, 0x75, 0x62, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
|
||||
0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@ -1717,6 +1717,8 @@ func (m *WorkListReq) validate(all bool) error {
|
||||
|
||||
// no validation rules for MediaAccountUuid
|
||||
|
||||
// no validation rules for ManagerUserVal
|
||||
|
||||
// no validation rules for Page
|
||||
|
||||
// no validation rules for PageSize
|
||||
|
||||
2583
api/files/files.pb.go
Normal file
2583
api/files/files.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
194
api/files/files.proto
Normal file
194
api/files/files.proto
Normal file
@ -0,0 +1,194 @@
|
||||
syntax = "proto3";
|
||||
package files;
|
||||
|
||||
option go_package = "./;files";
|
||||
|
||||
service File {
|
||||
rpc List(FileListReq) returns (FileListResp) {} // 获取当前路径下的文件列表
|
||||
rpc Info(FileInfoReq) returns (FileInfoResp) {} // 获取文件信息
|
||||
rpc Create(CreateReq) returns (CreateResp) {} // 创建文件夹
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {} // 删除文件或文件夹
|
||||
rpc Search(searchReq) returns (searchResp) {} // 搜索
|
||||
rpc Upload(UploadReq) returns (UploadResp) {} // 文件上传
|
||||
rpc TusCreate(TusCreateReq) returns (TusCreateResp) {
|
||||
} // 分块文件上传:创建文件
|
||||
rpc TusUpload(TusUploadReq) returns (TusUploadResp) {
|
||||
} // 分块文件上传:上传文件块
|
||||
rpc ResumableTransfer(ResumableTransferReq) returns (ResumableTransferResp) {
|
||||
} // 断点续传的grpc实现
|
||||
rpc Preview(PreviewReq) returns (PreviewResp) {} // 文件预览
|
||||
rpc Action(ActionReq) returns (ActionResp) {} // 移动文件或重命名文件
|
||||
rpc DirDownload(DirDownloadReq) returns (stream DirDownloadResp) {
|
||||
} // 文件夹压缩下载
|
||||
rpc Usage(UsageReq) returns (UsageResp) {} //查看磁盘使用率
|
||||
}
|
||||
|
||||
message FileListReq {
|
||||
string path = 1; // 目标文件夹路径
|
||||
string userSpacePath = 2; // 用户空间的路径
|
||||
Sorting sorting = 3;
|
||||
}
|
||||
|
||||
message Items {
|
||||
string path = 1;
|
||||
string name = 2;
|
||||
int64 size = 3;
|
||||
string extension = 4;
|
||||
string modified = 5;
|
||||
int64 modTime = 6;
|
||||
string mode = 7;
|
||||
bool isDir = 8;
|
||||
bool isSymlink = 9;
|
||||
string type = 10;
|
||||
}
|
||||
|
||||
message Sorting {
|
||||
string by = 1;
|
||||
bool asc = 2;
|
||||
}
|
||||
|
||||
message FileListResp {
|
||||
repeated Items items = 1;
|
||||
int32 numDirs = 2;
|
||||
int32 numFiles = 3;
|
||||
Sorting sorting = 4;
|
||||
string path = 5;
|
||||
string name = 6;
|
||||
int64 size = 7;
|
||||
string extension = 8;
|
||||
string modified = 9;
|
||||
int64 modTime = 10;
|
||||
string mode = 11;
|
||||
bool isDir = 12;
|
||||
bool isSymlink = 13;
|
||||
string type = 14;
|
||||
}
|
||||
|
||||
message CreateReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message CreateResp {}
|
||||
|
||||
message DeleteReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message DeleteResp {}
|
||||
|
||||
message UploadReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
bytes content = 3;
|
||||
}
|
||||
|
||||
message UploadResp {}
|
||||
|
||||
message searchReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
string query = 3;
|
||||
}
|
||||
|
||||
message searchResp {
|
||||
message Nested {
|
||||
bool isDir = 1;
|
||||
string path = 2;
|
||||
string name = 3;
|
||||
int64 size = 4;
|
||||
int64 modTime = 5;
|
||||
}
|
||||
|
||||
repeated Nested items = 1;
|
||||
}
|
||||
|
||||
message TusCreateReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
bool override = 3;
|
||||
}
|
||||
|
||||
message TusCreateResp {
|
||||
int64 uploadLength = 1;
|
||||
int64 uploadOffset = 2;
|
||||
}
|
||||
|
||||
message TusUploadReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
int64 uploadOffset = 3;
|
||||
bytes content = 4;
|
||||
}
|
||||
|
||||
message TusUploadResp { int64 uploadOffset = 1; }
|
||||
|
||||
message ResumableTransferReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
int64 offset = 3;
|
||||
int64 length = 4;
|
||||
}
|
||||
|
||||
message ResumableTransferResp { bytes content = 1; }
|
||||
|
||||
message FileInfoReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message FileInfoResp {
|
||||
string path = 1;
|
||||
string name = 2;
|
||||
int64 size = 3;
|
||||
string extension = 4;
|
||||
string modified = 5;
|
||||
string mode = 6;
|
||||
int64 modTime = 7;
|
||||
bool isDir = 8;
|
||||
bool isSymlink = 9;
|
||||
string type = 10;
|
||||
}
|
||||
|
||||
message PreviewReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
uint32 size = 3; // 预览大小 0:256x256, 1:1080x1080
|
||||
}
|
||||
|
||||
message PreviewResp {
|
||||
bytes content = 1;
|
||||
string fileName = 2;
|
||||
int64 modTime = 3;
|
||||
}
|
||||
|
||||
message ActionReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
string action = 3;
|
||||
string destination = 4;
|
||||
bool override = 5;
|
||||
bool rename = 6;
|
||||
}
|
||||
|
||||
message ActionResp {}
|
||||
|
||||
message DirDownloadReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
repeated string files = 3;
|
||||
string algo = 4;
|
||||
}
|
||||
|
||||
message DirDownloadResp { bytes content = 1; }
|
||||
|
||||
message UsageReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message UsageResp {
|
||||
int64 total = 1;
|
||||
int64 used = 2;
|
||||
}
|
||||
128
api/files/files.validator.pb.go
Normal file
128
api/files/files.validator.pb.go
Normal file
@ -0,0 +1,128 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: files.proto
|
||||
|
||||
package files
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *FileListReq) Validate() error {
|
||||
if this.Sorting != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Sorting); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Sorting", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Items) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Sorting) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FileListResp) Validate() error {
|
||||
for _, item := range this.Items {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.Sorting != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Sorting); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Sorting", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UploadReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UploadResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SearchReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SearchResp) Validate() error {
|
||||
for _, item := range this.Items {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SearchResp_Nested) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusCreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusCreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusUploadReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusUploadResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ResumableTransferReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ResumableTransferResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FileInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FileInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PreviewReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PreviewResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ActionReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ActionResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DirDownloadReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DirDownloadResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsageReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsageResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
723
api/files/files_triple.pb.go
Normal file
723
api/files/files_triple.pb.go
Normal file
@ -0,0 +1,723 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: files.proto
|
||||
|
||||
package files
|
||||
|
||||
import (
|
||||
context "context"
|
||||
constant1 "dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
fmt "fmt"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// FileClient is the client API for File service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type FileClient interface {
|
||||
List(ctx context.Context, in *FileListReq, opts ...grpc_go.CallOption) (*FileListResp, common.ErrorWithAttachment)
|
||||
Info(ctx context.Context, in *FileInfoReq, opts ...grpc_go.CallOption) (*FileInfoResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Search(ctx context.Context, in *SearchReq, opts ...grpc_go.CallOption) (*SearchResp, common.ErrorWithAttachment)
|
||||
Upload(ctx context.Context, in *UploadReq, opts ...grpc_go.CallOption) (*UploadResp, common.ErrorWithAttachment)
|
||||
TusCreate(ctx context.Context, in *TusCreateReq, opts ...grpc_go.CallOption) (*TusCreateResp, common.ErrorWithAttachment)
|
||||
TusUpload(ctx context.Context, in *TusUploadReq, opts ...grpc_go.CallOption) (*TusUploadResp, common.ErrorWithAttachment)
|
||||
ResumableTransfer(ctx context.Context, in *ResumableTransferReq, opts ...grpc_go.CallOption) (*ResumableTransferResp, common.ErrorWithAttachment)
|
||||
Preview(ctx context.Context, in *PreviewReq, opts ...grpc_go.CallOption) (*PreviewResp, common.ErrorWithAttachment)
|
||||
Action(ctx context.Context, in *ActionReq, opts ...grpc_go.CallOption) (*ActionResp, common.ErrorWithAttachment)
|
||||
DirDownload(ctx context.Context, in *DirDownloadReq, opts ...grpc_go.CallOption) (File_DirDownloadClient, error)
|
||||
Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.CallOption) (*UsageResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type fileClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type FileClientImpl struct {
|
||||
List func(ctx context.Context, in *FileListReq) (*FileListResp, error)
|
||||
Info func(ctx context.Context, in *FileInfoReq) (*FileInfoResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Search func(ctx context.Context, in *SearchReq) (*SearchResp, error)
|
||||
Upload func(ctx context.Context, in *UploadReq) (*UploadResp, error)
|
||||
TusCreate func(ctx context.Context, in *TusCreateReq) (*TusCreateResp, error)
|
||||
TusUpload func(ctx context.Context, in *TusUploadReq) (*TusUploadResp, error)
|
||||
ResumableTransfer func(ctx context.Context, in *ResumableTransferReq) (*ResumableTransferResp, error)
|
||||
Preview func(ctx context.Context, in *PreviewReq) (*PreviewResp, error)
|
||||
Action func(ctx context.Context, in *ActionReq) (*ActionResp, error)
|
||||
DirDownload func(ctx context.Context, in *DirDownloadReq) (File_DirDownloadClient, error)
|
||||
Usage func(ctx context.Context, in *UsageReq) (*UsageResp, error)
|
||||
}
|
||||
|
||||
func (c *FileClientImpl) GetDubboStub(cc *triple.TripleConn) FileClient {
|
||||
return NewFileClient(cc)
|
||||
}
|
||||
|
||||
func (c *FileClientImpl) XXX_InterfaceName() string {
|
||||
return "files.File"
|
||||
}
|
||||
|
||||
func NewFileClient(cc *triple.TripleConn) FileClient {
|
||||
return &fileClient{cc}
|
||||
}
|
||||
|
||||
func (c *fileClient) List(ctx context.Context, in *FileListReq, opts ...grpc_go.CallOption) (*FileListResp, common.ErrorWithAttachment) {
|
||||
out := new(FileListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Info(ctx context.Context, in *FileInfoReq, opts ...grpc_go.CallOption) (*FileInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(FileInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Info", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Search(ctx context.Context, in *SearchReq, opts ...grpc_go.CallOption) (*SearchResp, common.ErrorWithAttachment) {
|
||||
out := new(SearchResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Search", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Upload(ctx context.Context, in *UploadReq, opts ...grpc_go.CallOption) (*UploadResp, common.ErrorWithAttachment) {
|
||||
out := new(UploadResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Upload", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) TusCreate(ctx context.Context, in *TusCreateReq, opts ...grpc_go.CallOption) (*TusCreateResp, common.ErrorWithAttachment) {
|
||||
out := new(TusCreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/TusCreate", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) TusUpload(ctx context.Context, in *TusUploadReq, opts ...grpc_go.CallOption) (*TusUploadResp, common.ErrorWithAttachment) {
|
||||
out := new(TusUploadResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/TusUpload", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) ResumableTransfer(ctx context.Context, in *ResumableTransferReq, opts ...grpc_go.CallOption) (*ResumableTransferResp, common.ErrorWithAttachment) {
|
||||
out := new(ResumableTransferResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ResumableTransfer", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Preview(ctx context.Context, in *PreviewReq, opts ...grpc_go.CallOption) (*PreviewResp, common.ErrorWithAttachment) {
|
||||
out := new(PreviewResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Preview", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Action(ctx context.Context, in *ActionReq, opts ...grpc_go.CallOption) (*ActionResp, common.ErrorWithAttachment) {
|
||||
out := new(ActionResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Action", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) DirDownload(ctx context.Context, in *DirDownloadReq, opts ...grpc_go.CallOption) (File_DirDownloadClient, error) {
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
stream, err := c.cc.NewStream(ctx, "/"+interfaceKey+"/DirDownload", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &fileDirDownloadClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type File_DirDownloadClient interface {
|
||||
Recv() (*DirDownloadResp, error)
|
||||
grpc_go.ClientStream
|
||||
}
|
||||
|
||||
type fileDirDownloadClient struct {
|
||||
grpc_go.ClientStream
|
||||
}
|
||||
|
||||
func (x *fileDirDownloadClient) Recv() (*DirDownloadResp, error) {
|
||||
m := new(DirDownloadResp)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *fileClient) Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.CallOption) (*UsageResp, common.ErrorWithAttachment) {
|
||||
out := new(UsageResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Usage", in, out)
|
||||
}
|
||||
|
||||
// FileServer is the server API for File service.
|
||||
// All implementations must embed UnimplementedFileServer
|
||||
// for forward compatibility
|
||||
type FileServer interface {
|
||||
List(context.Context, *FileListReq) (*FileListResp, error)
|
||||
Info(context.Context, *FileInfoReq) (*FileInfoResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Search(context.Context, *SearchReq) (*SearchResp, error)
|
||||
Upload(context.Context, *UploadReq) (*UploadResp, error)
|
||||
TusCreate(context.Context, *TusCreateReq) (*TusCreateResp, error)
|
||||
TusUpload(context.Context, *TusUploadReq) (*TusUploadResp, error)
|
||||
ResumableTransfer(context.Context, *ResumableTransferReq) (*ResumableTransferResp, error)
|
||||
Preview(context.Context, *PreviewReq) (*PreviewResp, error)
|
||||
Action(context.Context, *ActionReq) (*ActionResp, error)
|
||||
DirDownload(*DirDownloadReq, File_DirDownloadServer) error
|
||||
Usage(context.Context, *UsageReq) (*UsageResp, error)
|
||||
mustEmbedUnimplementedFileServer()
|
||||
}
|
||||
|
||||
// UnimplementedFileServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedFileServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedFileServer) List(context.Context, *FileListReq) (*FileListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Info(context.Context, *FileInfoReq) (*FileInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Search(context.Context, *SearchReq) (*SearchResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Upload(context.Context, *UploadReq) (*UploadResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) TusCreate(context.Context, *TusCreateReq) (*TusCreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TusCreate not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) TusUpload(context.Context, *TusUploadReq) (*TusUploadResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TusUpload not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) ResumableTransfer(context.Context, *ResumableTransferReq) (*ResumableTransferResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResumableTransfer not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Preview(context.Context, *PreviewReq) (*PreviewResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Preview not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Action(context.Context, *ActionReq) (*ActionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Action not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) DirDownload(*DirDownloadReq, File_DirDownloadServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method DirDownload not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Usage(context.Context, *UsageReq) (*UsageResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Usage not implemented")
|
||||
}
|
||||
func (s *UnimplementedFileServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedFileServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedFileServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &File_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedFileServer) XXX_InterfaceName() string {
|
||||
return "files.File"
|
||||
}
|
||||
|
||||
func (UnimplementedFileServer) mustEmbedUnimplementedFileServer() {}
|
||||
|
||||
// UnsafeFileServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to FileServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeFileServer interface {
|
||||
mustEmbedUnimplementedFileServer()
|
||||
}
|
||||
|
||||
func RegisterFileServer(s grpc_go.ServiceRegistrar, srv FileServer) {
|
||||
s.RegisterService(&File_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _File_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FileListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("List", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FileInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Info", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Create", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Delete", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Search", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UploadReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Upload", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_TusCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TusCreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("TusCreate", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_TusUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TusUploadReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("TusUpload", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_ResumableTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResumableTransferReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ResumableTransfer", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Preview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PreviewReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Preview", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Action_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ActionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Action", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_DirDownload_Handler(srv interface{}, stream grpc_go.ServerStream) error {
|
||||
_, ok := srv.(dubbo3.Dubbo3GrpcService)
|
||||
ctx := stream.Context()
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
stream.(grpc_go.CtxSetterStream).SetContext(context.WithValue(ctx, constant1.AttachmentKey, invAttachment))
|
||||
invo := invocation.NewRPCInvocation("DirDownload", nil, nil)
|
||||
if !ok {
|
||||
fmt.Println(invo)
|
||||
return nil
|
||||
}
|
||||
m := new(DirDownloadReq)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(FileServer).DirDownload(m, &fileDirDownloadServer{stream})
|
||||
}
|
||||
|
||||
type File_DirDownloadServer interface {
|
||||
Send(*DirDownloadResp) error
|
||||
grpc_go.ServerStream
|
||||
}
|
||||
|
||||
type fileDirDownloadServer struct {
|
||||
grpc_go.ServerStream
|
||||
}
|
||||
|
||||
func (x *fileDirDownloadServer) Send(m *DirDownloadResp) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _File_Usage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UsageReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Usage", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// File_ServiceDesc is the grpc_go.ServiceDesc for File service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var File_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "files.File",
|
||||
HandlerType: (*FileServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _File_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Info",
|
||||
Handler: _File_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _File_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _File_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Search",
|
||||
Handler: _File_Search_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Upload",
|
||||
Handler: _File_Upload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TusCreate",
|
||||
Handler: _File_TusCreate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TusUpload",
|
||||
Handler: _File_TusUpload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResumableTransfer",
|
||||
Handler: _File_ResumableTransfer_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Preview",
|
||||
Handler: _File_Preview_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Action",
|
||||
Handler: _File_Action_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Usage",
|
||||
Handler: _File_Usage_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{
|
||||
{
|
||||
StreamName: "DirDownload",
|
||||
Handler: _File_DirDownload_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "files.proto",
|
||||
}
|
||||
997
api/governance/governance.pb.go
Normal file
997
api/governance/governance.pb.go
Normal file
@ -0,0 +1,997 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.29.1
|
||||
// protoc v3.20.3
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Item struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
|
||||
AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName,omitempty"`
|
||||
Sort int32 `protobuf:"varint,5,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
UpdatedAt int64 `protobuf:"varint,7,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||
Operator string `protobuf:"bytes,8,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,9,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Item) Reset() {
|
||||
*x = Item{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Item) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Item) ProtoMessage() {}
|
||||
|
||||
func (x *Item) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
|
||||
func (*Item) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Item) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetAttachment() string {
|
||||
if x != nil {
|
||||
return x.Attachment
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetAttachmentName() string {
|
||||
if x != nil {
|
||||
return x.AttachmentName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetOperator() string {
|
||||
if x != nil {
|
||||
return x.Operator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetOperatorId() int32 {
|
||||
if x != nil {
|
||||
return x.OperatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // 1 下架 2 上架
|
||||
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListReq) Reset() {
|
||||
*x = ListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListReq) ProtoMessage() {}
|
||||
|
||||
func (x *ListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListReq.ProtoReflect.Descriptor instead.
|
||||
func (*ListReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListReq) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListReq) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListReq) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListReq) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Data []*Item `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListResp) Reset() {
|
||||
*x = ListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListResp) ProtoMessage() {}
|
||||
|
||||
func (x *ListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListResp.ProtoReflect.Descriptor instead.
|
||||
func (*ListResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListResp) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListResp) GetData() []*Item {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteReq) Reset() {
|
||||
*x = DeleteReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteReq) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DeleteReq) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DeleteResp) Reset() {
|
||||
*x = DeleteResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteResp) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteResp.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type EditReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
|
||||
AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName,omitempty"`
|
||||
Sort int32 `protobuf:"varint,5,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Operator string `protobuf:"bytes,7,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,8,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *EditReq) Reset() {
|
||||
*x = EditReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EditReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EditReq) ProtoMessage() {}
|
||||
|
||||
func (x *EditReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EditReq.ProtoReflect.Descriptor instead.
|
||||
func (*EditReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *EditReq) GetId() uint32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditReq) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetAttachment() string {
|
||||
if x != nil {
|
||||
return x.Attachment
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetAttachmentName() string {
|
||||
if x != nil {
|
||||
return x.AttachmentName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditReq) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditReq) GetOperator() string {
|
||||
if x != nil {
|
||||
return x.Operator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetOperatorId() int32 {
|
||||
if x != nil {
|
||||
return x.OperatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type EditResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *EditResp) Reset() {
|
||||
*x = EditResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EditResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EditResp) ProtoMessage() {}
|
||||
|
||||
func (x *EditResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EditResp.ProtoReflect.Descriptor instead.
|
||||
func (*EditResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type CreateReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Sort uint32 `protobuf:"varint,2,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
|
||||
AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName,omitempty"`
|
||||
Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Operator string `protobuf:"bytes,6,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,7,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateReq) Reset() {
|
||||
*x = CreateReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateReq) ProtoMessage() {}
|
||||
|
||||
func (x *CreateReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateReq.ProtoReflect.Descriptor instead.
|
||||
func (*CreateReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetSort() uint32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetAttachment() string {
|
||||
if x != nil {
|
||||
return x.Attachment
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetAttachmentName() string {
|
||||
if x != nil {
|
||||
return x.AttachmentName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetOperator() string {
|
||||
if x != nil {
|
||||
return x.Operator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetOperatorId() int32 {
|
||||
if x != nil {
|
||||
return x.OperatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreateResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *CreateResp) Reset() {
|
||||
*x = CreateResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateResp) ProtoMessage() {}
|
||||
|
||||
func (x *CreateResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateResp.ProtoReflect.Descriptor instead.
|
||||
func (*CreateResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type DisplayReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DisplayReq) Reset() {
|
||||
*x = DisplayReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DisplayReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DisplayReq) ProtoMessage() {}
|
||||
|
||||
func (x *DisplayReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DisplayReq.ProtoReflect.Descriptor instead.
|
||||
func (*DisplayReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
type DisplayResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*Item `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DisplayResp) Reset() {
|
||||
*x = DisplayResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DisplayResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DisplayResp) ProtoMessage() {}
|
||||
|
||||
func (x *DisplayResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DisplayResp.ProtoReflect.Descriptor instead.
|
||||
func (*DisplayResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *DisplayResp) GetData() []*Item {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_governance_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_governance_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xfa,
|
||||
0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a,
|
||||
0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x07, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x22, 0x46, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1b, 0x0a, 0x09,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0xdf, 0x01, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74,
|
||||
0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74,
|
||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61,
|
||||
0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x74, 0x74,
|
||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x64, 0x69,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0xd1, 0x01, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a,
|
||||
0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x70, 0x6c,
|
||||
0x61, 0x79, 0x52, 0x65, 0x71, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xaa, 0x02, 0x0a, 0x0a, 0x47,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x12, 0x13, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39,
|
||||
0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x04, 0x45, 0x64, 0x69,
|
||||
0x74, 0x12, 0x13, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x45,
|
||||
0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39,
|
||||
0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x07, 0x44, 0x69, 0x73,
|
||||
0x70, 0x6c, 0x61, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x67,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x3b, 0x67, 0x6f,
|
||||
0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_governance_proto_rawDescOnce sync.Once
|
||||
file_governance_proto_rawDescData = file_governance_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_governance_proto_rawDescGZIP() []byte {
|
||||
file_governance_proto_rawDescOnce.Do(func() {
|
||||
file_governance_proto_rawDescData = protoimpl.X.CompressGZIP(file_governance_proto_rawDescData)
|
||||
})
|
||||
return file_governance_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_governance_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_governance_proto_goTypes = []interface{}{
|
||||
(*Item)(nil), // 0: governance.Item
|
||||
(*ListReq)(nil), // 1: governance.ListReq
|
||||
(*ListResp)(nil), // 2: governance.ListResp
|
||||
(*DeleteReq)(nil), // 3: governance.DeleteReq
|
||||
(*DeleteResp)(nil), // 4: governance.DeleteResp
|
||||
(*EditReq)(nil), // 5: governance.EditReq
|
||||
(*EditResp)(nil), // 6: governance.EditResp
|
||||
(*CreateReq)(nil), // 7: governance.CreateReq
|
||||
(*CreateResp)(nil), // 8: governance.CreateResp
|
||||
(*DisplayReq)(nil), // 9: governance.DisplayReq
|
||||
(*DisplayResp)(nil), // 10: governance.DisplayResp
|
||||
}
|
||||
var file_governance_proto_depIdxs = []int32{
|
||||
0, // 0: governance.ListResp.data:type_name -> governance.Item
|
||||
0, // 1: governance.DisplayResp.data:type_name -> governance.Item
|
||||
1, // 2: governance.Governance.List:input_type -> governance.ListReq
|
||||
3, // 3: governance.Governance.Delete:input_type -> governance.DeleteReq
|
||||
5, // 4: governance.Governance.Edit:input_type -> governance.EditReq
|
||||
7, // 5: governance.Governance.Create:input_type -> governance.CreateReq
|
||||
9, // 6: governance.Governance.Display:input_type -> governance.DisplayReq
|
||||
2, // 7: governance.Governance.List:output_type -> governance.ListResp
|
||||
4, // 8: governance.Governance.Delete:output_type -> governance.DeleteResp
|
||||
6, // 9: governance.Governance.Edit:output_type -> governance.EditResp
|
||||
8, // 10: governance.Governance.Create:output_type -> governance.CreateResp
|
||||
10, // 11: governance.Governance.Display:output_type -> governance.DisplayResp
|
||||
7, // [7:12] is the sub-list for method output_type
|
||||
2, // [2:7] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_governance_proto_init() }
|
||||
func file_governance_proto_init() {
|
||||
if File_governance_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_governance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Item); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EditReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EditResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DisplayReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DisplayResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_governance_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_governance_proto_goTypes,
|
||||
DependencyIndexes: file_governance_proto_depIdxs,
|
||||
MessageInfos: file_governance_proto_msgTypes,
|
||||
}.Build()
|
||||
File_governance_proto = out.File
|
||||
file_governance_proto_rawDesc = nil
|
||||
file_governance_proto_goTypes = nil
|
||||
file_governance_proto_depIdxs = nil
|
||||
}
|
||||
81
api/governance/governance.proto
Normal file
81
api/governance/governance.proto
Normal file
@ -0,0 +1,81 @@
|
||||
syntax = "proto3";
|
||||
package governance;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;governance";
|
||||
|
||||
service Governance{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||
}
|
||||
|
||||
message Item{
|
||||
int32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
int64 updatedAt = 7;
|
||||
string operator = 8;
|
||||
int32 operatorId = 9;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
string title = 1;
|
||||
int32 status = 2; // 1 下架 2 上架
|
||||
int32 page = 3;
|
||||
int32 pageSize = 4;
|
||||
}
|
||||
|
||||
message ListResp{
|
||||
int32 total = 1;
|
||||
repeated Item data =2;
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
string operator = 7;
|
||||
int32 operatorId = 8;
|
||||
}
|
||||
|
||||
message EditResp{
|
||||
}
|
||||
|
||||
message CreateReq{
|
||||
string title = 1;
|
||||
uint32 sort = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 status = 5;
|
||||
string operator = 6;
|
||||
int32 operatorId = 7;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
repeated Item data = 1;
|
||||
}
|
||||
64
api/governance/governance.validator.pb.go
Normal file
64
api/governance/governance.validator.pb.go
Normal file
@ -0,0 +1,64 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Item) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
327
api/governance/governance_triple.pb.go
Normal file
327
api/governance/governance_triple.pb.go
Normal file
@ -0,0 +1,327 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// GovernanceClient is the client API for Governance service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type GovernanceClient interface {
|
||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type governanceClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type GovernanceClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
}
|
||||
|
||||
func (c *GovernanceClientImpl) GetDubboStub(cc *triple.TripleConn) GovernanceClient {
|
||||
return NewGovernanceClient(cc)
|
||||
}
|
||||
|
||||
func (c *GovernanceClientImpl) XXX_InterfaceName() string {
|
||||
return "governance.Governance"
|
||||
}
|
||||
|
||||
func NewGovernanceClient(cc *triple.TripleConn) GovernanceClient {
|
||||
return &governanceClient{cc}
|
||||
}
|
||||
|
||||
func (c *governanceClient) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) {
|
||||
out := new(ListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) {
|
||||
out := new(EditResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Display", in, out)
|
||||
}
|
||||
|
||||
// GovernanceServer is the server API for Governance service.
|
||||
// All implementations must embed UnimplementedGovernanceServer
|
||||
// for forward compatibility
|
||||
type GovernanceServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
mustEmbedUnimplementedGovernanceServer()
|
||||
}
|
||||
|
||||
// UnimplementedGovernanceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedGovernanceServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedGovernanceServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
||||
}
|
||||
func (s *UnimplementedGovernanceServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedGovernanceServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedGovernanceServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Governance_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedGovernanceServer) XXX_InterfaceName() string {
|
||||
return "governance.Governance"
|
||||
}
|
||||
|
||||
func (UnimplementedGovernanceServer) mustEmbedUnimplementedGovernanceServer() {}
|
||||
|
||||
// UnsafeGovernanceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to GovernanceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeGovernanceServer interface {
|
||||
mustEmbedUnimplementedGovernanceServer()
|
||||
}
|
||||
|
||||
func RegisterGovernanceServer(s grpc_go.ServiceRegistrar, srv GovernanceServer) {
|
||||
s.RegisterService(&Governance_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Governance_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("List", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Delete", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Edit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Edit", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Create", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Display", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Governance_ServiceDesc is the grpc_go.ServiceDesc for Governance service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "governance.Governance",
|
||||
HandlerType: (*GovernanceServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _Governance_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _Governance_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Edit",
|
||||
Handler: _Governance_Edit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Governance_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Display",
|
||||
Handler: _Governance_Display_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "governance.proto",
|
||||
}
|
||||
1402
api/pressreleases/press_releases.pb.go
Normal file
1402
api/pressreleases/press_releases.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
119
api/pressreleases/press_releases.proto
Normal file
119
api/pressreleases/press_releases.proto
Normal file
@ -0,0 +1,119 @@
|
||||
syntax = "proto3";
|
||||
package pressreleases;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;pressreleases";
|
||||
|
||||
service PressReleases{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Get(GetReq) returns (GetResp) {}
|
||||
}
|
||||
|
||||
message Item{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
uint32 sort = 4;
|
||||
string content = 5;
|
||||
string attachment = 6;
|
||||
string attachmentName = 7;
|
||||
uint64 updatedAt = 8;
|
||||
uint32 status = 9;
|
||||
uint32 display = 10;
|
||||
string summary = 11;
|
||||
string operator = 12;
|
||||
int32 operatorId = 13;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
string title = 1;
|
||||
uint64 startTime = 2;
|
||||
uint64 endTime = 3;
|
||||
uint32 status = 4;
|
||||
uint32 display = 5;
|
||||
int32 page = 6;
|
||||
int32 pageSize = 7;
|
||||
}
|
||||
|
||||
message ListResp{
|
||||
uint64 total = 1;
|
||||
repeated Item data = 2;
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
string query = 1;
|
||||
uint32 page = 2;
|
||||
uint32 pageSize = 3;
|
||||
int64 timeStart = 4;
|
||||
int64 timeEnd = 5;
|
||||
int32 display = 6;
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
int64 total = 1;
|
||||
repeated Item data = 2;
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
uint32 sort = 4;
|
||||
string content = 5;
|
||||
string attachment = 6;
|
||||
string attachmentName = 7;
|
||||
uint32 status = 8;
|
||||
uint32 display = 9;
|
||||
string summary = 10;
|
||||
string operator = 11;
|
||||
int32 operatorId = 12;
|
||||
|
||||
}
|
||||
|
||||
message EditResp{
|
||||
}
|
||||
|
||||
message CreateReq{
|
||||
string title = 1;
|
||||
uint64 createdAt = 2;
|
||||
uint32 sort = 3;
|
||||
string content = 4;
|
||||
string attachment = 5;
|
||||
string attachmentName = 6;
|
||||
uint32 status = 7;
|
||||
uint32 display = 8;
|
||||
string summary = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
uint32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
|
||||
}
|
||||
|
||||
message GetReq{
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
message GetResp{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
string content = 4;
|
||||
string attachment = 5;
|
||||
string attachmentName = 6;
|
||||
string summary = 7;
|
||||
}
|
||||
70
api/pressreleases/press_releases.validator.pb.go
Normal file
70
api/pressreleases/press_releases.validator.pb.go
Normal file
@ -0,0 +1,70 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Item) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
372
api/pressreleases/press_releases_triple.pb.go
Normal file
372
api/pressreleases/press_releases_triple.pb.go
Normal file
@ -0,0 +1,372 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// PressReleasesClient is the client API for PressReleases service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PressReleasesClient interface {
|
||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Get(ctx context.Context, in *GetReq, opts ...grpc_go.CallOption) (*GetResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type pressReleasesClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type PressReleasesClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Get func(ctx context.Context, in *GetReq) (*GetResp, error)
|
||||
}
|
||||
|
||||
func (c *PressReleasesClientImpl) GetDubboStub(cc *triple.TripleConn) PressReleasesClient {
|
||||
return NewPressReleasesClient(cc)
|
||||
}
|
||||
|
||||
func (c *PressReleasesClientImpl) XXX_InterfaceName() string {
|
||||
return "pressreleases.PressReleases"
|
||||
}
|
||||
|
||||
func NewPressReleasesClient(cc *triple.TripleConn) PressReleasesClient {
|
||||
return &pressReleasesClient{cc}
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) {
|
||||
out := new(ListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Display", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) {
|
||||
out := new(EditResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_go.CallOption) (*GetResp, common.ErrorWithAttachment) {
|
||||
out := new(GetResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Get", in, out)
|
||||
}
|
||||
|
||||
// PressReleasesServer is the server API for PressReleases service.
|
||||
// All implementations must embed UnimplementedPressReleasesServer
|
||||
// for forward compatibility
|
||||
type PressReleasesServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Get(context.Context, *GetReq) (*GetResp, error)
|
||||
mustEmbedUnimplementedPressReleasesServer()
|
||||
}
|
||||
|
||||
// UnimplementedPressReleasesServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPressReleasesServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Get(context.Context, *GetReq) (*GetResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (s *UnimplementedPressReleasesServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedPressReleasesServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedPressReleasesServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &PressReleases_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedPressReleasesServer) XXX_InterfaceName() string {
|
||||
return "pressreleases.PressReleases"
|
||||
}
|
||||
|
||||
func (UnimplementedPressReleasesServer) mustEmbedUnimplementedPressReleasesServer() {}
|
||||
|
||||
// UnsafePressReleasesServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PressReleasesServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePressReleasesServer interface {
|
||||
mustEmbedUnimplementedPressReleasesServer()
|
||||
}
|
||||
|
||||
func RegisterPressReleasesServer(s grpc_go.ServiceRegistrar, srv PressReleasesServer) {
|
||||
s.RegisterService(&PressReleases_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PressReleases_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("List", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Display", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Edit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Edit", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Create", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Delete", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Get", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PressReleases_ServiceDesc is the grpc_go.ServiceDesc for PressReleases service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "pressreleases.PressReleases",
|
||||
HandlerType: (*PressReleasesServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _PressReleases_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Display",
|
||||
Handler: _PressReleases_Display_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Edit",
|
||||
Handler: _PressReleases_Edit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _PressReleases_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _PressReleases_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _PressReleases_Get_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "press_releases.proto",
|
||||
}
|
||||
1900
api/secFilings/secFilings.pb.go
Normal file
1900
api/secFilings/secFilings.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
135
api/secFilings/secFilings.proto
Normal file
135
api/secFilings/secFilings.proto
Normal file
@ -0,0 +1,135 @@
|
||||
syntax = "proto3";
|
||||
package secFilings;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;secFilings";
|
||||
|
||||
service SecFilings{
|
||||
rpc CreateSecFiling(CreateSecFilingReq) returns (CommonResp) {}
|
||||
rpc UpdateSecFiling(UpdateSecFilingReq) returns (CommonResp) {}
|
||||
rpc DetailSecFiling(DetailSecFilingReq) returns (SecFilingDetailResp) {}
|
||||
rpc ListSecFiling(ListSecFilingReq) returns (SecFilingListResp) {}
|
||||
rpc DeleteSecFiling(DeleteSecFilingReq)returns(CommonResp){}
|
||||
rpc IsSecFilingExist(IsSecFilingExistReq) returns (IsSecFilingExistResp) {}
|
||||
rpc UpdateSecFilingStatus(UpdateSecFilingStatusReq) returns(CommonResp) {}
|
||||
rpc ListFormType(ListFormTypeReq) returns (FormTypeListResp) {}
|
||||
rpc WebListSecFiling(WebListSecFilingReq) returns (WebListSecFilingResp) {}
|
||||
}
|
||||
message ListFormTypeReq{
|
||||
int32 page = 1;
|
||||
int32 pageSize = 2;
|
||||
}
|
||||
message FormTypeListResp{
|
||||
int64 total = 1;
|
||||
repeated FormType formType = 2;
|
||||
}
|
||||
message FormType{
|
||||
int32 id = 1;
|
||||
string formType = 2;
|
||||
}
|
||||
message IsSecFilingExistReq{
|
||||
string filingDate = 1;
|
||||
string form = 2;
|
||||
string finalLink = 3;
|
||||
}
|
||||
message IsSecFilingExistResp{
|
||||
bool exist = 1;
|
||||
}
|
||||
message CommonResp{
|
||||
string msg = 1 [json_name="msg"];
|
||||
string filingKey = 2[json_name="filing_key"];
|
||||
}
|
||||
message SecFiling{
|
||||
int32 idx = 1 [json_name="idx"];
|
||||
string filingKey = 2[json_name="filing_key"];
|
||||
string filingDate = 3[json_name="filing_date"];
|
||||
string form = 4[json_name="form"];
|
||||
string description = 5[json_name="description"];
|
||||
string formDescription = 6[json_name="form_description"];
|
||||
string fileLink = 7[json_name="file_link"];
|
||||
repeated DataFiles dataFiles = 8[json_name="data_files"];
|
||||
string pdfFile = 9[json_name="pdf_file"];
|
||||
string wordFile = 10[json_name="word_file"];
|
||||
string excelFile = 11[json_name="excel_file"];
|
||||
int32 status = 12[json_name="status"];
|
||||
string operator = 13[json_name="operator"];
|
||||
int32 operatorId = 14[json_name="operator_id"];
|
||||
string createdAt =15[json_name="created_at"];
|
||||
string updatedAt=16[json_name="updated_at"];
|
||||
}
|
||||
message DataFiles {
|
||||
string description = 1[json_name="description"];
|
||||
string fileUrl = 2[json_name="file_url"];
|
||||
}
|
||||
message CreateSecFilingReq{
|
||||
string filingDate = 1;
|
||||
string form = 2;
|
||||
string description = 3;
|
||||
string formDescription = 4;
|
||||
string fileLink = 5;
|
||||
repeated DataFiles dataFiles = 6;
|
||||
string pdfFile = 7;
|
||||
string wordFile = 8;
|
||||
string excelFile = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
}
|
||||
message UpdateSecFilingReq{
|
||||
string filingKey = 1;
|
||||
string form = 2;
|
||||
string description = 3;
|
||||
string formDescription = 4;
|
||||
string fileLink = 5;
|
||||
repeated DataFiles dataFiles = 6;
|
||||
string pdfFile = 7;
|
||||
string wordFile = 8;
|
||||
string excelFile = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
string filingDate = 12;
|
||||
|
||||
}
|
||||
message DetailSecFilingReq{
|
||||
string filingKey = 1;
|
||||
}
|
||||
message SecFilingDetailResp{
|
||||
string msg = 1;
|
||||
SecFiling data = 2;
|
||||
}
|
||||
message ListSecFilingReq{
|
||||
uint32 page = 1;
|
||||
uint32 pageSize = 2;
|
||||
string form = 3;
|
||||
string filingDateBegin = 4;
|
||||
string filingDateEnd = 5;
|
||||
int32 status = 6;
|
||||
}
|
||||
message SecFilingListResp{
|
||||
string msg = 1 [json_name="msg"];
|
||||
uint32 total = 2 [json_name="total"];
|
||||
repeated SecFiling data = 3 [json_name="data"];
|
||||
}
|
||||
message WebListSecFilingReq{
|
||||
uint32 page = 1;
|
||||
uint32 pageSize = 2;
|
||||
string year = 3;
|
||||
string sortField = 4;
|
||||
string sortOrder = 5;
|
||||
}
|
||||
message WebListSecFilingResp{
|
||||
string msg = 1 [json_name="msg"];
|
||||
uint32 total = 2 [json_name="total"];
|
||||
repeated SecFiling data = 3 [json_name="data"];
|
||||
}
|
||||
message DeleteSecFilingReq {
|
||||
string filingKey = 1;
|
||||
string operator = 2;
|
||||
int32 operatorId = 3;
|
||||
}
|
||||
message UpdateSecFilingStatusReq{
|
||||
string filingKey = 1;
|
||||
int32 status = 2;
|
||||
string operator = 3;
|
||||
int32 operatorId = 4;
|
||||
}
|
||||
118
api/secFilings/secFilings.validator.pb.go
Normal file
118
api/secFilings/secFilings.validator.pb.go
Normal file
@ -0,0 +1,118 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: secFilings.proto
|
||||
|
||||
package secFilings
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *ListFormTypeReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FormTypeListResp) Validate() error {
|
||||
for _, item := range this.FormType {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("FormType", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *FormType) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *IsSecFilingExistReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *IsSecFilingExistResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecFiling) Validate() error {
|
||||
for _, item := range this.DataFiles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataFiles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DataFiles) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateSecFilingReq) Validate() error {
|
||||
for _, item := range this.DataFiles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataFiles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateSecFilingReq) Validate() error {
|
||||
for _, item := range this.DataFiles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataFiles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DetailSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecFilingDetailResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecFilingListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *WebListSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WebListSecFilingResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateSecFilingStatusReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
507
api/secFilings/secFilings_triple.pb.go
Normal file
507
api/secFilings/secFilings_triple.pb.go
Normal file
@ -0,0 +1,507 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: secFilings.proto
|
||||
|
||||
package secFilings
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// SecFilingsClient is the client API for SecFilings service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type SecFilingsClient interface {
|
||||
CreateSecFiling(ctx context.Context, in *CreateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
UpdateSecFiling(ctx context.Context, in *UpdateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
DetailSecFiling(ctx context.Context, in *DetailSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingDetailResp, common.ErrorWithAttachment)
|
||||
ListSecFiling(ctx context.Context, in *ListSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingListResp, common.ErrorWithAttachment)
|
||||
DeleteSecFiling(ctx context.Context, in *DeleteSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
IsSecFilingExist(ctx context.Context, in *IsSecFilingExistReq, opts ...grpc_go.CallOption) (*IsSecFilingExistResp, common.ErrorWithAttachment)
|
||||
UpdateSecFilingStatus(ctx context.Context, in *UpdateSecFilingStatusReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
ListFormType(ctx context.Context, in *ListFormTypeReq, opts ...grpc_go.CallOption) (*FormTypeListResp, common.ErrorWithAttachment)
|
||||
WebListSecFiling(ctx context.Context, in *WebListSecFilingReq, opts ...grpc_go.CallOption) (*WebListSecFilingResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type secFilingsClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type SecFilingsClientImpl struct {
|
||||
CreateSecFiling func(ctx context.Context, in *CreateSecFilingReq) (*CommonResp, error)
|
||||
UpdateSecFiling func(ctx context.Context, in *UpdateSecFilingReq) (*CommonResp, error)
|
||||
DetailSecFiling func(ctx context.Context, in *DetailSecFilingReq) (*SecFilingDetailResp, error)
|
||||
ListSecFiling func(ctx context.Context, in *ListSecFilingReq) (*SecFilingListResp, error)
|
||||
DeleteSecFiling func(ctx context.Context, in *DeleteSecFilingReq) (*CommonResp, error)
|
||||
IsSecFilingExist func(ctx context.Context, in *IsSecFilingExistReq) (*IsSecFilingExistResp, error)
|
||||
UpdateSecFilingStatus func(ctx context.Context, in *UpdateSecFilingStatusReq) (*CommonResp, error)
|
||||
ListFormType func(ctx context.Context, in *ListFormTypeReq) (*FormTypeListResp, error)
|
||||
WebListSecFiling func(ctx context.Context, in *WebListSecFilingReq) (*WebListSecFilingResp, error)
|
||||
}
|
||||
|
||||
func (c *SecFilingsClientImpl) GetDubboStub(cc *triple.TripleConn) SecFilingsClient {
|
||||
return NewSecFilingsClient(cc)
|
||||
}
|
||||
|
||||
func (c *SecFilingsClientImpl) XXX_InterfaceName() string {
|
||||
return "secFilings.SecFilings"
|
||||
}
|
||||
|
||||
func NewSecFilingsClient(cc *triple.TripleConn) SecFilingsClient {
|
||||
return &secFilingsClient{cc}
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) CreateSecFiling(ctx context.Context, in *CreateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) UpdateSecFiling(ctx context.Context, in *UpdateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) DetailSecFiling(ctx context.Context, in *DetailSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingDetailResp, common.ErrorWithAttachment) {
|
||||
out := new(SecFilingDetailResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DetailSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) ListSecFiling(ctx context.Context, in *ListSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingListResp, common.ErrorWithAttachment) {
|
||||
out := new(SecFilingListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) DeleteSecFiling(ctx context.Context, in *DeleteSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) IsSecFilingExist(ctx context.Context, in *IsSecFilingExistReq, opts ...grpc_go.CallOption) (*IsSecFilingExistResp, common.ErrorWithAttachment) {
|
||||
out := new(IsSecFilingExistResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/IsSecFilingExist", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) UpdateSecFilingStatus(ctx context.Context, in *UpdateSecFilingStatusReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSecFilingStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) ListFormType(ctx context.Context, in *ListFormTypeReq, opts ...grpc_go.CallOption) (*FormTypeListResp, common.ErrorWithAttachment) {
|
||||
out := new(FormTypeListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListFormType", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) WebListSecFiling(ctx context.Context, in *WebListSecFilingReq, opts ...grpc_go.CallOption) (*WebListSecFilingResp, common.ErrorWithAttachment) {
|
||||
out := new(WebListSecFilingResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WebListSecFiling", in, out)
|
||||
}
|
||||
|
||||
// SecFilingsServer is the server API for SecFilings service.
|
||||
// All implementations must embed UnimplementedSecFilingsServer
|
||||
// for forward compatibility
|
||||
type SecFilingsServer interface {
|
||||
CreateSecFiling(context.Context, *CreateSecFilingReq) (*CommonResp, error)
|
||||
UpdateSecFiling(context.Context, *UpdateSecFilingReq) (*CommonResp, error)
|
||||
DetailSecFiling(context.Context, *DetailSecFilingReq) (*SecFilingDetailResp, error)
|
||||
ListSecFiling(context.Context, *ListSecFilingReq) (*SecFilingListResp, error)
|
||||
DeleteSecFiling(context.Context, *DeleteSecFilingReq) (*CommonResp, error)
|
||||
IsSecFilingExist(context.Context, *IsSecFilingExistReq) (*IsSecFilingExistResp, error)
|
||||
UpdateSecFilingStatus(context.Context, *UpdateSecFilingStatusReq) (*CommonResp, error)
|
||||
ListFormType(context.Context, *ListFormTypeReq) (*FormTypeListResp, error)
|
||||
WebListSecFiling(context.Context, *WebListSecFilingReq) (*WebListSecFilingResp, error)
|
||||
mustEmbedUnimplementedSecFilingsServer()
|
||||
}
|
||||
|
||||
// UnimplementedSecFilingsServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSecFilingsServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedSecFilingsServer) CreateSecFiling(context.Context, *CreateSecFilingReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) UpdateSecFiling(context.Context, *UpdateSecFilingReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) DetailSecFiling(context.Context, *DetailSecFilingReq) (*SecFilingDetailResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DetailSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) ListSecFiling(context.Context, *ListSecFilingReq) (*SecFilingListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) DeleteSecFiling(context.Context, *DeleteSecFilingReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) IsSecFilingExist(context.Context, *IsSecFilingExistReq) (*IsSecFilingExistResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method IsSecFilingExist not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) UpdateSecFilingStatus(context.Context, *UpdateSecFilingStatusReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateSecFilingStatus not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) ListFormType(context.Context, *ListFormTypeReq) (*FormTypeListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListFormType not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) WebListSecFiling(context.Context, *WebListSecFilingReq) (*WebListSecFilingResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WebListSecFiling not implemented")
|
||||
}
|
||||
func (s *UnimplementedSecFilingsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedSecFilingsServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedSecFilingsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &SecFilings_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedSecFilingsServer) XXX_InterfaceName() string {
|
||||
return "secFilings.SecFilings"
|
||||
}
|
||||
|
||||
func (UnimplementedSecFilingsServer) mustEmbedUnimplementedSecFilingsServer() {}
|
||||
|
||||
// UnsafeSecFilingsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SecFilingsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSecFilingsServer interface {
|
||||
mustEmbedUnimplementedSecFilingsServer()
|
||||
}
|
||||
|
||||
func RegisterSecFilingsServer(s grpc_go.ServiceRegistrar, srv SecFilingsServer) {
|
||||
s.RegisterService(&SecFilings_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SecFilings_CreateSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("CreateSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_UpdateSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_DetailSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DetailSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DetailSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_ListSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ListSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_DeleteSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_IsSecFilingExist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IsSecFilingExistReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("IsSecFilingExist", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_UpdateSecFilingStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateSecFilingStatusReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateSecFilingStatus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_ListFormType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListFormTypeReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ListFormType", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_WebListSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WebListSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("WebListSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SecFilings_ServiceDesc is the grpc_go.ServiceDesc for SecFilings service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SecFilings_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "secFilings.SecFilings",
|
||||
HandlerType: (*SecFilingsServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateSecFiling",
|
||||
Handler: _SecFilings_CreateSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateSecFiling",
|
||||
Handler: _SecFilings_UpdateSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DetailSecFiling",
|
||||
Handler: _SecFilings_DetailSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSecFiling",
|
||||
Handler: _SecFilings_ListSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteSecFiling",
|
||||
Handler: _SecFilings_DeleteSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "IsSecFilingExist",
|
||||
Handler: _SecFilings_IsSecFilingExist_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateSecFilingStatus",
|
||||
Handler: _SecFilings_UpdateSecFilingStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListFormType",
|
||||
Handler: _SecFilings_ListFormType_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WebListSecFiling",
|
||||
Handler: _SecFilings_WebListSecFiling_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "secFilings.proto",
|
||||
}
|
||||
1
clear.sh
1
clear.sh
@ -1,3 +1,4 @@
|
||||
ls api/account/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
ls api/bundle/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
ls api/order/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
ls api/secFilings/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
|
||||
@ -114,7 +114,9 @@ type System struct {
|
||||
HttpPort string
|
||||
Host string
|
||||
RedirectUri string
|
||||
Domain string
|
||||
ErpHost string
|
||||
FieeHost string
|
||||
}
|
||||
type Oss struct {
|
||||
AccessKeyId string
|
||||
|
||||
33
conf/dubbogo.yaml
Normal file
33
conf/dubbogo.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
dubbo:
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 5s
|
||||
address: 127.0.0.1:2181
|
||||
consumer:
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
# params:
|
||||
# .accessKeyId: "Accountksl"
|
||||
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
BundleClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
@ -1,10 +1,11 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
Domain = "app"
|
||||
AppMode = "dev"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "http://114.218.158.24:9020"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -4,8 +4,8 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
# address: 172.16.100.93:2181
|
||||
address: 127.0.0.1:2181
|
||||
address: 172.16.100.93:2181
|
||||
# address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
filter: tracing
|
||||
@ -37,14 +37,16 @@ dubbo:
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
PaymentCentClientImpl:
|
||||
interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java
|
||||
filter: cshutdown,sign,auth
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
Domain = "app"
|
||||
AppMode = "prod"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "https://erpapi.fontree.cn"
|
||||
FieeHost = "https://erpapi.fiee.com"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -45,6 +45,10 @@ dubbo:
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
Domain = "app"
|
||||
AppMode = "test"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "http://114.218.158.24:9020"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
@ -21,6 +22,14 @@ BucketName = "fontree-test"
|
||||
BaseDir = "fiee"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
|
||||
[oss]
|
||||
AccessKeyId="LTAI5tLz1fSK53FQAEC9uNSb"
|
||||
AccessKeysecret ="oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
BucketName = "fontree-test"
|
||||
BaseDir = "fiee"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisAddr = "172.16.100.114:6379"
|
||||
|
||||
@ -37,14 +37,16 @@ dubbo:
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
PaymentCentClientImpl:
|
||||
interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java
|
||||
filter: cshutdown,sign,auth
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
15
go.mod
15
go.mod
@ -1,11 +1,14 @@
|
||||
module fonchain-fiee
|
||||
|
||||
go 1.18
|
||||
go 1.21.3
|
||||
|
||||
toolchain go1.23.6
|
||||
|
||||
replace (
|
||||
//github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
||||
github.com/fonchain/utils/voice => ../utils/voice
|
||||
github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||
//github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
||||
)
|
||||
|
||||
//
|
||||
@ -46,11 +49,11 @@ require (
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.11.2 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/goccy/go-json v0.10.2
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/jinzhu/copier v0.3.5 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/k0kubun/pp v3.0.1+incompatible // indirect
|
||||
@ -102,6 +105,7 @@ require (
|
||||
github.com/PuerkitoBio/goquery v1.8.1
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0
|
||||
github.com/fonchain/utils/voice v0.0.0-00010101000000-000000000000
|
||||
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-contrib/pprof v1.4.0
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
@ -117,7 +121,7 @@ require (
|
||||
cloud.google.com/go v0.65.0 // indirect
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
|
||||
github.com/alibaba/sentinel-golang v1.0.4 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||
github.com/aws/aws-sdk-go v1.38.20 // indirect
|
||||
github.com/baidubce/bce-sdk-go v0.9.123 // indirect
|
||||
@ -129,6 +133,7 @@ require (
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||
github.com/dorlolo/simpleRequest v1.2.7 // indirect
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.7.4 // indirect
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
|
||||
|
||||
7
go.sum
7
go.sum
@ -71,8 +71,9 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8=
|
||||
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFmb7mUnp8nH9fQBA=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376 h1:lExo7heZgdFn5AbaNJEllbA0KSJ/Z8T7MphvMREJOOo=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376/go.mod h1:9CMdKNL3ynIGPpfTcdwTvIm8SGuAZYYC4jFVSSvE1YQ=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||
@ -187,6 +188,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
||||
github.com/dorlolo/simpleRequest v1.2.7 h1:I6AlEhMBSZPNQ4QjpCevhpxsPRDa3lgDOxJYYfmPTU8=
|
||||
github.com/dorlolo/simpleRequest v1.2.7/go.mod h1:koVT8DQu+JK40UoMNBQjt+zomlCW8FqE0ffEzjTOWYY=
|
||||
github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 h1:XoR8SSVziXe698dt4uZYDfsmHpKLemqAgFyndQsq5Kw=
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
|
||||
@ -284,6 +287,7 @@ github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
|
||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
@ -1368,6 +1372,7 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
|
||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||
|
||||
2
pkg/cache/common.go
vendored
2
pkg/cache/common.go
vendored
@ -17,7 +17,7 @@ type RedisConfig struct {
|
||||
RedisDbName string
|
||||
}
|
||||
|
||||
//LoadRedis 在中间件中初始化redis链接
|
||||
// LoadRedis 在中间件中初始化redis链接
|
||||
func LoadRedis(configEnv RedisConfig) {
|
||||
db, _ := strconv.ParseUint(configEnv.RedisDbName, 10, 64)
|
||||
client := redis.NewClient(&redis.Options{
|
||||
|
||||
126
pkg/common/jwt/common.go
Normal file
126
pkg/common/jwt/common.go
Normal file
@ -0,0 +1,126 @@
|
||||
// Package jwt -----------------------------
|
||||
// @file : common.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/12 18:07
|
||||
// -------------------------------------------
|
||||
package jwt
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/common/m"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// ParseToChatUser 将token信息转换为聊天室用户信息
|
||||
func ParseToChatUser(c *gin.Context) (chatUserInfo *accountFiee.ChatUserData, code e.ErrorCodeType) {
|
||||
//domain := c.GetHeader("Domain")
|
||||
//if domain == "" {
|
||||
// domain = c.GetHeader("domain")
|
||||
// if domain == "" {
|
||||
// domain = config.AppConfig.System.Domain
|
||||
// }
|
||||
//}
|
||||
fmt.Println("ParseToChatUser ----------- 1")
|
||||
var domain string
|
||||
var err error
|
||||
token := c.GetHeader(e.Authorization)
|
||||
if token == "" {
|
||||
fmt.Println("token is empty")
|
||||
code = e.NotLogin
|
||||
return
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
var originId int64 = 0
|
||||
var newChatUser *accountFiee.ChatUserData
|
||||
check := true
|
||||
var fieeJwtInfo *Claims
|
||||
fieeJwtInfo, err = ParseToken(token, m.JWTSecret)
|
||||
if err != nil {
|
||||
fmt.Printf("fiee token parse err:%v\n", err)
|
||||
check = false
|
||||
} else {
|
||||
check = true
|
||||
domain = config.AppConfig.System.Domain
|
||||
originId = int64(fieeJwtInfo.ID)
|
||||
newChatUser = &accountFiee.ChatUserData{
|
||||
NickName: fieeJwtInfo.NickName,
|
||||
Account: fieeJwtInfo.Phone,
|
||||
Role: 1,
|
||||
Origin: config.AppConfig.System.Domain,
|
||||
OriginId: int64(fieeJwtInfo.ID),
|
||||
}
|
||||
domain = config.AppConfig.System.Domain
|
||||
fmt.Printf("fiee token decrypt success, domain:%s , originId:%d", domain, originId)
|
||||
}
|
||||
fmt.Println("ParseToChatUser ----------- 2")
|
||||
if !check { //erp用户校验
|
||||
fmt.Println("ParseToChatUser ----------- 2.1")
|
||||
token, err = secret.GetJwtFromStr(token)
|
||||
if err != nil {
|
||||
check = false
|
||||
} else {
|
||||
var fontreeJwtInfo *account.DecryptJwtResponse
|
||||
fontreeJwtInfo, err = service.AccountProvider.DecryptJwt(ctx, &account.DecryptJwtRequest{Token: token, Domain: e.ErpDomain})
|
||||
if err != nil || fontreeJwtInfo.IsOffline {
|
||||
check = false
|
||||
} else {
|
||||
check = true
|
||||
domain = e.ErpDomain
|
||||
originId = int64(fontreeJwtInfo.ID)
|
||||
newChatUser = &accountFiee.ChatUserData{
|
||||
NickName: fontreeJwtInfo.NickName,
|
||||
Account: fontreeJwtInfo.Account,
|
||||
Role: 2,
|
||||
Origin: e.ErpDomain,
|
||||
OriginId: int64(fontreeJwtInfo.ID),
|
||||
}
|
||||
fmt.Printf("fontree token decrypt success, domain:%s , originId:%d\n", domain, originId)
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("ParseToChatUser ----------- 3")
|
||||
if !check {
|
||||
fmt.Println("ParseToChatUser ----------- 3.1")
|
||||
fmt.Println("fontree token decrypt err:", err)
|
||||
code = e.NotLogin
|
||||
return
|
||||
}
|
||||
fmt.Println("ParseToChatUser ----------- 4")
|
||||
var userQueryRes *accountFiee.GetChatUserListResp
|
||||
userQueryRes, err = service.AccountFieeProvider.GetChatUserList(c, &accountFiee.GetChatUserListRequest{
|
||||
Query: &accountFiee.ChatUserData{Origin: domain, OriginId: originId},
|
||||
Page: 1,
|
||||
PageSize: 1,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("ParseToChatUser ----------- 4.1")
|
||||
fmt.Println("获取chat user 失败", err)
|
||||
code = e.ErrorNotExistUser
|
||||
return
|
||||
}
|
||||
if userQueryRes.Total == 0 {
|
||||
fmt.Println("ParseToChatUser ----------- 4.2")
|
||||
createRes, errs := service.AccountFieeProvider.CreateChatUser(c, newChatUser)
|
||||
if errs == nil {
|
||||
chatUserInfo = createRes.Data
|
||||
} else {
|
||||
fmt.Println("创建chat user 失败", errs)
|
||||
code = e.ErrorNotExistUser
|
||||
}
|
||||
return
|
||||
} else {
|
||||
fmt.Println("ParseToChatUser ----------- 4.3")
|
||||
chatUserInfo = userQueryRes.List[0]
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -44,23 +44,60 @@ var EnMessages = map[string]string{
|
||||
"系统提示:已经发送过,验证码尚可用": "System message: Already sent, verification code is still available",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Your mobile phone number is sent too many times that day, please contact the administrator to log in through the password",
|
||||
"您的手机号验证码错误,请确认之后注册": "Your phone number verification code is incorrect, please confirm and register",
|
||||
"手机号不合法": "The phone number is illegal",
|
||||
"手机号未更改": "The phone number has not been changed",
|
||||
"新手机号过期": "New phone number expired",
|
||||
"验证码错误": "Verification code error",
|
||||
"验证码未发送": "The verification code was not sent",
|
||||
"账号不存在": "Account does not exist",
|
||||
"已实名": "In real name",
|
||||
"实名审核中,请勿重复提交": "During real-name audit, please do not submit repeatedly",
|
||||
"用户状态异常,无法进行审核": "The user is abnormal and cannot be audited. Procedure",
|
||||
"验证码已失效": "The verification code is invalid",
|
||||
"服务器错误": "Server error",
|
||||
"验证失败,请控制拼图对齐缺口": "Verification failed, please control puzzle alignment gap",
|
||||
"滑块验证状态不存在,请退出重试": "The slider verification status does not exist. Please exit and try again",
|
||||
"请先实名": "Please use your real name first",
|
||||
"实名审核中": "Real-name verification is underway",
|
||||
"实名审核失败": "The real-name verification failed",
|
||||
"未知实名状态": "Unknown real-name status",
|
||||
"手机号不合法": "The phone number is illegal",
|
||||
"手机号未更改": "The phone number has not been changed",
|
||||
"新手机号过期": "New phone number expired",
|
||||
"验证码错误": "Verification code error",
|
||||
"验证码未发送": "The verification code was not sent",
|
||||
"账号不存在": "Account does not exist",
|
||||
"已实名": "In real name",
|
||||
"实名审核中,请勿重复提交": "During real-name audit, please do not submit repeatedly",
|
||||
"用户状态异常,无法进行审核": "The user is abnormal and cannot be audited. Procedure",
|
||||
"验证码已失效": "The verification code is invalid",
|
||||
"服务器错误": "Server error",
|
||||
"验证失败,请控制拼图对齐缺口": "Verification failed, please control puzzle alignment gap",
|
||||
"滑块验证状态不存在,请退出重试": "The slider verification status does not exist. Please exit and try again",
|
||||
"语言不能为空": "The language cannot be empty",
|
||||
"排序参数需为正整数": "The sorting parameter must be a positive integer",
|
||||
"请先创建中文版本套餐": "Please create the Chinese version bundle first",
|
||||
"增值服务不存在": "Value-added service does not exist",
|
||||
"所选增值服务币种与套餐币种不一致": "The selected value-added service currency is not the same as the bundle currency",
|
||||
"文件转换失败": "File conversion failed",
|
||||
"每种增值服务类型只可选择一个": "Each type of value-added service can only be selected once",
|
||||
"保存套餐与增值服务关联失败": "Failed to save bundle with value-added service association",
|
||||
"删除套餐与增值服务关联失败": "Failed to delete bundle with value-added service association",
|
||||
"查询套餐与增值服务关联失败": "Failed to query bundle with value-added service association",
|
||||
"更新套餐与增值服务关联失败": "Failed to update bundle with value-added service association",
|
||||
"查询增值服务失败": "Failed to query value-added service",
|
||||
"更新套餐状态失败": "Failed to update bundle status",
|
||||
"查询增值服务详情失败": "Failed to query value-added service details",
|
||||
"序列化转换失败": "Serialization conversion failed",
|
||||
"保存套餐历史记录失败": "Failed to save bundle history record",
|
||||
"原价不能为空": "Original price cannot be empty",
|
||||
"原价格式转换失败": "Original price format conversion failed",
|
||||
"数量参数需为0-99": "Quantity parameter must be between 0 and 99",
|
||||
"优惠单价需小于等于原价": "The discounted price must be less than or equal to the original price",
|
||||
"请先创建中文版本增值服务": "Please create the Chinese version value-added service first",
|
||||
"保存增值服务失败": "Failed to save value-added service",
|
||||
"保存增值服务历史记录失败": "Failed to save value-added service history record",
|
||||
"更新增值服务失败": "Failed to update value-added service",
|
||||
"查询增值服务列表失败": "Failed to query value-added service list",
|
||||
"计算价格失败": "Failed to calculate price",
|
||||
"更新成功": "Update successful",
|
||||
"保存成功": "Save successful",
|
||||
"优惠单价转换失败": "Discount unit price conversion failed",
|
||||
"符号错误": "Symbol error",
|
||||
"条件存在冲突,请重新设置": "Condition conflict exists, please reconfigure",
|
||||
"币种已修改,已取消关联部分增值服务": "Currency has been modified, some value-added services have been unlinked",
|
||||
"币种已修改,已取消关联部分套餐": "Currency has been modified, some packages have been unlinked",
|
||||
"新增增值服务成功": "Successfully added value-added service",
|
||||
"状态值无效": "Invalid status value",
|
||||
"套餐已上架,请勿重复操作": "Plan is already published, do not repeat the operation",
|
||||
"套餐已下架,请勿重复操作": "Plan is already unpublished, do not repeat the operation",
|
||||
"请先实名": "Please use your real name first",
|
||||
"实名审核中": "Real-name verification is underway",
|
||||
"实名审核失败": "The real-name verification failed",
|
||||
"未知实名状态": "Unknown real-name status",
|
||||
}
|
||||
|
||||
var DeDEMessages = map[string]string{
|
||||
@ -99,23 +136,60 @@ var DeDEMessages = map[string]string{
|
||||
"系统提示:已经发送过,验证码尚可用": "Systemnachricht: Bereits gesendet, Verifizierungscode ist noch verfügbar",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Ihre Telefonnummer wurde an diesem Tag zu oft gesendet. Bitte wenden Sie sich an den Administrator, um sich über das Passwort anzumelden",
|
||||
"您的手机号验证码错误,请确认之后注册": "Ihre Telefonnummer Verifizierungscode ist falsch, bitte bestätigen und registrieren",
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
"请先实名": "Bitte, nur der name",
|
||||
"实名审核中": "Contest läuft",
|
||||
"实名审核失败": "Die confirmation hat versagt",
|
||||
"未知实名状态": "Noch nicht registriert",
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
"语言不能为空": "Sprache darf nicht leer sein",
|
||||
"排序参数需为正整数": "Sortierparameter muss eine positive ganze Zahl sein",
|
||||
"请先创建中文版本套餐": "Bitte erstelle das Chinese Version-Paket",
|
||||
"增值服务不存在": "Der Werbeangebot existiert nicht",
|
||||
"所选增值服务币种与套餐币种不一致": "Die ausgewählte Währung des Werbeangebots stimmt nicht mit der Währung des Pakets überein",
|
||||
"文件转换失败": "Datei-Umwandlung fehlgeschlagen",
|
||||
"每种增值服务类型只可选择一个": "Jeder Werbeangebotstyp kann nur einmal ausgewählt werden",
|
||||
"保存套餐与增值服务关联失败": "Fehler beim Speichern des Pakets mit Werbeangebot",
|
||||
"删除套餐与增值服务关联失败": "Fehler beim Löschen des Pakets mit Werbeangebot",
|
||||
"查询套餐与增值服务关联失败": "Fehler beim Abrufen des Pakets mit Werbeangebot",
|
||||
"更新套餐与增值服务关联失败": "Fehler beim Aktualisieren des Pakets mit Werbeangebot",
|
||||
"查询增值服务失败": "Fehler beim Abrufen des Werbeangebots",
|
||||
"更新套餐状态失败": "Fehler beim Aktualisieren des Paketstatus",
|
||||
"查询增值服务详情失败": "Fehler beim Abrufen der Werbeangebotsdetails",
|
||||
"序列化转换失败": "Fehler beim Serialisieren",
|
||||
"保存套餐历史记录失败": "Fehler beim Speichern des Pakethistorie",
|
||||
"原价不能为空": "Der reguläre Preis darf nicht leer sein",
|
||||
"原价格式转换失败": "Fehler beim Umwandeln des regulären Preises",
|
||||
"数量参数需为0-99": "Die Anzahlsmusterparameter muss eine positive ganze Zahl sein",
|
||||
"优惠单价需小于等于原价": "Der Rabattpreis muss kleiner oder gleich dem regulären Preis sein",
|
||||
"请先创建中文版本增值服务": "Bitte erstelle das Chinese Version-Werbeangebot",
|
||||
"保存增值服务失败": "Fehler beim Speichern des Werbeangebots",
|
||||
"保存增值服务历史记录失败": "Fehler beim Speichern des Werbeangebots-Historie",
|
||||
"更新增值服务失败": "Fehler beim Aktualisieren des Werbeangebots",
|
||||
"查询增值服务列表失败": "Fehler beim Abrufen der Werbeangebotsliste",
|
||||
"计算价格失败": "Fehler beim Berechnen des Preises",
|
||||
"更新成功": "Aktualisierung erfolgreich",
|
||||
"保存成功": "Speichern erfolgreich",
|
||||
"优惠单价转换失败": "Rabatt-Einzelpreisumrechnung fehlgeschlagen",
|
||||
"符号错误": "Symbolfehler",
|
||||
"条件存在冲突,请重新设置": "Bedingungskonflikt vorhanden, bitte neu konfigurieren",
|
||||
"币种已修改,已取消关联部分增值服务": "Währung wurde geändert, einige Mehrwertdienste wurden getrennt",
|
||||
"币种已修改,已取消关联部分套餐": "Währung wurde geändert, einige Pakete wurden getrennt",
|
||||
"新增增值服务成功": "Mehrwertdienst erfolgreich hinzugefügt",
|
||||
"状态值无效": "Ungültiger Statuswert",
|
||||
"套餐已上架,请勿重复操作": "Paket ist bereits veröffentlicht, bitte nicht wiederholen",
|
||||
"套餐已下架,请勿重复操作": "Paket ist bereits zurückgezogen, bitte nicht wiederholen",
|
||||
"请先实名": "Bitte, nur der name",
|
||||
"实名审核中": "Contest läuft",
|
||||
"实名审核失败": "Die confirmation hat versagt",
|
||||
"未知实名状态": "Noch nicht registriert",
|
||||
}
|
||||
|
||||
var JaJPMessages = map[string]string{
|
||||
@ -167,10 +241,48 @@ var JaJPMessages = map[string]string{
|
||||
"服务器错误": "サーバーエラー",
|
||||
"验证失败,请控制拼图对齐缺口": "検証に失敗しました。パズルの整列ギャップを制御してください",
|
||||
"滑块验证状态不存在,请退出重试": "スライダー検証状態が存在しません,リトライをログアウトしてください",
|
||||
"请先实名": "まずは実名でお願いします",
|
||||
"实名审核中": "実名審査中です",
|
||||
"实名审核失败": "実名検証失敗です",
|
||||
"未知实名状态": "未知の実名状態です",
|
||||
|
||||
"语言不能为空": "言語が空です",
|
||||
"排序参数需为正整数": "ソートパラメーターは正の整数でなければなりません",
|
||||
"请先创建中文版本套餐": "最初に中国語バージョンのパッケージを作成してください",
|
||||
"增值服务不存在": "付加サービスは存在しません",
|
||||
"所选增值服务币种与套餐币种不一致": "選択した付加サービスの通貨とパッケージの通貨が一致しません",
|
||||
"文件转换失败": "ファイル変換に失敗しました",
|
||||
"每种增值服务类型只可选择一个": "各種付加サービスタイプは一つしか選択できません",
|
||||
"保存套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの保存に失敗しました",
|
||||
"删除套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの削除に失敗しました",
|
||||
"查询套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの検索に失敗しました",
|
||||
"更新套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの更新に失敗しました",
|
||||
"查询增值服务失败": "付加サービスの検索に失敗しました",
|
||||
"更新套餐状态失败": "パッケージステータスの更新に失敗しました",
|
||||
"查询增值服务详情失败": "付加サービスの詳細検索に失敗しました",
|
||||
"序列化转换失败": "シリアライズ変換に失敗しました",
|
||||
"保存套餐历史记录失败": "パッケージ履歴の保存に失敗しました",
|
||||
"原价不能为空": "原価は空にできません",
|
||||
"原价格式转换失败": "原価のフォーマット変換に失敗しました",
|
||||
"数量参数需为0-99": "数量パラメーターは0-99でなければなりません",
|
||||
"优惠单价需小于等于原价": "割引単価は原価以下でなければなりません",
|
||||
"请先创建中文版本增值服务": "最初に中国語バージョンの付加サービスを作成してください",
|
||||
"保存增值服务失败": "付加サービスの保存に失敗しました",
|
||||
"保存增值服务历史记录失败": "付加サービス履歴の保存に失敗しました",
|
||||
"更新增值服务失败": "付加サービスの更新に失敗しました",
|
||||
"查询增值服务列表失败": "付加サービスリストの検索に失敗しました",
|
||||
"计算价格失败": "価格計算に失敗しました",
|
||||
"更新成功": "更新が成功しました",
|
||||
"保存成功": "保存が成功しました",
|
||||
"优惠单价转换失败": "割引単価変換に失敗しました",
|
||||
"符号错误": "記号エラー",
|
||||
"条件存在冲突,请重新设置": "条件が競合しています、再設定してください",
|
||||
"币种已修改,已取消关联部分增值服务": "通貨が変更され、一部の付加サービスの関連付けが解除されました",
|
||||
"币种已修改,已取消关联部分套餐": "通貨が変更され、一部のパッケージの関連付けが解除されました",
|
||||
"新增增值服务成功": "付加サービスの追加に成功しました",
|
||||
"状态值无效": "状態値が無効です",
|
||||
"套餐已上架,请勿重复操作": "プランはすでに公開済みです、重複操作は避けてください",
|
||||
"套餐已下架,请勿重复操作": "プランはすでに非公開です、重複操作は避けてください",
|
||||
"请先实名": "まずは実名でお願いします",
|
||||
"实名审核中": "実名審査中です",
|
||||
"实名审核失败": "実名検証失敗です",
|
||||
"未知实名状态": "未知の実名状態です",
|
||||
}
|
||||
|
||||
var ZhTWMessages = map[string]string{
|
||||
@ -222,8 +334,56 @@ var ZhTWMessages = map[string]string{
|
||||
"服务器错误": "服務器錯誤",
|
||||
"验证失败,请控制拼图对齐缺口": "驗證失敗,請控制拼圖對齊缺口",
|
||||
"滑块验证状态不存在,请退出重试": "滑塊驗證狀態不存在,請退出重試",
|
||||
"请先实名": "請先實名",
|
||||
"实名审核中": "實名審覈中",
|
||||
"实名审核失败": "實名審覈失敗",
|
||||
"未知实名状态": "未知實名狀態",
|
||||
|
||||
"语言不能为空": "語言不能為空",
|
||||
"排序参数需为正整数": "排序參數需為正整數",
|
||||
"请先创建中文版本套餐": "請先建立中文版本套餐",
|
||||
"增值服务不存在": "增值服務不存在",
|
||||
"所选增值服务币种与套餐币种不一致": "所選增值服務幣種與套餐幣種不一致",
|
||||
"文件转换失败": "文件轉換失敗",
|
||||
"每种增值服务类型只可选择一个": "每種增值服務類型只可選擇一個",
|
||||
"保存套餐与增值服务关联失败": "保存套餐與增值服務關聯失敗",
|
||||
"删除套餐与增值服务关联失败": "刪除套餐與增值服務關聯失敗",
|
||||
"查询套餐与增值服务关联失败": "查詢套餐與增值服務關聯失敗",
|
||||
"更新套餐与增值服务关联失败": "更新套餐與增值服務關聯失敗",
|
||||
"查询增值服务失败": "查詢增值服務失敗",
|
||||
"更新套餐状态失败": "更新套餐狀態失敗",
|
||||
"查询增值服务详情失败": "查詢增值服務詳情失敗",
|
||||
"序列化转换失败": "序列化轉換失敗",
|
||||
"保存套餐历史记录失败": "保存套餐歷史記錄失敗",
|
||||
"原价不能为空": "原價不能為空",
|
||||
"原价格式转换失败": "原價格式轉換失敗",
|
||||
"数量参数需为0-99": "數量參數需為0-99",
|
||||
"优惠单价需小于等于原价": "優惠單價需小於等於原價",
|
||||
"请先创建中文版本增值服务": "請先建立中文版本增值服務",
|
||||
"保存增值服务失败": "保存增值服務失敗",
|
||||
"保存增值服务历史记录失败": "保存增值服務歷史記錄失敗",
|
||||
"更新增值服务失败": "更新增值服務失敗",
|
||||
"查询增值服务列表失败": "查詢增值服務列表失敗",
|
||||
"计算价格失败": "計算價格失敗",
|
||||
"更新成功": "更新成功",
|
||||
"保存成功": "儲存成功",
|
||||
"优惠单价转换失败": "優惠單價轉換失敗",
|
||||
"符号错误": "符號錯誤",
|
||||
"条件存在冲突,请重新设置": "條件存在衝突,請重新設定",
|
||||
"币种已修改,已取消关联部分增值服务": "幣種已修改,已取消關聯部分增值服務",
|
||||
"币种已修改,已取消关联部分套餐": "幣種已修改,已取消關聯部分套餐",
|
||||
"新增增值服务成功": "新增增值服務成功",
|
||||
"状态值无效": "狀態值無效",
|
||||
"套餐已上架,请勿重复操作": "套餐已上架,請勿重複操作",
|
||||
"套餐已下架,请勿重复操作": "套餐已下架,請勿重複操作",
|
||||
"请先实名": "請先實名",
|
||||
"实名审核中": "實名審覈中",
|
||||
"实名审核失败": "實名審覈失敗",
|
||||
"未知实名状态": "未知實名狀態",
|
||||
"已存在标题相同的数据": "已存在標題相同的數據",
|
||||
"展示数量不能超过5个": "展示數量不能超過5個",
|
||||
"查询失败": "查詢失敗",
|
||||
"操作失败": "操作失敗",
|
||||
|
||||
"参数缺失": "參數缺失",
|
||||
"创建失败": "創建失敗",
|
||||
"更新失败": "更新失敗",
|
||||
"删除失败": "刪除失敗",
|
||||
"更新状态失败": "更新狀態失敗",
|
||||
}
|
||||
|
||||
167
pkg/common/ws/base.go
Normal file
167
pkg/common/ws/base.go
Normal file
@ -0,0 +1,167 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : hertzWSUpgrade.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/6/28 14:14
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/serializer"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// 消息结构
|
||||
type WSMessage struct {
|
||||
Type string `json:"type"`
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
// websocket消息内容
|
||||
type WsInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content interface{} `json:"content"` //消息内容
|
||||
From string `json:"from"` //发送者 0为服务端,客户端填写clientId
|
||||
To string `json:"to"` //接收者 接收消息的用户id
|
||||
Mark string `json:"mark"`
|
||||
//Conn *websocket.Conn `json:"-"` //客户端发送消息使用
|
||||
}
|
||||
type WsSessionInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
//SessionId string `json:"sessionId"` //会话Id
|
||||
Content interface{} `json:"content"` //消息内容
|
||||
}
|
||||
|
||||
// 身份认证消息
|
||||
type AuthorizationInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content AuthInfo `json:"content"`
|
||||
}
|
||||
|
||||
type AuthInfo struct {
|
||||
Auth string `json:"auth"`
|
||||
Domain string `json:"domain"`
|
||||
}
|
||||
|
||||
// 注册消息
|
||||
type WsRegisterInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content UserInfo `json:"content"` //消息内容
|
||||
From string `json:"from"` //发送者 0为服务端,客户端填写clientId
|
||||
To string `json:"to"` //接收者 接收消息的用户id
|
||||
//Conn *websocket.Conn `json:"-"` //客户端发送消息使用
|
||||
}
|
||||
type UserInfo struct {
|
||||
Uuid string `json:"uuid"` //画家uid
|
||||
UserId int64 `json:"userId"` //用户id
|
||||
ClientId string `json:"clientId,omitempty"` //服务端临时签发的客户端uid
|
||||
}
|
||||
|
||||
type TempClientInfo struct {
|
||||
ClientId string `json:"clientId"`
|
||||
}
|
||||
|
||||
func WsMessageRegisterCallback(clientId string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: RegisterType,
|
||||
Content: map[string]string{
|
||||
"clientId": clientId,
|
||||
},
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorMessage(wsType WsType, clientId string, code e.ErrorCodeType, err error) []byte {
|
||||
var ers string
|
||||
if err != nil {
|
||||
ers = err.Error()
|
||||
}
|
||||
var content = serializer.Response{
|
||||
Code: code,
|
||||
Err: ers,
|
||||
Msg: code.String(),
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: wsType,
|
||||
Content: content,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
func WsErrorPermissionDenied(wsType WsType, clientId string) []byte {
|
||||
var content = serializer.Response{
|
||||
Code: e.PermissionDenied,
|
||||
Err: "Permission Denied",
|
||||
Msg: "拒绝访问",
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: wsType,
|
||||
Content: content,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorInvalidDataFormat(clientId string) []byte {
|
||||
var content = serializer.Response{
|
||||
Status: e.Failed,
|
||||
Code: e.Failed,
|
||||
Err: "Invalid Data Format",
|
||||
Msg: "发送失败",
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: ErrorType,
|
||||
Content: content,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorUnknownMessageType(clientId string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: ErrorType,
|
||||
Content: "Unknown notice type",
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorConnection(clientId string, err string, marks ...string) []byte {
|
||||
mark := ""
|
||||
if marks != nil {
|
||||
mark = strings.Join(marks, ";")
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: ErrorType,
|
||||
Content: "Connection error:" + err,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
Mark: mark,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsChatMessage(clientId string, targetClientId string, msg string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: ChatType,
|
||||
Content: msg,
|
||||
From: clientId,
|
||||
To: targetClientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
392
pkg/common/ws/chatRoom.go
Normal file
392
pkg/common/ws/chatRoom.go
Normal file
@ -0,0 +1,392 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : chatRoom.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/21 18:17:17
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"github.com/gorilla/websocket"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// Time allowed to write a notice to the peer.
|
||||
writeWait = 10 * time.Second
|
||||
|
||||
// Time allowed to read the next pong notice from the peer.
|
||||
pongWait = 60 * time.Second
|
||||
|
||||
// Send pings to peer with this period. Must be less than pongWait.
|
||||
pingPeriod = (pongWait * 9) / 10
|
||||
|
||||
// Maximum notice size allowed from peer.
|
||||
maxMessageSize = 1024
|
||||
)
|
||||
|
||||
func NewChatRoom() *ChatRoom {
|
||||
var room = ChatRoom{
|
||||
clientsRwLocker: &sync.RWMutex{},
|
||||
clients: make(map[int64]map[string]*Client),
|
||||
register: make(clientChan),
|
||||
UnRegister: make(clientChan),
|
||||
broadcast: make(broadcastChan),
|
||||
eventBus: []*EventListener{},
|
||||
EventRwLocker: &sync.RWMutex{},
|
||||
}
|
||||
go room.Run()
|
||||
return &room
|
||||
}
|
||||
|
||||
type broadcastMessage struct {
|
||||
UserIds []int64
|
||||
message []byte
|
||||
}
|
||||
|
||||
type ChatRoomEvent struct {
|
||||
ListenEvent []ListenEvent
|
||||
message []byte
|
||||
SenderId int64
|
||||
ReceiverIds []int64
|
||||
}
|
||||
type (
|
||||
|
||||
// Client类型数据管道
|
||||
clientChan chan *Client
|
||||
|
||||
broadcastChan chan *broadcastMessage
|
||||
)
|
||||
|
||||
type ChatRoom struct {
|
||||
clientsRwLocker *sync.RWMutex
|
||||
EventRwLocker *sync.RWMutex
|
||||
//clients 客户端信息存储
|
||||
//// 支持多客户端连接 map[userId]map[clientId]*Client
|
||||
clients map[int64]map[string]*Client
|
||||
|
||||
//会话 map[sessionId][]*Client
|
||||
Session map[string][]*Client
|
||||
|
||||
//register register 注册管道
|
||||
register clientChan
|
||||
|
||||
//unRegister 注销管道 接收需要注销的客户端
|
||||
UnRegister clientChan
|
||||
|
||||
// 消息广播管道
|
||||
broadcast broadcastChan
|
||||
|
||||
// 事件广播管道,向其它程序推送消息
|
||||
eventBus []*EventListener
|
||||
}
|
||||
|
||||
func (o *ChatRoom) Run() {
|
||||
//消息分发
|
||||
for {
|
||||
select {
|
||||
// 注册事件
|
||||
case newClient := <-o.register:
|
||||
o.pushEvent(EventUserJoin, EventProgressBefore, nil, newClient)
|
||||
|
||||
o.clientsRwLocker.Lock()
|
||||
//添加到客户端集合中
|
||||
if o.clients[newClient.UserId] == nil {
|
||||
o.clients[newClient.UserId] = make(map[string]*Client)
|
||||
}
|
||||
o.clients[newClient.UserId][newClient.ClientId] = newClient
|
||||
//添加到会话集合中
|
||||
if o.Session == nil {
|
||||
o.Session = make(map[string][]*Client)
|
||||
}
|
||||
if newClient.Waiter {
|
||||
//客服人员没有默认会话窗口,而是自动加入所有用户的会话
|
||||
for sessionId, _ := range o.Session {
|
||||
sessionId := sessionId
|
||||
if sessionId != newClient.SessionId {
|
||||
for _, client := range o.clients[newClient.UserId] {
|
||||
o.Session[sessionId] = append(o.Session[sessionId], client)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 将自己加入会话
|
||||
o.Session[newClient.SessionId] = append(o.Session[newClient.SessionId], newClient)
|
||||
} else {
|
||||
//普通用户添加会话的逻辑
|
||||
_, ok := o.Session[newClient.SessionId]
|
||||
if !ok {
|
||||
o.Session[newClient.SessionId] = make([]*Client, 0)
|
||||
//把客服拉入会话
|
||||
for userId, clientInfo := range o.clients {
|
||||
if userId == newClient.UserId {
|
||||
continue
|
||||
}
|
||||
for i, client := range clientInfo {
|
||||
if client != nil && client.Waiter {
|
||||
//把客服人员客户端加入会话中
|
||||
o.Session[newClient.SessionId] = append(o.Session[newClient.SessionId], clientInfo[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 将自己加入会话
|
||||
o.Session[newClient.SessionId] = append(o.Session[newClient.SessionId], newClient)
|
||||
}
|
||||
o.clientsRwLocker.Unlock() // 统一在最后解锁
|
||||
o.pushEvent(EventUserJoin, EventProgressAfter, nil, newClient)
|
||||
//注销事件
|
||||
case client := <-o.UnRegister:
|
||||
o.pushEvent(EventUserLeave, EventProgressBefore, nil, client)
|
||||
//panic 恢复
|
||||
defer func() {
|
||||
if r := recover(); r != "" {
|
||||
const size = 64 << 10
|
||||
buf := make([]byte, size)
|
||||
buf = buf[:runtime.Stack(buf, false)]
|
||||
err, ok := r.(error)
|
||||
if !ok {
|
||||
err = fmt.Errorf("%v", r)
|
||||
}
|
||||
log.Fatal("close webosocket connection occured panic , recovered!", zap.Any("client", client), zap.Error(err), zap.String("stack", string(buf)))
|
||||
}
|
||||
}()
|
||||
fmt.Println("ws客户端注销事件触发")
|
||||
//从客户端集合中删除
|
||||
if _, ok := o.clients[client.UserId]; ok {
|
||||
if client != nil && client.Conn != nil {
|
||||
//_ = client.Conn.WriteMessage(websocket.CloseMessage, []byte{})
|
||||
_ = client.Conn.Close()
|
||||
}
|
||||
o.clients[client.UserId][client.ClientId] = nil
|
||||
delete(o.clients[client.UserId], client.ClientId)
|
||||
fmt.Printf("ws客户端%s 被注销\n", client.ClientId)
|
||||
}
|
||||
o.pushEvent(EventUserLeave, EventProgressAfter, nil, client)
|
||||
// 消息群发事件
|
||||
case messageInfo := <-o.broadcast:
|
||||
o.Broadcast(messageInfo.message, messageInfo.UserIds...)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (o *ChatRoom) Register(c *Client) (sessionId string) {
|
||||
if c.SessionId == "" && !c.Waiter {
|
||||
//这里的c经常拿不到sessionId,所以使用userId固定死
|
||||
//c.SessionId = fmt.Sprintf("%d-%d", c.UserId, time.Now().Unix())
|
||||
c.SessionId = fmt.Sprintf("%d", c.UserId)
|
||||
}
|
||||
o.register <- c
|
||||
return c.SessionId
|
||||
}
|
||||
|
||||
// SendSessionMessage
|
||||
// sendUserId: 发送消息的用户id,消息提醒时,此用户将会被排除
|
||||
// sessionId: 会话id
|
||||
// msgType: 消息类型
|
||||
// message: 消息内容
|
||||
func (o *ChatRoom) SendSessionMessage(sender *accountFiee.ChatUserData, sessionId string, msgType WsType, message any) (userIdInSession []int64, err error) {
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------1")
|
||||
o.clientsRwLocker.Lock()
|
||||
defer o.clientsRwLocker.Unlock()
|
||||
var msg = WsSessionInfo{
|
||||
Type: msgType,
|
||||
Content: message,
|
||||
}
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------2")
|
||||
msgBytes, _ := json.Marshal(msg)
|
||||
if o.Session[sessionId] == nil {
|
||||
err = fmt.Errorf("该会话不存在或已失效")
|
||||
return
|
||||
}
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------3")
|
||||
usableClients := []*Client{}
|
||||
fmt.Printf("sessionId:[%s],客户端数量%d\n", sessionId, len(o.Session[sessionId]))
|
||||
pushed := false
|
||||
for i, client := range o.Session[sessionId] {
|
||||
if client != nil {
|
||||
_, exist := o.clients[client.UserId][client.ClientId]
|
||||
if exist {
|
||||
usableClients = append(usableClients, o.Session[sessionId][i])
|
||||
if !pushed {
|
||||
go o.pushEvent(EventChatMessage, EventProgressBefore, sender, o.Session[sessionId][i], message)
|
||||
pushed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Printf("client:%+v\n", client)
|
||||
pushed = false
|
||||
if client != nil && (client.UserId != sender.ID || sender.Role == 3) {
|
||||
client.Send <- msgBytes
|
||||
if !pushed {
|
||||
go o.pushEvent(EventChatMessage, EventProgressAfter, sender, o.Session[sessionId][i], message)
|
||||
pushed = true
|
||||
}
|
||||
userIdInSession = append(userIdInSession, client.UserId)
|
||||
}
|
||||
//client.Send <- msgBytes
|
||||
}
|
||||
o.Session[sessionId] = usableClients
|
||||
fmt.Printf("sessionId:[%s],客户端数量%d\n", sessionId, len(o.Session[sessionId]))
|
||||
fmt.Println("userIdInSession", userIdInSession)
|
||||
return
|
||||
}
|
||||
func (o *ChatRoom) GetUserIdInSession(sessionId string, withoutUserId ...int64) (userIds []int64) {
|
||||
fmt.Printf("sessionId:%s withoutUserId:%d\n", sessionId, withoutUserId)
|
||||
fmt.Println("GetUserIdInSession 1")
|
||||
if o.Session[sessionId] != nil {
|
||||
fmt.Printf("GetUserIdInSession 2,o.Session[sessionId]:%+v", o.Session[sessionId])
|
||||
for _, client := range o.Session[sessionId] {
|
||||
fmt.Println("session one of userId", client.UserId)
|
||||
var jump bool
|
||||
if withoutUserId != nil {
|
||||
for _, userId := range withoutUserId {
|
||||
if client.UserId == userId {
|
||||
jump = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if !jump {
|
||||
fmt.Println("ADD USER", client.UserId)
|
||||
userId := client.UserId
|
||||
userIds = append(userIds, userId)
|
||||
}
|
||||
}
|
||||
}
|
||||
//针对app没有连接上websocket(聊天室没有检查到用户的客户端,此时websocket无法发送通知),但是需要推送app通知给用户的情况进行优化
|
||||
fmt.Println("GetUserIdInSession 3,userIds:", userIds)
|
||||
if len(userIds) == 0 {
|
||||
sessionUserId, _ := strconv.Atoi(sessionId)
|
||||
add := true
|
||||
if sessionUserId != 0 {
|
||||
for _, v := range withoutUserId {
|
||||
if v == int64(sessionUserId) {
|
||||
add = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if add {
|
||||
userIds = append(userIds, int64(sessionUserId))
|
||||
}
|
||||
fmt.Println("GetUserIdInSession 4,userIds:", userIds)
|
||||
}
|
||||
userIds = utils.Unique(userIds)
|
||||
fmt.Println("GetUserIdInSession 5,userIds:", userIds)
|
||||
return
|
||||
}
|
||||
|
||||
// func (o *ChatRoom) RegisterClient(c *Client) {
|
||||
// o.register <- c
|
||||
// }
|
||||
//
|
||||
// func (o *ChatRoom) DeleteClient(c *Client) {
|
||||
// o.unRegister <- c
|
||||
// }
|
||||
func (o *ChatRoom) Broadcast(message []byte, userIds ...int64) {
|
||||
fmt.Println("Broadcast -------1")
|
||||
// 如果userIds为空则群发,否则找到这个用户的ws对象
|
||||
var clientsToSend []*Client
|
||||
|
||||
if userIds == nil {
|
||||
for _, userClients := range o.clients {
|
||||
for _, cli := range userClients {
|
||||
if cli != nil {
|
||||
clientsToSend = append(clientsToSend, cli)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, userId := range userIds {
|
||||
userClients, ok := o.clients[userId]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
for _, cli := range userClients {
|
||||
if cli != nil {
|
||||
clientsToSend = append(clientsToSend, cli)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 使用有限的goroutine池发送消息
|
||||
fmt.Println("Broadcast -------2")
|
||||
var wg sync.WaitGroup
|
||||
for _, cli := range clientsToSend {
|
||||
wg.Add(1)
|
||||
go func(client *Client) {
|
||||
defer wg.Done()
|
||||
|
||||
err := client.Conn.SetWriteDeadline(time.Now().Add(writeWait))
|
||||
err = client.Conn.WriteMessage(websocket.TextMessage, message)
|
||||
if err != nil {
|
||||
o.UnRegister <- client
|
||||
}
|
||||
}(cli)
|
||||
}
|
||||
wg.Wait()
|
||||
fmt.Println("Broadcast -------3 end")
|
||||
}
|
||||
|
||||
// RegisterEventListener 注册聊天室事件监听者
|
||||
func (o *ChatRoom) RegisterEventListener(listenerChan *EventListener) {
|
||||
o.EventRwLocker.Lock()
|
||||
defer o.EventRwLocker.Unlock()
|
||||
o.eventBus = append(o.eventBus, listenerChan)
|
||||
}
|
||||
|
||||
// 注销监听者
|
||||
func (o *ChatRoom) UnRegisterEventListener(listenerChan *EventListener) {
|
||||
o.EventRwLocker.Lock()
|
||||
defer o.EventRwLocker.Unlock()
|
||||
var registerListenerList []*EventListener
|
||||
for i, listener := range o.eventBus {
|
||||
if listener.Name == listenerChan.Name {
|
||||
continue
|
||||
}
|
||||
registerListenerList = append(registerListenerList, o.eventBus[i])
|
||||
}
|
||||
o.eventBus = registerListenerList
|
||||
}
|
||||
|
||||
// pushEvent 推送聊天室事件
|
||||
func (o *ChatRoom) pushEvent(eventType EventType, progress EventProgress, chatUser *accountFiee.ChatUserData, client *Client, data ...any) {
|
||||
//o.EventRwLocker.Lock()
|
||||
//defer o.EventRwLocker.Unlock()
|
||||
for _, listener := range o.eventBus {
|
||||
hit := false
|
||||
for _, need := range listener.ListenEvents {
|
||||
if need.EventType == eventType && need.ProgressType == progress {
|
||||
hit = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if hit == false {
|
||||
continue
|
||||
}
|
||||
msg := ""
|
||||
if data != nil {
|
||||
msg = fmt.Sprintf("%v", data[0])
|
||||
}
|
||||
listener.Chan <- ListenEventData{
|
||||
ListenEvent: ListenEvent{
|
||||
EventType: eventType,
|
||||
ProgressType: progress,
|
||||
},
|
||||
ChatUser: chatUser,
|
||||
Client: client,
|
||||
Msg: msg,
|
||||
Data: data,
|
||||
}
|
||||
fmt.Printf("chatRooom 推送事件给%s eventType:%v progress:%v", listener.Name, eventType, progress)
|
||||
}
|
||||
}
|
||||
117
pkg/common/ws/client.go
Normal file
117
pkg/common/ws/client.go
Normal file
@ -0,0 +1,117 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : client.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/21 18:18:05
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
// 注册事件最大等待时间
|
||||
limitRegisterWaitTime = time.Second * 6
|
||||
limitReadTime = time.Second * 5
|
||||
)
|
||||
|
||||
// NewClient 创建客户端实例
|
||||
//
|
||||
// param userId 用户id
|
||||
// param uid 用户uuid
|
||||
// param conn 客户端websocket连接对象
|
||||
// return *Client
|
||||
func NewClient(userId int64, uid string, conn *websocket.Conn, room *ChatRoom) *Client {
|
||||
uidobj, _ := uuid.NewV4()
|
||||
var v = &Client{
|
||||
Room: room,
|
||||
UserId: userId,
|
||||
Uuid: uid,
|
||||
ClientId: strings.Replace(uidobj.String(), "-", "", -1),
|
||||
Conn: conn,
|
||||
Send: make(chan []byte, 500),
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
Room *ChatRoom `json:"-" `
|
||||
UserId int64 `json:"userId" ` //用户id
|
||||
Uuid string `json:"uuid"` //画家uid
|
||||
ClientId string `json:"clientId"` //为用户不同设备分配不同的客户端ID
|
||||
Conn *websocket.Conn `json:"-"`
|
||||
Send chan []byte
|
||||
SessionId string `json:"sessionId"` //会话ID,同一个用户多客户端登录,会话ID相同
|
||||
Waiter bool `json:"waiter"` //是否是客服
|
||||
}
|
||||
|
||||
func (c *Client) Reading(ctx context.Context, handleFunc ...func(sourceData []byte, cli *Client)) {
|
||||
defer func() {
|
||||
c.Room.UnRegister <- c
|
||||
ctx.Done()
|
||||
return
|
||||
}()
|
||||
//c.Conn.SetReadLimit(maxMessageSize)
|
||||
c.Conn.SetReadDeadline(time.Now().Add(pongWait))
|
||||
//接收到ping命令后,更新读取时间
|
||||
c.Conn.SetPongHandler(func(string) error {
|
||||
c.Conn.SetReadDeadline(time.Now().Add(pongWait))
|
||||
return nil
|
||||
})
|
||||
for {
|
||||
msgType, byteData, err := c.Conn.ReadMessage()
|
||||
if msgType == -1 {
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
|
||||
log.Println("ws连接已关闭", zap.Error(err))
|
||||
}
|
||||
break
|
||||
}
|
||||
if handleFunc != nil {
|
||||
handleFunc[0](byteData, c)
|
||||
} else {
|
||||
HandleMessage(byteData, c)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (c *Client) WriteWait() {
|
||||
ticker := time.NewTicker(pingPeriod)
|
||||
defer func() {
|
||||
ticker.Stop()
|
||||
c.Conn.Close()
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case msg, ok := <-c.Send:
|
||||
if !ok {
|
||||
// 聊天室关闭了管道
|
||||
c.Conn.WriteControl(websocket.CloseMessage, []byte{}, time.Now().Add(writeWait))
|
||||
return
|
||||
}
|
||||
// 设置写入超时
|
||||
err := c.Conn.SetWriteDeadline(time.Now().Add(writeWait))
|
||||
fmt.Printf("设置写超时 err check:%v\n", err)
|
||||
fmt.Printf("发送消息:%+v\n", string(msg))
|
||||
err = c.Conn.WriteMessage(websocket.TextMessage, msg)
|
||||
fmt.Printf("发送消息结束 err check:%v\n", err)
|
||||
case <-ticker.C:
|
||||
fmt.Println("ping websocket client")
|
||||
err := c.Conn.SetWriteDeadline(time.Now().Add(writeWait))
|
||||
fmt.Printf("ping 设置写超时 err check:%v\n", err)
|
||||
if err := c.Conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(pongWait)); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
57
pkg/common/ws/consts.go
Normal file
57
pkg/common/ws/consts.go
Normal file
@ -0,0 +1,57 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : consts.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/14 09:44
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import "fonchain-fiee/api/accountFiee"
|
||||
|
||||
// websocket 消息类型
|
||||
type WsType int
|
||||
|
||||
const (
|
||||
RegisterType WsType = iota //用户注册消息
|
||||
ErrorType //错误消息
|
||||
TestType //测试消息
|
||||
ChatType //聊天消息
|
||||
NewChatMsgType //新消息通知
|
||||
AuthorizationType //token校验通知
|
||||
)
|
||||
|
||||
// 事件总线中的事件类型
|
||||
type EventType string
|
||||
|
||||
const (
|
||||
EventConnection EventType = "connection" //websocket连接事件
|
||||
EventUserJoin EventType = "user_join" //用户/客服加入聊天事件
|
||||
EventUserLeave EventType = "user_leave" //用户离开事件
|
||||
EventChatMessage EventType = "chat_message" //聊天消息传递事件
|
||||
)
|
||||
|
||||
// before
|
||||
type EventProgress string
|
||||
|
||||
const (
|
||||
EventProgressBefore EventProgress = "before"
|
||||
EventProgressAfter EventProgress = "after"
|
||||
)
|
||||
|
||||
type ListenEvent struct {
|
||||
EventType EventType `json:"type"`
|
||||
ProgressType EventProgress `json:"progress"`
|
||||
}
|
||||
type ListenEventData struct {
|
||||
ListenEvent
|
||||
Client *Client
|
||||
ChatUser *accountFiee.ChatUserData
|
||||
Msg string
|
||||
Data any
|
||||
}
|
||||
type ListenEventChan chan ListenEventData
|
||||
type EventListener struct {
|
||||
Name string
|
||||
ListenEvents []ListenEvent //需要监听的事件列表
|
||||
Chan ListenEventChan
|
||||
}
|
||||
21
pkg/common/ws/ginWSUpgrade.go
Normal file
21
pkg/common/ws/ginWSUpgrade.go
Normal file
@ -0,0 +1,21 @@
|
||||
// Package utils -----------------------------
|
||||
// @file : hertzWSUpgrade.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/6/28 14:19
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"github.com/gorilla/websocket"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var UpGrader = websocket.Upgrader{
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: func(r *http.Request) bool {
|
||||
// 检查请求的来源是否允许websocket连接,可根据需求自行实现
|
||||
return true
|
||||
},
|
||||
}
|
||||
53
pkg/common/ws/readme.md
Normal file
53
pkg/common/ws/readme.md
Normal file
@ -0,0 +1,53 @@
|
||||
# wsscoket 对接说明
|
||||
## 客户端对接测试页面
|
||||
[{{服务端地址}}/ws/client](http://127.0.0.1:8088/ws/client)
|
||||
|
||||
## 客户端对接websocket流程
|
||||
### websocket的连接
|
||||
1. 客户端登录后获取uuid
|
||||
2. 连接服务端websocket后,在10s内发送一下格式的数据,否则websocket连接将断开。
|
||||
uuid请添加登录后获取的,如果uuid不正确,连接也会断开
|
||||
```json
|
||||
{
|
||||
"type": "register",
|
||||
"from": "",
|
||||
"to": "0",
|
||||
"content": {
|
||||
"uuid":"用户的uuid"
|
||||
}
|
||||
}
|
||||
```
|
||||
注册成功后,服务端将返回客户端临时id
|
||||
```json
|
||||
{"clientId":"02de5759-3f0a-47fa-a79f-afe61c39c5aa"}
|
||||
```
|
||||
|
||||
### weboscket 数据发送测试
|
||||
消息类型`type="test"`时,客户端将会把`content`内容原路返回,以此来测试最基本的通讯功能。
|
||||
```json
|
||||
{
|
||||
"type": "test",
|
||||
"from": "用户clientId",
|
||||
"to": "0",
|
||||
"content": {
|
||||
"demo":"testdemo"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### websocket消息类型说明
|
||||
#### 错误消息
|
||||
在websocket通讯过程中,服务端会对客户端发送过来的消息进行验证。
|
||||
|
||||
| type字段 | content字段 | 说明 |
|
||||
|--------|----------------------|------------------------------|
|
||||
| Error | Permission denied | 拒绝访问。 此报错一般出现在首次连接,验证uuid的时候 |
|
||||
| Error | Invalid data format | 无效的数据格式。消息内容未按照指定格式书写 |
|
||||
| Error | Unknown message type | 未知的消息类型。接收到了未定义的type |
|
||||
|
||||
**错误消息示例:**
|
||||
```json
|
||||
{"type":"Error","content":"Permission denied","from":"0","to":"tempId"}
|
||||
//{"type":"Error","content":"Invalid data format","from":"0","to":""}
|
||||
//{"type":"Error","content":"Unknown notice type","from":"0","to":"0"}
|
||||
```
|
||||
197
pkg/common/ws/wsMessageHandle.go
Normal file
197
pkg/common/ws/wsMessageHandle.go
Normal file
@ -0,0 +1,197 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : handler.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/23 11:13:43
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/common/jwt"
|
||||
"fonchain-fiee/pkg/common/m"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
)
|
||||
|
||||
func AuthorizationVerify(sourceData []byte) (userInfo *accountFiee.ChatUserData, ok bool, err error) {
|
||||
fmt.Println("AuthorizationVerify ----------------1")
|
||||
var msg AuthorizationInfo
|
||||
err = json.Unmarshal(sourceData, &msg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Println("AuthorizationVerify ----------------2")
|
||||
if msg.Type != AuthorizationType {
|
||||
return
|
||||
}
|
||||
fmt.Println("AuthorizationVerify ----------------3")
|
||||
if msg.Content.Auth == "" {
|
||||
return
|
||||
}
|
||||
fmt.Println("AuthorizationVerify ----------------4")
|
||||
var check = true
|
||||
var ctx = context.Background()
|
||||
var accountInfo accountFiee.ChatUserData
|
||||
//fiee token校验
|
||||
switch msg.Content.Domain {
|
||||
case "app":
|
||||
var fieeJwtInfo *jwt.Claims
|
||||
fieeJwtInfo, err = jwt.ParseToken(msg.Content.Auth, m.JWTSecret)
|
||||
if err != nil {
|
||||
check = false
|
||||
fmt.Printf("fiee token parse err:%v\n", err)
|
||||
} else {
|
||||
fmt.Printf("fieeJwtInfo :%#v\n", fieeJwtInfo)
|
||||
accountInfo.Origin = config.AppConfig.System.Domain
|
||||
//accountInfo.OriginId = int64(fieeJwtInfo.ID)
|
||||
accountInfo.Account = fieeJwtInfo.Account
|
||||
accountInfo.NickName = fieeJwtInfo.NickName
|
||||
infoReq := &accountFiee.UserByTelRequest{
|
||||
Tel: fieeJwtInfo.Phone,
|
||||
Domain: config.AppConfig.System.Domain,
|
||||
}
|
||||
var accInfo *accountFiee.UserInfoResponse
|
||||
accInfo, err = service.AccountFieeProvider.UserByTel(ctx, infoReq)
|
||||
if err != nil {
|
||||
check = false
|
||||
fmt.Printf("err:%#v\n", err)
|
||||
} else if accInfo != nil {
|
||||
fmt.Printf("fiee accInfo :%#v\n", accInfo)
|
||||
accountInfo.OriginId = int64(accInfo.Id)
|
||||
accountInfo.Account = accInfo.TelNum
|
||||
accountInfo.Avatar = accInfo.GroupPhoto
|
||||
if accInfo.Name != "" {
|
||||
accountInfo.NickName = accInfo.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
case "fontree":
|
||||
msg.Content.Auth, err = secret.GetJwtFromStr(msg.Content.Auth)
|
||||
if err != nil {
|
||||
fmt.Println("token解析失败:", err.Error())
|
||||
check = false
|
||||
} else {
|
||||
var fontreeJwtInfo *account.DecryptJwtResponse
|
||||
fontreeJwtInfo, err = service.AccountProvider.DecryptJwt(ctx, &account.DecryptJwtRequest{Token: msg.Content.Auth, Domain: e.ErpDomain})
|
||||
if err != nil || fontreeJwtInfo.IsOffline {
|
||||
check = false
|
||||
} else {
|
||||
check = true
|
||||
fmt.Printf("fontreeJwtInfo is %#v\n", fontreeJwtInfo)
|
||||
accountInfo.Origin = e.ErpDomain
|
||||
accountInfo.OriginId = int64(fontreeJwtInfo.ID)
|
||||
accountInfo.Account = fontreeJwtInfo.Account
|
||||
accountInfo.NickName = fontreeJwtInfo.NickName
|
||||
}
|
||||
}
|
||||
}
|
||||
if !check {
|
||||
return
|
||||
}
|
||||
|
||||
//查询是否已经注册
|
||||
var chatUserQuery *accountFiee.GetChatUserListResp
|
||||
chatUserQuery, err = service.AccountFieeProvider.GetChatUserList(ctx, &accountFiee.GetChatUserListRequest{
|
||||
Query: &accountFiee.ChatUserData{OriginId: accountInfo.OriginId, Origin: msg.Content.Domain},
|
||||
Page: 1,
|
||||
PageSize: 1,
|
||||
})
|
||||
//如果找不到聊天用户则创建
|
||||
if err != nil || chatUserQuery.Total == 0 {
|
||||
//注册客服
|
||||
var createUserRes *accountFiee.CreateChatUserResp
|
||||
var createChatUserReq = &accountFiee.ChatUserData{
|
||||
NickName: accountInfo.NickName,
|
||||
Account: accountInfo.Account,
|
||||
Role: 1,
|
||||
Origin: msg.Content.Domain,
|
||||
OriginId: accountInfo.OriginId,
|
||||
}
|
||||
if msg.Content.Domain == e.ErpDomain {
|
||||
createChatUserReq.Role = 2
|
||||
}
|
||||
createUserRes, err = service.AccountFieeProvider.CreateChatUser(ctx, createChatUserReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
userInfo = createUserRes.GetData()
|
||||
fmt.Printf("注册聊天用户:%#v\n", userInfo)
|
||||
} else {
|
||||
userInfo = chatUserQuery.List[0]
|
||||
if msg.Content.Domain == config.AppConfig.System.Domain && (accountInfo.NickName != userInfo.NickName || accountInfo.Account != userInfo.Account || accountInfo.Avatar != userInfo.Avatar) {
|
||||
_, _ = service.AccountFieeProvider.UpdateChatUser(ctx, &accountFiee.ChatUserData{
|
||||
NickName: accountInfo.NickName,
|
||||
ID: userInfo.ID,
|
||||
Account: accountInfo.Account,
|
||||
Avatar: accountInfo.Avatar,
|
||||
})
|
||||
userInfo.NickName = accountInfo.NickName
|
||||
userInfo.Account = accountInfo.Account
|
||||
userInfo.Avatar = accountInfo.Avatar
|
||||
}
|
||||
fmt.Printf("获取聊天用户:%#v\n", userInfo)
|
||||
}
|
||||
ok = true
|
||||
return
|
||||
}
|
||||
func HandleMessage(sourceData []byte, cli *Client) {
|
||||
var msg WsInfo
|
||||
err := json.Unmarshal(sourceData, &msg)
|
||||
if err != nil {
|
||||
cli.Send <- WsErrorInvalidDataFormat(msg.From)
|
||||
return
|
||||
}
|
||||
switch msg.Type {
|
||||
default:
|
||||
cli.Send <- WsErrorUnknownMessageType(msg.From)
|
||||
//fmt.Printf("不支持的ws业务消息:%#v\n", msg)
|
||||
case TestType:
|
||||
var newMsg = WsInfo{
|
||||
Type: TestType,
|
||||
Content: msg.Content,
|
||||
From: "0",
|
||||
To: msg.From,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(newMsg)
|
||||
cli.Send <- byteMsg
|
||||
case ChatType:
|
||||
if msg.From == "" {
|
||||
//客户端id不能为空
|
||||
cli.Send <- WsErrorMessage(ChatType, "null", e.ErrInvalidClientId, nil)
|
||||
return
|
||||
}
|
||||
var chatInfo ChatInfo
|
||||
_ = json.Unmarshal(sourceData, &chatInfo)
|
||||
//解析Content
|
||||
if clients, ok := cli.Room.clients[chatInfo.Content.TargetUserId]; ok {
|
||||
for _, targetObj := range clients {
|
||||
if targetObj != nil {
|
||||
targetObj.Send <- WsChatMessage(msg.From, chatInfo.Content.TargetClientId, chatInfo.Content.Msg)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//对方不在线
|
||||
cli.Send <- WsErrorMessage(ChatType, msg.From, e.ErrTargetOutLine, nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type ChatInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content ChatContent `json:"content"` //消息内容
|
||||
From string `json:"from"` //发送者 0为服务端,客户端填写clientId
|
||||
To string `json:"to"` //接收者 接收消息的用户id
|
||||
}
|
||||
type ChatContent struct {
|
||||
TargetUuid string `json:"targetUuid"`
|
||||
TargetUserId int64 `json:"targetUserId"`
|
||||
TargetClientId string `json:"targetClientId"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
127
pkg/common/ws/wsRoom.html
Normal file
127
pkg/common/ws/wsRoom.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Chat Example</title>
|
||||
<script type="text/javascript">
|
||||
window.onload = function () {
|
||||
var conn;
|
||||
var msg = document.getElementById("msg");
|
||||
var log = document.getElementById("log");
|
||||
|
||||
function appendLog(item) {
|
||||
var doScroll = log.scrollTop > log.scrollHeight - log.clientHeight - 1;
|
||||
log.appendChild(item);
|
||||
if (doScroll) {
|
||||
log.scrollTop = log.scrollHeight - log.clientHeight;
|
||||
}
|
||||
}
|
||||
//时间格式化
|
||||
Date.prototype.Format = function (fmt) { // author: meizz
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, // 月份
|
||||
"d+": this.getDate(), // 日
|
||||
"h+": this.getHours(), // 小时
|
||||
"m+": this.getMinutes(), // 分
|
||||
"s+": this.getSeconds(), // 秒
|
||||
"q+": Math.floor((this.getMonth() + 3) / 3), // 季度
|
||||
"S": this.getMilliseconds() // 毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt))
|
||||
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in o)
|
||||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
return fmt;
|
||||
}
|
||||
|
||||
document.getElementById("form").onsubmit = function () {
|
||||
if (!conn) {
|
||||
return false;
|
||||
}
|
||||
if (!msg.value) {
|
||||
return false;
|
||||
}
|
||||
conn.send(msg.value);
|
||||
|
||||
|
||||
var item = document.createElement("div");
|
||||
var now = new Date().Format("yyyy-MM-dd hh:mm:ss:S")
|
||||
item.innerText = "客户端发送消息:\t"+now+"\n\t\t"+msg.value+"\n\n";
|
||||
appendLog(item);
|
||||
|
||||
|
||||
msg.value = "";
|
||||
return false;
|
||||
};
|
||||
|
||||
if (window["WebSocket"]) {
|
||||
conn = new WebSocket("ws://" + document.location.host + "/ws");
|
||||
conn.onclose = function (evt) {
|
||||
var item = document.createElement("div");
|
||||
item.innerHTML = "<b>Connection closed.</b>";
|
||||
appendLog(item);
|
||||
};
|
||||
conn.onmessage = function (evt) {
|
||||
var messages = evt.data.split('\n');
|
||||
var now = new Date().Format("yyyy-MM-dd hh:mm:ss:S")
|
||||
for (var i = 0; i < messages.length; i++) {
|
||||
var item = document.createElement("div");
|
||||
item.innerText = "服务端回复消息:\t"+now+"\n\t\t"+messages[i]+"\n\n";
|
||||
appendLog(item);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
var item = document.createElement("div");
|
||||
item.innerHTML = "<b>Your browser does not support WebSockets.</b>";
|
||||
appendLog(item);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style type="text/css">
|
||||
html {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: gray;
|
||||
}
|
||||
|
||||
#log {
|
||||
background: white;
|
||||
margin: 0;
|
||||
padding: 0.5em 0.5em 0.5em 0.5em;
|
||||
position: absolute;
|
||||
top: 0.5em;
|
||||
left: 0.5em;
|
||||
right: 0.5em;
|
||||
bottom: 3em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#form {
|
||||
padding: 0 0.5em 0 0.5em;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
bottom: 1em;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
input{
|
||||
height: 50px;
|
||||
font-size: larger;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<form id="form">
|
||||
<input type="submit" value="Send" />
|
||||
<input type="text" id="msg" size="64" autofocus />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
63
pkg/e/chatCode.go
Normal file
63
pkg/e/chatCode.go
Normal file
@ -0,0 +1,63 @@
|
||||
// Package e -----------------------------
|
||||
// @file : chatCode.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/12 16:57
|
||||
// -------------------------------------------
|
||||
package e
|
||||
|
||||
import "fmt"
|
||||
|
||||
type ErrorCodeType int
|
||||
|
||||
func (e ErrorCodeType) String() string {
|
||||
return GetCodeMsg(e)
|
||||
}
|
||||
|
||||
func (e ErrorCodeType) Error() string {
|
||||
return GetCodeMsg(e)
|
||||
}
|
||||
func (e ErrorCodeType) Int() int {
|
||||
return int(e)
|
||||
}
|
||||
func GetCodeMsg(e ErrorCodeType) string {
|
||||
v, ok := msgFlags[e]
|
||||
if !ok {
|
||||
return fmt.Sprintf("未知错误:[%d]", e)
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
var msgFlags = map[ErrorCodeType]string{
|
||||
SUCCESS: "操作成功",
|
||||
UpdatePasswordSuccess: "修改密码成功",
|
||||
NotExistInentifier: "该第三方账号未绑定",
|
||||
ERROR: "fail",
|
||||
InvalidParams: "请求参数错误",
|
||||
BindError: "参数绑定错误,类型不一致",
|
||||
JsonUnmarshal: "Json解析错误",
|
||||
|
||||
ErrorDatabase: "数据库操作出错,请重试",
|
||||
|
||||
ErrorOss: "OSS配置错误",
|
||||
|
||||
InvalidToken: "Token验证失败",
|
||||
|
||||
ErrorUploadFile: "上传失败",
|
||||
ErrorUploadVideoCover: "视频截取封面错误",
|
||||
ErrorUploadValidParam: "上传参数非法",
|
||||
ErrorFileReadErr: "读取文件错误",
|
||||
ErrorFileNotExists: "文件不存在",
|
||||
ErrorChunkNotGt: "分块数量不一致",
|
||||
ErrorChunk: "读取分块错误",
|
||||
ErrorUploadBos: "上传bos错误",
|
||||
ErrorFileCreate: "文件创建错误",
|
||||
ErrInvalidDataFormat: "无效的数据格式",
|
||||
ErrInvalidClientId: "无效的客户端ID",
|
||||
ErrRegisterFailed: "注册失败",
|
||||
ErrUnRegistered: "未注册客户端",
|
||||
PermissionDenied: "拒绝访问",
|
||||
ErrChatSendErr: "消息发送失败",
|
||||
NotLogin: "请先登录",
|
||||
ErrorNotExistUser: "用户不存在",
|
||||
}
|
||||
@ -13,6 +13,7 @@ const (
|
||||
|
||||
const (
|
||||
DomainAdmin = "blockchain"
|
||||
ErpDomain = "fontree"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -140,6 +141,15 @@ const (
|
||||
ERROR_Text_Irregularity = 90018
|
||||
ERROR_Text_Length = 90019
|
||||
ERROR_NoPermission = 90020
|
||||
|
||||
//聊天室
|
||||
ErrInvalidDataFormat = 80100 //无效的数据格式
|
||||
ErrInvalidClientId = 80101 //无效的客户端id
|
||||
ErrRegisterFailed = 80102 //注册失败
|
||||
ErrUnRegistered = 80103 //未注册
|
||||
PermissionDenied = 80104 //拒绝访问
|
||||
ErrChatSendErr = 80105 //聊天记录发送失败
|
||||
ErrTargetOutLine = 80106 //目标离线
|
||||
)
|
||||
const (
|
||||
Push = 1
|
||||
|
||||
56
pkg/e/fileType.go
Normal file
56
pkg/e/fileType.go
Normal file
@ -0,0 +1,56 @@
|
||||
package e
|
||||
|
||||
import "strings"
|
||||
|
||||
type FileType int
|
||||
|
||||
// 定义文件类型值
|
||||
const (
|
||||
Video FileType = 1
|
||||
Audio FileType = 2
|
||||
Image FileType = 3
|
||||
File FileType = 4
|
||||
Other FileType = 5
|
||||
)
|
||||
|
||||
// 根据扩展名映射到文件类型值
|
||||
var extensionToType = map[string]FileType{
|
||||
// 视频文件
|
||||
".3g2": Video, ".3gp": Video, ".asf": Video, ".avi": Video, ".divx": Video, ".drc": Video,
|
||||
".flv": Video, ".h261": Video, ".h264": Video, ".mkv": Video, ".mov": Video, ".mp4": Video, ".mpg": Video,
|
||||
".mpeg": Video, ".mpv": Video, ".mxf": Video, ".nuv": Video, ".qt": Video, ".rm": Video,
|
||||
".rmvb": Video, ".srt": Video, ".swf": Video, ".vob": Video, ".vp6": Video, ".vp8": Video, ".webm": Video,
|
||||
".wmv": Video, ".xesc": Video,
|
||||
|
||||
// 音频文件
|
||||
".aac": Audio, ".aax": Audio, ".ac3": Audio, ".act": Audio, ".au": Audio, ".flac": Audio,
|
||||
".m4a": Audio, ".m4p": Audio, ".m4r": Audio, ".mid": Audio, ".midi": Audio, ".mp2": Audio,
|
||||
".mp3": Audio, ".mpa": Audio, ".mpc": Audio, ".ogg": Audio, ".wav": Audio, ".wma": Audio, ".wv": Audio,
|
||||
|
||||
// 图像文件
|
||||
".bmp": Image, ".gif": Image, ".ico": Image, ".jpeg": Image, ".jpg": Image, ".jpe": Image,
|
||||
".png": Image, ".psd": Image, ".tiff": Image, ".webp": Image,
|
||||
|
||||
// 普通文件
|
||||
".a": File, ".abw": File, ".azw": File, ".bin": File, ".bz2": File, ".c": File, ".cab": File,
|
||||
".class": File, ".conf": File, ".crt": File, ".css": File, ".csv": File, ".dat": File, ".deb": File,
|
||||
".dll": File, ".dms": File, ".doc": File, ".docx": File, ".eot": File, ".eps": File, ".exe": File,
|
||||
".gz": File, ".h": File, ".htm": File, ".html": File, ".iso": File, ".jar": File,
|
||||
".js": File, ".json": File, ".log": File, ".m3u": File, ".m3u8": File, ".md": File, ".msi": File,
|
||||
".otf": File, ".pcap": File, ".pdf": File, ".ppt": File, ".pptx": File, ".rar": File, ".rpm": File,
|
||||
".rss": File, ".run": File, ".sh": File, ".sql": File, ".svg": File, ".tar": File, ".tgz": File,
|
||||
".ttf": File, ".txt": File, ".vsd": File, ".weba": File,
|
||||
".wps": File, ".xml": File, ".xpi": File, ".zip": File, ".z": File,
|
||||
|
||||
// 未知文件扩展名
|
||||
"": Other,
|
||||
}
|
||||
|
||||
// DetectFileTypeByExtension 通过文件扩展名判断文件类型并返回对应的值
|
||||
func DetectFileTypeByExtension(extension string) FileType {
|
||||
extension = strings.ToLower(extension)
|
||||
if fileType, exists := extensionToType[extension]; exists {
|
||||
return fileType
|
||||
}
|
||||
return Other
|
||||
}
|
||||
@ -146,6 +146,8 @@ var MsgFlags = map[int]string{
|
||||
ERROR_Text_Irregularity: "文字内容不合规",
|
||||
ERROR_Text_Length: "文本长度超出限制",
|
||||
ERROR_NoPermission: "您暂无权限,请联系客服",
|
||||
|
||||
ErrInvalidClientId: "无效的客户端ID",
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
@ -14,8 +13,10 @@ import (
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
"github.com/gin-gonic/gin"
|
||||
"time"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// CheckLogin 检测登陆
|
||||
@ -81,6 +82,9 @@ func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc {
|
||||
startTime := time.Now()
|
||||
//如果没有登录
|
||||
authorization := ctx.GetHeader(e.Authorization)
|
||||
if authorization == "" {
|
||||
authorization = ctx.Query("token")
|
||||
}
|
||||
if authorization == "" {
|
||||
service.NotLoginRes(ctx, logic.ConvertLoginMsg(ctx, e.ErrNotLogin))
|
||||
return
|
||||
|
||||
@ -29,12 +29,12 @@ func Cors() gin.HandlerFunc {
|
||||
c.Header("Access-Control-Allow-Origin", "*") // 这是允许访问所有域
|
||||
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE,UPDATE") //服务器支持的所有跨域请求的方法,为了避免浏览次请求的多次'预检'请求
|
||||
// header的类型
|
||||
c.Header("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token, tokenC, session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma")
|
||||
c.Header("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token, tokenC, session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma, Upload-Offset")
|
||||
// 允许跨域设置 可以返回其他子段
|
||||
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma,FooBar") // 跨域关键设置 让浏览器可以解析
|
||||
c.Header("Access-Control-Max-Age", "172800") // 缓存请求信息 单位为秒
|
||||
c.Header("Access-Control-Allow-Credentials", "false") // 跨域请求是否需要带cookie信息 默认设置为true
|
||||
c.Set("content-type", "application/json")
|
||||
c.Set("content-type", c.ContentType())
|
||||
//c.Header("Access-Control-Allow-Credentials", "true") // 跨域请求是否需要带cookie信息 默认设置为true
|
||||
//c.Header("Access-Control-Request-Private-Network", "true") // 跨域请求是否需要带cookie信息 默认设置为true
|
||||
//c.Header("Access-Control-Allow-Private-Network", "true") // 设置返回格式是json
|
||||
|
||||
@ -24,14 +24,17 @@ func NewLogger() gin.HandlerFunc {
|
||||
latencyTime := endTime.Sub(startTime) // 请求方式
|
||||
path := c.Request.URL.Path
|
||||
query := c.Request.URL.RawQuery
|
||||
data, _ := io.ReadAll(c.Request.Body)
|
||||
if _, err := c.FormFile("file"); err != nil {
|
||||
data, _ := io.ReadAll(c.Request.Body)
|
||||
log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query,
|
||||
string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String())
|
||||
|
||||
c.Request.Body = io.NopCloser(bytes.NewBuffer(data))
|
||||
}
|
||||
val := c.GetHeader("Accept-Language")
|
||||
if val == "" {
|
||||
c.Request.Header.Set("Accept-Language", "zh-CN")
|
||||
}
|
||||
log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query,
|
||||
string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String())
|
||||
c.Request.Body = io.NopCloser(bytes.NewBuffer(data))
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
||||
7
pkg/model/bundle/bundle.go
Normal file
7
pkg/model/bundle/bundle.go
Normal file
@ -0,0 +1,7 @@
|
||||
package bundle
|
||||
|
||||
type UserWorkConfirmReq struct {
|
||||
WorkUuid string `json:"workUuid"`
|
||||
ConfirmRemark string `json:"confirmRemark"`
|
||||
ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回
|
||||
}
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -11,6 +12,7 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleRoute := r.Group("bundle")
|
||||
bundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
bundleAppRoute := r.Group("bundle")
|
||||
bundleAppNoAuthRoute := r.Group("bundle")
|
||||
bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
// 套餐
|
||||
{
|
||||
@ -20,13 +22,48 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleClientRoute.POST("update", bundle.UpdateBundle)
|
||||
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
||||
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
||||
}
|
||||
bundleClientRoute.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
||||
|
||||
bundleAppRoute = bundleAppRoute.Group("common")
|
||||
bundleExtend := bundleClientRoute.Group("extend")
|
||||
{
|
||||
bundleExtend.POST("", bundle.BundleExtend)
|
||||
bundleExtend.POST("list", bundle.BundleExtendRecordsList)
|
||||
}
|
||||
bundleBalance := bundleClientRoute.Group("balance")
|
||||
{
|
||||
bundleBalance.POST("list", bundle.GetBundleBalance)
|
||||
bundleBalance.POST("used-record", bundle.GetUsedRecordList)
|
||||
}
|
||||
}
|
||||
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
||||
{
|
||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
||||
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
|
||||
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
|
||||
bundleClientRouteV2.POST("bundle-list", bundle.BundleListV2)
|
||||
bundleClientRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||
}
|
||||
bundleAppRouteV1 := bundleAppRoute.Group("common")
|
||||
{
|
||||
bundleAppRouteV1.POST("bundle-list", bundle.BundleList)
|
||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
||||
|
||||
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks) // 作品状态变更的待确认记录
|
||||
bundleAppRoute.POST("confirm-cast-log", bundle.CastLogConfirm) // 对变更记录进行确认
|
||||
|
||||
bundleAppRoute.POST("balance", bundle.GetUserBalance)
|
||||
bundleAppRoute.POST("work-detail", bundle.GetWorkDetail)
|
||||
bundleAppRoute.POST("work-confirm", bundle.WorkConfirm)
|
||||
}
|
||||
bundleAppRouteV2 := bundleAppRoute.Group("app/system/v2")
|
||||
{
|
||||
bundleAppRouteV2.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
||||
}
|
||||
bundleAppNoAuthRouteV2 := bundleAppNoAuthRoute.Group("app/system/v2")
|
||||
{
|
||||
bundleAppNoAuthRouteV2.POST("bundle-list", bundle.BundleListH5V2)
|
||||
bundleAppNoAuthRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -35,14 +35,15 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
|
||||
//bundleOrderWebRoute := bundleOrderRoute.Group("web")
|
||||
{
|
||||
bundleOrderRoute.POST("financial-confirm", bundle.UpdateFinancialConfirmationStatus)
|
||||
bundleOrderRoute.POST("order-export", bundle.ExportOrderInfo)
|
||||
bundleOrderWebRoute.POST("financial-confirm", bundle.UpdateFinancialConfirmationStatus)
|
||||
bundleOrderWebRoute.POST("order-export", bundle.ExportOrderInfoOss)
|
||||
}
|
||||
|
||||
bundleOrderAppRoute := bundleOrderRoute.Group("app")
|
||||
{
|
||||
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
||||
bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
|
||||
bundleOrderAppRoute.POST("order-del", bundle.DeleteBundleOrder)
|
||||
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
|
||||
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)
|
||||
|
||||
|
||||
@ -5,8 +5,12 @@ import (
|
||||
"fonchain-fiee/pkg/router/app"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/account"
|
||||
"fonchain-fiee/pkg/service/asChat"
|
||||
"fonchain-fiee/pkg/service/auth"
|
||||
"fonchain-fiee/pkg/service/file"
|
||||
"fonchain-fiee/pkg/service/governance"
|
||||
"fonchain-fiee/pkg/service/lang"
|
||||
"fonchain-fiee/pkg/service/pressreleases"
|
||||
"fonchain-fiee/pkg/service/qr"
|
||||
"fonchain-fiee/pkg/service/redirect"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
@ -23,7 +27,10 @@ import (
|
||||
func NewRouter() *gin.Engine {
|
||||
//使用默认gin路由
|
||||
r := gin.Default()
|
||||
|
||||
wsGroup := r.Group("api/fiee")
|
||||
wsGroup.Use(
|
||||
middleware.GinRecovery(true),
|
||||
)
|
||||
r.Use(gzip.Gzip(gzip.BestSpeed)) // 中间件占用绝大部分内存
|
||||
//加入日志中间件,跨域中间件
|
||||
r.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
@ -31,6 +38,7 @@ func NewRouter() *gin.Engine {
|
||||
privateGroup.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
//加入日志中间件,跨域中间件
|
||||
v1 := r.Group("api/fiee")
|
||||
v1.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
GiteaRoute(v1)
|
||||
|
||||
v1.GET("test", func(c *gin.Context) {
|
||||
@ -43,6 +51,7 @@ func NewRouter() *gin.Engine {
|
||||
BundleOrderRouter(privateGroup)
|
||||
ValueAddBundleRouter(privateGroup)
|
||||
MediaRouter(privateGroup)
|
||||
SecFilingRouter(privateGroup)
|
||||
app.MediaAppRouter(privateGroup)
|
||||
{
|
||||
v1.POST("version", version.Version) //版本号公共
|
||||
@ -109,7 +118,72 @@ func NewRouter() *gin.Engine {
|
||||
redirectRoute.POST("sdk/down/v2", auth.DownImgV2)
|
||||
redirectRoute.POST("sdk/down/v3", auth.DownImgV3)
|
||||
}
|
||||
//========================================================================================
|
||||
// 客服聊天
|
||||
{
|
||||
// websocket数据接收
|
||||
wsGroup.GET("aschat/ws", asChat.ChatHandlerIns.Connection)
|
||||
v1.POST("aschat/message/new", asChat.ChatHandlerIns.NewMessage)
|
||||
v1.POST("aschat/media/upload", asChat.ChatHandlerIns.Upload)
|
||||
v1.POST("aschat/message/list", asChat.ChatHandlerIns.MessageList)
|
||||
v1.POST("aschat/user/stat", asChat.ChatHandlerIns.UserMessageStat)
|
||||
v1.POST("aschat/voicetotext", asChat.ChatHandlerIns.VoiceToText)
|
||||
v1.POST("aschat/userDetail", asChat.ChatHandlerIns.UserDetail)
|
||||
v1.POST("aschat/autoReplyRuler/create", asChat.Handler.CreateChatAutoReplyRuler)
|
||||
v1.POST("aschat/autoReplyRuler/delete", asChat.Handler.DeleteChatAutoReplyRuler)
|
||||
v1.POST("aschat/autoReplyRuler/update", asChat.Handler.UpdateChatAutoReplyRuler)
|
||||
v1.POST("aschat/autoReplyRuler/detail", asChat.Handler.GetChatAutoReplyRulerDetail)
|
||||
v1.POST("aschat/autoReplyRuler/query", asChat.Handler.GetChatAutoReplyRulerList)
|
||||
|
||||
v1.POST("/test/user/log/erp", asChat.Handler.ErpLoginDemo)
|
||||
v1.POST("/test/user/log/fiee", asChat.Handler.FieeLoginDemo)
|
||||
v1.POST("/aschat/test", asChat.Handler.Test)
|
||||
}
|
||||
|
||||
{
|
||||
// 素材库
|
||||
resourceRoute := v1.Group("/resource").Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
resourceRoute.GET("", file.Info)
|
||||
resourceRoute.DELETE("", file.Delete)
|
||||
resourceRoute.PUT("", file.Action)
|
||||
resourceRoute.POST("", file.Create)
|
||||
resourceRoute.GET("/search", file.Search)
|
||||
resourceRoute.POST("/upload", file.Upload)
|
||||
resourceRoute.POST("/tus/create", file.TusCreate)
|
||||
resourceRoute.POST("/tus/upload", file.TusUpload)
|
||||
v1.Group("/resource").GET("/raw/*path", file.Raw)
|
||||
resourceRoute.GET("/dir/raw", file.DirDownload)
|
||||
resourceRoute.GET("/preview/:size/*path", file.Preview)
|
||||
resourceRoute.GET("/list", file.List)
|
||||
resourceRoute.GET("/usage", file.Usage)
|
||||
}
|
||||
|
||||
{
|
||||
// 官网文档
|
||||
governanceRoute := v1.Group("/governance")
|
||||
governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
governanceRoute.GET("/display", middleware.Cors(), governance.Display)
|
||||
governanceRouteLogin.POST("/list", governance.List)
|
||||
governanceRouteLogin.POST("", governance.Create)
|
||||
governanceRouteLogin.POST("/edit", governance.Edit)
|
||||
governanceRouteLogin.POST("/delete", governance.Delete)
|
||||
|
||||
}
|
||||
{
|
||||
// 官网新闻
|
||||
pressreleasesRoute := v1.Group("/pressreleases")
|
||||
pressreleasesRouteLogin := pressreleasesRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
|
||||
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
|
||||
pressreleasesRouteLogin.POST("/list", pressreleases.List)
|
||||
pressreleasesRouteLogin.POST("", pressreleases.Create)
|
||||
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
|
||||
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
|
||||
|
||||
}
|
||||
//静态文件
|
||||
r.StaticFS("/api/static", http.Dir("./runtime"))
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
|
||||
35
pkg/router/secfiling.go
Normal file
35
pkg/router/secfiling.go
Normal file
@ -0,0 +1,35 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/secfilings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func SecFilingRouter(r *gin.RouterGroup) {
|
||||
SecFilingRouter := r.Group("sec-filing")
|
||||
SecNoAuthRouter := r.Group("sec-filing")
|
||||
SecFilingRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
// sec-filing
|
||||
secFilingRoute := SecFilingRouter.Group("system")
|
||||
{
|
||||
secFilingRoute.POST("create", secfilings.CreateSecFiling)
|
||||
secFilingRoute.POST("update", secfilings.UpdateSecFiling)
|
||||
secFilingRoute.POST("list", secfilings.ListSecFiling)
|
||||
secFilingRoute.POST("detail", secfilings.DetailSecFiling)
|
||||
secFilingRoute.POST("delete", secfilings.DeleteSecFiling)
|
||||
secFilingRoute.POST("get", secfilings.GetSecFilings)
|
||||
secFilingRoute.POST("update/status", secfilings.UpdateSecFilingStatus)
|
||||
secFilingRoute.POST("form/list", secfilings.GetFormList)
|
||||
|
||||
}
|
||||
secNoAUthRouter := SecNoAuthRouter.Group("web")
|
||||
{
|
||||
secNoAUthRouter.POST("list", secfilings.WebListSecFiling)
|
||||
secNoAUthRouter.POST("detail", secfilings.DetailSecFiling)
|
||||
}
|
||||
|
||||
}
|
||||
@ -23,10 +23,22 @@ func ValueAddBundleRouter(r *gin.RouterGroup) {
|
||||
bundleClientRoute.POST("list", bundle.ValueAddBundleList)
|
||||
bundleClientRoute.POST("detail", bundle.ValueAddBundleDetail)
|
||||
}
|
||||
|
||||
valueAddBundleAppRoute = valueAddBundleAppRoute.Group("system")
|
||||
bundleClientRouteV2 := valueAddBundleRoute.Group("system/v2")
|
||||
{
|
||||
valueAddBundleAppRoute.POST("list", bundle.ValueAddBundleList)
|
||||
bundleClientRouteV2.POST("save", bundle.SaveValueAddService)
|
||||
bundleClientRouteV2.POST("list", bundle.ValueAddServiceList)
|
||||
bundleClientRouteV2.POST("detail", bundle.ValueAddServiceDetail)
|
||||
}
|
||||
|
||||
valueAddBundleAppRouteV1 := valueAddBundleAppRoute.Group("system")
|
||||
{
|
||||
valueAddBundleAppRouteV1.POST("list", bundle.ValueAddBundleList)
|
||||
}
|
||||
valueAddBundleAppRouteV2 := valueAddBundleAppRoute.Group("system/v2")
|
||||
{
|
||||
valueAddBundleAppRouteV2.POST("list", bundle.ValueAddServiceList)
|
||||
valueAddBundleAppRouteV2.POST("detail", bundle.ValueAddServiceDetail)
|
||||
valueAddBundleAppRouteV2.POST("detail/lang", bundle.ValueAddServiceLangDetail)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,17 +1,19 @@
|
||||
package serializer
|
||||
|
||||
import "fonchain-fiee/pkg/e"
|
||||
|
||||
// Response 基础序列化器
|
||||
type Response struct {
|
||||
Status int `json:"status"`
|
||||
Data interface{} `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Code int `json:"code"`
|
||||
Error error `json:"error"`
|
||||
Err string `json:"err"`
|
||||
Keys []string `json:"keys"`
|
||||
Mark string `json:"mark,omitempty"`
|
||||
Page *PageInfo `json:"page,omitempty"`
|
||||
Positions interface{} `json:"positions"`
|
||||
Status int `json:"status"`
|
||||
Data interface{} `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Code e.ErrorCodeType `json:"code"`
|
||||
Error error `json:"error"`
|
||||
Err string `json:"err"`
|
||||
Keys []string `json:"keys"`
|
||||
Mark string `json:"mark,omitempty"`
|
||||
Page *PageInfo `json:"page,omitempty"`
|
||||
Positions interface{} `json:"positions"`
|
||||
}
|
||||
type PageInfo struct {
|
||||
Page int32 `json:"page" query:"page"`
|
||||
|
||||
@ -156,7 +156,7 @@ func SendMsg(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
} else {
|
||||
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
||||
@ -165,7 +165,7 @@ func SendMsg(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
226
pkg/service/asChat/chatAutoReplyRulerHandler.go
Normal file
226
pkg/service/asChat/chatAutoReplyRulerHandler.go
Normal file
@ -0,0 +1,226 @@
|
||||
package asChat
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var Handler = &ChatAutoReplyRulerHandler{}
|
||||
|
||||
type ChatAutoReplyRulerHandler struct {
|
||||
}
|
||||
|
||||
// 创建自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) CreateChatAutoReplyRuler(c *gin.Context) {
|
||||
var req dto.ChatAutoReplyData
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
rulerBytes, _ := json.Marshal(req.Rules)
|
||||
protoReq := accountFiee.ChatAutoReplyRulerData{
|
||||
Title: req.Title,
|
||||
Ruler: string(rulerBytes),
|
||||
Response: req.Response,
|
||||
}
|
||||
_, err := service.AccountFieeProvider.CreateChatAutoReplyRuler(c, &protoReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
err = ChatHandlerIns.robot.ReloadRules(c)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
// 删除自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) DeleteChatAutoReplyRuler(c *gin.Context) {
|
||||
var req accountFiee.DeleteChatAutoReplyRulerRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
_, err := service.AccountFieeProvider.DeleteChatAutoReplyRuler(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
// 更新自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) UpdateChatAutoReplyRuler(c *gin.Context) {
|
||||
var req dto.ChatAutoReplyData
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
protoReq := req.ToProtoData()
|
||||
_, err := service.AccountFieeProvider.UpdateChatAutoReplyRuler(c, protoReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
err = ChatHandlerIns.robot.ReloadRules(c)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
// 使用id查询自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) GetChatAutoReplyRulerDetail(c *gin.Context) {
|
||||
var req accountFiee.GetChatAutoReplyRulerByIdRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.AccountFieeProvider.GetChatAutoReplyRulerDetail(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
tmp := dto.ChatAutoReplyData{}
|
||||
tmp.Parse(resp)
|
||||
service.Success(c, tmp)
|
||||
}
|
||||
|
||||
// 批量查询自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) GetChatAutoReplyRulerList(c *gin.Context) {
|
||||
var req dto.GetChatAutoReplyRulerListRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var protoReq = accountFiee.GetChatAutoReplyRulerListRequest{Query: &accountFiee.ChatAutoReplyRulerData{}}
|
||||
utils.RequestDataConvert(&req, &protoReq)
|
||||
if req.RuleType != "" {
|
||||
protoReq.Where = fmt.Sprintf("ruler LIKE '%%%s\":{\"enable\":true%%'", req.RuleType)
|
||||
}
|
||||
resp, err := service.AccountFieeProvider.GetChatAutoReplyRulerList(c, &protoReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var data []dto.ChatAutoReplyData
|
||||
for _, v := range resp.List {
|
||||
tmp := dto.ChatAutoReplyData{}
|
||||
tmp.Parse(v)
|
||||
data = append(data, tmp)
|
||||
}
|
||||
service.Success(c, map[string]interface{}{
|
||||
"data": data,
|
||||
"page": resp.Page,
|
||||
"pagesize": resp.PageSize,
|
||||
"total": resp.Total,
|
||||
})
|
||||
}
|
||||
func (a *ChatAutoReplyRulerHandler) ErpLoginDemo(c *gin.Context) {
|
||||
var req dto.ErpLoginDemoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
loginRes, err := service.AccountProvider.Login(c, &account.LoginRequest{
|
||||
Domain: "fontree",
|
||||
TelNum: req.TelNum,
|
||||
Password: req.Password,
|
||||
})
|
||||
if err != nil {
|
||||
if err.Error() == "没有找到数据" || err.Error() == "No data found" {
|
||||
registerRequest := account.RegistRequest{
|
||||
Domain: "fontree",
|
||||
NickName: req.TelNum,
|
||||
TelNum: req.TelNum,
|
||||
Password: req.Password,
|
||||
EnterDate: time.Now().Format(stime.Format_Normal_YMD),
|
||||
Extend: &account.Extend{JumpTo: "onsite"}, //origin-老平台 onsite 当前
|
||||
JobNum: fmt.Sprintf("%d", rand.Intn(1000)),
|
||||
}
|
||||
registerRes, errs := service.AccountProvider.Register(c, ®isterRequest)
|
||||
if errs != nil {
|
||||
service.Error(c, errs)
|
||||
return
|
||||
}
|
||||
service.Success(c, registerRes)
|
||||
} else {
|
||||
service.Error(c, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
departmentName := ""
|
||||
if loginRes.AccountInfo != nil && len(loginRes.AccountInfo.Departments) > 0 {
|
||||
departmentName = loginRes.AccountInfo.Departments[0].Name
|
||||
}
|
||||
loginRes.Token, err = secret.CombineSecret("xxx", departmentName, loginRes.Token)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, loginRes)
|
||||
}
|
||||
func (a *ChatAutoReplyRulerHandler) FieeLoginDemo(c *gin.Context) {
|
||||
var req dto.ErpLoginDemoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
loginRes, err := service.AccountFieeProvider.Login(c, &accountFiee.LoginRequest{
|
||||
Domain: config.AppConfig.System.Domain,
|
||||
TelNum: req.TelNum,
|
||||
Password: req.Password,
|
||||
})
|
||||
if err != nil {
|
||||
if err.Error() == "账号不存在" || err.Error() == "Account does not exist" {
|
||||
registerRequest := accountFiee.RegistRequest{
|
||||
Domain: config.AppConfig.System.Domain,
|
||||
NickName: req.TelNum,
|
||||
TelNum: req.TelNum,
|
||||
//Password: req.Password,
|
||||
//EnterDate: time.Now().Format(stime.Format_Normal_YMD),
|
||||
//Extend: &account.Extend{JumpTo: "onsite"}, //origin-老平台 onsite 当前
|
||||
//JobNum: fmt.Sprintf("%d", rand.Intn(1000)),
|
||||
}
|
||||
registerRes, errs := service.AccountFieeProvider.Register(c, ®isterRequest)
|
||||
if errs != nil {
|
||||
service.Error(c, errs)
|
||||
return
|
||||
}
|
||||
service.Success(c, registerRes)
|
||||
} else {
|
||||
service.Error(c, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//departmentName := ""
|
||||
//if loginRes.AccountInfo != nil && len(loginRes.AccountInfo.Departments) > 0 {
|
||||
// departmentName = loginRes.AccountInfo.Departments[0].Name
|
||||
//}
|
||||
//loginRes.Token, err = secret.CombineSecret("xxx", departmentName, loginRes.Token)
|
||||
//if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
//}
|
||||
service.Success(c, loginRes)
|
||||
}
|
||||
func (a *ChatAutoReplyRulerHandler) Test(c *gin.Context) {
|
||||
fmt.Println(c.GetHeader("domain"))
|
||||
}
|
||||
250
pkg/service/asChat/chatCache/cache.go
Normal file
250
pkg/service/asChat/chatCache/cache.go
Normal file
@ -0,0 +1,250 @@
|
||||
// Package asChat -----------------------------
|
||||
// @file : cache.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2024/9/11 下午5:18
|
||||
// -------------------------------------------
|
||||
package chatCache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"github.com/go-redis/redis"
|
||||
"github.com/goccy/go-json"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const CacheChatRecordKey = "fiee:chatRecord"
|
||||
const CacheSessionKey = "fiee:chatSession"
|
||||
const CacheNewMsgStatKey = "fiee:newMsgStat"
|
||||
|
||||
var chatCacheLocker sync.RWMutex
|
||||
|
||||
type ChatCache struct {
|
||||
NewMessageStatExpireAfter time.Duration //消息统计的数据过期时间
|
||||
}
|
||||
|
||||
// ------------------------------存储用户的会话ID--------------------------------
|
||||
func (cr ChatCache) GetUserSessionCacheKey(userId int64) string {
|
||||
return fmt.Sprintf("%s:%d", CacheSessionKey, userId)
|
||||
}
|
||||
func (cr ChatCache) SaveUserSession(userId int64, sessionId string) {
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
////var c = context.Background()
|
||||
err := cache.RedisClient.Set(cr.GetUserSessionCacheKey(userId), sessionId, 0).Err()
|
||||
if err != nil {
|
||||
log.Print("保存用户会话失败", zap.Error(err))
|
||||
}
|
||||
}
|
||||
func (cr ChatCache) GetUserSession(userId int64) (sessionId string) {
|
||||
fmt.Println("GetUserSession-1")
|
||||
chatCacheLocker.RLock()
|
||||
defer chatCacheLocker.RUnlock()
|
||||
//var c = context.Background()
|
||||
sessionId, err := cache.RedisClient.Get(cr.GetUserSessionCacheKey(userId)).Result()
|
||||
fmt.Println("GetUserSession-2")
|
||||
if err != nil {
|
||||
if err.Error() == "redis: nil" {
|
||||
err = nil
|
||||
} else {
|
||||
log.Print("获取用户会话失败", zap.Error(err))
|
||||
}
|
||||
}
|
||||
fmt.Println("GetUserSession-3, sessionId:", sessionId)
|
||||
return
|
||||
}
|
||||
|
||||
// ------------------------------存储会话的聊天记录--------------------------------
|
||||
func (cr ChatCache) GetChatRecordCacheKey(sessionId string) string {
|
||||
return fmt.Sprintf("%s:%s", CacheChatRecordKey, sessionId)
|
||||
}
|
||||
func (cr ChatCache) AddChatRecord(sessionId string, data ...*accountFiee.ChatRecordData) (err error) {
|
||||
////var c = context.Background()
|
||||
messages := cr.GetChatRecord(sessionId)
|
||||
fmt.Printf("AddChatRecord add data:%+v\n", data)
|
||||
messages = append(messages, data...)
|
||||
cacheBytes, _ := json.Marshal(messages)
|
||||
fmt.Println("Marshal result", string(cacheBytes))
|
||||
err = cache.RedisClient.Set(cr.GetChatRecordCacheKey(sessionId), cacheBytes, 2*time.Hour).Err()
|
||||
return
|
||||
}
|
||||
|
||||
func (cr ChatCache) CoverChatRecord(sessionId string, data []*accountFiee.ChatRecordData) (err error) {
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
//var c = context.Background()
|
||||
cacheBytes, _ := json.Marshal(data)
|
||||
err = cache.RedisClient.Set(cr.GetChatRecordCacheKey(sessionId), cacheBytes, 2*time.Hour).Err()
|
||||
return
|
||||
}
|
||||
func (cr ChatCache) GetChatRecord(sessionId string) (data []*accountFiee.ChatRecordData) {
|
||||
chatCacheLocker.RLock()
|
||||
defer chatCacheLocker.RUnlock()
|
||||
data = make([]*accountFiee.ChatRecordData, 0)
|
||||
//var c = context.Background()
|
||||
messages, err := cache.RedisClient.Get(cr.GetChatRecordCacheKey(sessionId)).Bytes()
|
||||
if err != nil {
|
||||
if err.Error() == "redis: nil" {
|
||||
err = nil
|
||||
}
|
||||
//log.Print("获取聊天记录失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
//fmt.Printf("cache data: %+v", string(messages))
|
||||
if len(messages) > 0 {
|
||||
_ = json.Unmarshal(messages, &data)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ------------------------------存储新消息统计--------------------------------
|
||||
func (cr ChatCache) GetNewMsgStatCacheKey(ownerId int64) string {
|
||||
return fmt.Sprintf("%s:%d", CacheNewMsgStatKey, ownerId)
|
||||
}
|
||||
|
||||
// 消息数量自增
|
||||
func (cr ChatCache) IncreaseNewMessageTotal(ownerId int64, sessionId string) (err error) {
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
ctx := context.Background()
|
||||
data := cr.GetNewMessageStat(ctx, ownerId)
|
||||
if len(data) > 0 {
|
||||
foundIndex := -1
|
||||
for i, v := range data {
|
||||
if v.SessionId == sessionId {
|
||||
foundIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if foundIndex > -1 {
|
||||
data[foundIndex].Total += 1
|
||||
}
|
||||
//将foundIndex之后的所有元素右移动一位
|
||||
if foundIndex > 0 {
|
||||
elementToMove := data[foundIndex]
|
||||
copy(data[1:], data[0:foundIndex])
|
||||
data[0] = elementToMove
|
||||
} else if foundIndex == -1 {
|
||||
data = append([]dto.UserMsgStatic{{SessionId: sessionId, Total: 1}}, data...)
|
||||
}
|
||||
} else {
|
||||
data = []dto.UserMsgStatic{{SessionId: sessionId, Total: 1}}
|
||||
}
|
||||
return cr.coverOwnerNewMessageStat(ctx, ownerId, data)
|
||||
}
|
||||
|
||||
// 重置新消息数量
|
||||
func (cr ChatCache) ResetNewMessageTotal(ownerId int64, sessionId string, total ...int64) error {
|
||||
fmt.Printf("ResetNewMessageTotal: %d ,sessionId:%s ,total:%v\n", ownerId, sessionId, total)
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
var tl int64
|
||||
if len(total) > 0 {
|
||||
tl = total[0]
|
||||
}
|
||||
fmt.Println("ResetNewMessageTotal tl:", tl)
|
||||
ctx := context.Background()
|
||||
data := cr.GetNewMessageStat(ctx, ownerId)
|
||||
fmt.Printf("ResetNewMessageTotal data:%+v\n", data)
|
||||
found := false
|
||||
for i, v := range data {
|
||||
if v.SessionId == sessionId {
|
||||
found = true
|
||||
data[i].Total = tl
|
||||
fmt.Println("ResetNewMessageTotal found!")
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
fmt.Println("ResetNewMessageTotal not found!")
|
||||
data = append(data, dto.UserMsgStatic{
|
||||
SessionId: sessionId,
|
||||
Total: tl,
|
||||
})
|
||||
}
|
||||
err := cr.coverOwnerNewMessageStat(ctx, ownerId, data)
|
||||
fmt.Println("ResetNewMessageTotal result:", err)
|
||||
return err
|
||||
}
|
||||
|
||||
func (cr ChatCache) RecountNewMessageTotal(ownerId int64) {
|
||||
//var c = context.Background()
|
||||
var keys []string
|
||||
var err error
|
||||
keys, err = cache.RedisClient.Keys(CacheChatRecordKey + "*").Result()
|
||||
if err != nil {
|
||||
log.Print("获取聊天记录所有缓存KEY失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
var countMap = make(map[string]int)
|
||||
for _, key := range keys {
|
||||
var messages []byte
|
||||
var data []*accountFiee.ChatRecordData
|
||||
messages, err = cache.RedisClient.Get(key).Bytes()
|
||||
if err != nil {
|
||||
if err.Error() == "redis: nil" {
|
||||
err = nil
|
||||
}
|
||||
log.Print("获取聊天记录失败", zap.Error(err))
|
||||
data = make([]*accountFiee.ChatRecordData, 0)
|
||||
continue
|
||||
}
|
||||
if len(messages) > 0 {
|
||||
_ = json.Unmarshal(messages, &data)
|
||||
}
|
||||
lastIndex := strings.Count(key, ":")
|
||||
var sessionId = strings.Split(key, ":")[lastIndex]
|
||||
countMap[sessionId] = 0
|
||||
for _, v := range data {
|
||||
if v.WaiterRead == 2 { //统计未读消息数量
|
||||
countMap[sessionId]++
|
||||
}
|
||||
}
|
||||
}
|
||||
for sessionId, count := range countMap {
|
||||
err = cr.ResetNewMessageTotal(ownerId, sessionId, int64(count))
|
||||
if err != nil {
|
||||
log.Print("重置新消息数量统计",
|
||||
zap.String("function", "RecountNewMessageTotal"),
|
||||
zap.Int64("ownerId", ownerId),
|
||||
zap.String("sessionId", sessionId),
|
||||
zap.Int("count", count),
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// erp获取最新的消息统计
|
||||
func (cr ChatCache) GetNewMessageStat(ctx context.Context, ownerId int64) (result []dto.UserMsgStatic) {
|
||||
//chatCacheLocker.RLock()
|
||||
//defer chatCacheLocker.RUnlock()
|
||||
result = make([]dto.UserMsgStatic, 0)
|
||||
vals, err := cache.RedisClient.Get(cr.GetNewMsgStatCacheKey(ownerId)).Bytes()
|
||||
if err != nil && errors.Is(err, redis.Nil) {
|
||||
log.Print("从缓存获取新消息统计失败", zap.Error(err), zap.Int64("ownerId", ownerId))
|
||||
return
|
||||
}
|
||||
if vals != nil {
|
||||
_ = json.Unmarshal(vals, &result)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 覆盖指定erp用户的新消息统计
|
||||
func (cr ChatCache) coverOwnerNewMessageStat(ctx context.Context, ownerId int64, data []dto.UserMsgStatic) (err error) {
|
||||
value, _ := json.Marshal(data)
|
||||
//err = cache.RedisClient.Set(ctx, cr.GetNewMsgStatCacheKey(ownerId), value, cr.NewMessageStatExpireAfter).Err()
|
||||
err = cache.RedisClient.Set(cr.GetNewMsgStatCacheKey(ownerId), value, 0).Err()
|
||||
return
|
||||
}
|
||||
33
pkg/service/asChat/consts/chatRoom.go
Normal file
33
pkg/service/asChat/consts/chatRoom.go
Normal file
@ -0,0 +1,33 @@
|
||||
// package asChat -----------------------------
|
||||
// @file : chatRoom.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/21 18:17:17
|
||||
// -------------------------------------------
|
||||
package consts
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
)
|
||||
|
||||
var (
|
||||
ChatRoom = ws.NewChatRoom()
|
||||
)
|
||||
|
||||
type WsInfo struct {
|
||||
Type ws.WsType `json:"type"` //消息类型
|
||||
Content any `json:"content"`
|
||||
}
|
||||
|
||||
func WsMessageRegisterCallback(clientId string, sessionId string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: ws.RegisterType,
|
||||
Content: map[string]string{
|
||||
//"clientId": clientId,
|
||||
"sessionId": sessionId,
|
||||
},
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
7
pkg/service/asChat/consts/consts.go
Normal file
7
pkg/service/asChat/consts/consts.go
Normal file
@ -0,0 +1,7 @@
|
||||
// Package consts -----------------------------
|
||||
// @file : consts.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 17:40
|
||||
// -------------------------------------------
|
||||
package consts
|
||||
220
pkg/service/asChat/dto/dto.go
Normal file
220
pkg/service/asChat/dto/dto.go
Normal file
@ -0,0 +1,220 @@
|
||||
// Package asChat -----------------------------
|
||||
// @file : dto.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2024/9/10 下午6:28
|
||||
// -------------------------------------------
|
||||
package dto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
MsgType accountFiee.MsgType `json:"msgType"`
|
||||
Text string `json:"text"` //文本内容
|
||||
Media []MessageMedia `json:"media"`
|
||||
LocalStamp int64 `json:"localStamp"`
|
||||
}
|
||||
type MessageMedia struct {
|
||||
MediaId int64 `json:"mediaId"` //媒体文件id
|
||||
MediaSize string `json:"mediaSize"` //媒体文件大小
|
||||
Ext string `json:"ext"` //后缀格式
|
||||
Url string `json:"url"` //文件地址
|
||||
ConvText string `json:"convText"` //语音转文字内容,需要调用语音转文字接口后才会有值
|
||||
Duration int64 `json:"duration"` //时长 单位:毫秒
|
||||
}
|
||||
|
||||
// 客户端发送消息请求,使用api发送消息
|
||||
type NewMessageRequest struct {
|
||||
Waiter bool `json:"waiter"` //是否是客服发送,客服没有userId
|
||||
Robot bool `json:"-"` //是否机器人发送
|
||||
SessionId string `json:"sessionId"`
|
||||
Message
|
||||
AtUserId int64 `json:"atUserId"` //指定发送给sessionId中的某一个用户
|
||||
}
|
||||
|
||||
// 服务端接收到消息后,使用websocket发送给userId关联的客户端,通知客户端有新消息,然后调用接口获取消息
|
||||
type NewMessageNotice struct {
|
||||
Name string `json:"name"` //名字
|
||||
UserId int64 `json:"userId"` //用户id
|
||||
SessionId string `json:"sessionId"`
|
||||
MessageId int64 `json:"messageId"` //消息id
|
||||
//NewMsgTotal int64 `json:"newMsgTotal"` //新消息数量
|
||||
//Active bool `json:"active"` //是否在线
|
||||
}
|
||||
|
||||
// 获取会话列表
|
||||
type SessionType struct {
|
||||
NewMessageNotice
|
||||
RecentMessage []*Message `json:"recentMessage"` //最近消息
|
||||
}
|
||||
|
||||
type MessageListType struct {
|
||||
ID int64 `json:"ID"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UserId int64 `json:"userId"`
|
||||
Role int32 `json:"role,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Message Message `json:"message"`
|
||||
}
|
||||
|
||||
func (m *MessageListType) BuildMessage(data *accountFiee.ChatRecordData) {
|
||||
m.ID = data.ID
|
||||
m.CreatedAt = data.CreatedAt
|
||||
m.UserId = data.UserId
|
||||
m.Name = data.Name
|
||||
m.Role = data.Role
|
||||
switch data.MsgType {
|
||||
default:
|
||||
m.Message.MsgType = data.MsgType
|
||||
m.Message.Text = data.Content
|
||||
m.Message.LocalStamp = data.LocalStamp
|
||||
if data.Medias != nil {
|
||||
for _, media := range data.Medias {
|
||||
m.Message.Media = append(m.Message.Media, MessageMedia{
|
||||
MediaId: media.ID,
|
||||
MediaSize: media.Size,
|
||||
Ext: media.Ext,
|
||||
Url: media.Url,
|
||||
ConvText: media.ConvText,
|
||||
Duration: media.Duration,
|
||||
})
|
||||
}
|
||||
}
|
||||
case accountFiee.MsgType_TextMsgType:
|
||||
m.Message = Message{
|
||||
MsgType: data.MsgType,
|
||||
Text: data.Content,
|
||||
Media: []MessageMedia{},
|
||||
LocalStamp: data.LocalStamp,
|
||||
}
|
||||
case accountFiee.MsgType_ImageMsgType, accountFiee.MsgType_AudioMsgType, accountFiee.MsgType_VideoMsgType:
|
||||
m.Message.MsgType = data.MsgType
|
||||
m.Message.Text = data.Content
|
||||
m.Message.LocalStamp = data.LocalStamp
|
||||
if data.Medias != nil {
|
||||
for _, media := range data.Medias {
|
||||
m.Message.Media = append(m.Message.Media, MessageMedia{
|
||||
MediaId: media.ID,
|
||||
MediaSize: media.Size,
|
||||
Ext: media.Ext,
|
||||
Url: media.Url,
|
||||
ConvText: media.ConvText,
|
||||
Duration: media.Duration,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
func (m *MessageListType) ToJson() string {
|
||||
jsonBytes, _ := json.Marshal(m)
|
||||
return string(jsonBytes)
|
||||
}
|
||||
|
||||
type UserMsgStatic struct {
|
||||
UserId int64 `json:"userId"` //用户id
|
||||
Name string `json:"name"` //名称
|
||||
ArtistUid string `json:"artistUid,omitempty"`
|
||||
SessionId string `json:"sessionId"` //会话id
|
||||
Total int64 `json:"total"` //新消息数量
|
||||
//NewMessageTime string `json:"newMessageTime"` //最新消息的创建时间
|
||||
}
|
||||
|
||||
type MessageListRequest struct {
|
||||
SessionId string `json:"sessionId"` //不传则获取自己的会话消息里列表
|
||||
CurrentId int64 `json:"currentId"` //组合查询条件1:基于某个消息id,向前或向后查找。两种组合条件不能同时使用
|
||||
Direction int `json:"direction"` //组合查询条件1:方向 1=向前查找 2=向后查找
|
||||
Recent bool `json:"recent"` //组合查询条件2:查找最新的若干条消息。两种组合条件不能同时使用
|
||||
InHour time.Duration `json:"inHour"` //组合查询条件2:可选,查询指定小时内的数据
|
||||
PageSize int64 `json:"pageSize"` //查找数量
|
||||
}
|
||||
|
||||
type VoiceToTextRequest struct {
|
||||
MediaId int64 `json:"mediaId"`
|
||||
}
|
||||
|
||||
type ArtistInfoRequest struct {
|
||||
UserId int64 `json:"userId"`
|
||||
}
|
||||
type ArtistInfo struct {
|
||||
Tnum string `json:"tnum"`
|
||||
ArtistName string `json:"artistName"`
|
||||
Age int64 `json:"age"`
|
||||
Sex string `json:"sex"`
|
||||
NativePlace string `json:"nativePlace"`
|
||||
TelNum string `json:"telNum"`
|
||||
RecentPhoto string `json:"recentPhoto"`
|
||||
}
|
||||
|
||||
type GetChatAutoReplyRulerListRequest struct {
|
||||
Page int64 `json:"page"`
|
||||
PageSize int64 `json:"pageSize"`
|
||||
accountFiee.ChatAutoReplyRulerData
|
||||
RuleType string `json:"ruleType"`
|
||||
}
|
||||
type ErpLoginDemoReq struct {
|
||||
TelNum string `json:"telNum"`
|
||||
Password string `json:"password"`
|
||||
Nickname string `json:"nickname"`
|
||||
RealName string `json:"realName"`
|
||||
}
|
||||
|
||||
type ChatAutoReplyData struct {
|
||||
ID int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Rules map[string]*AutoReplyRule `json:"rules"`
|
||||
Response string `json:"response"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
Status int32 `json:"status"`
|
||||
}
|
||||
|
||||
func (r *ChatAutoReplyData) ToProtoData() (data *accountFiee.ChatAutoReplyRulerData) {
|
||||
jsonBytes, _ := json.Marshal(r.Rules)
|
||||
data = &accountFiee.ChatAutoReplyRulerData{
|
||||
ID: r.ID,
|
||||
CreatedAt: r.CreatedAt,
|
||||
UpdatedAt: r.UpdatedAt,
|
||||
Title: r.Title,
|
||||
Ruler: string(jsonBytes),
|
||||
Status: r.Status,
|
||||
Response: r.Response,
|
||||
}
|
||||
return
|
||||
}
|
||||
func (r *ChatAutoReplyData) Parse(data *accountFiee.ChatAutoReplyRulerData) {
|
||||
err := json.Unmarshal([]byte(data.Ruler), &r.Rules)
|
||||
log.Printf("ChatAutoReplyData parse err:%v\n", err)
|
||||
r.ID = data.ID
|
||||
r.CreatedAt = data.CreatedAt
|
||||
r.UpdatedAt = data.UpdatedAt
|
||||
r.Title = data.Title
|
||||
r.Status = data.Status
|
||||
r.Response = data.Response
|
||||
}
|
||||
|
||||
type AutoReplyRule struct {
|
||||
Enable bool `json:"enable"`
|
||||
Content string `json:"content,omitempty"`
|
||||
SecondDuration time.Duration `json:"secondDuration,omitempty"`
|
||||
}
|
||||
|
||||
type UserDetailReq struct {
|
||||
ChatUserId int64 `json:"chatUserId"` //注意是聊天用户ID(chat_user表),不是账号服务ID
|
||||
}
|
||||
type UserDetailResp struct {
|
||||
UserId uint64 `json:"userId"`
|
||||
ChatUserId int64 `json:"chatUserId"`
|
||||
RnStatus int32 `json:"rnStatus"` //状态 1:未实名 2:审核中 3:审核失败 4:审核通过
|
||||
SubNum string `json:"subNum"`
|
||||
RealName string `json:"realName"`
|
||||
Age string `json:"age"`
|
||||
Gender string `json:"gender"`
|
||||
NativePlace string `json:"nativePlace"`
|
||||
Phone string `json:"phone"`
|
||||
GroupPhoto string `json:"groupPhoto"`
|
||||
}
|
||||
614
pkg/service/asChat/handler.go
Normal file
614
pkg/service/asChat/handler.go
Normal file
@ -0,0 +1,614 @@
|
||||
// package asChat -----------------------------
|
||||
// @file : handler.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/23 11:13:43
|
||||
// -------------------------------------------
|
||||
package asChat
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/jwt"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/consts"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"fonchain-fiee/pkg/service/asChat/logic"
|
||||
"fonchain-fiee/pkg/service/asChat/robot"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"io"
|
||||
"log"
|
||||
"path"
|
||||
"slices"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain/utils/voice"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var ChatHandlerIns = NewChatHandler()
|
||||
|
||||
func NewChatHandler() ChatHandler {
|
||||
c := ChatHandler{
|
||||
cache: chatCache.ChatCache{NewMessageStatExpireAfter: 10 * time.Minute},
|
||||
}
|
||||
c.robot = robot.NewRobot(&c.cache)
|
||||
return c
|
||||
}
|
||||
|
||||
type ChatHandler struct {
|
||||
cache chatCache.ChatCache
|
||||
robot *robot.Robot
|
||||
}
|
||||
|
||||
func (cr ChatHandler) Connection(c *gin.Context) {
|
||||
conn, err := ws.UpGrader.Upgrade(c.Writer, c.Request, nil)
|
||||
conn.SetReadDeadline(time.Now().Add(time.Second * 10))
|
||||
if err != nil {
|
||||
log.Print("无法升级为websocket连接", zap.Error(err))
|
||||
c.String(500, "无法转为websocket连接")
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
if conn != nil {
|
||||
conn.Close()
|
||||
}
|
||||
}()
|
||||
_, byteData, err := conn.ReadMessage()
|
||||
if err != nil {
|
||||
_ = conn.WriteMessage(websocket.TextMessage, ws.WsErrorConnection("null", err.Error(), "conn.ReadMessag1"))
|
||||
return
|
||||
}
|
||||
fmt.Println("22222222222222,AuthorizationVerify")
|
||||
var ok bool
|
||||
var userInfo *accountFiee.ChatUserData
|
||||
userInfo, ok, err = ws.AuthorizationVerify(byteData)
|
||||
if err != nil {
|
||||
_ = conn.WriteMessage(websocket.TextMessage, ws.WsErrorConnection("null", err.Error(), "AuthorizationVerify2"))
|
||||
return
|
||||
}
|
||||
if !ok {
|
||||
_ = conn.WriteMessage(websocket.TextMessage, ws.WsErrorConnection("null", "登录状态失效", "AuthorizationVerify2.1"))
|
||||
return
|
||||
}
|
||||
fmt.Println("33333333333333,RecountNewMessageTotal")
|
||||
conn.SetReadDeadline(time.Time{})
|
||||
go cr.cache.RecountNewMessageTotal(userInfo.ID)
|
||||
|
||||
fmt.Println("44444444444444,ws.NewClient")
|
||||
//注册ws客户端,并发送clientId给ws客户端
|
||||
var cli = ws.NewClient(userInfo.ID, "", conn, consts.ChatRoom)
|
||||
cli.Waiter = userInfo.Role == 2
|
||||
fmt.Println("55555555555555,GetUserSession")
|
||||
//查询是否有历史的sessionId
|
||||
cli.SessionId = cr.cache.GetUserSession(userInfo.ID)
|
||||
consts.ChatRoom.Register(cli)
|
||||
cr.cache.SaveUserSession(userInfo.ID, cli.SessionId)
|
||||
fmt.Println("66666666666666666666666666")
|
||||
go cli.WriteWait()
|
||||
cli.Send <- consts.WsMessageRegisterCallback(cli.ClientId, cli.SessionId)
|
||||
fmt.Println("777777777777777777777777")
|
||||
// 处理websocket连接的逻辑
|
||||
ctx, _ := context.WithCancel(context.Background())
|
||||
cli.Reading(ctx, HandleMessage)
|
||||
fmt.Println("88888888888888888888888888")
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func (cr ChatHandler) NewMessage(c *gin.Context) {
|
||||
var request dto.NewMessageRequest
|
||||
if err := c.ShouldBindJSON(&request); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if request.SessionId == "" {
|
||||
service.Error(c, errors.New("sessionId不能为空"))
|
||||
return
|
||||
}
|
||||
if request.MsgType == 0 {
|
||||
service.Error(c, errors.New("msgType不能为空"))
|
||||
return
|
||||
}
|
||||
fmt.Println("NewMessage 1111111111111111111111111111111")
|
||||
//获取用户信息
|
||||
chatUser, code := jwt.ParseToChatUser(c)
|
||||
if code != 0 {
|
||||
service.ErrWithCode(c, code)
|
||||
return
|
||||
}
|
||||
err := logic.NewMessage(c, &cr.cache, chatUser, request)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
//fmt.Println("NewMessage 22222222222222222222222222222222222")
|
||||
////存储入库
|
||||
//if chatUser.NickName != "" {
|
||||
// chatUser.NickName = fmt.Sprintf("未知用户(%d)", chatUser.ID)
|
||||
//}
|
||||
//fmt.Println("NewMessage 3333333333333333333333333333333333")
|
||||
//var data = accountFiee.ChatRecordData{
|
||||
// SessionId: request.SessionId,
|
||||
// UserId: chatUser.ID,
|
||||
// Name: chatUser.NickName,
|
||||
// Avatar: "",
|
||||
// MsgType: request.MsgType,
|
||||
// Content: request.Message.Text,
|
||||
// LocalStamp: request.LocalStamp,
|
||||
// Medias: nil,
|
||||
//}
|
||||
//if len(request.Message.Media) > 0 {
|
||||
// for _, media := range request.Message.Media {
|
||||
// data.Medias = append(data.Medias, &accountFiee.ChatMediaData{
|
||||
// ID: media.MediaId,
|
||||
// })
|
||||
// }
|
||||
//}
|
||||
//fmt.Println("NewMessage 4444444444444444444444444444444444")
|
||||
//resp, err := service.AccountFieeProvider.CreateChatRecord(c, &data)
|
||||
//if err != nil {
|
||||
// service.Error(c, errors.New("创建失败"))
|
||||
// return
|
||||
//}
|
||||
//fmt.Printf("CreateChatRecord resp:%+v\n", resp)
|
||||
////录入缓存
|
||||
//err = cr.cache.AddChatRecord(request.SessionId, resp.Data)
|
||||
//if err != nil {
|
||||
// service.Error(c, errors.New("创建失败"))
|
||||
// return
|
||||
//}
|
||||
//fmt.Println("NewMessage 5 消息数量+1")
|
||||
////新消息数量统计+1
|
||||
//noticeUserId := consts.ChatRoom.GetUserIdInSession(request.SessionId, chatUser.ID)
|
||||
//fmt.Println("NewMessage 5.1 消息数量配置结束")
|
||||
//fmt.Printf("noticeUserId %+v\n", noticeUserId)
|
||||
//for _, userId := range noticeUserId {
|
||||
// fmt.Println("userId")
|
||||
// cr.cache.IncreaseNewMessageTotal(userId, request.SessionId)
|
||||
//}
|
||||
//fmt.Println("NewMessage 6")
|
||||
////发送websocket消息提醒通知
|
||||
//var notice = dto.MessageListType{}
|
||||
//notice.BuildMessage(resp.Data)
|
||||
//fmt.Printf("ws消息提醒:%+v\n", notice)
|
||||
//_, err = consts.ChatRoom.SendSessionMessage(chatUser.ID, request.SessionId, ws.NewChatMsgType, notice)
|
||||
//if err != nil {
|
||||
// log.Print("发送新消息通知失败", zap.Error(err), zap.Any("notice", notice))
|
||||
//}
|
||||
//cr.robot.Listen(&data)
|
||||
//fmt.Println("NewMessage 7 -end")
|
||||
////发送app推送(无横幅推送)
|
||||
////go func() {
|
||||
//// omitMessage := ""
|
||||
//// switch request.MsgType {
|
||||
//// case accountFiee.MsgType_TextMsgType:
|
||||
//// runMsg := []rune(request.Text)
|
||||
//// if len(runMsg) > 15 {
|
||||
//// omitMessage = string(runMsg[:15]) + "..."
|
||||
//// } else {
|
||||
//// omitMessage = request.Text
|
||||
//// }
|
||||
//// case accountFiee.MsgType_ImageMsgType:
|
||||
//// omitMessage = "[图片]"
|
||||
//// case accountFiee.MsgType_AudioMsgType:
|
||||
//// omitMessage = "[音频]"
|
||||
//// case accountFiee.MsgType_VideoMsgType:
|
||||
//// omitMessage = "[视频]"
|
||||
//// default:
|
||||
//// omitMessage = "新消息请查收"
|
||||
//// }
|
||||
//// for _, userId := range noticeUserId {
|
||||
//// _ = asPusher.NewArtistinfoUniPush().NewChatMessageNotice(userId, omitMessage)
|
||||
//// }
|
||||
////}()
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
func (cr ChatHandler) MessageList(c *gin.Context) {
|
||||
var request dto.MessageListRequest
|
||||
if err := c.ShouldBindJSON(&request); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//domain := c.GetHeader("domain")
|
||||
//fmt.Println("MessageList domain:", domain)
|
||||
if (request.Direction == 0 && !request.Recent) || (request.Direction > 0 && request.Recent) {
|
||||
service.Error(c, errors.New("组合条件校验失败"))
|
||||
return
|
||||
}
|
||||
if request.SessionId == "" {
|
||||
service.Error(c, errors.New("sessionId不能为空"))
|
||||
return
|
||||
}
|
||||
if request.PageSize < -1 {
|
||||
service.Error(c, errors.New("pageSize校验错误"))
|
||||
return
|
||||
}
|
||||
var resp = make([]*dto.MessageListType, 0)
|
||||
if request.CurrentId == 0 && request.Direction == 1 {
|
||||
service.Success(c, resp)
|
||||
return
|
||||
}
|
||||
accessUser, code := jwt.ParseToChatUser(c)
|
||||
if code != 0 {
|
||||
service.ErrWithCode(c, code)
|
||||
return
|
||||
}
|
||||
//if request.SessionId == "" {
|
||||
// request.SessionId = cr.cache.GetUserSession(tokenResult.UserInfo.ID)
|
||||
// if request.SessionId == "" {
|
||||
// service.Success(c, resp)
|
||||
// return
|
||||
// }
|
||||
//}
|
||||
messages := cr.cache.GetChatRecord(request.SessionId)
|
||||
//messages := []*accountFiee.ChatRecordData{}
|
||||
var returnDataIdList = make([]int64, 0)
|
||||
defer func() {
|
||||
//获取最新数据时,重置新消息数量统计
|
||||
if request.Direction == 1 || request.Recent {
|
||||
cr.cache.ResetNewMessageTotal(accessUser.ID, request.SessionId)
|
||||
}
|
||||
//设置消息已被客服阅读,当客服重新通过通过websocket连接时,这些消息将不被纳入新消息数量统计
|
||||
if len(returnDataIdList) > 0 && accessUser.Role == 2 {
|
||||
for _, hasReadId := range returnDataIdList {
|
||||
for i, message := range messages {
|
||||
if message.ID == hasReadId {
|
||||
messages[i].WaiterRead = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
err := cr.cache.CoverChatRecord(request.SessionId, messages)
|
||||
if err != nil {
|
||||
log.Print("设置消息已读失败", zap.Error(err))
|
||||
}
|
||||
for _, v := range messages {
|
||||
_, err = service.AccountFieeProvider.SaveChatRecord(context.Background(), v)
|
||||
if err != nil {
|
||||
log.Print("设置消息已读失败", zap.Error(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
if len(messages) == 0 {
|
||||
//从数据库获取
|
||||
recordResp, err := service.AccountFieeProvider.GetChatRecordList(c, &accountFiee.GetChatRecordListRequest{
|
||||
Query: &accountFiee.ChatRecordData{SessionId: request.SessionId},
|
||||
Page: 1,
|
||||
PageSize: -1,
|
||||
//Where: fmt.Sprintf("id %s %d", utils.IfGec(request.Direction == 1, "<", ">"), request.CurrentId),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
messages = recordResp.List
|
||||
err = cr.cache.CoverChatRecord(request.SessionId, messages)
|
||||
if err != nil {
|
||||
log.Print("覆盖聊天记录失败", zap.Error(err))
|
||||
}
|
||||
}
|
||||
if request.Recent {
|
||||
if int64(len(messages)) >= request.PageSize {
|
||||
messages = messages[len(messages)-int(request.PageSize):]
|
||||
}
|
||||
var now = time.Now()
|
||||
for _, message := range messages {
|
||||
if request.InHour > 0 {
|
||||
messageCreatedAt, _ := stime.StringToTime(message.CreatedAt)
|
||||
if now.Sub(*messageCreatedAt) >= request.InHour*time.Hour {
|
||||
continue
|
||||
}
|
||||
}
|
||||
returnDataIdList = append(returnDataIdList, message.ID)
|
||||
var msg = &dto.MessageListType{}
|
||||
msg.BuildMessage(message)
|
||||
resp = append(resp, msg)
|
||||
}
|
||||
} else {
|
||||
sort.Slice(messages, func(i, j int) bool {
|
||||
if request.Direction == 1 {
|
||||
return messages[i].ID < messages[j].ID
|
||||
} else {
|
||||
return messages[i].ID > messages[j].ID
|
||||
}
|
||||
})
|
||||
fmt.Printf("data is %+v\n", messages)
|
||||
total := 0
|
||||
for i, message := range messages {
|
||||
switch request.Direction {
|
||||
case 1: //向下查找,找比CurrentId大的数据
|
||||
if message.ID <= request.CurrentId {
|
||||
continue
|
||||
}
|
||||
case 2: //向上查找,找比CurrentId小的数据
|
||||
if message.ID >= request.CurrentId {
|
||||
continue
|
||||
}
|
||||
}
|
||||
message := message
|
||||
fmt.Println(i, message.ID)
|
||||
if request.PageSize != -1 && int64(total+1) > request.PageSize {
|
||||
continue
|
||||
}
|
||||
total++
|
||||
returnDataIdList = append(returnDataIdList, message.ID)
|
||||
var msg = &dto.MessageListType{}
|
||||
msg.BuildMessage(message)
|
||||
resp = append(resp, msg)
|
||||
}
|
||||
}
|
||||
//二次排序
|
||||
sort.Slice(resp, func(i, j int) bool {
|
||||
return resp[i].ID < resp[j].ID
|
||||
})
|
||||
//优化空列表
|
||||
for i, v := range resp {
|
||||
if v.Message.Media == nil {
|
||||
resp[i].Message.Media = []dto.MessageMedia{}
|
||||
}
|
||||
}
|
||||
if accessUser.Role == 1 {
|
||||
}
|
||||
service.Success(c, resp)
|
||||
}
|
||||
|
||||
func (cr ChatHandler) Upload(c *gin.Context) {
|
||||
fmt.Println("111111111111")
|
||||
//获取用户信息
|
||||
chatUser, code := jwt.ParseToChatUser(c)
|
||||
if code != 0 {
|
||||
service.ErrWithCode(c, code)
|
||||
return
|
||||
}
|
||||
fmt.Printf("chatUser is %#v\n", chatUser)
|
||||
//获取文件对象
|
||||
file, err := c.FormFile("file")
|
||||
if err != nil {
|
||||
log.Print("ERROR: upload file failed. ", zap.Error(err))
|
||||
return
|
||||
}
|
||||
duration := c.PostForm("duration")
|
||||
fmt.Println(duration)
|
||||
ext := c.PostForm("ext")
|
||||
fileExt := strings.ToLower(path.Ext(file.Filename))
|
||||
if ext != "" {
|
||||
fileExt = ext
|
||||
}
|
||||
fileType := e.DetectFileTypeByExtension(fileExt)
|
||||
if fileType == e.Audio {
|
||||
if !slices.Contains([]string{".mp4", ".aac", ".mp3", ".opus", ".wav"}, fileExt) {
|
||||
service.Error(c, errors.New("不支持的格式"))
|
||||
return
|
||||
}
|
||||
}
|
||||
//计算md5
|
||||
tmp, err := file.Open()
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("上传失败"))
|
||||
return
|
||||
}
|
||||
fileContent, err := io.ReadAll(tmp)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("文件读取失败"))
|
||||
return
|
||||
}
|
||||
hash := md5.New()
|
||||
_, err = hash.Write(fileContent)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("文件读取失败"))
|
||||
return
|
||||
}
|
||||
md5Bytes := hash.Sum(nil) // 获取 MD5 字节切片
|
||||
md5String := hex.EncodeToString(md5Bytes) // 转换为十六进制字符串表示
|
||||
//检查文件是否存在
|
||||
checkResp, err := service.AccountFieeProvider.GetChatMediaList(c, &accountFiee.GetChatMediaListRequest{Query: &accountFiee.ChatMediaData{Md5: md5String}, Page: 1, PageSize: 1})
|
||||
if err != nil {
|
||||
log.Print("md5查询附件失败", zap.Error(err))
|
||||
}
|
||||
if checkResp != nil && checkResp.Total > 0 {
|
||||
service.Success(c, checkResp.List[0])
|
||||
return
|
||||
}
|
||||
|
||||
//文件不存在则上传文件
|
||||
filename, _ := uuid.NewV4()
|
||||
defer tmp.Close()
|
||||
fileBuffer := bytes.NewBuffer(fileContent)
|
||||
var bosUrl string
|
||||
bosUrl, err = upload.UploadWithBuffer(fileBuffer, fmt.Sprintf("%d/%v%v", chatUser.ID, filename, fileExt))
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//存到数据库
|
||||
var durationInt64, _ = strconv.ParseInt(duration, 10, 64)
|
||||
var mediaData = accountFiee.ChatMediaData{
|
||||
Url: bosUrl,
|
||||
Md5: md5String,
|
||||
Size: fmt.Sprintf("%d", file.Size),
|
||||
Ext: fileExt,
|
||||
Duration: durationInt64,
|
||||
}
|
||||
resp, err := service.AccountFieeProvider.CreateChatMedia(c, &mediaData)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, resp.Data)
|
||||
}
|
||||
|
||||
func (cr ChatHandler) UserMessageStat(c *gin.Context) {
|
||||
var request accountFiee.GetChatUserListRequest2
|
||||
if err := c.ShouldBindJSON(&request); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//获取用户信息
|
||||
chatUser, code := jwt.ParseToChatUser(c)
|
||||
if code != 0 {
|
||||
service.ErrWithCode(c, code)
|
||||
return
|
||||
}
|
||||
result := cr.cache.GetNewMessageStat(c, chatUser.ID)
|
||||
if len(result) == 0 {
|
||||
service.Success(c, result)
|
||||
return
|
||||
}
|
||||
fmt.Printf("cache stat:%+v\n", result)
|
||||
request.Page = 1
|
||||
request.PageSize = int64(len(result))
|
||||
for i, item := range result {
|
||||
if item.UserId == 0 {
|
||||
sessionId, _ := strconv.Atoi(item.SessionId)
|
||||
item.UserId = int64(sessionId)
|
||||
result[i].UserId = int64(sessionId)
|
||||
}
|
||||
request.UserIdIn = append(request.UserIdIn, item.UserId)
|
||||
}
|
||||
fmt.Printf("protoReq.UserIdIn:%+v\n", request.UserIdIn)
|
||||
listRes, err := service.AccountFieeProvider.GetChatUserList2(c, &request)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
fmt.Printf("GetChatUserList:%+v\n", listRes)
|
||||
for i, item := range result {
|
||||
for _, user := range listRes.List {
|
||||
if item.UserId == user.UserId {
|
||||
user := user
|
||||
result[i].Name = user.Name
|
||||
//result[i].ArtistUid = user.ArtistUid
|
||||
break
|
||||
}
|
||||
}
|
||||
if result[i].Name == "" {
|
||||
result[i].Name = logic.BeautifulZeroNameWithPhone(result[i].Name, result[i].UserId)
|
||||
}
|
||||
}
|
||||
//筛选
|
||||
if request.Account != "" || request.Name != "" {
|
||||
newData := []dto.UserMsgStatic{}
|
||||
for _, v := range listRes.List {
|
||||
for _, vv := range result {
|
||||
if v.UserId == vv.UserId {
|
||||
vv := vv
|
||||
newData = append(newData, vv)
|
||||
}
|
||||
}
|
||||
}
|
||||
result = newData
|
||||
}
|
||||
reverse(result)
|
||||
if chatUser.Role == 1 {
|
||||
userSessionId := fmt.Sprintf("%d", chatUser.ID)
|
||||
newResp := []dto.UserMsgStatic{}
|
||||
for _, v := range result {
|
||||
if v.SessionId == userSessionId {
|
||||
newResp = append(newResp, v)
|
||||
service.Success(c, newResp)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
service.Success(c, result)
|
||||
}
|
||||
func reverse(slice []dto.UserMsgStatic) {
|
||||
for i, j := 0, len(slice)-1; i < j; i, j = i+1, j-1 {
|
||||
slice[i], slice[j] = slice[j], slice[i]
|
||||
}
|
||||
}
|
||||
func (cr ChatHandler) VoiceToText(c *gin.Context) {
|
||||
var req dto.VoiceToTextRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
detail, err := service.AccountFieeProvider.GetChatMediaDetail(c, &accountFiee.GetChatMediaByIdRequest{Id: req.MediaId})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if detail.ConvText != "" {
|
||||
service.Success(c, map[string]string{"convText": detail.ConvText})
|
||||
return
|
||||
}
|
||||
voiceApi := voice.NewVoiceApi()
|
||||
detail.ConvText, err = voiceApi.ToTextFromUrl(detail.Url)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("语音转文字失败"))
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
service.AccountFieeProvider.UpdateChatMedia(context.Background(), detail)
|
||||
}()
|
||||
service.Success(c, map[string]string{"convText": detail.ConvText})
|
||||
}
|
||||
|
||||
func (cr ChatHandler) UserDetail(c *gin.Context) {
|
||||
var req dto.UserDetailReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var chatUser *accountFiee.ChatUserData
|
||||
if req.ChatUserId == 0 { //不传ChatUserId则从token获取
|
||||
var code e.ErrorCodeType
|
||||
chatUser, code = jwt.ParseToChatUser(c)
|
||||
if code != 0 {
|
||||
service.ErrWithCode(c, code)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
var err error
|
||||
chatUser, err = service.AccountFieeProvider.GetChatUserDetail(c, &accountFiee.GetChatUserByIdRequest{
|
||||
Id: req.ChatUserId,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
//fmt.Printf("chatUser:%#v\n", chatUser)
|
||||
//if chatUser.Origin == "fiee" {
|
||||
// chatUser.Origin = "app"
|
||||
//}
|
||||
resp, err := service.AccountFieeProvider.Info(c, &accountFiee.InfoRequest{ID: uint64(chatUser.OriginId), Domain: chatUser.Origin})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var detail = dto.UserDetailResp{
|
||||
UserId: resp.Id,
|
||||
ChatUserId: chatUser.ID,
|
||||
RnStatus: resp.Status,
|
||||
SubNum: resp.SubNum,
|
||||
RealName: resp.Name,
|
||||
Age: "∞",
|
||||
Gender: resp.Sex,
|
||||
NativePlace: resp.PlaceOfResidence,
|
||||
Phone: resp.TelNum,
|
||||
GroupPhoto: resp.GroupPhoto,
|
||||
}
|
||||
|
||||
service.Success(c, detail)
|
||||
}
|
||||
13
pkg/service/asChat/intreface.go
Normal file
13
pkg/service/asChat/intreface.go
Normal file
@ -0,0 +1,13 @@
|
||||
// Package autoReply -----------------------------
|
||||
// @file : intreface.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 16:15
|
||||
// -------------------------------------------
|
||||
package asChat
|
||||
|
||||
type IReplyRuler interface {
|
||||
Name() string //规则名称
|
||||
Check()
|
||||
RunScript() string //运行脚本
|
||||
}
|
||||
113
pkg/service/asChat/logic/chat.go
Normal file
113
pkg/service/asChat/logic/chat.go
Normal file
@ -0,0 +1,113 @@
|
||||
// Package service -----------------------------
|
||||
// @file : chat.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 19:04
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/consts"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var cacheMap = make(map[int64]dto.NewMessageRequest)
|
||||
var newMessageLocker sync.Mutex
|
||||
|
||||
func NewMessage(ctx context.Context, cache *chatCache.ChatCache, sender *accountFiee.ChatUserData, request dto.NewMessageRequest) (err error) {
|
||||
newMessageLocker.Lock()
|
||||
defer newMessageLocker.Unlock()
|
||||
if request.SessionId == "" {
|
||||
return errors.New("sessionId不能为空")
|
||||
}
|
||||
if request.MsgType == 0 {
|
||||
return errors.New("msgType不能为空")
|
||||
}
|
||||
//短时间重复消息不发送
|
||||
if request.AtUserId != 0 && request.Robot {
|
||||
if msgRecord, ok := cacheMap[request.AtUserId]; ok {
|
||||
if msgRecord.SessionId == "" {
|
||||
cacheMap[request.AtUserId] = request
|
||||
} else {
|
||||
fmt.Println(request.LocalStamp - msgRecord.LocalStamp)
|
||||
if msgRecord.Message.Text == request.Message.Text && request.LocalStamp-msgRecord.LocalStamp < 1 { //秒级
|
||||
cacheMap[request.AtUserId] = request
|
||||
return nil
|
||||
} else {
|
||||
cacheMap[request.AtUserId] = request
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cacheMap[request.AtUserId] = request
|
||||
}
|
||||
}
|
||||
|
||||
//存储入库
|
||||
if sender.NickName == "" {
|
||||
//sender.NickName = fmt.Sprintf("未知用户(%d)", sender.ID)
|
||||
sender.NickName = BeautifulZeroNameWithPhone(sender.NickName, sender.ID)
|
||||
}
|
||||
fmt.Println("NewMessage 3333333333333333333333333333333333")
|
||||
var data = accountFiee.ChatRecordData{
|
||||
SessionId: request.SessionId,
|
||||
UserId: sender.ID,
|
||||
Name: sender.NickName,
|
||||
Avatar: sender.Avatar,
|
||||
MsgType: request.MsgType,
|
||||
Content: request.Message.Text,
|
||||
LocalStamp: request.LocalStamp,
|
||||
Medias: nil,
|
||||
Role: sender.Role,
|
||||
}
|
||||
if len(request.Message.Media) > 0 {
|
||||
for _, media := range request.Message.Media {
|
||||
data.Medias = append(data.Medias, &accountFiee.ChatMediaData{
|
||||
ID: media.MediaId,
|
||||
})
|
||||
}
|
||||
}
|
||||
fmt.Println("NewMessage 4444444444444444444444444444444444")
|
||||
resp, err := service.AccountFieeProvider.CreateChatRecord(ctx, &data)
|
||||
if err != nil {
|
||||
return errors.New("消息发送失败")
|
||||
}
|
||||
fmt.Printf("CreateChatRecord resp:%+v\n", resp)
|
||||
//录入缓存
|
||||
err = cache.AddChatRecord(request.SessionId, resp.Data)
|
||||
if err != nil {
|
||||
log.Printf("cache.AddChatRecord 失败:%v", err)
|
||||
return errors.New("消息发送失败")
|
||||
}
|
||||
fmt.Println("NewMessage 5 消息数量+1")
|
||||
if sender.Role != 3 {
|
||||
//新消息数量统计+1
|
||||
noticeUserId := consts.ChatRoom.GetUserIdInSession(request.SessionId, sender.ID)
|
||||
fmt.Println("NewMessage 5.1 消息数量配置结束")
|
||||
fmt.Printf("noticeUserId %+v\n", noticeUserId)
|
||||
for _, userId := range noticeUserId {
|
||||
fmt.Println("userId")
|
||||
_ = cache.IncreaseNewMessageTotal(userId, request.SessionId)
|
||||
}
|
||||
}
|
||||
fmt.Println("NewMessage 6")
|
||||
//发送websocket消息提醒通知
|
||||
var notice = dto.MessageListType{}
|
||||
notice.BuildMessage(resp.Data)
|
||||
fmt.Printf("ws消息提醒:%+v\n", notice)
|
||||
_, err = consts.ChatRoom.SendSessionMessage(sender, request.SessionId, ws.NewChatMsgType, notice)
|
||||
if err != nil {
|
||||
log.Print("发送新消息通知失败", zap.Error(err), zap.Any("notice", notice))
|
||||
}
|
||||
fmt.Println("NewMessage 7 -end")
|
||||
return nil
|
||||
}
|
||||
42
pkg/service/asChat/logic/utils.go
Normal file
42
pkg/service/asChat/logic/utils.go
Normal file
@ -0,0 +1,42 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
)
|
||||
|
||||
// 对没有名字的name进行优化
|
||||
func beautifulZeroName(name string, userId int64) string {
|
||||
return utils.IfGec(name == "", fmt.Sprintf("未实名用户:%d", userId), name)
|
||||
}
|
||||
|
||||
var userIdMapPhone = make(map[int64]string)
|
||||
|
||||
func BeautifulZeroNameWithPhone(name string, userId int64) string {
|
||||
var ctx = context.Background()
|
||||
if name == "" {
|
||||
telNum, ok := userIdMapPhone[userId]
|
||||
if ok {
|
||||
return telNum
|
||||
}
|
||||
chatUserRes, err := service.AccountFieeProvider.GetChatUserDetail(ctx, &accountFiee.GetChatUserByIdRequest{Id: userId})
|
||||
if err != nil {
|
||||
return fmt.Sprintf("未实名用户:%d", userId)
|
||||
} else {
|
||||
if userRes, errs := service.AccountFieeProvider.Info(ctx, &accountFiee.InfoRequest{
|
||||
Domain: chatUserRes.Origin,
|
||||
ID: uint64(chatUserRes.OriginId),
|
||||
Scene: "",
|
||||
}); errs != nil {
|
||||
return fmt.Sprintf("未实名用户:%d", userId)
|
||||
} else {
|
||||
userIdMapPhone[userId] = userRes.TelNum
|
||||
return userRes.TelNum
|
||||
}
|
||||
}
|
||||
}
|
||||
return name
|
||||
}
|
||||
26
pkg/service/asChat/readme.md
Normal file
26
pkg/service/asChat/readme.md
Normal file
@ -0,0 +1,26 @@
|
||||
# asChat 客服聊天
|
||||
|
||||
## 聊天室主要流程与功能描述
|
||||
1. 用户通过画家包登录
|
||||
2. 打开客服页面。 画家宝客户端自动进行websocket连接,后台会自动创建一个默认聊天室(聊天室携带一个SessionId)
|
||||
3. 用户调用api接口,发送消息。 服务端接收到消息后,会通过websocket通知聊天室里面所有用户。
|
||||
4. erp首次打开客服菜单时,会进行websocket连接,并调用一次api接口刷新消息列表。后续通过websocket接收消息推送,收到消息时,应主动调用一次消息列表刷新接口。
|
||||
5. erp客服端发送消息时,加入到此聊天室。
|
||||
6. 用户端调用api接口获取新消息列表。
|
||||
|
||||
## 客户端应具备的其它功能
|
||||
1. weboscket断开自动重连
|
||||
2. 当通过websocket接收到错误类型的消息,应具备对应的错误处理机制<p>
|
||||
错误消息示例
|
||||
```json
|
||||
{"type":1,"content":"Connection error:登录状态失效","from":"0","to":"null"}
|
||||
```
|
||||
|
||||
## 服务端应具备的功能
|
||||
1. 通过redis缓存聊天消息
|
||||
2. 通过redis缓存用户的sessionId避免ws断开后,找不到之前的sessionId
|
||||
3. 客服端由于不是画家宝用户,没有userId。在websocket连接时,如果找不到userId,应该为其在画家宝创建一个账号。且经纪人不可见。
|
||||
4. 由于没有创建聊天室的需求,所以每个用户使用一个聊天室即可。客服与之对话时,就自动加入用户端的聊天室
|
||||
5. 新消息统计
|
||||
- 当发送消息时,该聊天室中除了发信者以外,其它用户的新消息数都+1,录入缓存。
|
||||
- 当新客服人员加入时,没有新消息统计的缓存。~~他的新消息数量应该从创建时间开始计算~~,所以都是0。
|
||||
39
pkg/service/asChat/robot/KeywordsReplyRuler.go
Normal file
39
pkg/service/asChat/robot/KeywordsReplyRuler.go
Normal file
@ -0,0 +1,39 @@
|
||||
// Package autoReply -----------------------------
|
||||
// @file : KeywordsReplyRuler.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 16:21
|
||||
// -------------------------------------------
|
||||
package robot
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 使用go开发一个自动回复功能,
|
||||
// 一个自动回复消息有多种触发条件:
|
||||
// 1. 关键词触发
|
||||
// 2. 进入聊天系统后直接发送
|
||||
// 3. 若干秒不回复自动发送
|
||||
|
||||
//func (k KeywordsRuleChecker) Do(sessionId string, response string, chatRoom *ws.ChatRoom) (err error) {
|
||||
// var notice = dto.MessageListType{}
|
||||
// notice.BuildMessage(response)
|
||||
// _, err = chatRoom.SendSessionMessage(1, sessionId, ws.NewChatMsgType, notice)
|
||||
// return nil
|
||||
//}
|
||||
|
||||
type AutoReply struct {
|
||||
Response string `json:"response"`
|
||||
Rules map[string]IRobotTask `json:"rules"`
|
||||
}
|
||||
type AutoReplyRule struct {
|
||||
Enable bool `json:"enable"`
|
||||
Keywords []string `json:"keywords"`
|
||||
ReplyTimeout int `json:"replyTimeout"` // 回复超时时间
|
||||
}
|
||||
|
||||
type AutoReplyManager struct {
|
||||
replies []AutoReply
|
||||
lastMessage time.Time
|
||||
}
|
||||
31
pkg/service/asChat/robot/readme.md
Normal file
31
pkg/service/asChat/robot/readme.md
Normal file
@ -0,0 +1,31 @@
|
||||
# robot 聊天机器人
|
||||
|
||||
web端和后端交互式时,增删改查的规则配置是存放在rules对象中的。在数据库中,rules字段是作为json字符串存放的。
|
||||
```json
|
||||
{
|
||||
"title": "1",
|
||||
"response": "11",
|
||||
"rules": {
|
||||
"keywords": {
|
||||
"enable": true,
|
||||
"content": "什么,为什么,怎么办,不是"
|
||||
},
|
||||
"joinSession": {
|
||||
"enable": true
|
||||
},
|
||||
"noReplyAfter": {
|
||||
"enable": false,
|
||||
"secondDuration": 1
|
||||
}
|
||||
},
|
||||
"status": 1
|
||||
}
|
||||
```
|
||||
如果有新增的规则,直接在rules对象中添加字段即可。然后去 [./rulerList.go](./rulerList.go) 中,增加规则的解析方法。
|
||||
目前,在[./rulerList.go](./rulerList.go)定义了三种回复规则的解析方式:
|
||||
- keywords :关键字回复
|
||||
- joinSession:用户打开聊天窗口后
|
||||
- noReplyAfter:客服指定时间没有回复后
|
||||
|
||||
## 注意
|
||||
- 目前不支持用户多端登录,会导致用户收到重复消息
|
||||
29
pkg/service/asChat/robot/replyAndRuler.go
Normal file
29
pkg/service/asChat/robot/replyAndRuler.go
Normal file
@ -0,0 +1,29 @@
|
||||
// Package robot -----------------------------
|
||||
// @file : replyRuler.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 17:39
|
||||
// -------------------------------------------
|
||||
package robot
|
||||
|
||||
import (
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
)
|
||||
|
||||
// 回复规则
|
||||
type Reply struct {
|
||||
Title string
|
||||
Response string
|
||||
Rules []IRobotTask
|
||||
}
|
||||
|
||||
func (r *Reply) Hit(event ws.ListenEventData, robotInfo *accountFiee.ChatUserData) (hit bool, rule IRobotTask) {
|
||||
for _, rule = range r.Rules {
|
||||
hit = rule.Hit(event, robotInfo)
|
||||
if hit {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
265
pkg/service/asChat/robot/robot.go
Normal file
265
pkg/service/asChat/robot/robot.go
Normal file
@ -0,0 +1,265 @@
|
||||
// Package robot -----------------------------
|
||||
// @file : robot.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 17:41
|
||||
// -------------------------------------------
|
||||
package robot
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/consts"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"log"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
func NewRobot(cache *chatCache.ChatCache) *Robot {
|
||||
ctx := context.Background()
|
||||
robotQuery, err := service.AccountFieeProvider.GetChatUserList(ctx, &accountFiee.GetChatUserListRequest{
|
||||
Query: &accountFiee.ChatUserData{Role: 3},
|
||||
Page: 1, PageSize: 1,
|
||||
})
|
||||
if err != nil {
|
||||
panic("聊天机器人初始化失败,err:" + err.Error())
|
||||
}
|
||||
var robotInfo *accountFiee.ChatUserData
|
||||
if robotQuery.Total > 0 {
|
||||
robotInfo = robotQuery.List[0]
|
||||
} else {
|
||||
robotInfo = &accountFiee.ChatUserData{
|
||||
NickName: "阿泰",
|
||||
Role: 3,
|
||||
Origin: "fontree",
|
||||
}
|
||||
createChatUserResp, errs := service.AccountFieeProvider.CreateChatUser(ctx, robotInfo)
|
||||
if errs != nil {
|
||||
panic("聊天机器人创建失败,err:" + errs.Error())
|
||||
}
|
||||
robotInfo = createChatUserResp.Data
|
||||
}
|
||||
r := &Robot{
|
||||
Info: robotInfo,
|
||||
EventListener: &ws.EventListener{
|
||||
Name: "robot1",
|
||||
ListenEvents: []ws.ListenEvent{ //只监听消息推送事件
|
||||
{ws.EventUserJoin, ws.EventProgressAfter},
|
||||
{ws.EventChatMessage, ws.EventProgressBefore},
|
||||
},
|
||||
Chan: make(ws.ListenEventChan),
|
||||
},
|
||||
cache: cache,
|
||||
}
|
||||
err = r.ReloadRules(ctx)
|
||||
fmt.Println("机器人规则加载完成,结果:", err)
|
||||
consts.ChatRoom.RegisterEventListener(r.EventListener)
|
||||
go r.Run()
|
||||
return r
|
||||
}
|
||||
|
||||
type Robot struct {
|
||||
Info *accountFiee.ChatUserData //机器人信息
|
||||
joinSessionRules, keywordsRules, noReplyAfterRules []IRobotTask //自动回复规则
|
||||
DelayTask []IRobotTask //延时任务
|
||||
ticker *time.Ticker //定时器
|
||||
stopChan chan struct{} //停止管道
|
||||
isRunning bool //运行状态
|
||||
mu sync.Mutex
|
||||
*ws.EventListener
|
||||
cache *chatCache.ChatCache
|
||||
}
|
||||
|
||||
//func (r *Robot) Listen(record *accountFiee.ChatRecordData) {
|
||||
// for _, replyRules := range r.Rules {
|
||||
// for _, rule := range replyRules.Rules {
|
||||
// hit, runTime, function := rule.Hit(record)
|
||||
// if hit && function != nil {
|
||||
// if runTime.IsZero() {
|
||||
// go func() {
|
||||
// err := function(r.Info.ID, replyRules.Response)
|
||||
// if err != nil {
|
||||
// log.Printf("聊天机器人[%d]回复消息失败:%v", r.Info.ID, err)
|
||||
// }
|
||||
// }()
|
||||
// } else {
|
||||
// r.mu.Lock()
|
||||
// r.DelayTask = append(r.DelayTask, RobotTask{
|
||||
// RunTime: runTime,
|
||||
// Run: function,
|
||||
// Response: replyRules.Response,
|
||||
// })
|
||||
// r.mu.Unlock()
|
||||
// // 添加任务后启动定时任务(如果未运行)
|
||||
// if !r.isRunning {
|
||||
// go r.Run()
|
||||
// }
|
||||
// }
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
func (r *Robot) Run() {
|
||||
r.mu.Lock()
|
||||
if r.isRunning {
|
||||
r.mu.Unlock()
|
||||
return
|
||||
}
|
||||
r.isRunning = true
|
||||
r.ticker = time.NewTicker(time.Second)
|
||||
r.stopChan = make(chan struct{})
|
||||
r.mu.Unlock()
|
||||
|
||||
defer func() {
|
||||
r.mu.Lock()
|
||||
r.isRunning = false
|
||||
if r.ticker != nil {
|
||||
r.ticker.Stop()
|
||||
r.ticker = nil
|
||||
}
|
||||
r.stopChan = nil
|
||||
r.mu.Unlock()
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
default:
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
case <-r.ticker.C:
|
||||
r.mu.Lock()
|
||||
if len(r.DelayTask) == 0 {
|
||||
r.mu.Unlock()
|
||||
break
|
||||
//return // 没有任务时退出
|
||||
}
|
||||
now := time.Now()
|
||||
var remainingTasks []IRobotTask
|
||||
for _, task := range r.DelayTask {
|
||||
if now.After(task.RunTime()) {
|
||||
// 执行任务
|
||||
go func() {
|
||||
err := task.Run(r.cache)
|
||||
if err != nil {
|
||||
log.Printf("聊天机器人[%d]延时回复消息失败:%v", r.Info.ID, err)
|
||||
} else {
|
||||
log.Printf("聊天机器人[%d]延时回复消息成功", r.Info.ID)
|
||||
}
|
||||
}()
|
||||
} else {
|
||||
// 保留未到期的任务
|
||||
remainingTasks = append(remainingTasks, task)
|
||||
}
|
||||
}
|
||||
r.DelayTask = remainingTasks
|
||||
r.mu.Unlock()
|
||||
case <-r.stopChan:
|
||||
return
|
||||
case event := <-r.EventListener.Chan:
|
||||
fmt.Printf("robot listen event:%#v\n", event)
|
||||
r.mu.Lock()
|
||||
//加入聊天室规则
|
||||
hasHit := false
|
||||
for _, rule := range r.joinSessionRules {
|
||||
hit := rule.Hit(event, r.Info)
|
||||
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
|
||||
if hit {
|
||||
hasHit = true
|
||||
if rule.RunTime().IsZero() {
|
||||
err := rule.Run(r.cache)
|
||||
if err != nil {
|
||||
log.Printf("robot 执行任务失败:%v\n", err)
|
||||
}
|
||||
} else {
|
||||
r.RegisterDelayTask(rule)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !hasHit {
|
||||
for _, rule := range r.keywordsRules {
|
||||
hit := rule.Hit(event, r.Info)
|
||||
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
|
||||
if hit {
|
||||
hasHit = true
|
||||
fmt.Println("命中规则:", rule.GetTitle())
|
||||
if rule.RunTime().IsZero() {
|
||||
err := rule.Run(r.cache)
|
||||
if err != nil {
|
||||
log.Printf("robot 执行任务失败:%v\n", err)
|
||||
}
|
||||
} else {
|
||||
r.RegisterDelayTask(rule)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if !hasHit {
|
||||
for _, rule := range r.noReplyAfterRules {
|
||||
hit := rule.Hit(event, r.Info)
|
||||
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
|
||||
if hit {
|
||||
hasHit = true
|
||||
fmt.Println("命中规则:", rule.GetTitle())
|
||||
if rule.RunTime().IsZero() {
|
||||
err := rule.Run(r.cache)
|
||||
if err != nil {
|
||||
log.Printf("robot 执行任务失败:%v\n", err)
|
||||
}
|
||||
} else {
|
||||
r.RegisterDelayTask(rule)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
r.mu.Unlock()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Stop 主动停止机器人的定时任务
|
||||
func (r *Robot) Stop() {
|
||||
r.mu.Lock()
|
||||
if r.stopChan != nil {
|
||||
close(r.stopChan)
|
||||
}
|
||||
r.mu.Unlock()
|
||||
}
|
||||
func (r *Robot) RegisterDelayTask(task IRobotTask) {
|
||||
if task.Run == nil {
|
||||
return
|
||||
}
|
||||
r.DelayTask = append(r.DelayTask, task)
|
||||
}
|
||||
|
||||
// 重载回复规则
|
||||
func (r *Robot) ReloadRules(ctx context.Context) error {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
r.joinSessionRules = []IRobotTask{}
|
||||
r.keywordsRules = []IRobotTask{}
|
||||
r.noReplyAfterRules = []IRobotTask{}
|
||||
ruleListRes, err := service.AccountFieeProvider.GetChatAutoReplyRulerList(ctx, &accountFiee.GetChatAutoReplyRulerListRequest{
|
||||
Query: &accountFiee.ChatAutoReplyRulerData{Status: 1},
|
||||
Page: 1,
|
||||
PageSize: -1,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("robot 查询回复规则失败:%v\n", err)
|
||||
return fmt.Errorf("robot 查询回复规则失败:%v\n", err)
|
||||
} else {
|
||||
var data []*dto.ChatAutoReplyData
|
||||
for _, v := range ruleListRes.List {
|
||||
tmp := dto.ChatAutoReplyData{}
|
||||
tmp.Parse(v)
|
||||
data = append(data, &tmp)
|
||||
}
|
||||
r.joinSessionRules, r.keywordsRules, r.noReplyAfterRules = ParseReplyRule(data)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
64
pkg/service/asChat/robot/rulerList.go
Normal file
64
pkg/service/asChat/robot/rulerList.go
Normal file
@ -0,0 +1,64 @@
|
||||
// Package autoReply -----------------------------
|
||||
// @file : rulerList.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 16:16
|
||||
// -------------------------------------------
|
||||
package robot
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type IRobotTask interface {
|
||||
Hit(event ws.ListenEventData, sender *accountFiee.ChatUserData) (hit bool)
|
||||
Run(cache *chatCache.ChatCache) error
|
||||
RunTime() time.Time
|
||||
SetResponse(response string)
|
||||
GetResponse() string
|
||||
SetTitle(title string)
|
||||
GetTitle() string
|
||||
}
|
||||
|
||||
// 自动回复规则结构转换
|
||||
func ParseReplyRule(data []*dto.ChatAutoReplyData) (joinSessionRules, keywordsRules, noReplyAfterRules []IRobotTask) {
|
||||
for _, responseRules := range data {
|
||||
responseRules := responseRules
|
||||
for ruleName, v := range responseRules.Rules {
|
||||
if !v.Enable {
|
||||
continue
|
||||
}
|
||||
switch ruleName {
|
||||
case "keywords": //关键字回复
|
||||
var keywords []string
|
||||
if v.Content == "" {
|
||||
continue
|
||||
} else {
|
||||
keywords = strings.Split(v.Content, ",")
|
||||
}
|
||||
fmt.Println("ParseReplyRule 解析keywords:", keywords)
|
||||
r := NewReplyWhenHitKeywords(responseRules.Title+"-keywords", keywords)
|
||||
r.SetResponse(responseRules.Response)
|
||||
keywordsRules = append(keywordsRules, r)
|
||||
case "joinSession": //加入聊天后回复
|
||||
r := NewReplyWhenUserJoinSession(responseRules.Title + "-joinSession")
|
||||
r.SetResponse(responseRules.Response)
|
||||
joinSessionRules = append(joinSessionRules, r)
|
||||
case "noReplyAfter": //指定时间没有回复则自动回复
|
||||
if v.SecondDuration == 0 {
|
||||
continue
|
||||
}
|
||||
r := NewReplyWhenWaiterNoAction(responseRules.Title+"-noReplyAfter", v.SecondDuration)
|
||||
r.SetResponse(responseRules.Response)
|
||||
noReplyAfterRules = append(noReplyAfterRules, r)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
102
pkg/service/asChat/robot/ruler_ReplyWhenWaiterNoAction.go
Normal file
102
pkg/service/asChat/robot/ruler_ReplyWhenWaiterNoAction.go
Normal file
@ -0,0 +1,102 @@
|
||||
// Package robot -----------------------------
|
||||
// @file : ruler_ReplyWhenWaiterNoAction.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 18:02
|
||||
// -------------------------------------------
|
||||
package robot
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"fonchain-fiee/pkg/service/asChat/logic"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 客服指定时间不回复则自动回复
|
||||
func NewReplyWhenWaiterNoAction(title string, delaySecond time.Duration) IRobotTask {
|
||||
return &RobotTaskReplyWhenWaiterNoAction{
|
||||
delaySecond: delaySecond,
|
||||
title: title,
|
||||
}
|
||||
}
|
||||
|
||||
type RobotTaskReplyWhenWaiterNoAction struct {
|
||||
title string
|
||||
runTime time.Time
|
||||
Response string
|
||||
Receiver *accountFiee.ChatUserData
|
||||
Sender *accountFiee.ChatUserData
|
||||
Msg string
|
||||
Resp string
|
||||
delaySecond time.Duration
|
||||
}
|
||||
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) Hit(event ws.ListenEventData, sender *accountFiee.ChatUserData) (hit bool) {
|
||||
if event.Client == nil || event.EventType != ws.EventChatMessage {
|
||||
return
|
||||
}
|
||||
//客服和机器人的的消息不需要处理
|
||||
if event.ChatUser.Role != 1 {
|
||||
return
|
||||
}
|
||||
hit = true // 立即保存SessionId的值
|
||||
r.Sender = sender
|
||||
r.Receiver = event.ChatUser
|
||||
r.runTime = time.Now().Add(r.delaySecond * time.Second)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) Run(cache *chatCache.ChatCache) error {
|
||||
clientSessionId := fmt.Sprintf("%d", r.Receiver.ID)
|
||||
fmt.Println("延时回复 sessionID:", clientSessionId)
|
||||
//如果客服已经回复则不发送消息
|
||||
chatRecordListRes, err := service.AccountFieeProvider.GetChatRecordList(context.Background(), &accountFiee.GetChatRecordListRequest{
|
||||
Query: &accountFiee.ChatRecordData{
|
||||
SessionId: clientSessionId,
|
||||
},
|
||||
Page: 1,
|
||||
PageSize: 1,
|
||||
Order: "created_at desc",
|
||||
})
|
||||
if err != nil || chatRecordListRes.Total == 0 {
|
||||
return err
|
||||
}
|
||||
checkUserId := chatRecordListRes.List[0].UserId
|
||||
checkChatUser, err := service.AccountFieeProvider.GetChatUserDetail(context.Background(), &accountFiee.GetChatUserByIdRequest{Id: checkUserId})
|
||||
if err != nil || checkChatUser.Role != 1 {
|
||||
return err
|
||||
}
|
||||
err = logic.NewMessage(context.Background(), cache, r.Sender, dto.NewMessageRequest{
|
||||
Waiter: true,
|
||||
Robot: true,
|
||||
AtUserId: r.Receiver.ID,
|
||||
SessionId: clientSessionId,
|
||||
Message: dto.Message{
|
||||
MsgType: 1,
|
||||
Text: r.Resp,
|
||||
LocalStamp: time.Now().Unix(),
|
||||
},
|
||||
})
|
||||
return err
|
||||
}
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) RunTime() time.Time {
|
||||
return r.runTime
|
||||
}
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) SetResponse(response string) {
|
||||
r.Resp = response
|
||||
}
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) GetResponse() string {
|
||||
return r.Response
|
||||
}
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) SetTitle(title string) {
|
||||
r.title = title
|
||||
}
|
||||
func (r *RobotTaskReplyWhenWaiterNoAction) GetTitle() string {
|
||||
return r.title
|
||||
}
|
||||
80
pkg/service/asChat/robot/ruler_keywords.go
Normal file
80
pkg/service/asChat/robot/ruler_keywords.go
Normal file
@ -0,0 +1,80 @@
|
||||
package robot
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"fonchain-fiee/pkg/service/asChat/logic"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type RobotTaskWithKeyworkds struct {
|
||||
title string
|
||||
runTime time.Time
|
||||
Response string
|
||||
Receiver *accountFiee.ChatUserData
|
||||
Sender *accountFiee.ChatUserData
|
||||
Msg string
|
||||
Resp string
|
||||
keywords []string
|
||||
}
|
||||
|
||||
func NewReplyWhenHitKeywords(title string, keywords []string) IRobotTask {
|
||||
return &RobotTaskWithKeyworkds{title: title, keywords: keywords}
|
||||
}
|
||||
func (r *RobotTaskWithKeyworkds) Hit(event ws.ListenEventData, sender *accountFiee.ChatUserData) (hit bool) {
|
||||
if event.EventType != ws.EventChatMessage || event.Msg == "" || event.Client == nil || event.ChatUser == nil {
|
||||
return
|
||||
}
|
||||
if event.ChatUser.Role != 1 {
|
||||
return
|
||||
}
|
||||
r.Sender = sender
|
||||
r.Receiver = event.ChatUser
|
||||
for _, v := range r.keywords {
|
||||
if strings.Contains(event.Msg, v) {
|
||||
fmt.Printf("关键词比对:%s ----- %s : true", event.Msg, v)
|
||||
hit = true
|
||||
break
|
||||
}
|
||||
fmt.Printf("关键词比对:%s ----- %s: false", event.Msg, v)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *RobotTaskWithKeyworkds) Run(cache *chatCache.ChatCache) (err error) {
|
||||
err = logic.NewMessage(context.Background(), cache, r.Sender, dto.NewMessageRequest{
|
||||
Waiter: true,
|
||||
Robot: true,
|
||||
AtUserId: r.Receiver.ID,
|
||||
SessionId: fmt.Sprintf("%d", r.Receiver.ID),
|
||||
Message: dto.Message{
|
||||
MsgType: 1,
|
||||
Text: r.Resp,
|
||||
LocalStamp: time.Now().Unix(),
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (r *RobotTaskWithKeyworkds) RunTime() time.Time {
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (r *RobotTaskWithKeyworkds) SetResponse(response string) {
|
||||
r.Resp = response
|
||||
}
|
||||
|
||||
func (r *RobotTaskWithKeyworkds) GetResponse() string {
|
||||
return r.Response
|
||||
}
|
||||
func (r *RobotTaskWithKeyworkds) SetTitle(title string) {
|
||||
r.title = title
|
||||
}
|
||||
func (r *RobotTaskWithKeyworkds) GetTitle() string {
|
||||
return r.title
|
||||
}
|
||||
95
pkg/service/asChat/robot/ruler_replyWhenUserJoinSession.go
Normal file
95
pkg/service/asChat/robot/ruler_replyWhenUserJoinSession.go
Normal file
@ -0,0 +1,95 @@
|
||||
package robot
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"fonchain-fiee/pkg/service/asChat/logic"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
func NewReplyWhenUserJoinSession(title string) IRobotTask {
|
||||
return &ReplyWhenUserJoinSession{title: title}
|
||||
}
|
||||
|
||||
type ReplyWhenUserJoinSession struct {
|
||||
Response string
|
||||
Sender *accountFiee.ChatUserData
|
||||
Msg string
|
||||
Resp string
|
||||
sessionId string
|
||||
atUserId int
|
||||
title string
|
||||
}
|
||||
|
||||
func (r *ReplyWhenUserJoinSession) Hit(event ws.ListenEventData, sender *accountFiee.ChatUserData) (hit bool) {
|
||||
if event.EventType != ws.EventUserJoin {
|
||||
return
|
||||
}
|
||||
if event.Client == nil {
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
queryRes, err := service.AccountFieeProvider.GetChatRecordList(ctx, &accountFiee.GetChatRecordListRequest{
|
||||
Query: &accountFiee.ChatRecordData{
|
||||
SessionId: event.Client.SessionId,
|
||||
},
|
||||
Page: 1,
|
||||
PageSize: 1,
|
||||
Order: "created_at desc",
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
//如果最近一次的消息也是机器人发送的,就不再发送了
|
||||
for i, v := range queryRes.List {
|
||||
if i == 0 {
|
||||
if v.UserId == sender.ID {
|
||||
return
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
hit = true
|
||||
r.Sender = sender
|
||||
r.sessionId = event.Client.SessionId
|
||||
r.atUserId, _ = strconv.Atoi(event.Client.SessionId)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ReplyWhenUserJoinSession) Run(cache *chatCache.ChatCache) (err error) {
|
||||
err = logic.NewMessage(context.Background(), cache, r.Sender, dto.NewMessageRequest{
|
||||
Waiter: true,
|
||||
Robot: true,
|
||||
AtUserId: int64(r.atUserId),
|
||||
SessionId: r.sessionId,
|
||||
Message: dto.Message{
|
||||
MsgType: 1,
|
||||
Text: r.Resp,
|
||||
LocalStamp: time.Now().Unix(),
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ReplyWhenUserJoinSession) RunTime() time.Time {
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (r *ReplyWhenUserJoinSession) SetResponse(response string) {
|
||||
r.Resp = response
|
||||
}
|
||||
func (r *ReplyWhenUserJoinSession) GetResponse() string {
|
||||
return r.Response
|
||||
}
|
||||
func (r *ReplyWhenUserJoinSession) SetTitle(title string) {
|
||||
r.title = title
|
||||
}
|
||||
func (r *ReplyWhenUserJoinSession) GetTitle() string {
|
||||
return r.title
|
||||
}
|
||||
20
pkg/service/asChat/robot/task.go
Normal file
20
pkg/service/asChat/robot/task.go
Normal file
@ -0,0 +1,20 @@
|
||||
// Package robot -----------------------------
|
||||
// @file : task.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 18:02
|
||||
// -------------------------------------------
|
||||
package robot
|
||||
|
||||
import (
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/service/asChat/chatCache"
|
||||
"time"
|
||||
)
|
||||
|
||||
type RobotTask struct {
|
||||
RunTime time.Time
|
||||
Run func(msg string, cache *chatCache.ChatCache, Sender *accountFiee.ChatUserData) error
|
||||
Response string
|
||||
ChatUser *accountFiee.ChatUserData
|
||||
}
|
||||
46
pkg/service/asChat/service.go
Normal file
46
pkg/service/asChat/service.go
Normal file
@ -0,0 +1,46 @@
|
||||
// Package asChat -----------------------------
|
||||
// @file : service.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2024/9/10 下午7:05
|
||||
// -------------------------------------------
|
||||
package asChat
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
)
|
||||
|
||||
func HandleMessage(sourceData []byte, cli *ws.Client) {
|
||||
var msg map[string]any
|
||||
err := json.Unmarshal(sourceData, &msg)
|
||||
if err != nil {
|
||||
cli.Send <- ws.WsErrorInvalidDataFormat(cli.ClientId)
|
||||
return
|
||||
}
|
||||
switch msg["type"] {
|
||||
default:
|
||||
cli.Send <- ws.WsErrorUnknownMessageType(cli.ClientId)
|
||||
case ws.TestType:
|
||||
var newMsg = ws.WsInfo{
|
||||
Type: ws.TestType,
|
||||
Content: msg["content"],
|
||||
}
|
||||
byteMsg, _ := json.Marshal(newMsg)
|
||||
cli.Send <- byteMsg
|
||||
//case ws.ChatType:
|
||||
// var chatInfo ChatInfo
|
||||
// _ = json.Unmarshal(sourceData, &chatInfo)
|
||||
// //解析Content
|
||||
// if clients, ok := cli.Room.clients[chatInfo.Content.TargetUserId]; ok {
|
||||
// for _, targetObj := range clients {
|
||||
// if targetObj != nil {
|
||||
// targetObj.Send <- WsChatMessage(msg.From, chatInfo.Content.TargetClientId, chatInfo.Content.Msg)
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //对方不在线
|
||||
// cli.Send <- WsErrorMessage(ChatType, msg.From, e.ErrTargetOutLine, nil)
|
||||
// }
|
||||
}
|
||||
}
|
||||
@ -7,8 +7,9 @@ import (
|
||||
"fonchain-fiee/pkg/logic"
|
||||
"fonchain-fiee/pkg/serializer"
|
||||
"fonchain-fiee/pkg/service/approval/model"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -189,3 +190,21 @@ func translateErrorMessage(c *gin.Context, message string) string {
|
||||
return common.EnMessages[message]
|
||||
}
|
||||
}
|
||||
|
||||
func ErrWithCode(c *gin.Context, code e.ErrorCodeType, newMsg ...string) {
|
||||
msg := e.GetCodeMsg(code)
|
||||
if newMsg != nil {
|
||||
msg = newMsg[0]
|
||||
}
|
||||
status := 1
|
||||
if code == e.NotLogin {
|
||||
status = e.NotLogin
|
||||
}
|
||||
|
||||
c.JSON(e.Success, serializer.Response{
|
||||
Code: code,
|
||||
Status: status,
|
||||
Msg: msg,
|
||||
Data: nil,
|
||||
})
|
||||
}
|
||||
|
||||
250
pkg/service/bundle/bundleBalance.go
Normal file
250
pkg/service/bundle/bundleBalance.go
Normal file
@ -0,0 +1,250 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"strconv"
|
||||
|
||||
bundleModel "fonchain-fiee/pkg/model/bundle"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func BundleExtend(c *gin.Context) {
|
||||
var req bundle.BundleExtendRequest
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.Type = 1 // 设置未手动扩展'
|
||||
req.OperatorName = userInfo.Name
|
||||
req.OperatorPhoneNumber = userInfo.TelNum
|
||||
req.OperatorId = userInfo.ID
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.BundleExtend(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func BundleExtendRecordsList(c *gin.Context) {
|
||||
var req bundle.BundleExtendRecordsListRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.BundleExtendRecordsList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func GetBundleBalance(c *gin.Context) {
|
||||
var req bundle.GetBundleBalanceListReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func GetUsedRecordList(c *gin.Context) {
|
||||
var req bundle.GetUsedRecordListReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetUsedRecordList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func GetWorkDetail(c *gin.Context) {
|
||||
var req cast.WorkDetailReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// userInfo := login.GetUserInfoFromC(c)
|
||||
// res, err := service.BundleProvider.GetBundleBalanceByUserId(context.TODO(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
// UserId: int32(userInfo.ID),
|
||||
// })
|
||||
// if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
// }
|
||||
// if res.ExpiredTime <= time.Now().UnixMilli() {
|
||||
// service.Success(c, gin.H{
|
||||
// "status": 1,
|
||||
// "message": "套餐过期请重新购买",
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
workRes, err := service.CastProvider.WorkDetail(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// if len(workRes.Images) > 0 && res.ImageConsumptionNumber >= res.ImageNumber { // 图片用尽
|
||||
// service.Success(c, gin.H{
|
||||
// "status": 2,
|
||||
// "message": "增值服务已用尽",
|
||||
// })
|
||||
// return
|
||||
// } else {
|
||||
// if res.VideoConsumptionNumber >= res.VideoNumber { // 视频用尽
|
||||
// service.Success(c, gin.H{
|
||||
// "status": 2,
|
||||
// "message": "增值服务已用尽",
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
service.Success(c, workRes)
|
||||
}
|
||||
|
||||
func GetToBeComfirmedWorks(c *gin.Context) {
|
||||
var req bundle.ToBeComfirmedWorksReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.ArtistUuid = strconv.Itoa(int(userInfo.ID))
|
||||
res, err := service.BundleProvider.ToBeComfirmedWorks(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func GetUserBalance(c *gin.Context) {
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
res, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
UserId: int32(userInfo.ID),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
var req bundleModel.UserWorkConfirmReq
|
||||
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if req.ConfirmStatus == 2 { // 驳回完直接结束
|
||||
res, err := service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 2,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
balanceInfoRes, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
UserId: int32(userInfo.ID),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
wordInfoRes, err := service.CastProvider.WorkDetail(c, &cast.WorkDetailReq{
|
||||
WorkUuid: req.WorkUuid,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if wordInfoRes.WorkStatus != 4 {
|
||||
service.Error(c, errors.New("作品不是待确认状态"))
|
||||
return
|
||||
}
|
||||
var workCategory = wordInfoRes.WorkCategory
|
||||
|
||||
var addBalanceReq bundle.AddBundleBalanceReq
|
||||
addBalanceReq.UserId = int32(userInfo.ID)
|
||||
switch workCategory {
|
||||
case 1:
|
||||
{
|
||||
if balanceInfoRes.ImageConsumptionNumber >= balanceInfoRes.ImageNumber { // 图文余量不足
|
||||
service.Error(c, errors.New("图文余量不足"))
|
||||
return
|
||||
}
|
||||
addBalanceReq.ImageConsumptionNumber = 1
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if balanceInfoRes.VideoConsumptionNumber >= balanceInfoRes.VideoNumber { // 视频余量不足
|
||||
service.Error(c, errors.New("视频余量不足"))
|
||||
return
|
||||
}
|
||||
addBalanceReq.VideoConsumptionNumber = 1
|
||||
}
|
||||
default:
|
||||
service.Error(c, errors.New("不支持的类型"))
|
||||
return
|
||||
}
|
||||
_, err = service.BundleProvider.AddBundleBalance(c, &addBalanceReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 1,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func CastLogConfirm(ctx *gin.Context) {
|
||||
var req bundle.ConfirmWorkReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.ConfirmWork(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, res)
|
||||
}
|
||||
@ -12,6 +12,7 @@ import (
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/service/bundle/logic"
|
||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"github.com/360EntSecGroup-Skylar/excelize"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
@ -20,6 +21,23 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func DeleteBundleOrder(c *gin.Context) {
|
||||
var req bundle.DeleteValueAddServiceRequest
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.UserID = userInfo.ID
|
||||
res, err := service.BundleProvider.DeleteValueAddService(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
|
||||
func CreateBundleOrderAddSignature(c *gin.Context) {
|
||||
var req bundle.OrderAddRecord
|
||||
|
||||
@ -29,8 +47,10 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
||||
}
|
||||
if req.Language == "" {
|
||||
req.Language = c.GetHeader("Accept-Language")
|
||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||
return
|
||||
if req.Language == "" {
|
||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||
return
|
||||
}
|
||||
}
|
||||
if req.BundleUuid == "" {
|
||||
service.Error(c, errors.New(common.MissOrderNo))
|
||||
@ -184,8 +204,10 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
}
|
||||
if req.Language == "" {
|
||||
req.Language = c.GetHeader("Accept-Language")
|
||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||
return
|
||||
if req.Language == "" {
|
||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||
return
|
||||
}
|
||||
}
|
||||
// 不去校验 签名
|
||||
/*if req.Signature == "" {
|
||||
@ -220,11 +242,11 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
//有套餐并且套餐未过期
|
||||
if orderRecordsList.OrderRecords != nil {
|
||||
for _, orderInfo := range orderRecordsList.OrderRecords {
|
||||
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.PayType == 1 {
|
||||
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.Status == 1 {
|
||||
service.Error(c, errors.New(common.ThereAreOutstandingOrders))
|
||||
return
|
||||
}
|
||||
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.ExpirationTime > time.Now().Format("2006-01-02") {
|
||||
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.ExpirationTime > time.Now().Format("2006-01-02 15:04:05") {
|
||||
service.Error(c, errors.New(common.HadOrder))
|
||||
return
|
||||
}
|
||||
@ -249,9 +271,10 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
}
|
||||
// 获取 套餐信息
|
||||
bundleDetailReq := &bundle.BundleDetailRequest{
|
||||
Uuid: req.BundleUuid,
|
||||
Uuid: req.BundleUuid,
|
||||
Language: req.Language,
|
||||
}
|
||||
bundleDetail, detailErr := service.BundleProvider.BundleDetail(context.Background(), bundleDetailReq)
|
||||
bundleDetail, detailErr := service.BundleProvider.BundleLangDetailV2(context.Background(), bundleDetailReq)
|
||||
if detailErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
@ -297,7 +320,7 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
||||
signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Bundle.Contract, addTotalPrice, expirationDay)
|
||||
signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, addTotalPrice, expirationDay)
|
||||
if signContractErr != nil {
|
||||
service.Error(c, signContractErr)
|
||||
return
|
||||
@ -305,11 +328,11 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
req.CustomerNum = userInfo.SubNum
|
||||
req.CustomerName = userInfo.Name
|
||||
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||
req.BundleName = bundleDetail.Bundle.Name
|
||||
req.Amount = bundleDetail.Bundle.Price
|
||||
req.AmountType = bundleDetail.Bundle.PriceType
|
||||
req.BundleCommonUid = bundleDetail.Bundle.BundleCommonUid
|
||||
req.TotalAmount = bundleDetail.Bundle.Price + addTotalPrice
|
||||
req.BundleName = bundleDetail.Name
|
||||
req.Amount = bundleDetail.Price
|
||||
req.AmountType = bundleDetail.PriceType
|
||||
//req.BundleCommonUid = bundleDetail.BundleCommonUid
|
||||
req.TotalAmount = bundleDetail.Price + addTotalPrice
|
||||
req.ContractNo = common.GenerateContractNo(lastContractNo)
|
||||
req.SignContract = signContract
|
||||
req.SignedTime = common.GetBeijingTime()
|
||||
@ -858,8 +881,93 @@ func ExportOrderInfo(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
var exportUrl = strings.Replace(strings.Replace(filePath, ".", fmt.Sprintf("%s://%s", httpType, c.Request.Host), 1), "runtime", "api/static", 1)
|
||||
var exportUrl = strings.Replace(strings.Replace(filePath, ".", fmt.Sprintf("%s://%s", httpType, c.Request.Host), 1), "runtime", "api/fiee/static", 1)
|
||||
//var exportUrl = fmt.Sprintf("%s%s/%s", httpType, c.Request.Host, dirPath + path)
|
||||
fmt.Println("exportUrl : ", exportUrl)
|
||||
service.Success(c, &bundleModel.ExportResponse{ExportUrl: exportUrl})
|
||||
}
|
||||
|
||||
func ExportOrderInfoOss(c *gin.Context) {
|
||||
var req bundle.OrderRecordsRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.OrderRecordsList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
rows := make([][]interface{}, 0)
|
||||
|
||||
for _, orderRecord := range res.OrderRecords {
|
||||
if orderRecord.CustomerID != "" {
|
||||
var userID uint64
|
||||
userID, err = strconv.ParseUint(orderRecord.CustomerID, 10, 64)
|
||||
if err != nil {
|
||||
err = nil
|
||||
continue
|
||||
}
|
||||
|
||||
userInfo, _ := service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||
Domain: "app",
|
||||
ID: userID,
|
||||
})
|
||||
if userInfo != nil {
|
||||
orderRecord.Sex = userInfo.Sex
|
||||
orderRecord.Nationality = userInfo.Nationality
|
||||
orderRecord.TelNum = userInfo.TelNum
|
||||
}
|
||||
}
|
||||
|
||||
status := ""
|
||||
if orderRecord.Status == bundleModel.OrderSigned {
|
||||
status = "未支付"
|
||||
} else if orderRecord.Status == bundleModel.OrderPaid {
|
||||
status = "已支付"
|
||||
}
|
||||
financialConfirmation := ""
|
||||
if orderRecord.FinancialConfirmation == bundleModel.UnConfirm {
|
||||
financialConfirmation = "未确认"
|
||||
} else if orderRecord.FinancialConfirmation == bundleModel.Confirmed {
|
||||
financialConfirmation = "已确认"
|
||||
}
|
||||
|
||||
rows = append(rows, []interface{}{
|
||||
orderRecord.OrderNo,
|
||||
orderRecord.CustomerNum,
|
||||
orderRecord.CustomerName,
|
||||
orderRecord.Sex,
|
||||
orderRecord.TelNum,
|
||||
orderRecord.Nationality,
|
||||
orderRecord.BundleName,
|
||||
orderRecord.SignedTime,
|
||||
orderRecord.Amount,
|
||||
orderRecord.Num,
|
||||
orderRecord.ValueAddBundleAmount,
|
||||
orderRecord.TotalAmount,
|
||||
status,
|
||||
orderRecord.PayTime,
|
||||
financialConfirmation,
|
||||
})
|
||||
}
|
||||
|
||||
dirPath := "./runtime"
|
||||
|
||||
filePath, err := logic.WriteToExcel(dirPath, rows)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
exportUrl, err := upload.PutBos(filePath, "excel", true)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, &bundleModel.ExportResponse{ExportUrl: exportUrl})
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/pkg/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
@ -76,3 +77,98 @@ func BundleList(c *gin.Context) {
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func SaveBundleV2(c *gin.Context) {
|
||||
var req bundle.BundleProfile
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.SaveBundle(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func BundleListV2(c *gin.Context) {
|
||||
var req bundle.BundleListRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.BundleListV2(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
func BundleDetailV2(c *gin.Context) {
|
||||
var req bundle.BundleDetailRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
language := c.GetHeader("Accept-Language")
|
||||
req.Language = language
|
||||
res, err := service.BundleProvider.BundleDetailV2(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
func HandShelf(c *gin.Context) {
|
||||
var req bundle.HandShelfRequest
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.HandShelf(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func OnlyAddValueListByOrderNo(c *gin.Context) {
|
||||
var req bundle.OnlyAddValueListByOrderNoRequest
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.OnlyAddValueListByOrderNo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
func BundleListH5V2(c *gin.Context) {
|
||||
var req bundle.BundleListRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.BundleListH5V2(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
@ -47,6 +47,10 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
}
|
||||
|
||||
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string) error {
|
||||
fmt.Println("================================templatePath:", templatePath)
|
||||
fmt.Println("================================outputPath:", outputPath)
|
||||
fmt.Println("================================price:", price)
|
||||
fmt.Println("================================expirationDate:", expirationDate)
|
||||
pdf := gopdf.GoPdf{}
|
||||
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -141,74 +142,292 @@ func CreateAntomPay(c *gin.Context) {
|
||||
// 获取 用户信息
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
|
||||
// 检查 订单信息
|
||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
// outTradeNo就是orderNo,根据这个去查询子表的source,如果是2就时单独的子套餐,如果是1就是主套餐
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||
OrderNo: req.OutTradeNo,
|
||||
})
|
||||
|
||||
if detailErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom创建支付,查询订单source报错:", err)
|
||||
logger.Errorf("=============== antom创建支付,查询订单source报错:", err)
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("detail.OrderRecord.CustomerID :", detail.OrderRecord.CustomerID)
|
||||
|
||||
// 判断 是否是 本人操作
|
||||
if strconv.FormatUint(userInfo.ID, 10) != detail.OrderRecord.CustomerID {
|
||||
service.Error(c, errors.New(common.NotMatchOrderInfo))
|
||||
return
|
||||
currencyType := 0
|
||||
if req.ProductPriceCurrency == "cny" || req.ProductPriceCurrency == "CNY" {
|
||||
currencyType = 1
|
||||
}
|
||||
if req.ProductPriceCurrency == "usd" || req.ProductPriceCurrency == "USD" {
|
||||
currencyType = 2
|
||||
}
|
||||
|
||||
fmt.Println("detail.OrderRecord.TotalAmount :", detail.OrderRecord.TotalAmount)
|
||||
fmt.Println("req.ProductAllPrice :", req.ProductAllPrice)
|
||||
fmt.Println("detail.OrderRecord.TotalAmount*100 :", detail.OrderRecord.TotalAmount*100)
|
||||
bundleName := "" // 套餐名称
|
||||
|
||||
//金额校验
|
||||
orderAmountInCents := int64(math.Round(float64(detail.OrderRecord.TotalAmount * 100)))
|
||||
reqAmountInCents := int64(math.Round(float64(req.ProductAllPrice)))
|
||||
if orderAmountInCents != reqAmountInCents {
|
||||
fmt.Println("111111111111111111111111111111111111")
|
||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
||||
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
||||
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
||||
|
||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
||||
// 查询支付结果
|
||||
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
||||
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
||||
if orderLimit != nil && orderLimit.Type == 1 { // 这儿的type实际就是source
|
||||
// 检查 订单信息 type是1说明既有主套餐又有增值服务
|
||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
OrderNo: req.OutTradeNo,
|
||||
})
|
||||
|
||||
if stripeInfosErr != nil {
|
||||
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
|
||||
if detailErr != nil {
|
||||
fmt.Println("=============== antom创建支付,查询主订单信息报错:", detailErr)
|
||||
logger.Errorf("=============== antom创建支付,查询主订单信息报错:", detailErr)
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
|
||||
if stripeInfosRes != nil && len(stripeInfosRes.Infos) > 0 {
|
||||
for _, info := range stripeInfosRes.Infos {
|
||||
if info.OutTradeNo == detail.OrderRecord.OrderNo && info.Status == "paid" {
|
||||
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: detail.OrderRecord.Uuid,
|
||||
Status: bundleModel.OrderPaid,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
})
|
||||
fmt.Println("detail.OrderRecord.Uuid :", detail.OrderRecord.Uuid)
|
||||
if updateOrderRecordErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
||||
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
||||
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
||||
|
||||
bundleName = detail.OrderRecord.BundleName
|
||||
|
||||
// 主套餐
|
||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
||||
// 查询支付结果
|
||||
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
||||
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
||||
})
|
||||
|
||||
if stripeInfosErr != nil {
|
||||
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
|
||||
return
|
||||
}
|
||||
|
||||
if stripeInfosRes != nil && len(stripeInfosRes.Infos) > 0 {
|
||||
for _, info := range stripeInfosRes.Infos {
|
||||
if info.OutTradeNo == detail.OrderRecord.OrderNo && info.Status == "paid" {
|
||||
// 更新主套餐和子套餐 TODO
|
||||
// 更新子套餐,TODO
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: req.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
Status: bundleModel.OrderPaid,
|
||||
})
|
||||
fmt.Println("detail.OrderRecord.Uuid :", detail.OrderRecord.Uuid)
|
||||
if updateStatusErr != nil {
|
||||
fmt.Println("=============== antom创建支付,更新主套餐和子套餐支付状态报错:", updateStatusErr)
|
||||
logger.Errorf("=============== antom创建支付,更新主套餐和子套餐支付状态报错:", updateStatusErr)
|
||||
service.Error(c, updateStatusErr)
|
||||
return
|
||||
}
|
||||
service.Success(c, &service.Response{
|
||||
Msg: common.HadPay,
|
||||
Code: 0,
|
||||
})
|
||||
return
|
||||
}
|
||||
service.Success(c, &service.Response{
|
||||
Msg: common.HadPay,
|
||||
Code: 0,
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("detail.OrderRecord.CustomerID :", detail.OrderRecord.CustomerID)
|
||||
|
||||
// 判断 是否是 本人操作
|
||||
if strconv.FormatUint(userInfo.ID, 10) != detail.OrderRecord.CustomerID {
|
||||
service.Error(c, errors.New(common.NotMatchOrderInfo))
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("detail.OrderRecord.TotalAmount :", detail.OrderRecord.TotalAmount)
|
||||
fmt.Println("req.ProductAllPrice :", req.ProductAllPrice)
|
||||
fmt.Println("detail.OrderRecord.TotalAmount*100 :", detail.OrderRecord.TotalAmount*100)
|
||||
|
||||
//金额校验
|
||||
orderAmountInCents := int64(math.Round(float64(detail.OrderRecord.TotalAmount) * 100))
|
||||
reqAmountInCents := req.ProductAllPrice
|
||||
if orderAmountInCents != reqAmountInCents {
|
||||
fmt.Println("111111111111111111111111111111111111")
|
||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if orderLimit != nil && orderLimit.Type == 2 {
|
||||
|
||||
res, listErr := service.BundleProvider.OnlyAddValueListByOrderNo(context.Background(), &bundle.OnlyAddValueListByOrderNoRequest{
|
||||
OrderNo: req.OutTradeNo,
|
||||
})
|
||||
if listErr != nil {
|
||||
fmt.Println("=============== antom创建支付,查询单独增值服务列表报错:", listErr)
|
||||
logger.Errorf("=============== antom创建支付,查询单独增值服务列表报错:", listErr)
|
||||
service.Error(c, listErr)
|
||||
return
|
||||
}
|
||||
if res != nil && len(res.AddBundleInfos) > 0 {
|
||||
firstAddBundle := res.AddBundleInfos[0]
|
||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||
if firstAddBundle.PaymentStatus == bundleModel.OrderSigned && firstAddBundle.CheckOutSessionId != "" {
|
||||
// 查询支付结果
|
||||
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
||||
CheckoutSessionIds: []string{firstAddBundle.CheckOutSessionId},
|
||||
})
|
||||
|
||||
if stripeInfosErr != nil {
|
||||
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
|
||||
return
|
||||
}
|
||||
|
||||
if stripeInfosRes != nil && len(stripeInfosRes.Infos) > 0 {
|
||||
for _, info := range stripeInfosRes.Infos {
|
||||
if info.OutTradeNo == firstAddBundle.OrderNo && info.Status == "paid" {
|
||||
// 更新子套餐,TODO
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: req.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
Status: bundleModel.OrderPaid,
|
||||
})
|
||||
fmt.Println("req.OutTradeNo :", req.OutTradeNo)
|
||||
if updateStatusErr != nil {
|
||||
fmt.Println("=============== antom创建支付,更新子套餐支付状态报错:", updateStatusErr)
|
||||
logger.Errorf("=============== antom创建支付,更新子套餐支付状态报错:", updateStatusErr)
|
||||
service.Error(c, updateStatusErr)
|
||||
return
|
||||
}
|
||||
service.Success(c, &service.Response{
|
||||
Msg: common.HadPay,
|
||||
Code: 0,
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("firstAddBundle.CustomerID :", firstAddBundle.CustomerID)
|
||||
|
||||
// 判断 是否是 本人操作
|
||||
if strconv.FormatUint(userInfo.ID, 10) != firstAddBundle.CustomerID {
|
||||
service.Error(c, errors.New(common.NotMatchOrderInfo))
|
||||
return
|
||||
}
|
||||
|
||||
orderAmountInCents := int64(0.0)
|
||||
for _, info := range res.AddBundleInfos {
|
||||
temp := int64(math.Round(float64(info.Amount) * 100))
|
||||
orderAmountInCents += temp
|
||||
}
|
||||
|
||||
fmt.Println("orderAmountInCents :", orderAmountInCents)
|
||||
fmt.Println("req.ProductAllPrice :", req.ProductAllPrice)
|
||||
|
||||
//金额校验
|
||||
reqAmountInCents := req.ProductAllPrice
|
||||
if orderAmountInCents != reqAmountInCents {
|
||||
fmt.Println("111111111111111111111111111111111111")
|
||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if req.ProductAllPrice == 0 {
|
||||
////创建对账单 todo 待修改
|
||||
_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
||||
BundleOrderOn: req.OutTradeNo,
|
||||
BundleAddOrderOn: req.OutTradeNo,
|
||||
UserName: userInfo.Name,
|
||||
UserTel: userInfo.TelNum,
|
||||
BundleName: bundleName,
|
||||
PayAmount: float32(req.ProductAllPrice),
|
||||
CurrencyType: int32(currencyType),
|
||||
PayStatus: 2,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
UserID: userInfo.ID,
|
||||
SerialNumber: "zero-price-serial-number",
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
||||
logger.Errorf("=============== antom创建支付,创建对账单报错:", err)
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: req.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
Status: bundleModel.OrderPaid,
|
||||
})
|
||||
if updateStatusErr != nil {
|
||||
fmt.Println("=============== antom创建支付,更新订单报错:", updateStatusErr)
|
||||
logger.Errorf("=============== antom创建支付,更新订单报错:", updateStatusErr)
|
||||
service.Error(c, updateStatusErr)
|
||||
return
|
||||
}
|
||||
|
||||
switch orderLimit.Type {
|
||||
case common.OrderTypePackage:
|
||||
//如果是购买套餐 1:创建新的余量信息CreateBundleBalance 2 添加扩展记录BundleExtend
|
||||
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
||||
UserId: int32(orderLimit.UserId),
|
||||
OrderUUID: orderLimit.OrderUUID,
|
||||
//AccountNumber: orderLimit.AccountNumber,
|
||||
//VideoNumber: orderLimit.VideoNumber,
|
||||
//ImageNumber: orderLimit.ImageNumber,
|
||||
//DataAnalysisNumber: orderLimit.DataNumber,
|
||||
ExpansionPacksNumber: 1,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom创建支付,OrderTypePackage报错:", err)
|
||||
logger.Errorf("=============== antom创建支付,OrderTypePackage报错:", err)
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
case common.OrderTypeAddon:
|
||||
//如果是购买增值服务 1:修改余量信息AddBundleBalance 2 添加扩展记录BundleExtend
|
||||
//_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||
// UserId: int32(orderLimit.UserId),
|
||||
// OrderUUID: orderLimit.OrderUUID,
|
||||
// AccountNumber: orderLimit.AccountNumber,
|
||||
// VideoNumber: orderLimit.VideoNumber,
|
||||
// ImageNumber: orderLimit.ImageNumber,
|
||||
// DataAnalysisNumber: orderLimit.DataNumber,
|
||||
// ExpansionPacksNumber: 1,
|
||||
//})
|
||||
//if err != nil {
|
||||
// fmt.Println("=============== antom创建支付,OrderTypePackage报错:", err)
|
||||
// logger.Errorf("=============== antom创建支付,OrderTypePackage报错:", err)
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
//}
|
||||
default:
|
||||
fmt.Println("=============== antom创建支付,无效的订单类型:", err)
|
||||
logger.Errorf("=============== antom创建支付,无效的订单类型:", err)
|
||||
service.Error(c, errors.New("无效的订单类型"))
|
||||
return
|
||||
}
|
||||
|
||||
var timeUnit uint32
|
||||
switch orderLimit.Unit {
|
||||
case "天":
|
||||
timeUnit = common.TimeUnitDay
|
||||
case "月":
|
||||
timeUnit = common.TimeUnitMonth
|
||||
case "年":
|
||||
timeUnit = common.TimeUnitYear
|
||||
default:
|
||||
timeUnit = 0
|
||||
}
|
||||
_, err = service.BundleProvider.BundleExtend(context.Background(), &bundle.BundleExtendRequest{
|
||||
UserId: int64(orderLimit.UserId),
|
||||
AccountAdditional: uint32(orderLimit.AccountNumber),
|
||||
VideoAdditional: uint32(orderLimit.VideoNumber),
|
||||
ImagesAdditional: uint32(orderLimit.ImageNumber),
|
||||
DataAdditional: uint32(orderLimit.DataNumber),
|
||||
AvailableDurationAdditional: uint32(orderLimit.Duration),
|
||||
TimeUnit: timeUnit,
|
||||
AssociatedorderNumber: req.OutTradeNo, //增值服务订单号
|
||||
Type: 2, //自行购买
|
||||
OperatorName: orderLimit.UserName,
|
||||
OperatorId: orderLimit.UserId,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c)
|
||||
return
|
||||
}
|
||||
|
||||
var antomReq payment.CreatePayRequest
|
||||
@ -233,9 +452,9 @@ func CreateAntomPay(c *gin.Context) {
|
||||
fmt.Println("result.CheckoutSessionId :", result.CheckoutSessionId)
|
||||
fmt.Println("result.Url :", result.Url)
|
||||
|
||||
//更新订单状态
|
||||
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: detail.OrderRecord.Uuid,
|
||||
//更新订单url和checkSessionId
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: req.OutTradeNo,
|
||||
CheckoutSessionId: result.CheckoutSessionId,
|
||||
CheckoutSessionUrl: result.Url,
|
||||
})
|
||||
@ -243,25 +462,35 @@ func CreateAntomPay(c *gin.Context) {
|
||||
resp := &order.CreateStripeCheckoutSessionResponse{}
|
||||
resp.CheckoutSessionUrl = result.Url
|
||||
resp.CheckoutSessionId = result.CheckoutSessionId
|
||||
fmt.Println("resp:", resp)
|
||||
|
||||
if updateOrderRecordErr != nil {
|
||||
fmt.Println("有更新报错:", updateOrderRecordErr)
|
||||
service.Error(c, updateOrderRecordErr)
|
||||
fmt.Println("req.OutTradeNo :", req.OutTradeNo)
|
||||
if updateStatusErr != nil {
|
||||
fmt.Println("=============== antom创建支付,更新订单的请求id报错:", updateStatusErr)
|
||||
logger.Errorf("=============== antom创建支付,更新订单的请求id报错:", updateStatusErr)
|
||||
service.Error(c, updateStatusErr)
|
||||
return
|
||||
}
|
||||
fmt.Println("resp:", resp)
|
||||
|
||||
////创建对账单 todo 待修改
|
||||
//_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
||||
// BundleOrderOn: detail.OrderRecord.OrderNo,
|
||||
// BundleAddOrderOn: detail.OrderRecord.OrderNo,
|
||||
// UserName: userInfo.Name,
|
||||
// UserTel: userInfo.TelNum,
|
||||
// BundleName: detail.OrderRecord.BundleName,
|
||||
// Amount: detail.OrderRecord.TotalAmount,
|
||||
// CurrencyType: int32(detail.OrderRecord.AmountType),
|
||||
// PayStatus: 1,
|
||||
// UserId: userInfo.ID,
|
||||
//})
|
||||
_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
||||
BundleOrderOn: req.OutTradeNo,
|
||||
BundleAddOrderOn: req.OutTradeNo,
|
||||
UserName: userInfo.Name,
|
||||
UserTel: userInfo.TelNum,
|
||||
BundleName: bundleName,
|
||||
PayAmount: float32(req.ProductAllPrice) / 100, // 以后别用float存钱,无语
|
||||
CurrencyType: int32(currencyType),
|
||||
PayStatus: 1,
|
||||
UserID: userInfo.ID,
|
||||
SerialNumber: result.CheckoutSessionId,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
||||
logger.Errorf("=============== antom创建支付,创建对账单报错:", err)
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, resp)
|
||||
|
||||
}
|
||||
@ -374,6 +603,19 @@ func AntomWebhook(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// 更新对账单
|
||||
_, err = service.BundleProvider.UpdateReconciliationStatusBySerialNumber(context.Background(), &bundle.UpdateStatusAndPayTimeBySerialNumber{
|
||||
PayTime: paymentTime,
|
||||
PaymentStatus: 2,
|
||||
SerialNumber: requestId,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom回调,更新对账单报错:", err)
|
||||
logger.Errorf("=============== antom回调,更新对账单报错:", err)
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
//添加余额
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||
OrderNo: resp.OutTradeNo,
|
||||
@ -387,12 +629,12 @@ func AntomWebhook(c *gin.Context) {
|
||||
case common.OrderTypePackage:
|
||||
//如果是购买套餐 1:创建新的余量信息CreateBundleBalance 2 添加扩展记录BundleExtend
|
||||
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
||||
UserId: int32(orderLimit.UserId),
|
||||
OrderUUID: orderLimit.OrderUUID,
|
||||
AccountNumber: orderLimit.AccountNumber,
|
||||
VideoNumber: orderLimit.VideoNumber,
|
||||
ImageNumber: orderLimit.ImageNumber,
|
||||
DataAnalysisNumber: orderLimit.DataNumber,
|
||||
UserId: int32(orderLimit.UserId),
|
||||
OrderUUID: orderLimit.OrderUUID,
|
||||
//AccountNumber: orderLimit.AccountNumber,
|
||||
//VideoNumber: orderLimit.VideoNumber,
|
||||
//ImageNumber: orderLimit.ImageNumber,
|
||||
//DataAnalysisNumber: orderLimit.DataNumber,
|
||||
ExpansionPacksNumber: 1,
|
||||
})
|
||||
if err != nil {
|
||||
@ -401,19 +643,19 @@ func AntomWebhook(c *gin.Context) {
|
||||
}
|
||||
case common.OrderTypeAddon:
|
||||
//如果是购买增值服务 1:修改余量信息AddBundleBalance 2 添加扩展记录BundleExtend
|
||||
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||
UserId: int32(orderLimit.UserId),
|
||||
OrderUUID: orderLimit.OrderUUID,
|
||||
AccountNumber: orderLimit.AccountNumber,
|
||||
VideoNumber: orderLimit.VideoNumber,
|
||||
ImageNumber: orderLimit.ImageNumber,
|
||||
DataAnalysisNumber: orderLimit.DataNumber,
|
||||
ExpansionPacksNumber: 1,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||
// UserId: int32(orderLimit.UserId),
|
||||
// OrderUUID: orderLimit.OrderUUID,
|
||||
// AccountNumber: orderLimit.AccountNumber,
|
||||
// VideoNumber: orderLimit.VideoNumber,
|
||||
// ImageNumber: orderLimit.ImageNumber,
|
||||
// DataAnalysisNumber: orderLimit.DataNumber,
|
||||
// ExpansionPacksNumber: 1,
|
||||
//})
|
||||
//if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
//}
|
||||
default:
|
||||
service.Error(c, errors.New("无效的订单类型"))
|
||||
return
|
||||
@ -438,6 +680,9 @@ func AntomWebhook(c *gin.Context) {
|
||||
AvailableDurationAdditional: uint32(orderLimit.Duration),
|
||||
TimeUnit: timeUnit,
|
||||
AssociatedorderNumber: resp.OutTradeNo, //增值服务订单号
|
||||
Type: 2, //自行购买
|
||||
OperatorName: orderLimit.UserName,
|
||||
OperatorId: orderLimit.UserId,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -485,15 +730,21 @@ func HomePageRoll(c *gin.Context) {
|
||||
|
||||
var roll []Roll
|
||||
for _, i := range res.BundleInfo {
|
||||
maskedTel := userMap[i.CustomerId].TelNum
|
||||
if len(userMap[i.CustomerId].TelNum) >= 11 { // 标准11位手机号
|
||||
maskedTel = userMap[i.CustomerId].TelNum[:3] + "****" + userMap[i.CustomerId].TelNum[7:]
|
||||
} else if len(userMap[i.CustomerId].TelNum) >= 7 { // 短号处理
|
||||
maskedTel = userMap[i.CustomerId].TelNum[:3] + "****" + userMap[i.CustomerId].TelNum[7:]
|
||||
tel := ""
|
||||
name := i.BundleName // Use bundle name as fallback
|
||||
if userInfo, exists := userMap[i.CustomerId]; exists && userInfo != nil {
|
||||
tel = userInfo.TelNum
|
||||
if len(tel) >= 2 {
|
||||
masked := ""
|
||||
for j := 0; j < len(tel)-2; j++ {
|
||||
masked += "*"
|
||||
}
|
||||
tel = masked + tel[len(tel)-2:]
|
||||
}
|
||||
}
|
||||
roll = append(roll, Roll{
|
||||
Tel: maskedTel,
|
||||
Name: i.BundleName,
|
||||
Tel: tel,
|
||||
Name: name,
|
||||
})
|
||||
}
|
||||
service.Success(c, roll)
|
||||
|
||||
@ -67,3 +67,65 @@ func ValueAddBundleDetail(c *gin.Context) {
|
||||
|
||||
service.Success1(c, res.Msg, res)
|
||||
}
|
||||
|
||||
func SaveValueAddService(c *gin.Context) {
|
||||
var req bundle.ValueAddServiceLang
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error1(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.SaveValueAddService(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func ValueAddServiceList(c *gin.Context) {
|
||||
var req bundle.ValueAddServiceListRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error1(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.ValueAddServiceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func ValueAddServiceDetail(c *gin.Context) {
|
||||
var req bundle.ValueAddServiceDetailRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error1(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.ValueAddServiceDetail(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func ValueAddServiceLangDetail(c *gin.Context) {
|
||||
var req bundle.ValueAddServiceDetailRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error1(c, err)
|
||||
return
|
||||
}
|
||||
language := c.GetHeader("Accept-Language")
|
||||
req.Language = language
|
||||
res, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ func (c *CastService) ApprovalDetail(approvalIds []int) (data map[int]modelCast.
|
||||
}
|
||||
idsBytes, _ := json.Marshal(req)
|
||||
var respBody string
|
||||
url := fmt.Sprintf(config.AppConfig.System.ErpHost + "/approval/list/ex")
|
||||
url := fmt.Sprintf(config.AppConfig.System.FieeHost + "/approval/list/ex")
|
||||
respBody, err = utils.Post(url, string(idsBytes))
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
@ -324,24 +324,33 @@ func Remind(ctx *gin.Context) {
|
||||
if workInfo.ArtistPhoneAreaCode == "" {
|
||||
workInfo.ArtistPhoneAreaCode = "86"
|
||||
}
|
||||
artistID, _ := strconv.ParseUint(workInfo.ArtistUuid, 10, 64)
|
||||
infoResp, err := service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||
ID: artistID,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if workInfo.ArtistPhoneAreaCode == "86" {
|
||||
_, err = service.AccountFieeProvider.SendMsg(context.Background(), &accountFiee.SendMsgRequest{
|
||||
_, err = service.AccountFieeProvider.OnlySendMsg(context.Background(), &accountFiee.SendMsgRequest{
|
||||
Domain: "app",
|
||||
TelNum: workInfo.ArtistPhone,
|
||||
TelNum: infoResp.TelNum,
|
||||
Project: "fiee",
|
||||
SignNo: 0, // TODO 模板ID
|
||||
MId: 0,
|
||||
SignNo: 0,
|
||||
MId: 277385,
|
||||
Scope: "",
|
||||
Zone: workInfo.ArtistPhoneAreaCode,
|
||||
Zone: infoResp.TelAreaCode,
|
||||
NonceStr: "",
|
||||
})
|
||||
} else {
|
||||
_, err = service.AccountFieeProvider.SendNationMsg(context.Background(), &accountFiee.SendNationMsgRequest{
|
||||
_, err = service.AccountFieeProvider.SendNationTemplateMsg(context.Background(), &accountFiee.SendNationMsgRequest{
|
||||
Domain: "app",
|
||||
TelNum: workInfo.ArtistPhone,
|
||||
TelNum: fmt.Sprintf("%s%s", infoResp.TelAreaCode, infoResp.TelNum),
|
||||
Project: "fiee",
|
||||
SignNo: 0, // TODO 模板ID
|
||||
MId: 0,
|
||||
SignNo: 0,
|
||||
MId: 108375,
|
||||
Scope: "",
|
||||
})
|
||||
}
|
||||
|
||||
280
pkg/service/file/file.go
Normal file
280
pkg/service/file/file.go
Normal file
@ -0,0 +1,280 @@
|
||||
package file
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/files"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Raw(ctx *gin.Context) {
|
||||
r := ctx.Request
|
||||
w := ctx.Writer
|
||||
|
||||
w.Header().Add("Content-Security-Policy", `script-src 'none';`)
|
||||
w.Header().Set("Cache-Control", "private")
|
||||
rs, err := newGrpcReaderSeeker(getUserSpacePath(ctx), ctx.Param("path"))
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if r.URL.Query().Get("inline") == "true" {
|
||||
w.Header().Set("Content-Disposition", "inline")
|
||||
} else {
|
||||
// As per RFC6266 section 4.3
|
||||
w.Header().Set("Content-Disposition", "attachment; filename*=utf-8''"+rs.FileName)
|
||||
}
|
||||
http.ServeContent(ctx.Writer, r, rs.FileName, time.Now(), rs)
|
||||
}
|
||||
|
||||
func List(ctx *gin.Context) {
|
||||
path := ctx.DefaultQuery("path", "/")
|
||||
sortBy := ctx.DefaultQuery("sortBy", "name")
|
||||
sortAsc, _ := strconv.ParseBool(ctx.DefaultQuery("sortAsc", "true"))
|
||||
resp, err := service.FilesProvider.List(ctx, &files.FileListReq{
|
||||
Path: path,
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
Sorting: &files.Sorting{
|
||||
By: sortBy,
|
||||
Asc: sortAsc,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Usage(ctx *gin.Context) {
|
||||
path := ctx.DefaultQuery("path", "/")
|
||||
resp, err := service.FilesProvider.Usage(ctx, &files.UsageReq{
|
||||
Path: path,
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Info(ctx *gin.Context) {
|
||||
resp, err := service.FilesProvider.Info(ctx, &files.FileInfoReq{
|
||||
Path: ctx.DefaultQuery("path", "/"),
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Create(ctx *gin.Context) {
|
||||
var req files.CreateReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
req.UserSpacePath = getUserSpacePath(ctx)
|
||||
resp, err := service.FilesProvider.Create(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Delete(ctx *gin.Context) {
|
||||
resp, err := service.FilesProvider.Delete(ctx, &files.DeleteReq{
|
||||
Path: ctx.DefaultQuery("path", "/"),
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Search(ctx *gin.Context) {
|
||||
resp, err := service.FilesProvider.Search(ctx, &files.SearchReq{
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
Path: ctx.Query("path"),
|
||||
Query: ctx.Query("query"),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Upload(ctx *gin.Context) {
|
||||
path, ok := ctx.GetQuery("path")
|
||||
if !ok {
|
||||
service.Error(ctx, errors.New("缺失参数路径"))
|
||||
return
|
||||
}
|
||||
b, err := io.ReadAll(ctx.Request.Body)
|
||||
if !ok {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.FilesProvider.Upload(ctx, &files.UploadReq{
|
||||
Path: path,
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
Content: b,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func TusCreate(ctx *gin.Context) {
|
||||
var req files.TusCreateReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
req.UserSpacePath = getUserSpacePath(ctx)
|
||||
resp, err := service.FilesProvider.TusCreate(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func TusUpload(ctx *gin.Context) {
|
||||
path, ok := ctx.GetQuery("path")
|
||||
if !ok {
|
||||
service.Error(ctx, errors.New("文件路径缺失"))
|
||||
return
|
||||
}
|
||||
uploadOffset, err := getUploadOffset(ctx.Request)
|
||||
if err != nil {
|
||||
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
||||
return
|
||||
}
|
||||
mf, err := ctx.MultipartForm()
|
||||
if err != nil {
|
||||
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
||||
return
|
||||
}
|
||||
f, err := mf.File["file"][0].Open()
|
||||
if err != nil {
|
||||
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
||||
return
|
||||
}
|
||||
defer f.Close()
|
||||
b, err := io.ReadAll(f)
|
||||
// b, err := io.ReadAll(ctx.Request.Body)
|
||||
if !ok {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.FilesProvider.TusUpload(ctx, &files.TusUploadReq{
|
||||
Path: path,
|
||||
UploadOffset: uploadOffset,
|
||||
Content: b,
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
ctx.Writer.Header().Set("Upload-Offset", strconv.FormatInt(resp.UploadOffset, 10))
|
||||
service.Success(ctx, nil)
|
||||
}
|
||||
|
||||
func Preview(ctx *gin.Context) {
|
||||
var size int
|
||||
size, err := strconv.Atoi(ctx.Param("size"))
|
||||
if err != nil {
|
||||
size = 1
|
||||
}
|
||||
resp, err := service.FilesProvider.Preview(ctx, &files.PreviewReq{
|
||||
Path: ctx.Param("path"),
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
Size: uint32(size),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
ctx.Writer.Header().Set("Cache-Control", "private")
|
||||
http.ServeContent(ctx.Writer, ctx.Request, resp.FileName, time.UnixMilli(resp.ModTime), bytes.NewReader(resp.Content))
|
||||
}
|
||||
|
||||
func Action(ctx *gin.Context) {
|
||||
var req files.ActionReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
req.UserSpacePath = getUserSpacePath(ctx)
|
||||
resp, err := service.FilesProvider.Action(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func DirDownload(ctx *gin.Context) {
|
||||
path := ctx.Query("path")
|
||||
fileList := strings.Split(ctx.Query("files"), ",")
|
||||
algo := ctx.Query("algo")
|
||||
stream, err := service.FilesProvider.DirDownload(ctx, &files.DirDownloadReq{
|
||||
Algo: algo,
|
||||
Files: fileList,
|
||||
Path: path,
|
||||
UserSpacePath: getUserSpacePath(ctx),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
header, err := stream.Header()
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Writer.Header().Set("Content-Disposition", "attachment; filename*=utf-8''"+url.PathEscape(header.Get("filename")[0]))
|
||||
for {
|
||||
recvMsg, err := stream.Recv()
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
ctx.Writer.Write(recvMsg.Content)
|
||||
}
|
||||
}
|
||||
|
||||
func getUploadOffset(r *http.Request) (int64, error) {
|
||||
uploadOffset, err := strconv.ParseInt(r.Header.Get("Upload-Offset"), 10, 64)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("invalid upload offset: %w", err)
|
||||
}
|
||||
return uploadOffset, nil
|
||||
}
|
||||
|
||||
func getUserSpacePath(ctx *gin.Context) string {
|
||||
// user := login.GetUserInfoFromC(ctx)
|
||||
// return strconv.Itoa(int(user.ID))
|
||||
|
||||
return ""
|
||||
}
|
||||
91
pkg/service/file/grpc_reader_seeker.go
Normal file
91
pkg/service/file/grpc_reader_seeker.go
Normal file
@ -0,0 +1,91 @@
|
||||
package file
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fonchain-fiee/api/files"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"io"
|
||||
)
|
||||
|
||||
type grpcReaderSeeker struct {
|
||||
io.Reader
|
||||
io.Seeker
|
||||
path string
|
||||
userSpacePath string
|
||||
cursor int64
|
||||
length int64
|
||||
FileName string
|
||||
}
|
||||
|
||||
func (g *grpcReaderSeeker) Seek(offset int64, whence int) (int64, error) {
|
||||
var abs int64
|
||||
switch whence {
|
||||
case io.SeekStart:
|
||||
abs = offset
|
||||
case io.SeekCurrent:
|
||||
abs = g.cursor + offset
|
||||
case io.SeekEnd:
|
||||
abs = g.length + offset
|
||||
default:
|
||||
return 0, errors.New("grpc.Reader.Seek: invalid whence")
|
||||
}
|
||||
if abs < 0 {
|
||||
return 0, errors.New("grpc.Reader.Seek: negative position")
|
||||
}
|
||||
g.cursor = abs
|
||||
return abs, nil
|
||||
}
|
||||
|
||||
func (g *grpcReaderSeeker) Read(b []byte) (n int, err error) {
|
||||
if g.cursor >= g.length {
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
data, err := g.getBytesData(len(b))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
n = copy(b, data)
|
||||
g.cursor += int64(n)
|
||||
return
|
||||
}
|
||||
|
||||
// 通过grpc获取到bytes数据
|
||||
func (g *grpcReaderSeeker) getBytesData(len int) ([]byte, error) {
|
||||
resp, err := service.FilesProvider.ResumableTransfer(context.TODO(), &files.ResumableTransferReq{
|
||||
UserSpacePath: g.userSpacePath,
|
||||
Path: g.path,
|
||||
Offset: g.cursor,
|
||||
Length: int64(len),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp.Content, nil
|
||||
}
|
||||
|
||||
// grpc 获取到文件信息
|
||||
func (g *grpcReaderSeeker) initInfo() error {
|
||||
resp, err := service.FilesProvider.Info(context.TODO(), &files.FileInfoReq{
|
||||
UserSpacePath: g.userSpacePath,
|
||||
Path: g.path,
|
||||
})
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
g.FileName = resp.Name
|
||||
g.length = resp.Size
|
||||
return err
|
||||
}
|
||||
|
||||
func newGrpcReaderSeeker(userSpacePath string, path string) (*grpcReaderSeeker, error) {
|
||||
g := new(grpcReaderSeeker)
|
||||
g.userSpacePath = userSpacePath
|
||||
g.path = path
|
||||
err := g.initInfo()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return g, nil
|
||||
}
|
||||
84
pkg/service/governance/governance.go
Normal file
84
pkg/service/governance/governance.go
Normal file
@ -0,0 +1,84 @@
|
||||
package governance
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"fonchain-fiee/api/governance"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
)
|
||||
|
||||
func Create(ctx *gin.Context) {
|
||||
var req governance.CreateReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
// user := login.Info{
|
||||
// Name: "test" + strconv.Itoa(rand.Intn(10)),
|
||||
// ID: uint64(rand.Intn(10)),
|
||||
// }
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.GovernanceProvider.Create(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Delete(ctx *gin.Context) {
|
||||
var req governance.DeleteReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.GovernanceProvider.Delete(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Display(ctx *gin.Context) {
|
||||
resp, err := service.GovernanceProvider.Display(ctx, &governance.DisplayReq{})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func List(ctx *gin.Context) {
|
||||
var req governance.ListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.GovernanceProvider.List(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Edit(ctx *gin.Context) {
|
||||
var req governance.EditReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.GovernanceProvider.Edit(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
@ -1,18 +1,23 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
"dubbo.apache.org/dubbo-go/v3/config"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/api/files"
|
||||
"fonchain-fiee/api/governance"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
"fonchain-fiee/api/pressreleases"
|
||||
"fonchain-fiee/api/secFilings"
|
||||
pkConfig "fonchain-fiee/pkg/config"
|
||||
"os"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
"dubbo.apache.org/dubbo-go/v3/config"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
||||
)
|
||||
|
||||
var AccountProvider = new(account.AccountClientImpl)
|
||||
@ -20,8 +25,12 @@ var AccountFieeProvider = new(accountFiee.AccountFieeClientImpl)
|
||||
|
||||
var BundleProvider = new(bundle.BundleClientImpl)
|
||||
var OrderProvider = new(order.OrderClientImpl)
|
||||
var FilesProvider = new(files.FileClientImpl)
|
||||
var PaymentProvider = new(payment.PaymentCentClientImpl)
|
||||
var CastProvider = new(cast.CastClientImpl)
|
||||
var GovernanceProvider = new(governance.GovernanceClientImpl)
|
||||
var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl)
|
||||
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
||||
|
||||
func init() {
|
||||
config.SetConsumerService(BundleProvider)
|
||||
@ -30,6 +39,10 @@ func init() {
|
||||
config.SetConsumerService(PaymentProvider)
|
||||
config.SetConsumerService(AccountFieeProvider)
|
||||
config.SetConsumerService(CastProvider)
|
||||
config.SetConsumerService(FilesProvider)
|
||||
config.SetConsumerService(GovernanceProvider)
|
||||
config.SetConsumerService(PressReleasesProvider)
|
||||
config.SetConsumerService(SecFilingProvider)
|
||||
|
||||
if err := config.Load(); err != nil {
|
||||
panic(err)
|
||||
|
||||
103
pkg/service/pressreleases/pressreleases.go
Normal file
103
pkg/service/pressreleases/pressreleases.go
Normal file
@ -0,0 +1,103 @@
|
||||
package pressreleases
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"fonchain-fiee/api/pressreleases"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
)
|
||||
|
||||
func Create(ctx *gin.Context) {
|
||||
var req pressreleases.CreateReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.PressReleasesProvider.Create(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Delete(ctx *gin.Context) {
|
||||
var req pressreleases.DeleteReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Delete(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Display(ctx *gin.Context) {
|
||||
var req pressreleases.DisplayReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Display(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func List(ctx *gin.Context) {
|
||||
var req pressreleases.ListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.List(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Edit(ctx *gin.Context) {
|
||||
var req pressreleases.EditReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.PressReleasesProvider.Edit(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Get(ctx *gin.Context) {
|
||||
id, err := strconv.Atoi(ctx.Query("id"))
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Get(ctx, &pressreleases.GetReq{
|
||||
Id: int64(id),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
235
pkg/service/secfilings/secfilings.go
Normal file
235
pkg/service/secfilings/secfilings.go
Normal file
@ -0,0 +1,235 @@
|
||||
package secfilings
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/secFilings"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
func CreateSecFiling(c *gin.Context) {
|
||||
var req secFilings.CreateSecFilingReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.Operator = userInfo.Name
|
||||
req.OperatorId = int32(userInfo.ID)
|
||||
res, err := service.SecFilingProvider.CreateSecFiling(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func UpdateSecFiling(c *gin.Context) {
|
||||
var req secFilings.UpdateSecFilingReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.Operator = userInfo.Name
|
||||
req.OperatorId = int32(userInfo.ID)
|
||||
res, err := service.SecFilingProvider.UpdateSecFiling(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func UpdateSecFilingStatus(c *gin.Context) {
|
||||
var req secFilings.UpdateSecFilingStatusReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.Operator = userInfo.Name
|
||||
req.OperatorId = int32(userInfo.ID)
|
||||
res, err := service.SecFilingProvider.UpdateSecFilingStatus(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func ListSecFiling(c *gin.Context) {
|
||||
var req secFilings.ListSecFilingReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.SecFilingProvider.ListSecFiling(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func DetailSecFiling(c *gin.Context) {
|
||||
var req secFilings.DetailSecFilingReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.SecFilingProvider.DetailSecFiling(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func DeleteSecFiling(c *gin.Context) {
|
||||
var req secFilings.DeleteSecFilingReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.Operator = userInfo.Name
|
||||
req.OperatorId = int32(userInfo.ID)
|
||||
res, err := service.SecFilingProvider.DeleteSecFiling(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
type GetSecFilingsReq struct {
|
||||
FilingDate string `json:"filingDate"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
type GetSecFilingsData struct {
|
||||
Symbol string `json:"symbol"`
|
||||
Cik string `json:"cik"`
|
||||
FilingDate string `json:"filingDate"`
|
||||
AcceptedDate string `json:"acceptedDate"`
|
||||
FormType string `json:"formType"`
|
||||
Link string `json:"link"`
|
||||
FinalLink string `json:"finalLink"`
|
||||
IsSelect bool `json:"isSelect"`
|
||||
}
|
||||
type GetSecFilingsResp struct {
|
||||
Total int `json:"total"`
|
||||
Data []*GetSecFilingsResult `json:"data"`
|
||||
}
|
||||
type GetSecFilingsResult struct {
|
||||
//Symbol string `json:"symbol"`
|
||||
//Cik string `json:"cik"`
|
||||
FilingDate string `json:"filingDate"`
|
||||
Form string `json:"form"`
|
||||
//Description string `json:"description"`
|
||||
//FormDescription string `json:"formDescription"`
|
||||
FileLink string `json:"fileLink"`
|
||||
IsSelect bool `json:"isSelect"`
|
||||
}
|
||||
|
||||
func GetSecFilings(c *gin.Context) {
|
||||
var req GetSecFilingsReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if req.FilingDate == "" {
|
||||
service.Error(c, errors.New("filing_date is empty"))
|
||||
return
|
||||
}
|
||||
fmt.Println(req.FilingDate)
|
||||
symbol := "MINM"
|
||||
beginDate := req.FilingDate
|
||||
endDate := req.FilingDate
|
||||
page := 0
|
||||
pageSize := 100
|
||||
if req.Page != 0 && req.PageSize != 0 {
|
||||
page = req.Page - 1
|
||||
pageSize = req.PageSize
|
||||
}
|
||||
|
||||
baseURL := "https://financialmodelingprep.com/stable/sec-filings-search/symbol"
|
||||
params := url.Values{}
|
||||
params.Add("symbol", symbol)
|
||||
params.Add("from", beginDate)
|
||||
params.Add("to", endDate)
|
||||
params.Add("page", strconv.Itoa(page))
|
||||
params.Add("limit", strconv.Itoa(pageSize))
|
||||
params.Add("apikey", "lBQWUwdjRmfHVZ7e3I1trWe4jw0ZtDct")
|
||||
|
||||
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
|
||||
resp, err := http.Get(fullURL)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
service.Error(c, fmt.Errorf("http status code is not 200"))
|
||||
return
|
||||
}
|
||||
var result []GetSecFilingsData
|
||||
err = json.NewDecoder(resp.Body).Decode(&result)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var data = GetSecFilingsResp{
|
||||
Total: 0,
|
||||
Data: make([]*GetSecFilingsResult, 0),
|
||||
}
|
||||
for _, v := range result {
|
||||
res, err := service.SecFilingProvider.IsSecFilingExist(c, &secFilings.IsSecFilingExistReq{
|
||||
FilingDate: req.FilingDate,
|
||||
Form: v.FormType,
|
||||
FinalLink: v.FinalLink,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
data.Data = append(data.Data, &GetSecFilingsResult{
|
||||
FilingDate: req.FilingDate,
|
||||
Form: v.FormType,
|
||||
FileLink: v.FinalLink,
|
||||
IsSelect: res.Exist,
|
||||
})
|
||||
data.Total++
|
||||
}
|
||||
service.Success(c, data)
|
||||
}
|
||||
func GetFormList(c *gin.Context) {
|
||||
var req secFilings.ListFormTypeReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.SecFilingProvider.ListFormType(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func WebListSecFiling(c *gin.Context) {
|
||||
var req secFilings.WebListSecFilingReq
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.SecFilingProvider.WebListSecFiling(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
@ -329,3 +329,19 @@ func GetSnapshot(videoPath, snapshotPath string, frameNum int) (snapshotName str
|
||||
snapshotName = names[len(names)-1] + "." + PngType
|
||||
return
|
||||
}
|
||||
|
||||
func UploadWithBuffer(fileBuffer *bytes.Buffer, cloudStoreSubPath string) (url string, err error) {
|
||||
Client, err := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
|
||||
if err != nil {
|
||||
err = errors.New(fmt.Sprintf("云存储初始化失败:%s", err.Error()))
|
||||
return
|
||||
}
|
||||
cloudStoreSubPath = getEnvDir(cloudStoreSubPath)
|
||||
_, err = Client.PutObjectFromBytes(config.ConfigData.Oss.BucketName, cloudStoreSubPath, fileBuffer.Bytes())
|
||||
url = config.ConfigData.Oss.CdnHost + "/" + cloudStoreSubPath
|
||||
return
|
||||
}
|
||||
func getEnvDir(cloudStoreSubPath string) (ep string) {
|
||||
ep, _ = url.JoinPath("fiee", cloudStoreSubPath)
|
||||
return ep
|
||||
}
|
||||
|
||||
47
pkg/utils/if.go
Normal file
47
pkg/utils/if.go
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* @FileName: if.go
|
||||
* @Author: JJXu
|
||||
* @CreateTime: 2022/3/31 下午10:34
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
package utils
|
||||
|
||||
import "strings"
|
||||
|
||||
func If(condition bool, trueVal, falseVal interface{}) interface{} {
|
||||
if condition {
|
||||
return trueVal
|
||||
}
|
||||
return falseVal
|
||||
}
|
||||
func IfGec[T ~string | ~int | ~int32 | ~int64 | ~bool | ~float32 | ~float64](condition bool, trueVal, falseVal T) T {
|
||||
if condition {
|
||||
return trueVal
|
||||
}
|
||||
return falseVal
|
||||
}
|
||||
|
||||
// IsValueInList 值是否在列表中
|
||||
// value:查询的值
|
||||
// list: 列表
|
||||
// disableStrictCase: 禁用严格大小写检查。默认是严格大小写
|
||||
func IsValueInList(value string, list []string, disableStrictCase ...bool) bool {
|
||||
var disStrictCase bool
|
||||
if disableStrictCase != nil {
|
||||
disStrictCase = disableStrictCase[0]
|
||||
}
|
||||
for _, v := range list {
|
||||
var listValue string
|
||||
if disStrictCase {
|
||||
listValue = strings.ToLower(v)
|
||||
value = strings.ToLower(v)
|
||||
} else {
|
||||
listValue = v
|
||||
}
|
||||
if listValue == value {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
51
pkg/utils/requestDataToProto.go
Normal file
51
pkg/utils/requestDataToProto.go
Normal file
@ -0,0 +1,51 @@
|
||||
// Package utils -----------------------------
|
||||
// @file : requestDataToProto.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/8/28 17:57
|
||||
// -------------------------------------------
|
||||
package utils
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// http请求转proto请求
|
||||
func RequestDataConvert(from interface{}, to interface{}) {
|
||||
var proxyField = "Query"
|
||||
fromValue := reflect.ValueOf(from)
|
||||
toValue := reflect.ValueOf(to)
|
||||
toType := reflect.TypeOf(to)
|
||||
|
||||
// 获取From结构体的字段信息
|
||||
fromType := fromValue.Type().Elem()
|
||||
for i := 0; i < fromType.NumField(); i++ {
|
||||
// 获取字段名和字段值
|
||||
fieldName := fromType.Field(i).Name
|
||||
fieldValue := fromValue.Elem().FieldByName(fieldName)
|
||||
if fieldName != proxyField {
|
||||
_, exists := toType.Elem().FieldByName(fieldName)
|
||||
if exists {
|
||||
// 设置To结构体中相应字段的值
|
||||
toValue.Elem().FieldByName(fieldName).Set(fieldValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
queryField, exists := toType.Elem().FieldByName(proxyField)
|
||||
if exists {
|
||||
var queryFieldTypeName string
|
||||
// 指针类型额外处理,拿到真实的数据类型
|
||||
if queryField.Type.Kind() == reflect.Ptr {
|
||||
queryFieldTypeName = queryField.Type.Elem().String()
|
||||
} else {
|
||||
queryFieldTypeName = queryField.Type.Kind().String()
|
||||
}
|
||||
//处理拿到的结构体类型如 utils.xxxx的类型,去掉utils.这部分
|
||||
if strings.Contains(queryFieldTypeName, ".") {
|
||||
queryFieldTypeName = strings.Split(queryFieldTypeName, ".")[1]
|
||||
}
|
||||
fromQueryValue := fromValue.Elem().FieldByName(queryFieldTypeName)
|
||||
toValue.Elem().FieldByName(proxyField).Set(fromQueryValue.Addr())
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user