From 0fb6b2733f66b1f1149de266335fa11ab7a24c36 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Tue, 31 Oct 2023 12:54:44 +0900 Subject: [PATCH 01/33] Change protobuf configuration --- api/yorkie/v1/admin.pb.go | 129 +++---- api/yorkie/v1/admin.proto | 2 +- api/yorkie/v1/resources.pb.go | 341 +++++++++--------- api/yorkie/v1/resources.proto | 2 +- api/yorkie/v1/v1connect/admin.connect.go | 414 ++++++++++++++++++++++ api/yorkie/v1/v1connect/yorkie.connect.go | 308 ++++++++++++++++ api/yorkie/v1/yorkie.pb.go | 93 ++--- api/yorkie/v1/yorkie.proto | 2 +- buf.gen.yaml | 8 + go.mod | 1 + go.sum | 2 + 11 files changed, 1019 insertions(+), 283 deletions(-) create mode 100644 api/yorkie/v1/v1connect/admin.connect.go create mode 100644 api/yorkie/v1/v1connect/yorkie.connect.go create mode 100644 buf.gen.yaml diff --git a/api/yorkie/v1/admin.pb.go b/api/yorkie/v1/admin.pb.go index d0f482dd4..728dd021a 100644 --- a/api/yorkie/v1/admin.pb.go +++ b/api/yorkie/v1/admin.pb.go @@ -1328,70 +1328,71 @@ func init() { func init() { proto.RegisterFile("yorkie/v1/admin.proto", fileDescriptor_7ef4cd0843a14163) } var fileDescriptor_7ef4cd0843a14163 = []byte{ - // 999 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0xae, 0xd3, 0xa4, 0x4d, 0x4e, 0xd2, 0x2d, 0x9d, 0x4d, 0xb6, 0x59, 0xd3, 0xe6, 0x67, 0xd0, - 0x6a, 0x0b, 0x8b, 0xb2, 0xb4, 0x08, 0x04, 0x02, 0x09, 0x91, 0x42, 0xab, 0xd5, 0xfe, 0x68, 0xd7, - 0xa1, 0x37, 0xbd, 0x89, 0xbc, 0xf1, 0x69, 0x6a, 0x9a, 0xd8, 0xce, 0x8c, 0x93, 0x55, 0x7a, 0xc7, - 0x5b, 0xf0, 0x32, 0x5c, 0x70, 0xc7, 0x25, 0x8f, 0x80, 0xca, 0x33, 0x70, 0x8f, 0x6c, 0xcf, 0xb8, - 0x63, 0xe7, 0x07, 0xda, 0xed, 0x5d, 0xe6, 0x9c, 0xef, 0x7c, 0xe7, 0x6f, 0xe6, 0x9c, 0x18, 0x2a, - 0x53, 0x97, 0x5d, 0xd8, 0xf8, 0x74, 0xb2, 0xff, 0xd4, 0xb4, 0x86, 0xb6, 0xd3, 0xf2, 0x98, 0xeb, - 0xbb, 0xa4, 0x10, 0x89, 0x5b, 0x93, 0x7d, 0xfd, 0xe1, 0x35, 0x82, 0x21, 0x77, 0xc7, 0xac, 0x87, - 0x3c, 0x42, 0xd1, 0x63, 0xd8, 0xe8, 0xd8, 0x7d, 0xe7, 0xc4, 0x33, 0x70, 0x34, 0x46, 0xee, 0x13, - 0x1d, 0xf2, 0x63, 0x8e, 0xcc, 0x31, 0x87, 0x58, 0xd5, 0x1a, 0xda, 0x5e, 0xc1, 0x88, 0xcf, 0x81, - 0xce, 0x33, 0x39, 0x7f, 0xe7, 0x32, 0xab, 0x9a, 0x89, 0x74, 0xf2, 0x4c, 0xbf, 0x80, 0x7b, 0x92, - 0x88, 0x7b, 0xae, 0xc3, 0x91, 0x7c, 0x04, 0xd9, 0xc0, 0x32, 0x64, 0x29, 0x1e, 0x6c, 0xb6, 0xe2, - 0x78, 0x5a, 0x27, 0x1c, 0x99, 0x11, 0x2a, 0xe9, 0x11, 0x94, 0x5e, 0xb8, 0xfd, 0x67, 0xce, 0xfb, - 0xba, 0x7f, 0x04, 0x1b, 0x82, 0x47, 0x78, 0x2f, 0x43, 0xce, 0x77, 0x2f, 0xd0, 0x11, 0x2c, 0xd1, - 0x81, 0x7e, 0x02, 0xe5, 0x43, 0x86, 0xa6, 0x8f, 0xaf, 0x99, 0xfb, 0x33, 0xf6, 0x7c, 0xe9, 0x96, - 0x40, 0x56, 0x71, 0x19, 0xfe, 0xa6, 0x3f, 0x42, 0x25, 0x85, 0x15, 0xd4, 0x9f, 0xc2, 0xba, 0x17, - 0x89, 0x44, 0x6e, 0x44, 0xc9, 0x4d, 0x82, 0x25, 0x84, 0x3e, 0x86, 0xad, 0x63, 0xf4, 0xff, 0x87, - 0xbf, 0x36, 0x10, 0x15, 0x78, 0x2b, 0x67, 0x15, 0xb8, 0xff, 0xc2, 0xe6, 0x92, 0x84, 0x0b, 0x77, - 0xf4, 0x08, 0xca, 0x49, 0xb1, 0x20, 0x6f, 0x41, 0x5e, 0x58, 0xf2, 0xaa, 0xd6, 0x58, 0x5d, 0xc0, - 0x1e, 0x63, 0xa8, 0x09, 0xe5, 0x13, 0xcf, 0x9a, 0x2d, 0xdf, 0x3d, 0xc8, 0xd8, 0x96, 0x48, 0x26, - 0x63, 0x5b, 0xe4, 0x6b, 0x58, 0x3b, 0xb3, 0x71, 0x60, 0xf1, 0xb0, 0x4f, 0xc5, 0x83, 0xa6, 0xda, - 0xfc, 0x80, 0xc0, 0x7c, 0x3b, 0x90, 0x1c, 0x47, 0x21, 0xd0, 0x10, 0x06, 0x41, 0xd5, 0x53, 0x2e, - 0x6e, 0x55, 0x88, 0xdf, 0xb5, 0x28, 0xe5, 0x1f, 0xdc, 0xde, 0x78, 0x88, 0x4e, 0x5c, 0x0a, 0xd2, - 0x84, 0x92, 0xc0, 0x74, 0x95, 0x0e, 0x14, 0x85, 0xec, 0x55, 0x70, 0xcf, 0xea, 0x50, 0xf4, 0x18, - 0x4e, 0x6c, 0x77, 0xcc, 0xbb, 0xb6, 0xbc, 0x6a, 0x20, 0x45, 0xcf, 0x2c, 0xf2, 0x21, 0x14, 0x3c, - 0xb3, 0x8f, 0x5d, 0x6e, 0x5f, 0x62, 0x75, 0xb5, 0xa1, 0xed, 0xe5, 0x82, 0x9b, 0xd8, 0xc7, 0x8e, - 0x7d, 0x89, 0x64, 0x17, 0xc0, 0xe6, 0xdd, 0x33, 0x97, 0xbd, 0x33, 0x99, 0x55, 0xcd, 0x36, 0xb4, - 0xbd, 0xbc, 0x51, 0xb0, 0xf9, 0x51, 0x24, 0x20, 0x1f, 0xc3, 0x07, 0xb6, 0xd3, 0x1b, 0x8c, 0x2d, - 0xec, 0x72, 0xc7, 0xf4, 0xf8, 0xb9, 0xeb, 0x57, 0x73, 0x21, 0x68, 0x53, 0xc8, 0x3b, 0x42, 0x4c, - 0xdf, 0x40, 0x25, 0x95, 0x82, 0x28, 0xc5, 0x57, 0x50, 0xb0, 0xa4, 0x50, 0xf4, 0x4d, 0x57, 0x8a, - 0x21, 0x0d, 0x3a, 0xe3, 0xe1, 0xd0, 0x64, 0x53, 0xe3, 0x1a, 0x4c, 0x4f, 0xc3, 0x3b, 0x26, 0x01, - 0x37, 0xa8, 0x49, 0x13, 0x4a, 0x92, 0xa5, 0x7b, 0x81, 0x53, 0x51, 0x94, 0xa2, 0x94, 0x3d, 0xc7, - 0x29, 0x7d, 0x09, 0xf7, 0x13, 0xdc, 0x22, 0xd8, 0x2f, 0x21, 0x2f, 0x51, 0xa2, 0x71, 0xcb, 0x62, - 0x8d, 0xb1, 0xf4, 0x12, 0x76, 0x0c, 0x1c, 0xba, 0x13, 0x94, 0x90, 0xf6, 0xf4, 0xfb, 0x60, 0xbc, - 0xdd, 0x69, 0xd0, 0xc1, 0x98, 0x38, 0x73, 0x59, 0x2f, 0x6a, 0x63, 0xde, 0x88, 0x0e, 0xb4, 0x0e, - 0xbb, 0x0b, 0x7c, 0x47, 0x49, 0xd1, 0x5f, 0x34, 0x78, 0x70, 0x8c, 0xbe, 0x6c, 0xd5, 0x4b, 0xf4, - 0xcd, 0xbb, 0x8d, 0xab, 0x09, 0xc0, 0x91, 0x4d, 0x90, 0x75, 0x39, 0x8e, 0xc2, 0xe0, 0x56, 0xdb, - 0x99, 0xcf, 0x34, 0xa3, 0x10, 0x49, 0x3b, 0x38, 0xa2, 0x1d, 0xd8, 0x9e, 0x09, 0x41, 0xd4, 0x5c, - 0x87, 0x7c, 0x7c, 0xb9, 0x02, 0xff, 0x25, 0x23, 0x3e, 0x93, 0x1d, 0x58, 0x1f, 0x98, 0x43, 0xcf, - 0x65, 0x7e, 0xe8, 0x37, 0xa2, 0x95, 0x22, 0xea, 0xc0, 0x83, 0x0e, 0x9a, 0xac, 0x77, 0x7e, 0x9b, - 0x87, 0x53, 0x86, 0xdc, 0x68, 0x8c, 0x4c, 0x26, 0x14, 0x1d, 0x96, 0xbe, 0x16, 0xea, 0xc3, 0xf6, - 0x8c, 0x3f, 0x91, 0x44, 0x1d, 0x8a, 0xbe, 0xeb, 0x9b, 0x83, 0x6e, 0xcf, 0x1d, 0x8b, 0xbb, 0x93, - 0x33, 0x20, 0x14, 0x1d, 0x06, 0x92, 0xe4, 0x33, 0xc8, 0xdc, 0xe4, 0x19, 0xfc, 0xa6, 0x01, 0x09, - 0x9e, 0xd6, 0xe1, 0xb9, 0xe9, 0xf4, 0x91, 0xdf, 0x6d, 0xeb, 0x1e, 0x05, 0x2c, 0x62, 0x7c, 0x24, - 0x9b, 0x17, 0x8f, 0x95, 0x0e, 0x8e, 0x92, 0x65, 0xc9, 0x2e, 0x1d, 0x22, 0xb9, 0xd4, 0x10, 0xa1, - 0xed, 0x68, 0xcc, 0xc7, 0xe1, 0x8b, 0x8a, 0x3d, 0x81, 0xf5, 0x5e, 0x24, 0x12, 0x53, 0x61, 0x4b, - 0x29, 0x47, 0x04, 0x36, 0x24, 0xe2, 0xe0, 0x9f, 0x75, 0x28, 0x85, 0x97, 0xba, 0x83, 0x6c, 0x62, - 0xf7, 0x90, 0x7c, 0x07, 0x6b, 0xd1, 0x06, 0x27, 0x55, 0xc5, 0x2c, 0xf1, 0xef, 0x40, 0x7f, 0x38, - 0x47, 0x23, 0x9e, 0xc4, 0x0a, 0xf9, 0x16, 0x72, 0xe1, 0x0e, 0x26, 0xdb, 0x0a, 0x4a, 0xdd, 0xee, - 0x7a, 0x75, 0x56, 0x11, 0x5b, 0xff, 0x04, 0x1b, 0x89, 0x75, 0x4b, 0xea, 0x6a, 0xf0, 0x73, 0x96, - 0xb6, 0xde, 0x58, 0x0c, 0x88, 0x59, 0xdf, 0x40, 0x49, 0xdd, 0x7c, 0xa4, 0xa6, 0x46, 0x30, 0xbb, - 0x29, 0xf5, 0xfa, 0x42, 0x7d, 0x4c, 0xf9, 0x1c, 0xe0, 0x7a, 0x4f, 0x93, 0x1d, 0xc5, 0x60, 0x66, - 0xcf, 0xeb, 0xbb, 0x0b, 0xb4, 0x6a, 0xd6, 0x89, 0x75, 0x97, 0xc8, 0x7a, 0xde, 0xae, 0x4d, 0x64, - 0x3d, 0x77, 0x53, 0x46, 0xac, 0x89, 0xcd, 0x41, 0xd2, 0x69, 0xa5, 0x5f, 0x77, 0x82, 0x75, 0xee, - 0xd2, 0xa1, 0x2b, 0xe4, 0x15, 0x14, 0x95, 0x01, 0x4f, 0x52, 0xb9, 0xa5, 0x96, 0x8a, 0x5e, 0x5b, - 0xa4, 0x8e, 0xf9, 0x06, 0x50, 0x99, 0x3b, 0x65, 0xc9, 0x63, 0xc5, 0x74, 0xd9, 0x0e, 0xd0, 0xf7, - 0xfe, 0x1b, 0x18, 0x7b, 0x3b, 0x85, 0xcd, 0xd4, 0xb8, 0x24, 0xcd, 0x64, 0x88, 0x73, 0xa6, 0xb9, - 0x4e, 0x97, 0x41, 0x54, 0xee, 0xd4, 0x14, 0x4b, 0x70, 0xcf, 0x9f, 0xa8, 0x09, 0xee, 0x05, 0x43, - 0x30, 0xaa, 0xba, 0xf2, 0xd6, 0x13, 0x55, 0x9f, 0x1d, 0x61, 0x7a, 0x6d, 0x91, 0x5a, 0xf2, 0xb5, - 0x9f, 0xfc, 0x71, 0x55, 0xd3, 0xfe, 0xbc, 0xaa, 0x69, 0x7f, 0x5d, 0xd5, 0xb4, 0x5f, 0xff, 0xae, - 0xad, 0xc0, 0x96, 0x85, 0x13, 0x69, 0x66, 0x7a, 0x76, 0x6b, 0xb2, 0xff, 0x5a, 0x3b, 0xcd, 0xb6, - 0xbe, 0x99, 0xec, 0xbf, 0x5d, 0x0b, 0xbf, 0x12, 0x3e, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0xe5, - 0x95, 0x51, 0xe5, 0x64, 0x0c, 0x00, 0x00, + // 1022 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x52, 0xe3, 0xc6, + 0x13, 0x47, 0x80, 0xc1, 0x6e, 0x9b, 0xe5, 0xcf, 0x2c, 0x2c, 0x5e, 0xfd, 0xc1, 0xd8, 0x93, 0xda, + 0x5a, 0xf2, 0x65, 0x07, 0x52, 0x49, 0x25, 0x95, 0x54, 0xa5, 0x62, 0x12, 0xa8, 0xad, 0xfd, 0xa8, + 0x5d, 0x39, 0x5c, 0xb8, 0xb8, 0x84, 0xd4, 0x18, 0x05, 0x5b, 0x92, 0x67, 0x24, 0x6f, 0x99, 0x5b, + 0xde, 0x22, 0x2f, 0x93, 0x43, 0x6e, 0x39, 0xe6, 0x11, 0x52, 0xe4, 0x19, 0x72, 0x4f, 0x49, 0x33, + 0x23, 0x24, 0xf9, 0x23, 0x59, 0xc2, 0xcd, 0xd3, 0xfd, 0xeb, 0x5f, 0x7f, 0xcd, 0x74, 0x5b, 0xb0, + 0x35, 0xf6, 0xd8, 0x95, 0x83, 0xad, 0xd1, 0x41, 0xcb, 0xb4, 0x07, 0x8e, 0xdb, 0xf4, 0x99, 0x17, + 0x78, 0xa4, 0x24, 0xc4, 0xcd, 0xd1, 0x81, 0xfe, 0xf8, 0x16, 0xc1, 0x90, 0x7b, 0x21, 0xb3, 0x90, + 0x0b, 0x14, 0x3d, 0x81, 0xb5, 0x8e, 0xd3, 0x73, 0x4f, 0x7d, 0x03, 0x87, 0x21, 0xf2, 0x80, 0xe8, + 0x50, 0x0c, 0x39, 0x32, 0xd7, 0x1c, 0x60, 0x55, 0xab, 0x6b, 0xfb, 0x25, 0x23, 0x39, 0x47, 0x3a, + 0xdf, 0xe4, 0xfc, 0xad, 0xc7, 0xec, 0xea, 0xa2, 0xd0, 0xa9, 0x33, 0xfd, 0x0c, 0x1e, 0x28, 0x22, + 0xee, 0x7b, 0x2e, 0x47, 0xf2, 0x1e, 0x2c, 0x47, 0x96, 0x31, 0x4b, 0xf9, 0x70, 0xbd, 0x99, 0xc4, + 0xd3, 0x3c, 0xe5, 0xc8, 0x8c, 0x58, 0x49, 0x8f, 0xa1, 0xf2, 0xc2, 0xeb, 0x3d, 0x73, 0xff, 0xab, + 0xfb, 0x27, 0xb0, 0x26, 0x79, 0xa4, 0xf7, 0x4d, 0x28, 0x04, 0xde, 0x15, 0xba, 0x92, 0x45, 0x1c, + 0xe8, 0x07, 0xb0, 0x79, 0xc4, 0xd0, 0x0c, 0xf0, 0x35, 0xf3, 0x7e, 0x44, 0x2b, 0x50, 0x6e, 0x09, + 0x2c, 0xa7, 0x5c, 0xc6, 0xbf, 0xe9, 0xf7, 0xb0, 0x95, 0xc3, 0x4a, 0xea, 0x8f, 0x60, 0xd5, 0x17, + 0x22, 0x99, 0x1b, 0x49, 0xe5, 0xa6, 0xc0, 0x0a, 0x42, 0x9f, 0xc2, 0xc6, 0x09, 0x06, 0xff, 0xc2, + 0x5f, 0x1b, 0x48, 0x1a, 0x78, 0x27, 0x67, 0x5b, 0xf0, 0xf0, 0x85, 0xc3, 0x15, 0x09, 0x97, 0xee, + 0xe8, 0x31, 0x6c, 0x66, 0xc5, 0x92, 0xbc, 0x09, 0x45, 0x69, 0xc9, 0xab, 0x5a, 0x7d, 0x69, 0x06, + 0x7b, 0x82, 0xa1, 0x26, 0x6c, 0x9e, 0xfa, 0xf6, 0x64, 0xf9, 0x1e, 0xc0, 0xa2, 0x63, 0xcb, 0x64, + 0x16, 0x1d, 0x9b, 0x7c, 0x09, 0x2b, 0x17, 0x0e, 0xf6, 0x6d, 0x1e, 0xf7, 0xa9, 0x7c, 0xd8, 0x48, + 0x37, 0x3f, 0x22, 0x30, 0xcf, 0xfb, 0x8a, 0xe3, 0x38, 0x06, 0x1a, 0xd2, 0x20, 0xaa, 0x7a, 0xce, + 0xc5, 0x9d, 0x0a, 0xf1, 0xab, 0x26, 0x52, 0xfe, 0xce, 0xb3, 0xc2, 0x01, 0xba, 0x49, 0x29, 0x48, + 0x03, 0x2a, 0x12, 0xd3, 0x4d, 0x75, 0xa0, 0x2c, 0x65, 0xaf, 0xa2, 0x7b, 0xb6, 0x07, 0x65, 0x9f, + 0xe1, 0xc8, 0xf1, 0x42, 0xde, 0x75, 0xd4, 0x55, 0x03, 0x25, 0x7a, 0x66, 0x93, 0xff, 0x43, 0xc9, + 0x37, 0x7b, 0xd8, 0xe5, 0xce, 0x35, 0x56, 0x97, 0xea, 0xda, 0x7e, 0x21, 0xba, 0x89, 0x3d, 0xec, + 0x38, 0xd7, 0x48, 0x76, 0x01, 0x1c, 0xde, 0xbd, 0xf0, 0xd8, 0x5b, 0x93, 0xd9, 0xd5, 0xe5, 0xba, + 0xb6, 0x5f, 0x34, 0x4a, 0x0e, 0x3f, 0x16, 0x02, 0xf2, 0x3e, 0xfc, 0xcf, 0x71, 0xad, 0x7e, 0x68, + 0x63, 0x97, 0xbb, 0xa6, 0xcf, 0x2f, 0xbd, 0xa0, 0x5a, 0x88, 0x41, 0xeb, 0x52, 0xde, 0x91, 0x62, + 0xfa, 0x06, 0xb6, 0x72, 0x29, 0xc8, 0x52, 0x7c, 0x01, 0x25, 0x5b, 0x09, 0x65, 0xdf, 0xf4, 0x54, + 0x31, 0x94, 0x41, 0x27, 0x1c, 0x0c, 0x4c, 0x36, 0x36, 0x6e, 0xc1, 0xf4, 0x2c, 0xbe, 0x63, 0x0a, + 0xf0, 0x0e, 0x35, 0x69, 0x40, 0x45, 0xb1, 0x74, 0xaf, 0x70, 0x2c, 0x8b, 0x52, 0x56, 0xb2, 0xe7, + 0x38, 0xa6, 0x2f, 0xe1, 0x61, 0x86, 0x5b, 0x06, 0xfb, 0x39, 0x14, 0x15, 0x4a, 0x36, 0x6e, 0x5e, + 0xac, 0x09, 0x96, 0x5e, 0xc3, 0x8e, 0x81, 0x03, 0x6f, 0x84, 0x0a, 0xd2, 0x1e, 0x7f, 0x1b, 0x8d, + 0xb7, 0x7b, 0x0d, 0x3a, 0x1a, 0x13, 0x17, 0x1e, 0xb3, 0x44, 0x1b, 0x8b, 0x86, 0x38, 0xd0, 0x3d, + 0xd8, 0x9d, 0xe1, 0x5b, 0x24, 0x45, 0x7f, 0xd2, 0xe0, 0xd1, 0x09, 0x06, 0xaa, 0x55, 0x2f, 0x31, + 0x30, 0xef, 0x37, 0xae, 0x06, 0x00, 0x47, 0x36, 0x42, 0xd6, 0xe5, 0x38, 0x8c, 0x83, 0x5b, 0x6a, + 0x2f, 0x7e, 0xa2, 0x19, 0x25, 0x21, 0xed, 0xe0, 0x90, 0x76, 0x60, 0x7b, 0x22, 0x04, 0x59, 0x73, + 0x1d, 0x8a, 0xc9, 0xe5, 0x8a, 0xfc, 0x57, 0x8c, 0xe4, 0x4c, 0x76, 0x60, 0xb5, 0x6f, 0x0e, 0x7c, + 0x8f, 0x05, 0xb1, 0x5f, 0x41, 0xab, 0x44, 0xd4, 0x85, 0x47, 0x1d, 0x34, 0x99, 0x75, 0x79, 0x97, + 0x87, 0xb3, 0x09, 0x85, 0x61, 0x88, 0x4c, 0x25, 0x24, 0x0e, 0x73, 0x5f, 0x0b, 0x0d, 0x60, 0x7b, + 0xc2, 0x9f, 0x4c, 0x62, 0x0f, 0xca, 0x81, 0x17, 0x98, 0xfd, 0xae, 0xe5, 0x85, 0xf2, 0xee, 0x14, + 0x0c, 0x88, 0x45, 0x47, 0x91, 0x24, 0xfb, 0x0c, 0x16, 0xdf, 0xe5, 0x19, 0xfc, 0xa2, 0x01, 0x89, + 0x9e, 0xd6, 0xd1, 0xa5, 0xe9, 0xf6, 0x90, 0xdf, 0x6f, 0xeb, 0x9e, 0x44, 0x2c, 0x72, 0x7c, 0x64, + 0x9b, 0x97, 0x8c, 0x95, 0x0e, 0x0e, 0xb3, 0x65, 0x59, 0x9e, 0x3b, 0x44, 0x0a, 0xb9, 0x21, 0x42, + 0xdb, 0x62, 0xcc, 0x27, 0xe1, 0xcb, 0x8a, 0x7d, 0x08, 0xab, 0x96, 0x10, 0xc9, 0xa9, 0xb0, 0x91, + 0x2a, 0x87, 0x00, 0x1b, 0x0a, 0x71, 0xf8, 0xd7, 0x2a, 0x54, 0xe2, 0x4b, 0xdd, 0x41, 0x36, 0x72, + 0x2c, 0x24, 0xdf, 0xc0, 0x8a, 0xd8, 0xe0, 0xa4, 0x9a, 0x32, 0xcb, 0xfc, 0x3b, 0xd0, 0x1f, 0x4f, + 0xd1, 0xc8, 0x27, 0xb1, 0x40, 0xbe, 0x86, 0x42, 0xbc, 0x83, 0xc9, 0x76, 0x0a, 0x95, 0xde, 0xee, + 0x7a, 0x75, 0x52, 0x91, 0x58, 0xff, 0x00, 0x6b, 0x99, 0x75, 0x4b, 0xf6, 0xd2, 0xc1, 0x4f, 0x59, + 0xda, 0x7a, 0x7d, 0x36, 0x20, 0x61, 0x7d, 0x03, 0x95, 0xf4, 0xe6, 0x23, 0xb5, 0x74, 0x04, 0x93, + 0x9b, 0x52, 0xdf, 0x9b, 0xa9, 0x4f, 0x28, 0x9f, 0x03, 0xdc, 0xee, 0x69, 0xb2, 0x93, 0x32, 0x98, + 0xd8, 0xf3, 0xfa, 0xee, 0x0c, 0x6d, 0x3a, 0xeb, 0xcc, 0xba, 0xcb, 0x64, 0x3d, 0x6d, 0xd7, 0x66, + 0xb2, 0x9e, 0xba, 0x29, 0x05, 0x6b, 0x66, 0x73, 0x90, 0x7c, 0x5a, 0xf9, 0xd7, 0x9d, 0x61, 0x9d, + 0xba, 0x74, 0xe8, 0x02, 0x79, 0x05, 0xe5, 0xd4, 0x80, 0x27, 0xb9, 0xdc, 0x72, 0x4b, 0x45, 0xaf, + 0xcd, 0x52, 0x27, 0x7c, 0x7d, 0xd8, 0x9a, 0x3a, 0x65, 0xc9, 0xd3, 0x94, 0xe9, 0xbc, 0x1d, 0xa0, + 0xef, 0xff, 0x33, 0x30, 0xf1, 0x76, 0x06, 0xeb, 0xb9, 0x71, 0x49, 0x1a, 0xd9, 0x10, 0xa7, 0x4c, + 0x73, 0x9d, 0xce, 0x83, 0xa4, 0xb9, 0x73, 0x53, 0x2c, 0xc3, 0x3d, 0x7d, 0xa2, 0x66, 0xb8, 0x67, + 0x0c, 0x41, 0x51, 0xf5, 0xd4, 0x5b, 0xcf, 0x54, 0x7d, 0x72, 0x84, 0xe9, 0xb5, 0x59, 0x6a, 0xc5, + 0xd7, 0x3e, 0xfd, 0xed, 0xa6, 0xa6, 0xfd, 0x7e, 0x53, 0xd3, 0xfe, 0xb8, 0xa9, 0x69, 0x3f, 0xff, + 0x59, 0x5b, 0x80, 0x0d, 0x1b, 0x47, 0xca, 0xcc, 0xf4, 0x9d, 0xe6, 0xe8, 0xe0, 0xb5, 0x76, 0xd6, + 0xec, 0x39, 0xc1, 0x65, 0x78, 0xde, 0xb4, 0xbc, 0x41, 0x4b, 0xe8, 0x3e, 0x0e, 0xd0, 0x54, 0xbf, + 0x5b, 0xa6, 0xef, 0xb4, 0x92, 0xaf, 0x8a, 0xaf, 0x46, 0x07, 0xe7, 0x2b, 0xf1, 0xf7, 0xc4, 0xa7, + 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xc3, 0x25, 0x59, 0x8e, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/api/yorkie/v1/admin.proto b/api/yorkie/v1/admin.proto index ee6eadd52..753e3181c 100644 --- a/api/yorkie/v1/admin.proto +++ b/api/yorkie/v1/admin.proto @@ -19,7 +19,7 @@ package yorkie.v1; import "yorkie/v1/resources.proto"; -option go_package = ".;v1"; +option go_package = "github.com/yorkie-team/yorkie/api/yorkie/v1;v1"; option java_multiple_files = true; option java_package = "dev.yorkie.api.v1"; diff --git a/api/yorkie/v1/resources.pb.go b/api/yorkie/v1/resources.pb.go index 7253c0ab1..92d21ed72 100644 --- a/api/yorkie/v1/resources.pb.go +++ b/api/yorkie/v1/resources.pb.go @@ -3466,176 +3466,177 @@ func init() { func init() { proto.RegisterFile("yorkie/v1/resources.proto", fileDescriptor_36361b2f5d0f0896) } var fileDescriptor_36361b2f5d0f0896 = []byte{ - // 2697 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xdb, 0x8f, 0x23, 0x47, - 0xd5, 0x9f, 0x6e, 0xb7, 0x2f, 0x7d, 0x66, 0x77, 0xc7, 0x5b, 0xb3, 0x17, 0xaf, 0x77, 0x77, 0xb2, - 0xeb, 0x7c, 0xc9, 0x37, 0xd9, 0x05, 0xcf, 0x25, 0x17, 0x42, 0x42, 0x02, 0x1e, 0xbb, 0xb3, 0xe3, - 0x64, 0xd6, 0x33, 0xb4, 0x3d, 0x1b, 0x12, 0x81, 0x5a, 0x3d, 0xdd, 0x35, 0x33, 0x9d, 0xb1, 0xdd, - 0x4e, 0x77, 0xdb, 0x59, 0x4b, 0x3c, 0x45, 0x41, 0xe2, 0x95, 0x37, 0xfe, 0x02, 0x24, 0x84, 0xc4, - 0x7b, 0x1e, 0xe1, 0x01, 0x21, 0x21, 0x04, 0x12, 0x91, 0x78, 0x85, 0xf0, 0x80, 0xe0, 0x2d, 0x42, - 0xe2, 0x0d, 0x09, 0xd5, 0xad, 0xdd, 0xb6, 0xdb, 0x1e, 0x8f, 0x33, 0x89, 0x36, 0xe2, 0xad, 0xab, - 0xea, 0x77, 0xaa, 0xce, 0xa9, 0xfa, 0x9d, 0x53, 0xa7, 0xba, 0x0a, 0x6e, 0xf4, 0x5d, 0xef, 0xc4, - 0xc1, 0x6b, 0xbd, 0x8d, 0x35, 0x0f, 0xfb, 0x6e, 0xd7, 0xb3, 0xb0, 0x5f, 0xec, 0x78, 0x6e, 0xe0, - 0x22, 0x95, 0x35, 0x15, 0x7b, 0x1b, 0xf9, 0xa7, 0x8e, 0x5c, 0xf7, 0xa8, 0x89, 0xd7, 0x68, 0xc3, - 0x41, 0xf7, 0x70, 0x2d, 0x70, 0x5a, 0xd8, 0x0f, 0xcc, 0x56, 0x87, 0x61, 0xf3, 0x2b, 0xa3, 0x80, - 0x0f, 0x3c, 0xb3, 0xd3, 0xc1, 0x1e, 0xef, 0xab, 0xf0, 0x3b, 0x09, 0x32, 0xf5, 0xb6, 0xd9, 0xf1, - 0x8f, 0xdd, 0x00, 0xdd, 0x03, 0xc5, 0x73, 0xdd, 0x20, 0x27, 0xdd, 0x91, 0x56, 0x17, 0x37, 0xaf, - 0x15, 0xc3, 0x71, 0x8a, 0x6f, 0xd6, 0x77, 0x6b, 0x5a, 0x13, 0xb7, 0x70, 0x3b, 0xd0, 0x29, 0x06, - 0x7d, 0x07, 0xd4, 0x8e, 0x87, 0x7d, 0xdc, 0xb6, 0xb0, 0x9f, 0x93, 0xef, 0x24, 0x56, 0x17, 0x37, - 0x0b, 0x11, 0x01, 0xd1, 0x67, 0x71, 0x4f, 0x80, 0xb4, 0x76, 0xe0, 0xf5, 0xf5, 0x81, 0x50, 0xfe, - 0xbb, 0x70, 0x69, 0xb8, 0x11, 0x65, 0x21, 0x71, 0x82, 0xfb, 0x74, 0x78, 0x55, 0x27, 0x9f, 0xe8, - 0x39, 0x48, 0xf6, 0xcc, 0x66, 0x17, 0xe7, 0x64, 0xaa, 0xd2, 0x72, 0x64, 0x04, 0x21, 0xab, 0x33, - 0xc4, 0x2b, 0xf2, 0xcb, 0x52, 0xe1, 0x27, 0x32, 0x40, 0xf9, 0xd8, 0x6c, 0x1f, 0xe1, 0x3d, 0xd3, - 0x3a, 0x41, 0x77, 0xe1, 0x82, 0xed, 0x5a, 0x5d, 0xa2, 0xb5, 0x31, 0xe8, 0x78, 0x51, 0xd4, 0xbd, - 0x85, 0xfb, 0xe8, 0x45, 0x00, 0xeb, 0x18, 0x5b, 0x27, 0x1d, 0xd7, 0x69, 0x07, 0x7c, 0x94, 0xab, - 0x91, 0x51, 0xca, 0x61, 0xa3, 0x1e, 0x01, 0xa2, 0x3c, 0x64, 0x7c, 0x6e, 0x61, 0x2e, 0x71, 0x47, - 0x5a, 0xbd, 0xa0, 0x87, 0x65, 0x74, 0x1f, 0xd2, 0x16, 0xd5, 0xc1, 0xcf, 0x29, 0x74, 0x5e, 0x2e, - 0x0f, 0xf5, 0x47, 0x5a, 0x74, 0x81, 0x40, 0x25, 0xb8, 0xdc, 0x72, 0xda, 0x86, 0xdf, 0x6f, 0x5b, - 0xd8, 0x36, 0x02, 0xc7, 0x3a, 0xc1, 0x41, 0x2e, 0x39, 0xa6, 0x46, 0xc3, 0x69, 0xe1, 0x06, 0x6d, - 0xd4, 0x97, 0x5a, 0x4e, 0xbb, 0x4e, 0xe1, 0xac, 0x02, 0xdd, 0x06, 0x70, 0x7c, 0xc3, 0xc3, 0x2d, - 0xb7, 0x87, 0xed, 0x5c, 0xea, 0x8e, 0xb4, 0x9a, 0xd1, 0x55, 0xc7, 0xd7, 0x59, 0x45, 0xe1, 0x57, - 0x12, 0xa4, 0xd8, 0xa8, 0xe8, 0x69, 0x90, 0x1d, 0x9b, 0xaf, 0xee, 0xf2, 0x98, 0x52, 0xd5, 0x8a, - 0x2e, 0x3b, 0x36, 0xca, 0x41, 0xba, 0x85, 0x7d, 0xdf, 0x3c, 0x62, 0x93, 0xae, 0xea, 0xa2, 0x88, - 0x5e, 0x00, 0x70, 0x3b, 0xd8, 0x33, 0x03, 0xc7, 0x6d, 0xfb, 0xb9, 0x04, 0xb5, 0xed, 0x4a, 0xa4, - 0x9b, 0x5d, 0xd1, 0xa8, 0x47, 0x70, 0x68, 0x0b, 0x96, 0xc4, 0x9a, 0x1b, 0xcc, 0xea, 0x9c, 0x42, - 0x35, 0xb8, 0x11, 0xb3, 0x98, 0x7c, 0x7a, 0x2e, 0x75, 0x86, 0xca, 0x85, 0x1f, 0x49, 0x90, 0x11, - 0x4a, 0x12, 0x7b, 0xad, 0xa6, 0x43, 0xd6, 0xd4, 0xc7, 0xef, 0x53, 0x6b, 0x2e, 0xea, 0x2a, 0xab, - 0xa9, 0xe3, 0xf7, 0xd1, 0x5d, 0x00, 0x1f, 0x7b, 0x3d, 0xec, 0xd1, 0x66, 0x62, 0x42, 0x62, 0x4b, - 0x5e, 0x97, 0x74, 0x95, 0xd5, 0x12, 0xc8, 0x2d, 0x48, 0x37, 0xcd, 0x56, 0xc7, 0xf5, 0xd8, 0xe2, - 0xb1, 0x76, 0x51, 0x85, 0x6e, 0x40, 0xc6, 0xb4, 0x02, 0xd7, 0x33, 0x1c, 0x9b, 0x6a, 0x7a, 0x41, - 0x4f, 0xd3, 0x72, 0xd5, 0x2e, 0x7c, 0xb4, 0x02, 0x6a, 0x68, 0x25, 0xfa, 0x1a, 0x24, 0x7c, 0x2c, - 0xbc, 0x25, 0x17, 0x37, 0x11, 0xc5, 0x3a, 0x0e, 0xb6, 0x17, 0x74, 0x02, 0x23, 0x68, 0xd3, 0xb6, - 0x39, 0xc5, 0xe2, 0xd1, 0x25, 0xdb, 0x26, 0x68, 0xd3, 0xb6, 0xd1, 0x1a, 0x28, 0x64, 0xf9, 0xa8, - 0x7e, 0xc3, 0x53, 0x35, 0x80, 0x3f, 0x74, 0x7b, 0x78, 0x7b, 0x41, 0xa7, 0x40, 0xf4, 0x22, 0xa4, - 0x18, 0x05, 0xf8, 0xec, 0xde, 0x8c, 0x15, 0x61, 0xa4, 0xd8, 0x5e, 0xd0, 0x39, 0x98, 0x8c, 0x83, - 0x6d, 0x47, 0x50, 0x2e, 0x7e, 0x1c, 0xcd, 0x76, 0x88, 0x15, 0x14, 0x48, 0xc6, 0xf1, 0x71, 0x13, - 0x5b, 0x01, 0x65, 0xda, 0xa4, 0x71, 0xea, 0x14, 0x42, 0xc6, 0x61, 0x60, 0xb4, 0x09, 0x49, 0x3f, - 0xe8, 0x37, 0x71, 0x2e, 0x4d, 0xa5, 0xf2, 0xf1, 0x52, 0x04, 0xb1, 0xbd, 0xa0, 0x33, 0x28, 0x7a, - 0x15, 0x32, 0x4e, 0xdb, 0xf2, 0xb0, 0xe9, 0xe3, 0x5c, 0x86, 0x8a, 0xdd, 0x8e, 0x15, 0xab, 0x72, - 0xd0, 0xf6, 0x82, 0x1e, 0x0a, 0xa0, 0x6f, 0x81, 0x1a, 0x78, 0x18, 0x1b, 0xd4, 0x3a, 0x75, 0x8a, - 0x74, 0xc3, 0xc3, 0x98, 0x5b, 0x98, 0x09, 0xf8, 0x37, 0xfa, 0x36, 0x00, 0x95, 0x66, 0x3a, 0x03, - 0x15, 0x5f, 0x99, 0x28, 0x2e, 0xf4, 0xa6, 0x23, 0xd2, 0x42, 0xfe, 0x37, 0x12, 0x24, 0xea, 0x38, - 0x20, 0xfe, 0xdd, 0x31, 0x3d, 0x42, 0x56, 0xa2, 0x57, 0x80, 0x6d, 0xc3, 0x14, 0x8c, 0x99, 0xe4, - 0xdf, 0x0c, 0x5f, 0x66, 0xf0, 0x52, 0x20, 0xa2, 0xa2, 0x3c, 0x88, 0x8a, 0x9b, 0x22, 0x2a, 0x32, - 0x76, 0xdc, 0x8a, 0x0f, 0xd4, 0x75, 0xa7, 0xd5, 0x69, 0x8a, 0xf0, 0x88, 0x5e, 0x82, 0x45, 0xfc, - 0x18, 0x5b, 0x5d, 0xae, 0x82, 0x32, 0x4d, 0x05, 0x10, 0xc8, 0x52, 0x90, 0xff, 0x97, 0x04, 0x89, - 0x92, 0x6d, 0x9f, 0x87, 0x21, 0xaf, 0xd1, 0x48, 0xd0, 0x8b, 0x76, 0x20, 0x4f, 0xeb, 0xe0, 0x22, - 0x41, 0x0f, 0xc4, 0xbf, 0x4c, 0xab, 0xff, 0x2d, 0x81, 0x42, 0xdc, 0xeb, 0x09, 0x30, 0xfb, 0x05, - 0x80, 0x88, 0x64, 0x62, 0x9a, 0xa4, 0x6a, 0x85, 0x52, 0xf3, 0x1a, 0xfe, 0xb1, 0x04, 0x29, 0x16, - 0x24, 0xce, 0xc3, 0xf4, 0x61, 0xdd, 0xe5, 0xf9, 0x74, 0x4f, 0xcc, 0xaa, 0xfb, 0xaf, 0x15, 0x50, - 0xa8, 0xf7, 0x9e, 0x83, 0xe6, 0xf7, 0x40, 0x39, 0xf4, 0xdc, 0x16, 0xd7, 0x39, 0x9a, 0x0a, 0x35, - 0xf0, 0xe3, 0xa0, 0xe6, 0xda, 0x78, 0xcf, 0xf5, 0x75, 0x8a, 0x41, 0xcf, 0x82, 0x1c, 0xb8, 0x5c, - 0xcd, 0x49, 0x48, 0x39, 0x70, 0xd1, 0x31, 0x5c, 0x1f, 0xe8, 0x63, 0xb4, 0xcc, 0x8e, 0x71, 0xd0, - 0x37, 0xe8, 0xd6, 0xc2, 0x13, 0x85, 0xcd, 0x89, 0xe1, 0xb7, 0x18, 0x6a, 0xf6, 0xd0, 0xec, 0x6c, - 0xf5, 0x4b, 0x44, 0x88, 0x25, 0x54, 0xcb, 0xd6, 0x78, 0x0b, 0xd9, 0xc3, 0x2d, 0xb7, 0x1d, 0xe0, - 0x36, 0x0b, 0xec, 0xaa, 0x2e, 0x8a, 0xa3, 0x73, 0x9b, 0x9a, 0x71, 0x6e, 0x51, 0x15, 0xc0, 0x0c, - 0x02, 0xcf, 0x39, 0xe8, 0x06, 0xd8, 0xcf, 0xa5, 0xa9, 0xba, 0xcf, 0x4d, 0x56, 0xb7, 0x14, 0x62, - 0x99, 0x96, 0x11, 0xe1, 0xfc, 0x0f, 0x20, 0x37, 0xc9, 0x9a, 0x98, 0x0c, 0xf0, 0xfe, 0x70, 0x06, - 0x38, 0x41, 0xd5, 0x41, 0x0e, 0x98, 0x7f, 0x0d, 0x96, 0x46, 0x46, 0x8f, 0xe9, 0xf5, 0x4a, 0xb4, - 0x57, 0x35, 0x2a, 0xfe, 0x67, 0x09, 0x52, 0x6c, 0xf7, 0x7a, 0x52, 0x69, 0x34, 0xaf, 0x6b, 0xff, - 0x42, 0x81, 0x24, 0xdd, 0x9c, 0x9e, 0x54, 0xc3, 0xde, 0x1c, 0xe2, 0x18, 0x73, 0x89, 0x7b, 0x93, - 0x13, 0x85, 0x69, 0x24, 0x1b, 0x9d, 0xa4, 0xe4, 0xac, 0x3c, 0x77, 0x26, 0xfb, 0x68, 0x8a, 0x2a, - 0xf4, 0xfc, 0x14, 0x85, 0xce, 0xe4, 0xa4, 0x9f, 0x97, 0xa8, 0x5f, 0xb0, 0x1b, 0x7d, 0x2c, 0x41, - 0x46, 0x24, 0x56, 0xe7, 0x41, 0x98, 0xcd, 0x61, 0x05, 0xe6, 0xd9, 0xbd, 0x67, 0xde, 0x08, 0x3e, - 0x4b, 0x40, 0x46, 0xa4, 0x75, 0xe7, 0xa1, 0xfb, 0xb3, 0x43, 0x64, 0x47, 0x51, 0x29, 0x0f, 0x47, - 0x88, 0x5e, 0x88, 0x10, 0x3d, 0x0e, 0x45, 0x48, 0xde, 0x3c, 0x6d, 0x13, 0x78, 0x69, 0x6a, 0x96, - 0x7a, 0xc6, 0x8d, 0x60, 0x1d, 0x32, 0x3c, 0xf2, 0xfb, 0xb9, 0xe4, 0xd8, 0x81, 0x8d, 0x74, 0x4a, - 0x1c, 0xd0, 0xd7, 0x43, 0x14, 0x7a, 0x0a, 0x16, 0xfd, 0x4e, 0xd3, 0x09, 0x8c, 0x26, 0xee, 0xe1, - 0x26, 0x4d, 0xd7, 0x93, 0x3a, 0xd0, 0xaa, 0x1d, 0x52, 0x33, 0xef, 0x0e, 0xf2, 0x45, 0xf3, 0xf5, - 0xaf, 0x32, 0xa8, 0x61, 0x2e, 0xfe, 0xa4, 0x2d, 0x7a, 0x2d, 0x26, 0xb2, 0x15, 0xa7, 0x1f, 0x27, - 0xbe, 0x88, 0xe8, 0xf6, 0x39, 0x43, 0xce, 0x56, 0x0a, 0x94, 0x03, 0xd7, 0xee, 0x17, 0x3e, 0x93, - 0xe0, 0xf2, 0x98, 0xd3, 0x8e, 0x24, 0x7b, 0xd2, 0x8c, 0xc9, 0xde, 0x3a, 0x64, 0xe8, 0x7f, 0x8a, - 0x53, 0x13, 0xc4, 0x34, 0x85, 0xb1, 0xa4, 0x92, 0xff, 0xec, 0x38, 0x3d, 0x21, 0xe6, 0xc0, 0x52, - 0x80, 0x56, 0x41, 0x09, 0xfa, 0x1d, 0x76, 0x3a, 0xbe, 0x34, 0xe4, 0x05, 0x8f, 0x88, 0x7d, 0x8d, - 0x7e, 0x07, 0xeb, 0x14, 0x31, 0xb0, 0x3f, 0x49, 0x0f, 0xff, 0xac, 0x50, 0xf8, 0xf9, 0x45, 0x58, - 0x8c, 0xd8, 0x8c, 0x2a, 0xb0, 0xf8, 0x9e, 0xef, 0xb6, 0x0d, 0xf7, 0xe0, 0x3d, 0x72, 0x18, 0x66, - 0xe6, 0xde, 0x8d, 0x8f, 0x6a, 0xf4, 0x7b, 0x97, 0x02, 0xb7, 0x17, 0x74, 0x20, 0x72, 0xac, 0x84, - 0x4a, 0x40, 0x4b, 0x86, 0xe9, 0x79, 0x66, 0x9f, 0xdb, 0x7f, 0x67, 0x4a, 0x27, 0x25, 0x82, 0x23, - 0x27, 0x4d, 0x22, 0x45, 0x0b, 0xec, 0x47, 0x9c, 0xd3, 0x72, 0x02, 0x27, 0xfc, 0x5d, 0x30, 0xa9, - 0x87, 0x3d, 0x81, 0x23, 0x3d, 0x84, 0x42, 0x68, 0x03, 0x94, 0x00, 0x3f, 0x16, 0x34, 0xba, 0x39, - 0x41, 0x98, 0xec, 0xd6, 0xdb, 0x0b, 0x3a, 0x85, 0xa2, 0x57, 0x48, 0x82, 0xd9, 0x6d, 0x07, 0xd8, - 0xe3, 0x01, 0x60, 0x65, 0x82, 0x54, 0x99, 0xa1, 0xb6, 0x17, 0x74, 0x21, 0x40, 0x87, 0xf3, 0xb0, - 0xf8, 0x13, 0x30, 0x71, 0x38, 0x0f, 0xd3, 0x9f, 0x1b, 0x04, 0x9a, 0xff, 0x44, 0x02, 0x18, 0xcc, - 0x21, 0x5a, 0x85, 0x64, 0x9b, 0x84, 0xad, 0x9c, 0x44, 0x3d, 0x29, 0xea, 0x75, 0xfa, 0x76, 0x83, - 0x44, 0x34, 0x9d, 0x01, 0xe6, 0x3c, 0x80, 0x44, 0x39, 0x99, 0x98, 0x83, 0x93, 0xca, 0x6c, 0x9c, - 0xcc, 0xff, 0x49, 0x02, 0x35, 0x5c, 0xd5, 0xa9, 0x56, 0x3d, 0x28, 0x7d, 0x75, 0xac, 0xfa, 0x87, - 0x04, 0x6a, 0xc8, 0xb4, 0xd0, 0xef, 0xa4, 0xd9, 0xfd, 0x4e, 0x8e, 0xf8, 0xdd, 0x9c, 0xc7, 0xdf, - 0xa8, 0xad, 0xca, 0x1c, 0xb6, 0x26, 0x67, 0xb4, 0xf5, 0x0f, 0x12, 0x28, 0xc4, 0x31, 0xd0, 0x73, - 0xc3, 0x8b, 0xb7, 0x1c, 0x93, 0xe6, 0x7e, 0x35, 0x56, 0xef, 0xef, 0x12, 0xa4, 0xb9, 0xd3, 0xfe, - 0x2f, 0xac, 0x9d, 0x87, 0xf1, 0xd4, 0xb5, 0xe3, 0x19, 0xd2, 0x57, 0x62, 0xed, 0xc2, 0xfd, 0xf9, - 0x21, 0xa4, 0x79, 0x1c, 0x8c, 0xd9, 0xde, 0xd7, 0x21, 0x8d, 0x59, 0x8c, 0x8d, 0x39, 0xbc, 0x45, - 0xef, 0x79, 0x04, 0xac, 0x60, 0x41, 0x9a, 0x07, 0x20, 0x92, 0x14, 0xb5, 0xc9, 0x56, 0x21, 0x8d, - 0xa5, 0x3b, 0x22, 0x44, 0xd1, 0xf6, 0x39, 0x06, 0x79, 0x04, 0x19, 0x22, 0x4f, 0xd2, 0x93, 0x01, - 0x9b, 0xa4, 0x48, 0x06, 0x42, 0xe6, 0xa4, 0xdb, 0xb1, 0x67, 0x9b, 0x7b, 0x0e, 0x2c, 0x05, 0x85, - 0xdf, 0xcb, 0x90, 0x11, 0x1e, 0x88, 0x9e, 0x89, 0x5c, 0x80, 0x5c, 0x8d, 0x71, 0x51, 0x7e, 0x05, - 0x12, 0x9b, 0x01, 0xcd, 0x99, 0x77, 0xbc, 0x08, 0x8b, 0x4e, 0xdb, 0x37, 0xe8, 0x1f, 0x40, 0x7e, - 0xa1, 0x30, 0x71, 0x6c, 0xd5, 0x69, 0xfb, 0x7b, 0x1e, 0xee, 0x55, 0x6d, 0x54, 0x1e, 0xca, 0x18, - 0x59, 0xea, 0xfe, 0x74, 0x8c, 0xd4, 0xd4, 0x3f, 0x2d, 0xfa, 0x2c, 0xe9, 0xde, 0x94, 0x2b, 0x36, - 0xb1, 0x20, 0xd1, 0x2b, 0xb6, 0x77, 0x01, 0x06, 0x1a, 0xcf, 0x99, 0xf3, 0x5d, 0x83, 0x94, 0x7b, - 0x78, 0xe8, 0x63, 0xb6, 0x8a, 0x49, 0x9d, 0x97, 0x0a, 0xbf, 0xe4, 0xe7, 0xb6, 0xe9, 0x6b, 0xc5, - 0x01, 0x7c, 0xad, 0x10, 0x8f, 0x51, 0x6c, 0xa9, 0x46, 0xa2, 0x51, 0x62, 0xf2, 0xfa, 0x29, 0xf3, - 0xad, 0x5f, 0x72, 0x9a, 0x3e, 0x91, 0xf5, 0xe3, 0x62, 0xc4, 0x19, 0x88, 0x58, 0xea, 0x34, 0xb1, - 0x1a, 0x7e, 0x1c, 0x54, 0x29, 0xf3, 0x6c, 0xdc, 0x09, 0x8e, 0xf9, 0xb9, 0x8b, 0x15, 0x46, 0xc8, - 0x90, 0x19, 0x27, 0x03, 0xef, 0xeb, 0x4b, 0x27, 0xc3, 0x2b, 0xec, 0xcc, 0x45, 0xcf, 0x90, 0xe8, - 0xeb, 0x83, 0x9f, 0x8e, 0x53, 0x02, 0xa9, 0xc0, 0x50, 0x22, 0x85, 0x73, 0x70, 0xce, 0x44, 0xfa, - 0x21, 0xa4, 0xf9, 0xf1, 0x0b, 0x6d, 0x82, 0xca, 0x4f, 0x82, 0xa7, 0xb1, 0x29, 0xc3, 0x70, 0x55, - 0x1b, 0xbd, 0x06, 0x4b, 0x4d, 0x7c, 0x18, 0x18, 0xbe, 0x73, 0xd0, 0x74, 0xda, 0x47, 0x44, 0x52, - 0x9e, 0x26, 0x79, 0x91, 0xa0, 0xeb, 0x0c, 0x5c, 0xb5, 0x0b, 0x2d, 0x50, 0xf6, 0x7d, 0xec, 0xa1, - 0x4b, 0x21, 0x83, 0x55, 0x4a, 0xd5, 0x3c, 0x64, 0xba, 0x3e, 0xf6, 0xda, 0x66, 0x4b, 0xd0, 0x35, - 0x2c, 0xa3, 0x6f, 0xc6, 0x6c, 0x95, 0xf9, 0x22, 0xbb, 0xbc, 0x2f, 0x8a, 0xcb, 0x7b, 0x3a, 0x0b, - 0xf4, 0x76, 0x3f, 0x32, 0x09, 0x85, 0xff, 0xc8, 0x90, 0xde, 0xf3, 0x5c, 0x9a, 0x19, 0x8f, 0x0e, - 0x89, 0x40, 0x89, 0x0c, 0x47, 0xbf, 0xd1, 0x6d, 0x80, 0x4e, 0xf7, 0xa0, 0xe9, 0x58, 0xf4, 0x4e, - 0x9c, 0xb9, 0x88, 0xca, 0x6a, 0xde, 0xc2, 0x7d, 0xd2, 0xec, 0x63, 0xcb, 0xc3, 0xec, 0xca, 0x5c, - 0x61, 0xcd, 0xac, 0x86, 0x34, 0xaf, 0x42, 0xd6, 0xec, 0x06, 0xc7, 0xc6, 0x07, 0xf8, 0xe0, 0xd8, - 0x75, 0x4f, 0x8c, 0xae, 0xd7, 0xe4, 0xff, 0x98, 0x2f, 0x91, 0xfa, 0xb7, 0x59, 0xf5, 0xbe, 0xd7, - 0x44, 0xeb, 0x70, 0x65, 0x08, 0xd9, 0xc2, 0xc1, 0xb1, 0x6b, 0xfb, 0xf4, 0x3f, 0x9a, 0xaa, 0xa3, - 0x08, 0xfa, 0x21, 0x6b, 0x41, 0xaf, 0xc3, 0x4d, 0x7e, 0xb3, 0x6b, 0x63, 0xd3, 0x0a, 0x9c, 0x9e, - 0x19, 0x60, 0x23, 0x38, 0xf6, 0xb0, 0x7f, 0xec, 0x36, 0x6d, 0xea, 0x13, 0xaa, 0x7e, 0x83, 0x41, - 0x2a, 0x21, 0xa2, 0x21, 0x00, 0x23, 0x93, 0x98, 0x39, 0xc3, 0x24, 0x12, 0xd1, 0xc8, 0xe6, 0xa2, - 0x9e, 0x2e, 0x3a, 0xd8, 0x61, 0x7e, 0x9c, 0x80, 0x6b, 0xfb, 0xa4, 0x64, 0x1e, 0x34, 0x31, 0x5f, - 0x88, 0x37, 0x1c, 0xdc, 0xb4, 0x7d, 0xb4, 0xce, 0xa7, 0x5f, 0xe2, 0xff, 0xbc, 0x46, 0xfb, 0xab, - 0x07, 0x9e, 0xd3, 0x3e, 0xa2, 0xc9, 0x14, 0x5f, 0x9c, 0x37, 0x62, 0xa6, 0x57, 0x9e, 0x41, 0x7a, - 0x74, 0xf2, 0x0f, 0x27, 0x4c, 0x3e, 0x63, 0xd6, 0x0b, 0x11, 0x1e, 0xc7, 0xab, 0x5e, 0x2c, 0x8d, - 0x2d, 0x4f, 0xec, 0x92, 0x7d, 0x7f, 0xfa, 0x92, 0x29, 0x33, 0xa8, 0x3e, 0x79, 0x41, 0xf3, 0x45, - 0x40, 0xe3, 0x7a, 0xb0, 0x17, 0x0a, 0xcc, 0x1c, 0x89, 0x72, 0x49, 0x14, 0x0b, 0x1f, 0xca, 0xb0, - 0x54, 0xe1, 0xaf, 0x3b, 0xea, 0xdd, 0x56, 0xcb, 0xf4, 0xfa, 0x63, 0x2e, 0x31, 0x7e, 0x9d, 0x3a, - 0xfa, 0x98, 0x43, 0x8d, 0x3c, 0xe6, 0x18, 0xa6, 0x94, 0x72, 0x16, 0x4a, 0xbd, 0x0a, 0x8b, 0xa6, - 0x65, 0x61, 0xdf, 0x8f, 0xa6, 0xa5, 0xd3, 0x64, 0x41, 0xc0, 0xc7, 0xf8, 0x98, 0x3a, 0x0b, 0x1f, - 0xff, 0x29, 0x0d, 0x1e, 0xd6, 0xf0, 0x87, 0x1f, 0x2f, 0x0f, 0x25, 0xf2, 0xff, 0x37, 0xf1, 0xe1, - 0x05, 0x7f, 0x09, 0x12, 0x49, 0xec, 0xd7, 0x20, 0x23, 0xde, 0x62, 0x4c, 0x7b, 0x83, 0x13, 0x82, - 0x0a, 0x2d, 0xf1, 0x02, 0x87, 0x74, 0x82, 0x6e, 0xc2, 0xf5, 0xf2, 0x76, 0xa9, 0xf6, 0x40, 0x33, - 0x1a, 0xef, 0xec, 0x69, 0xc6, 0x7e, 0xad, 0xbe, 0xa7, 0x95, 0xab, 0x6f, 0x54, 0xb5, 0x4a, 0x76, - 0x01, 0x2d, 0xc3, 0x52, 0xb4, 0x71, 0x6f, 0xbf, 0x91, 0x95, 0xd0, 0x35, 0x40, 0xd1, 0xca, 0x8a, - 0xb6, 0xa3, 0x35, 0xb4, 0xac, 0x8c, 0xae, 0xc2, 0xe5, 0x68, 0x7d, 0x79, 0x47, 0x2b, 0xe9, 0xd9, - 0x44, 0xa1, 0x07, 0x19, 0xa1, 0x04, 0xda, 0x00, 0x85, 0x50, 0x99, 0xef, 0x3e, 0xb7, 0x63, 0xf4, - 0x2c, 0x56, 0xcc, 0xc0, 0x64, 0x5b, 0x23, 0x85, 0xe6, 0xbf, 0x01, 0x6a, 0x58, 0x75, 0x96, 0x5f, - 0x61, 0x85, 0x1a, 0x31, 0x33, 0x7c, 0x0e, 0x34, 0xfc, 0xe6, 0x44, 0x8a, 0x7b, 0x73, 0x32, 0xfc, - 0x6a, 0x45, 0x1e, 0x79, 0xb5, 0x52, 0xf8, 0x48, 0x82, 0xc5, 0xc8, 0x7d, 0xc8, 0xf9, 0xee, 0x87, - 0xe8, 0xff, 0x61, 0xc9, 0xc3, 0x4d, 0x93, 0x1c, 0xc8, 0x0d, 0x0e, 0x48, 0x50, 0xc0, 0x25, 0x51, - 0xbd, 0xcb, 0x36, 0x4e, 0x0b, 0x60, 0xd0, 0x73, 0xf4, 0x9d, 0x8c, 0x34, 0xfe, 0x4e, 0xe6, 0x16, - 0xa8, 0x36, 0x6e, 0x92, 0x73, 0x3e, 0xf6, 0x84, 0x41, 0x61, 0xc5, 0xd0, 0x2b, 0x9a, 0xc4, 0xf0, - 0x2b, 0x9a, 0xd7, 0xe1, 0x42, 0xc5, 0xb5, 0xb4, 0x1e, 0x6e, 0x07, 0x5b, 0xae, 0x4d, 0x67, 0x39, - 0x70, 0x3b, 0x8e, 0x25, 0xd2, 0x7d, 0x5a, 0x20, 0x5e, 0xde, 0x31, 0xfb, 0x4d, 0xd7, 0xb4, 0xf9, - 0xa1, 0x52, 0x14, 0x0b, 0x1f, 0x4a, 0x90, 0x11, 0x1d, 0xa0, 0xfb, 0x43, 0xd4, 0xbe, 0x1e, 0x99, - 0x22, 0x01, 0x89, 0xb0, 0xf9, 0x16, 0xb0, 0x8d, 0xce, 0x3f, 0xe6, 0x2a, 0x8b, 0x9d, 0x8f, 0x54, - 0x90, 0xae, 0xc8, 0xf1, 0x89, 0xc7, 0xc8, 0xb8, 0xae, 0x88, 0xba, 0x3a, 0x05, 0xdd, 0xfb, 0x44, - 0x06, 0x35, 0x3c, 0x05, 0x13, 0x2a, 0x3f, 0x2a, 0xed, 0xec, 0x73, 0x72, 0xd6, 0xf6, 0x77, 0x76, - 0xb2, 0x0b, 0x84, 0xca, 0x91, 0xca, 0xad, 0xdd, 0xdd, 0x1d, 0xad, 0x54, 0x63, 0x14, 0x8f, 0xd4, - 0x57, 0x6b, 0x0d, 0xed, 0x81, 0xa6, 0x67, 0xe5, 0x91, 0x4e, 0x76, 0x76, 0x6b, 0x0f, 0xb2, 0x09, - 0xc2, 0xfb, 0x48, 0x65, 0x65, 0x77, 0x7f, 0x6b, 0x47, 0xcb, 0x2a, 0x23, 0xd5, 0xf5, 0x86, 0x5e, - 0xad, 0x3d, 0xc8, 0x26, 0xd1, 0x15, 0xc8, 0x46, 0x87, 0x7c, 0xa7, 0xa1, 0xd5, 0xb3, 0xa9, 0x91, - 0x8e, 0x2b, 0xa5, 0x86, 0x96, 0x4d, 0xa3, 0x3c, 0x5c, 0x8b, 0x54, 0x92, 0x33, 0x99, 0xb1, 0xbb, - 0xf5, 0xa6, 0x56, 0x6e, 0x64, 0x33, 0xe8, 0x06, 0x5c, 0x1d, 0x6d, 0x2b, 0xe9, 0x7a, 0xe9, 0x9d, - 0xac, 0x3a, 0xd2, 0x57, 0x43, 0xfb, 0x5e, 0x23, 0x0b, 0x23, 0x7d, 0x71, 0x8b, 0x8c, 0x72, 0xad, - 0x91, 0x5d, 0x44, 0xd7, 0x61, 0x79, 0xc4, 0x2a, 0xda, 0x70, 0x61, 0xb4, 0x27, 0x5d, 0xd3, 0xb2, - 0x17, 0xef, 0xfd, 0x4c, 0x1a, 0x90, 0x83, 0xce, 0xec, 0xd3, 0xf0, 0x54, 0x65, 0xb7, 0x6c, 0x68, - 0x8f, 0xb4, 0x5a, 0x43, 0xcc, 0x41, 0x79, 0xff, 0x21, 0x29, 0xb1, 0x78, 0x40, 0x22, 0xc9, 0x14, - 0xd0, 0xdb, 0xa5, 0x46, 0x79, 0x5b, 0xab, 0x64, 0x25, 0xf4, 0x0c, 0xdc, 0x9d, 0x04, 0xda, 0xaf, - 0x09, 0x98, 0x3c, 0x0d, 0xb6, 0xa5, 0xef, 0x96, 0x2a, 0xe5, 0x52, 0xbd, 0x91, 0x4d, 0x6c, 0xdd, - 0xff, 0xed, 0xa7, 0x2b, 0xd2, 0x1f, 0x3f, 0x5d, 0x91, 0xfe, 0xf2, 0xe9, 0x8a, 0xf4, 0xd3, 0xbf, - 0xad, 0x2c, 0xc0, 0x65, 0x1b, 0xf7, 0x04, 0x67, 0xcc, 0x8e, 0x53, 0xec, 0x6d, 0xec, 0x49, 0xef, - 0x2a, 0xc5, 0x57, 0x7b, 0x1b, 0x07, 0x29, 0x1a, 0xb1, 0x9f, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x8f, 0x8c, 0xc7, 0x33, 0xd5, 0x29, 0x00, 0x00, + // 2717 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcd, 0x8f, 0x23, 0x47, + 0x15, 0x9f, 0xb6, 0xdb, 0x1f, 0xfd, 0x66, 0x77, 0xc7, 0x5b, 0xfb, 0xe5, 0xf5, 0xee, 0x4e, 0x76, + 0x1d, 0x12, 0x26, 0x1b, 0xe2, 0xd9, 0x9d, 0x7c, 0x10, 0x12, 0x12, 0xf0, 0xd8, 0x9d, 0x9d, 0x49, + 0x66, 0x3d, 0x43, 0xdb, 0xb3, 0x21, 0x11, 0xa8, 0xd5, 0xd3, 0x5d, 0x3b, 0xd3, 0x59, 0xdb, 0xdd, + 0xe9, 0x2e, 0x3b, 0x6b, 0x89, 0x53, 0x14, 0x24, 0xae, 0xdc, 0xf8, 0x0b, 0x90, 0x10, 0x12, 0xf7, + 0x1c, 0xe1, 0x80, 0x90, 0x10, 0x02, 0x89, 0x48, 0x5c, 0x21, 0x1c, 0x10, 0xdc, 0x22, 0x24, 0x6e, + 0x48, 0xa8, 0xbe, 0xda, 0x6d, 0xbb, 0xed, 0xf5, 0x38, 0x93, 0x68, 0x23, 0x6e, 0x5d, 0x55, 0xbf, + 0x57, 0xf5, 0x5e, 0xd5, 0xef, 0xbd, 0x7a, 0xd5, 0x55, 0x70, 0x79, 0xe0, 0x05, 0x0f, 0x5c, 0xbc, + 0xde, 0xbf, 0xbd, 0x1e, 0xe0, 0xd0, 0xeb, 0x05, 0x36, 0x0e, 0x2b, 0x7e, 0xe0, 0x11, 0x0f, 0x69, + 0xbc, 0xa9, 0xd2, 0xbf, 0x5d, 0x7a, 0xe2, 0xd0, 0xf3, 0x0e, 0xdb, 0x78, 0x9d, 0x35, 0x1c, 0xf4, + 0xee, 0xaf, 0x13, 0xb7, 0x83, 0x43, 0x62, 0x75, 0x7c, 0x8e, 0x2d, 0xad, 0x8e, 0x03, 0x3e, 0x08, + 0x2c, 0xdf, 0xc7, 0x81, 0xe8, 0xab, 0xfc, 0x7b, 0x05, 0xf2, 0xcd, 0xae, 0xe5, 0x87, 0x47, 0x1e, + 0x41, 0x37, 0x41, 0x0d, 0x3c, 0x8f, 0x14, 0x95, 0xeb, 0xca, 0xda, 0xf2, 0xc6, 0xc5, 0x4a, 0x34, + 0x4e, 0xe5, 0xcd, 0xe6, 0x6e, 0x43, 0x6f, 0xe3, 0x0e, 0xee, 0x12, 0x83, 0x61, 0xd0, 0x77, 0x41, + 0xf3, 0x03, 0x1c, 0xe2, 0xae, 0x8d, 0xc3, 0x62, 0xea, 0x7a, 0x7a, 0x6d, 0x79, 0xa3, 0x1c, 0x13, + 0x90, 0x7d, 0x56, 0xf6, 0x24, 0x48, 0xef, 0x92, 0x60, 0x60, 0x0c, 0x85, 0x4a, 0xdf, 0x83, 0x33, + 0xa3, 0x8d, 0xa8, 0x00, 0xe9, 0x07, 0x78, 0xc0, 0x86, 0xd7, 0x0c, 0xfa, 0x89, 0x9e, 0x81, 0x4c, + 0xdf, 0x6a, 0xf7, 0x70, 0x31, 0xc5, 0x54, 0x3a, 0x17, 0x1b, 0x41, 0xca, 0x1a, 0x1c, 0xf1, 0x4a, + 0xea, 0x65, 0xa5, 0xfc, 0xd3, 0x14, 0x40, 0xed, 0xc8, 0xea, 0x1e, 0xe2, 0x3d, 0xcb, 0x7e, 0x80, + 0x6e, 0xc0, 0x29, 0xc7, 0xb3, 0x7b, 0x54, 0x6b, 0x73, 0xd8, 0xf1, 0xb2, 0xac, 0x7b, 0x0b, 0x0f, + 0xd0, 0x8b, 0x00, 0xf6, 0x11, 0xb6, 0x1f, 0xf8, 0x9e, 0xdb, 0x25, 0x62, 0x94, 0x0b, 0xb1, 0x51, + 0x6a, 0x51, 0xa3, 0x11, 0x03, 0xa2, 0x12, 0xe4, 0x43, 0x61, 0x61, 0x31, 0x7d, 0x5d, 0x59, 0x3b, + 0x65, 0x44, 0x65, 0xf4, 0x2c, 0xe4, 0x6c, 0xa6, 0x43, 0x58, 0x54, 0xd9, 0xbc, 0x9c, 0x1d, 0xe9, + 0x8f, 0xb6, 0x18, 0x12, 0x81, 0xaa, 0x70, 0xb6, 0xe3, 0x76, 0xcd, 0x70, 0xd0, 0xb5, 0xb1, 0x63, + 0x12, 0xd7, 0x7e, 0x80, 0x49, 0x31, 0x33, 0xa1, 0x46, 0xcb, 0xed, 0xe0, 0x16, 0x6b, 0x34, 0x56, + 0x3a, 0x6e, 0xb7, 0xc9, 0xe0, 0xbc, 0x02, 0x5d, 0x03, 0x70, 0x43, 0x33, 0xc0, 0x1d, 0xaf, 0x8f, + 0x9d, 0x62, 0xf6, 0xba, 0xb2, 0x96, 0x37, 0x34, 0x37, 0x34, 0x78, 0x45, 0xf9, 0xd7, 0x0a, 0x64, + 0xf9, 0xa8, 0xe8, 0x49, 0x48, 0xb9, 0x8e, 0x58, 0xdd, 0x73, 0x13, 0x4a, 0x6d, 0xd7, 0x8d, 0x94, + 0xeb, 0xa0, 0x22, 0xe4, 0x3a, 0x38, 0x0c, 0xad, 0x43, 0x3e, 0xe9, 0x9a, 0x21, 0x8b, 0xe8, 0x05, + 0x00, 0xcf, 0xc7, 0x81, 0x45, 0x5c, 0xaf, 0x1b, 0x16, 0xd3, 0xcc, 0xb6, 0xf3, 0xb1, 0x6e, 0x76, + 0x65, 0xa3, 0x11, 0xc3, 0xa1, 0x4d, 0x58, 0x91, 0x6b, 0x6e, 0x72, 0xab, 0x8b, 0x2a, 0xd3, 0xe0, + 0x72, 0xc2, 0x62, 0x8a, 0xe9, 0x39, 0xe3, 0x8f, 0x94, 0xcb, 0x3f, 0x56, 0x20, 0x2f, 0x95, 0xa4, + 0xf6, 0xda, 0x6d, 0x97, 0xae, 0x69, 0x88, 0xdf, 0x67, 0xd6, 0x9c, 0x36, 0x34, 0x5e, 0xd3, 0xc4, + 0xef, 0xa3, 0x1b, 0x00, 0x21, 0x0e, 0xfa, 0x38, 0x60, 0xcd, 0xd4, 0x84, 0xf4, 0x66, 0xea, 0x96, + 0x62, 0x68, 0xbc, 0x96, 0x42, 0xae, 0x42, 0xae, 0x6d, 0x75, 0x7c, 0x2f, 0xe0, 0x8b, 0xc7, 0xdb, + 0x65, 0x15, 0xba, 0x0c, 0x79, 0xcb, 0x26, 0x5e, 0x60, 0xba, 0x0e, 0xd3, 0xf4, 0x94, 0x91, 0x63, + 0xe5, 0x6d, 0xa7, 0xfc, 0xd1, 0x2a, 0x68, 0x91, 0x95, 0xe8, 0x1b, 0x90, 0x0e, 0xb1, 0xf4, 0x96, + 0x62, 0xd2, 0x44, 0x54, 0x9a, 0x98, 0x6c, 0x2d, 0x19, 0x14, 0x46, 0xd1, 0x96, 0xe3, 0x08, 0x8a, + 0x25, 0xa3, 0xab, 0x8e, 0x43, 0xd1, 0x96, 0xe3, 0xa0, 0x75, 0x50, 0xe9, 0xf2, 0x31, 0xfd, 0x46, + 0xa7, 0x6a, 0x08, 0xbf, 0xeb, 0xf5, 0xf1, 0xd6, 0x92, 0xc1, 0x80, 0xe8, 0x45, 0xc8, 0x72, 0x0a, + 0x88, 0xd9, 0xbd, 0x92, 0x28, 0xc2, 0x49, 0xb1, 0xb5, 0x64, 0x08, 0x30, 0x1d, 0x07, 0x3b, 0xae, + 0xa4, 0x5c, 0xf2, 0x38, 0xba, 0xe3, 0x52, 0x2b, 0x18, 0x90, 0x8e, 0x13, 0xe2, 0x36, 0xb6, 0x09, + 0x63, 0xda, 0xb4, 0x71, 0x9a, 0x0c, 0x42, 0xc7, 0xe1, 0x60, 0xb4, 0x01, 0x99, 0x90, 0x0c, 0xda, + 0xb8, 0x98, 0x63, 0x52, 0xa5, 0x64, 0x29, 0x8a, 0xd8, 0x5a, 0x32, 0x38, 0x14, 0xbd, 0x0a, 0x79, + 0xb7, 0x6b, 0x07, 0xd8, 0x0a, 0x71, 0x31, 0xcf, 0xc4, 0xae, 0x25, 0x8a, 0x6d, 0x0b, 0xd0, 0xd6, + 0x92, 0x11, 0x09, 0xa0, 0x6f, 0x83, 0x46, 0x02, 0x8c, 0x4d, 0x66, 0x9d, 0x36, 0x43, 0xba, 0x15, + 0x60, 0x2c, 0x2c, 0xcc, 0x13, 0xf1, 0x8d, 0xbe, 0x03, 0xc0, 0xa4, 0xb9, 0xce, 0xc0, 0xc4, 0x57, + 0xa7, 0x8a, 0x4b, 0xbd, 0xd9, 0x88, 0xac, 0x50, 0xfa, 0xad, 0x02, 0xe9, 0x26, 0x26, 0xd4, 0xbf, + 0x7d, 0x2b, 0xa0, 0x64, 0xa5, 0x7a, 0x11, 0xec, 0x98, 0x96, 0x64, 0xcc, 0x34, 0xff, 0xe6, 0xf8, + 0x1a, 0x87, 0x57, 0x89, 0x8c, 0x8a, 0xa9, 0x61, 0x54, 0xdc, 0x90, 0x51, 0x91, 0xb3, 0xe3, 0x6a, + 0x72, 0xa0, 0x6e, 0xba, 0x1d, 0xbf, 0x2d, 0xc3, 0x23, 0x7a, 0x09, 0x96, 0xf1, 0x43, 0x6c, 0xf7, + 0x84, 0x0a, 0xea, 0x2c, 0x15, 0x40, 0x22, 0xab, 0xa4, 0xf4, 0x6f, 0x05, 0xd2, 0x55, 0xc7, 0x39, + 0x09, 0x43, 0x5e, 0x63, 0x91, 0xa0, 0x1f, 0xef, 0x20, 0x35, 0xab, 0x83, 0xd3, 0x14, 0x3d, 0x14, + 0xff, 0x32, 0xad, 0xfe, 0x8f, 0x02, 0x2a, 0x75, 0xaf, 0xc7, 0xc0, 0xec, 0x17, 0x00, 0x62, 0x92, + 0xe9, 0x59, 0x92, 0x9a, 0x1d, 0x49, 0x2d, 0x6a, 0xf8, 0xc7, 0x0a, 0x64, 0x79, 0x90, 0x38, 0x09, + 0xd3, 0x47, 0x75, 0x4f, 0x2d, 0xa6, 0x7b, 0x7a, 0x5e, 0xdd, 0x7f, 0xa3, 0x82, 0xca, 0xbc, 0xf7, + 0x04, 0x34, 0xbf, 0x09, 0xea, 0xfd, 0xc0, 0xeb, 0x08, 0x9d, 0xe3, 0xa9, 0x50, 0x0b, 0x3f, 0x24, + 0x0d, 0xcf, 0xc1, 0x7b, 0x5e, 0x68, 0x30, 0x0c, 0x7a, 0x1a, 0x52, 0xc4, 0x13, 0x6a, 0x4e, 0x43, + 0xa6, 0x88, 0x87, 0x8e, 0xe0, 0xd2, 0x50, 0x1f, 0xb3, 0x63, 0xf9, 0xe6, 0xc1, 0xc0, 0x64, 0x5b, + 0x8b, 0x48, 0x14, 0x36, 0xa6, 0x86, 0xdf, 0x4a, 0xa4, 0xd9, 0x5d, 0xcb, 0xdf, 0x1c, 0x54, 0xa9, + 0x10, 0x4f, 0xa8, 0xce, 0xd9, 0x93, 0x2d, 0x74, 0x0f, 0xb7, 0xbd, 0x2e, 0xc1, 0x5d, 0x1e, 0xd8, + 0x35, 0x43, 0x16, 0xc7, 0xe7, 0x36, 0x3b, 0xe7, 0xdc, 0xa2, 0x6d, 0x00, 0x8b, 0x90, 0xc0, 0x3d, + 0xe8, 0x11, 0x1c, 0x16, 0x73, 0x4c, 0xdd, 0x67, 0xa6, 0xab, 0x5b, 0x8d, 0xb0, 0x5c, 0xcb, 0x98, + 0x70, 0xe9, 0x87, 0x50, 0x9c, 0x66, 0x4d, 0x42, 0x06, 0xf8, 0xec, 0x68, 0x06, 0x38, 0x45, 0xd5, + 0x61, 0x0e, 0x58, 0x7a, 0x0d, 0x56, 0xc6, 0x46, 0x4f, 0xe8, 0xf5, 0x7c, 0xbc, 0x57, 0x2d, 0x2e, + 0xfe, 0x17, 0x05, 0xb2, 0x7c, 0xf7, 0x7a, 0x5c, 0x69, 0xb4, 0xa8, 0x6b, 0xff, 0x52, 0x85, 0x0c, + 0xdb, 0x9c, 0x1e, 0x57, 0xc3, 0xde, 0x1c, 0xe1, 0x18, 0x77, 0x89, 0x9b, 0xd3, 0x13, 0x85, 0x59, + 0x24, 0x1b, 0x9f, 0xa4, 0xcc, 0xbc, 0x3c, 0x77, 0xa7, 0xfb, 0x68, 0x96, 0x29, 0xf4, 0xfc, 0x0c, + 0x85, 0x8e, 0xe5, 0xa4, 0x9f, 0x97, 0xa8, 0x5f, 0xb0, 0x1b, 0x7d, 0xac, 0x40, 0x5e, 0x26, 0x56, + 0x27, 0x41, 0x98, 0x8d, 0x51, 0x05, 0x16, 0xd9, 0xbd, 0xe7, 0xde, 0x08, 0x3e, 0x4b, 0x43, 0x5e, + 0xa6, 0x75, 0x27, 0xa1, 0xfb, 0xd3, 0x23, 0x64, 0x47, 0x71, 0xa9, 0x00, 0xc7, 0x88, 0x5e, 0x8e, + 0x11, 0x3d, 0x09, 0x45, 0x49, 0xde, 0x7e, 0xd4, 0x26, 0xf0, 0xd2, 0xcc, 0x2c, 0xf5, 0x98, 0x1b, + 0xc1, 0x2d, 0xc8, 0x8b, 0xc8, 0x1f, 0x16, 0x33, 0x13, 0x07, 0x36, 0xda, 0x29, 0x75, 0xc0, 0xd0, + 0x88, 0x50, 0xe8, 0x09, 0x58, 0x0e, 0xfd, 0xb6, 0x4b, 0xcc, 0x36, 0xee, 0xe3, 0x36, 0x4b, 0xd7, + 0x33, 0x06, 0xb0, 0xaa, 0x1d, 0x5a, 0xb3, 0xe8, 0x0e, 0xf2, 0x45, 0xf3, 0xf5, 0x6f, 0x29, 0xd0, + 0xa2, 0x5c, 0xfc, 0x71, 0x5b, 0xf4, 0x46, 0x42, 0x64, 0xab, 0xcc, 0x3e, 0x4e, 0x7c, 0x11, 0xd1, + 0xed, 0x73, 0x86, 0x9c, 0xcd, 0x2c, 0xa8, 0x07, 0x9e, 0x33, 0x28, 0x7f, 0xa6, 0xc0, 0xd9, 0x09, + 0xa7, 0x1d, 0x4b, 0xf6, 0x94, 0x39, 0x93, 0xbd, 0x5b, 0x90, 0x67, 0xff, 0x29, 0x1e, 0x99, 0x20, + 0xe6, 0x18, 0x8c, 0x27, 0x95, 0xe2, 0x67, 0xc7, 0xa3, 0x13, 0x62, 0x01, 0xac, 0x12, 0xb4, 0x06, + 0x2a, 0x19, 0xf8, 0xfc, 0x74, 0x7c, 0x66, 0xc4, 0x0b, 0xee, 0x51, 0xfb, 0x5a, 0x03, 0x1f, 0x1b, + 0x0c, 0x31, 0xb4, 0x3f, 0xc3, 0x0e, 0xff, 0xbc, 0x50, 0xfe, 0xc5, 0x69, 0x58, 0x8e, 0xd9, 0x8c, + 0xea, 0xb0, 0xfc, 0x5e, 0xe8, 0x75, 0x4d, 0xef, 0xe0, 0x3d, 0x7a, 0x18, 0xe6, 0xe6, 0xde, 0x48, + 0x8e, 0x6a, 0xec, 0x7b, 0x97, 0x01, 0xb7, 0x96, 0x0c, 0xa0, 0x72, 0xbc, 0x84, 0xaa, 0xc0, 0x4a, + 0xa6, 0x15, 0x04, 0xd6, 0x40, 0xd8, 0x7f, 0x7d, 0x46, 0x27, 0x55, 0x8a, 0xa3, 0x27, 0x4d, 0x2a, + 0xc5, 0x0a, 0xfc, 0x47, 0x9c, 0xdb, 0x71, 0x89, 0x1b, 0xfd, 0x2e, 0x98, 0xd6, 0xc3, 0x9e, 0xc4, + 0xd1, 0x1e, 0x22, 0x21, 0x74, 0x1b, 0x54, 0x82, 0x1f, 0x4a, 0x1a, 0x5d, 0x99, 0x22, 0x4c, 0x77, + 0xeb, 0xad, 0x25, 0x83, 0x41, 0xd1, 0x2b, 0x34, 0xc1, 0xec, 0x75, 0x09, 0x0e, 0x44, 0x00, 0x58, + 0x9d, 0x22, 0x55, 0xe3, 0xa8, 0xad, 0x25, 0x43, 0x0a, 0xb0, 0xe1, 0x02, 0x2c, 0xff, 0x04, 0x4c, + 0x1d, 0x2e, 0xc0, 0xec, 0xe7, 0x06, 0x85, 0x96, 0x3e, 0x51, 0x00, 0x86, 0x73, 0x88, 0xd6, 0x20, + 0xd3, 0xa5, 0x61, 0xab, 0xa8, 0x30, 0x4f, 0x8a, 0x7b, 0x9d, 0xb1, 0xd5, 0xa2, 0x11, 0xcd, 0xe0, + 0x80, 0x05, 0x0f, 0x20, 0x71, 0x4e, 0xa6, 0x17, 0xe0, 0xa4, 0x3a, 0x1f, 0x27, 0x4b, 0x7f, 0x56, + 0x40, 0x8b, 0x56, 0x75, 0xa6, 0x55, 0x77, 0xaa, 0x5f, 0x1d, 0xab, 0xfe, 0xa9, 0x80, 0x16, 0x31, + 0x2d, 0xf2, 0x3b, 0x65, 0x7e, 0xbf, 0x4b, 0xc5, 0xfc, 0x6e, 0xc1, 0xe3, 0x6f, 0xdc, 0x56, 0x75, + 0x01, 0x5b, 0x33, 0x73, 0xda, 0xfa, 0x47, 0x05, 0x54, 0xea, 0x18, 0xe8, 0x99, 0xd1, 0xc5, 0x3b, + 0x97, 0x90, 0xe6, 0x7e, 0x35, 0x56, 0xef, 0x1f, 0x0a, 0xe4, 0x84, 0xd3, 0xfe, 0x3f, 0xac, 0x5d, + 0x80, 0xf1, 0xcc, 0xb5, 0x13, 0x19, 0xd2, 0x57, 0x62, 0xed, 0xa2, 0xfd, 0xf9, 0x2e, 0xe4, 0x44, + 0x1c, 0x4c, 0xd8, 0xde, 0x6f, 0x41, 0x0e, 0xf3, 0x18, 0x9b, 0x70, 0x78, 0x8b, 0xdf, 0xf3, 0x48, + 0x58, 0xd9, 0x86, 0x9c, 0x08, 0x40, 0x34, 0x29, 0xea, 0xd2, 0xad, 0x42, 0x99, 0x48, 0x77, 0x64, + 0x88, 0x62, 0xed, 0x0b, 0x0c, 0x72, 0x0f, 0xf2, 0x54, 0x9e, 0xa6, 0x27, 0x43, 0x36, 0x29, 0xb1, + 0x0c, 0x84, 0xce, 0x49, 0xcf, 0x77, 0xe6, 0x9b, 0x7b, 0x01, 0xac, 0x92, 0xf2, 0x1f, 0x52, 0x90, + 0x97, 0x1e, 0x88, 0x9e, 0x8a, 0x5d, 0x80, 0x5c, 0x48, 0x70, 0x51, 0x71, 0x05, 0x92, 0x98, 0x01, + 0x2d, 0x98, 0x77, 0xbc, 0x08, 0xcb, 0x6e, 0x37, 0x34, 0xd9, 0x1f, 0x40, 0x71, 0xa1, 0x30, 0x75, + 0x6c, 0xcd, 0xed, 0x86, 0x7b, 0x01, 0xee, 0x6f, 0x3b, 0xa8, 0x36, 0x92, 0x31, 0xf2, 0xd4, 0xfd, + 0xc9, 0x04, 0xa9, 0x99, 0x7f, 0x5a, 0x8c, 0x79, 0xd2, 0xbd, 0x19, 0x57, 0x6c, 0x72, 0x41, 0xe2, + 0x57, 0x6c, 0xef, 0x02, 0x0c, 0x35, 0x5e, 0x30, 0xe7, 0xbb, 0x08, 0x59, 0xef, 0xfe, 0xfd, 0x10, + 0xf3, 0x55, 0xcc, 0x18, 0xa2, 0x54, 0xfe, 0x95, 0x38, 0xb7, 0xcd, 0x5e, 0x2b, 0x01, 0x10, 0x6b, + 0x85, 0x44, 0x8c, 0xe2, 0x4b, 0x35, 0x16, 0x8d, 0xd2, 0xd3, 0xd7, 0x4f, 0x5d, 0x6c, 0xfd, 0x32, + 0xb3, 0xf4, 0x89, 0xad, 0x9f, 0x10, 0xa3, 0xce, 0x40, 0xc5, 0xb2, 0x8f, 0x12, 0x6b, 0xe0, 0x87, + 0x64, 0x9b, 0x31, 0xcf, 0xc1, 0x3e, 0x39, 0x12, 0xe7, 0x2e, 0x5e, 0x18, 0x23, 0x43, 0x7e, 0x92, + 0x0c, 0xa2, 0xaf, 0x2f, 0x9d, 0x0c, 0xaf, 0xf0, 0x33, 0x17, 0x3b, 0x43, 0xa2, 0xe7, 0x86, 0x3f, + 0x1d, 0x67, 0x04, 0x52, 0x89, 0x61, 0x44, 0x8a, 0xe6, 0xe0, 0x84, 0x89, 0xf4, 0x23, 0xc8, 0x89, + 0xe3, 0x17, 0xda, 0x00, 0x4d, 0x9c, 0x04, 0x1f, 0xc5, 0xa6, 0x3c, 0xc7, 0x6d, 0x3b, 0xe8, 0x35, + 0x58, 0x69, 0xe3, 0xfb, 0xc4, 0x0c, 0xdd, 0x83, 0xb6, 0xdb, 0x3d, 0xa4, 0x92, 0xa9, 0x59, 0x92, + 0xa7, 0x29, 0xba, 0xc9, 0xc1, 0xdb, 0x4e, 0xb9, 0x03, 0xea, 0x7e, 0x88, 0x03, 0x74, 0x26, 0x62, + 0xb0, 0xc6, 0xa8, 0x5a, 0x82, 0x7c, 0x2f, 0xc4, 0x41, 0xd7, 0xea, 0x48, 0xba, 0x46, 0x65, 0xf4, + 0xad, 0x84, 0xad, 0xb2, 0x54, 0xe1, 0x97, 0xf7, 0x15, 0x79, 0x79, 0xcf, 0x66, 0x81, 0xdd, 0xee, + 0xc7, 0x26, 0xa1, 0xfc, 0xdf, 0x14, 0xe4, 0xf6, 0x02, 0x8f, 0x65, 0xc6, 0xe3, 0x43, 0x22, 0x50, + 0x63, 0xc3, 0xb1, 0x6f, 0x74, 0x0d, 0xc0, 0xef, 0x1d, 0xb4, 0x5d, 0x9b, 0xdd, 0x89, 0x73, 0x17, + 0xd1, 0x78, 0xcd, 0x5b, 0x78, 0x40, 0x9b, 0x43, 0x6c, 0x07, 0x98, 0x5f, 0x99, 0xab, 0xbc, 0x99, + 0xd7, 0xd0, 0xe6, 0x35, 0x28, 0x58, 0x3d, 0x72, 0x64, 0x7e, 0x80, 0x0f, 0x8e, 0x3c, 0xef, 0x81, + 0xd9, 0x0b, 0xda, 0xe2, 0x1f, 0xf3, 0x19, 0x5a, 0xff, 0x36, 0xaf, 0xde, 0x0f, 0xda, 0xe8, 0x16, + 0x9c, 0x1f, 0x41, 0x76, 0x30, 0x39, 0xf2, 0x9c, 0x90, 0xfd, 0x47, 0xd3, 0x0c, 0x14, 0x43, 0xdf, + 0xe5, 0x2d, 0xe8, 0x75, 0xb8, 0x22, 0x6e, 0x76, 0x1d, 0x6c, 0xd9, 0xc4, 0xed, 0x5b, 0x04, 0x9b, + 0xe4, 0x28, 0xc0, 0xe1, 0x91, 0xd7, 0x76, 0x98, 0x4f, 0x68, 0xc6, 0x65, 0x0e, 0xa9, 0x47, 0x88, + 0x96, 0x04, 0x8c, 0x4d, 0x62, 0xfe, 0x18, 0x93, 0x48, 0x45, 0x63, 0x9b, 0x8b, 0xf6, 0x68, 0xd1, + 0xe1, 0x0e, 0xf3, 0x93, 0x34, 0x5c, 0xdc, 0xa7, 0x25, 0xeb, 0xa0, 0x8d, 0xc5, 0x42, 0xbc, 0xe1, + 0xe2, 0xb6, 0x13, 0xa2, 0x5b, 0x62, 0xfa, 0x15, 0xf1, 0xcf, 0x6b, 0xbc, 0xbf, 0x26, 0x09, 0xdc, + 0xee, 0x21, 0x4b, 0xa6, 0xc4, 0xe2, 0xbc, 0x91, 0x30, 0xbd, 0xa9, 0x39, 0xa4, 0xc7, 0x27, 0xff, + 0xfe, 0x94, 0xc9, 0xe7, 0xcc, 0x7a, 0x21, 0xc6, 0xe3, 0x64, 0xd5, 0x2b, 0xd5, 0x89, 0xe5, 0x49, + 0x5c, 0xb2, 0x1f, 0xcc, 0x5e, 0x32, 0x75, 0x0e, 0xd5, 0xa7, 0x2f, 0x68, 0xa9, 0x02, 0x68, 0x52, + 0x0f, 0xfe, 0x42, 0x81, 0x9b, 0xa3, 0x30, 0x2e, 0xc9, 0x62, 0xf9, 0xc3, 0x14, 0xac, 0xd4, 0xc5, + 0xeb, 0x8e, 0x66, 0xaf, 0xd3, 0xb1, 0x82, 0xc1, 0x84, 0x4b, 0x4c, 0x5e, 0xa7, 0x8e, 0x3f, 0xe6, + 0xd0, 0x62, 0x8f, 0x39, 0x46, 0x29, 0xa5, 0x1e, 0x87, 0x52, 0xaf, 0xc2, 0xb2, 0x65, 0xdb, 0x38, + 0x0c, 0xe3, 0x69, 0xe9, 0x2c, 0x59, 0x90, 0xf0, 0x09, 0x3e, 0x66, 0x8f, 0xc3, 0xc7, 0x7f, 0x29, + 0xc3, 0x87, 0x35, 0xe2, 0xe1, 0xc7, 0xcb, 0x23, 0x89, 0xfc, 0xd7, 0xa6, 0x3e, 0xbc, 0x10, 0x2f, + 0x41, 0x62, 0x89, 0xfd, 0x3a, 0xe4, 0xe5, 0x5b, 0x8c, 0x59, 0x6f, 0x70, 0x22, 0x50, 0xb9, 0x23, + 0x5f, 0xe0, 0xd0, 0x4e, 0xd0, 0x15, 0xb8, 0x54, 0xdb, 0xaa, 0x36, 0xee, 0xe8, 0x66, 0xeb, 0x9d, + 0x3d, 0xdd, 0xdc, 0x6f, 0x34, 0xf7, 0xf4, 0xda, 0xf6, 0x1b, 0xdb, 0x7a, 0xbd, 0xb0, 0x84, 0xce, + 0xc1, 0x4a, 0xbc, 0x71, 0x6f, 0xbf, 0x55, 0x50, 0xd0, 0x45, 0x40, 0xf1, 0xca, 0xba, 0xbe, 0xa3, + 0xb7, 0xf4, 0x42, 0x0a, 0x5d, 0x80, 0xb3, 0xf1, 0xfa, 0xda, 0x8e, 0x5e, 0x35, 0x0a, 0xe9, 0x72, + 0x1f, 0xf2, 0x52, 0x09, 0x74, 0x1b, 0x54, 0x4a, 0x65, 0xb1, 0xfb, 0x5c, 0x4b, 0xd0, 0xb3, 0x52, + 0xb7, 0x88, 0xc5, 0xb7, 0x46, 0x06, 0x2d, 0x7d, 0x13, 0xb4, 0xa8, 0xea, 0x38, 0xbf, 0xc2, 0xca, + 0x0d, 0x6a, 0x66, 0xf4, 0x1c, 0x68, 0xf4, 0xcd, 0x89, 0x92, 0xf4, 0xe6, 0x64, 0xf4, 0xd5, 0x4a, + 0x6a, 0xec, 0xd5, 0x4a, 0xf9, 0x23, 0x05, 0x96, 0x63, 0xf7, 0x21, 0x27, 0xbb, 0x1f, 0xa2, 0xaf, + 0xc3, 0x4a, 0x80, 0xdb, 0x16, 0x3d, 0x90, 0x9b, 0x02, 0x90, 0x66, 0x80, 0x33, 0xb2, 0x7a, 0x97, + 0x6f, 0x9c, 0x36, 0xc0, 0xb0, 0xe7, 0xf8, 0x3b, 0x19, 0x65, 0xf2, 0x9d, 0xcc, 0x55, 0xd0, 0x1c, + 0xdc, 0xa6, 0xe7, 0x7c, 0x1c, 0x48, 0x83, 0xa2, 0x8a, 0x91, 0x57, 0x34, 0xe9, 0xd1, 0x57, 0x34, + 0xaf, 0xc3, 0xa9, 0xba, 0x67, 0xeb, 0x7d, 0xdc, 0x25, 0x9b, 0x9e, 0xc3, 0x66, 0x99, 0x78, 0xbe, + 0x6b, 0xcb, 0x74, 0x9f, 0x15, 0xa8, 0x97, 0xfb, 0xd6, 0xa0, 0xed, 0x59, 0x8e, 0x38, 0x54, 0xca, + 0x62, 0xf9, 0x43, 0x05, 0xf2, 0xb2, 0x03, 0xf4, 0xec, 0x08, 0xb5, 0x2f, 0xc5, 0xa6, 0x48, 0x42, + 0x62, 0x6c, 0xbe, 0x0a, 0x7c, 0xa3, 0x0b, 0x8f, 0x84, 0xca, 0x72, 0xe7, 0xa3, 0x15, 0xb4, 0x2b, + 0x7a, 0x7c, 0x12, 0x31, 0x32, 0xa9, 0x2b, 0xaa, 0xae, 0xc1, 0x40, 0x37, 0x3f, 0x49, 0x81, 0x16, + 0x9d, 0x82, 0x29, 0x95, 0xef, 0x55, 0x77, 0xf6, 0x05, 0x39, 0x1b, 0xfb, 0x3b, 0x3b, 0x85, 0x25, + 0x4a, 0xe5, 0x58, 0xe5, 0xe6, 0xee, 0xee, 0x8e, 0x5e, 0x6d, 0x70, 0x8a, 0xc7, 0xea, 0xb7, 0x1b, + 0x2d, 0xfd, 0x8e, 0x6e, 0x14, 0x52, 0x63, 0x9d, 0xec, 0xec, 0x36, 0xee, 0x14, 0xd2, 0x94, 0xf7, + 0xb1, 0xca, 0xfa, 0xee, 0xfe, 0xe6, 0x8e, 0x5e, 0x50, 0xc7, 0xaa, 0x9b, 0x2d, 0x63, 0xbb, 0x71, + 0xa7, 0x90, 0x41, 0xe7, 0xa1, 0x10, 0x1f, 0xf2, 0x9d, 0x96, 0xde, 0x2c, 0x64, 0xc7, 0x3a, 0xae, + 0x57, 0x5b, 0x7a, 0x21, 0x87, 0x4a, 0x70, 0x31, 0x56, 0x49, 0xcf, 0x64, 0xe6, 0xee, 0xe6, 0x9b, + 0x7a, 0xad, 0x55, 0xc8, 0xa3, 0xcb, 0x70, 0x61, 0xbc, 0xad, 0x6a, 0x18, 0xd5, 0x77, 0x0a, 0xda, + 0x58, 0x5f, 0x2d, 0xfd, 0xfb, 0xad, 0x02, 0x8c, 0xf5, 0x25, 0x2c, 0x32, 0x6b, 0x8d, 0x56, 0x61, + 0x19, 0x5d, 0x82, 0x73, 0x63, 0x56, 0xb1, 0x86, 0x53, 0xe3, 0x3d, 0x19, 0xba, 0x5e, 0x38, 0x7d, + 0xf3, 0xe7, 0xca, 0x90, 0x1c, 0x6c, 0x66, 0x9f, 0x84, 0x27, 0xea, 0xbb, 0x35, 0x53, 0xbf, 0xa7, + 0x37, 0x5a, 0x72, 0x0e, 0x6a, 0xfb, 0x77, 0x69, 0x89, 0xc7, 0x03, 0x1a, 0x49, 0x66, 0x80, 0xde, + 0xae, 0xb6, 0x6a, 0x5b, 0x7a, 0xbd, 0xa0, 0xa0, 0xa7, 0xe0, 0xc6, 0x34, 0xd0, 0x7e, 0x43, 0xc2, + 0x52, 0xb3, 0x60, 0x9b, 0xc6, 0x6e, 0xb5, 0x5e, 0xab, 0x36, 0x5b, 0x85, 0xf4, 0xe6, 0xfe, 0xef, + 0x3e, 0x5d, 0x55, 0xfe, 0xf4, 0xe9, 0xaa, 0xf2, 0xd7, 0x4f, 0x57, 0x95, 0x9f, 0xfd, 0x7d, 0x75, + 0x09, 0xce, 0x3a, 0xb8, 0x2f, 0x39, 0x63, 0xf9, 0x6e, 0xa5, 0x7f, 0x7b, 0x4f, 0x79, 0xb7, 0x72, + 0xe8, 0x92, 0xa3, 0xde, 0x41, 0xc5, 0xf6, 0x3a, 0xeb, 0xbc, 0xed, 0x39, 0x82, 0x2d, 0xf9, 0xbd, + 0x6e, 0xf9, 0xee, 0x7a, 0xf4, 0xd0, 0xf3, 0xd5, 0xfe, 0xed, 0x83, 0x2c, 0x8b, 0xed, 0xcf, 0xff, + 0x2f, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x8d, 0x1a, 0x90, 0xff, 0x29, 0x00, 0x00, } func (m *Snapshot) Marshal() (dAtA []byte, err error) { diff --git a/api/yorkie/v1/resources.proto b/api/yorkie/v1/resources.proto index ad27ca5c8..b98bd59bc 100644 --- a/api/yorkie/v1/resources.proto +++ b/api/yorkie/v1/resources.proto @@ -20,7 +20,7 @@ package yorkie.v1; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -option go_package = ".;v1"; +option go_package = "github.com/yorkie-team/yorkie/api/yorkie/v1;v1"; option java_multiple_files = true; option java_package = "dev.yorkie.api.v1"; diff --git a/api/yorkie/v1/v1connect/admin.connect.go b/api/yorkie/v1/v1connect/admin.connect.go new file mode 100644 index 000000000..d78294f72 --- /dev/null +++ b/api/yorkie/v1/v1connect/admin.connect.go @@ -0,0 +1,414 @@ +// +// Copyright 2022 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: yorkie/v1/admin.proto + +package v1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // AdminServiceName is the fully-qualified name of the AdminService service. + AdminServiceName = "yorkie.v1.AdminService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // AdminServiceSignUpProcedure is the fully-qualified name of the AdminService's SignUp RPC. + AdminServiceSignUpProcedure = "/yorkie.v1.AdminService/SignUp" + // AdminServiceLogInProcedure is the fully-qualified name of the AdminService's LogIn RPC. + AdminServiceLogInProcedure = "/yorkie.v1.AdminService/LogIn" + // AdminServiceCreateProjectProcedure is the fully-qualified name of the AdminService's + // CreateProject RPC. + AdminServiceCreateProjectProcedure = "/yorkie.v1.AdminService/CreateProject" + // AdminServiceListProjectsProcedure is the fully-qualified name of the AdminService's ListProjects + // RPC. + AdminServiceListProjectsProcedure = "/yorkie.v1.AdminService/ListProjects" + // AdminServiceGetProjectProcedure is the fully-qualified name of the AdminService's GetProject RPC. + AdminServiceGetProjectProcedure = "/yorkie.v1.AdminService/GetProject" + // AdminServiceUpdateProjectProcedure is the fully-qualified name of the AdminService's + // UpdateProject RPC. + AdminServiceUpdateProjectProcedure = "/yorkie.v1.AdminService/UpdateProject" + // AdminServiceListDocumentsProcedure is the fully-qualified name of the AdminService's + // ListDocuments RPC. + AdminServiceListDocumentsProcedure = "/yorkie.v1.AdminService/ListDocuments" + // AdminServiceGetDocumentProcedure is the fully-qualified name of the AdminService's GetDocument + // RPC. + AdminServiceGetDocumentProcedure = "/yorkie.v1.AdminService/GetDocument" + // AdminServiceRemoveDocumentByAdminProcedure is the fully-qualified name of the AdminService's + // RemoveDocumentByAdmin RPC. + AdminServiceRemoveDocumentByAdminProcedure = "/yorkie.v1.AdminService/RemoveDocumentByAdmin" + // AdminServiceGetSnapshotMetaProcedure is the fully-qualified name of the AdminService's + // GetSnapshotMeta RPC. + AdminServiceGetSnapshotMetaProcedure = "/yorkie.v1.AdminService/GetSnapshotMeta" + // AdminServiceSearchDocumentsProcedure is the fully-qualified name of the AdminService's + // SearchDocuments RPC. + AdminServiceSearchDocumentsProcedure = "/yorkie.v1.AdminService/SearchDocuments" + // AdminServiceListChangesProcedure is the fully-qualified name of the AdminService's ListChanges + // RPC. + AdminServiceListChangesProcedure = "/yorkie.v1.AdminService/ListChanges" +) + +// AdminServiceClient is a client for the yorkie.v1.AdminService service. +type AdminServiceClient interface { + SignUp(context.Context, *connect.Request[v1.SignUpRequest]) (*connect.Response[v1.SignUpResponse], error) + LogIn(context.Context, *connect.Request[v1.LogInRequest]) (*connect.Response[v1.LogInResponse], error) + CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) + ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) + GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) + UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) + ListDocuments(context.Context, *connect.Request[v1.ListDocumentsRequest]) (*connect.Response[v1.ListDocumentsResponse], error) + GetDocument(context.Context, *connect.Request[v1.GetDocumentRequest]) (*connect.Response[v1.GetDocumentResponse], error) + RemoveDocumentByAdmin(context.Context, *connect.Request[v1.RemoveDocumentByAdminRequest]) (*connect.Response[v1.RemoveDocumentByAdminResponse], error) + GetSnapshotMeta(context.Context, *connect.Request[v1.GetSnapshotMetaRequest]) (*connect.Response[v1.GetSnapshotMetaResponse], error) + SearchDocuments(context.Context, *connect.Request[v1.SearchDocumentsRequest]) (*connect.Response[v1.SearchDocumentsResponse], error) + ListChanges(context.Context, *connect.Request[v1.ListChangesRequest]) (*connect.Response[v1.ListChangesResponse], error) +} + +// NewAdminServiceClient constructs a client for the yorkie.v1.AdminService service. By default, it +// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends +// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AdminServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &adminServiceClient{ + signUp: connect.NewClient[v1.SignUpRequest, v1.SignUpResponse]( + httpClient, + baseURL+AdminServiceSignUpProcedure, + opts..., + ), + logIn: connect.NewClient[v1.LogInRequest, v1.LogInResponse]( + httpClient, + baseURL+AdminServiceLogInProcedure, + opts..., + ), + createProject: connect.NewClient[v1.CreateProjectRequest, v1.CreateProjectResponse]( + httpClient, + baseURL+AdminServiceCreateProjectProcedure, + opts..., + ), + listProjects: connect.NewClient[v1.ListProjectsRequest, v1.ListProjectsResponse]( + httpClient, + baseURL+AdminServiceListProjectsProcedure, + opts..., + ), + getProject: connect.NewClient[v1.GetProjectRequest, v1.GetProjectResponse]( + httpClient, + baseURL+AdminServiceGetProjectProcedure, + opts..., + ), + updateProject: connect.NewClient[v1.UpdateProjectRequest, v1.UpdateProjectResponse]( + httpClient, + baseURL+AdminServiceUpdateProjectProcedure, + opts..., + ), + listDocuments: connect.NewClient[v1.ListDocumentsRequest, v1.ListDocumentsResponse]( + httpClient, + baseURL+AdminServiceListDocumentsProcedure, + opts..., + ), + getDocument: connect.NewClient[v1.GetDocumentRequest, v1.GetDocumentResponse]( + httpClient, + baseURL+AdminServiceGetDocumentProcedure, + opts..., + ), + removeDocumentByAdmin: connect.NewClient[v1.RemoveDocumentByAdminRequest, v1.RemoveDocumentByAdminResponse]( + httpClient, + baseURL+AdminServiceRemoveDocumentByAdminProcedure, + opts..., + ), + getSnapshotMeta: connect.NewClient[v1.GetSnapshotMetaRequest, v1.GetSnapshotMetaResponse]( + httpClient, + baseURL+AdminServiceGetSnapshotMetaProcedure, + opts..., + ), + searchDocuments: connect.NewClient[v1.SearchDocumentsRequest, v1.SearchDocumentsResponse]( + httpClient, + baseURL+AdminServiceSearchDocumentsProcedure, + opts..., + ), + listChanges: connect.NewClient[v1.ListChangesRequest, v1.ListChangesResponse]( + httpClient, + baseURL+AdminServiceListChangesProcedure, + opts..., + ), + } +} + +// adminServiceClient implements AdminServiceClient. +type adminServiceClient struct { + signUp *connect.Client[v1.SignUpRequest, v1.SignUpResponse] + logIn *connect.Client[v1.LogInRequest, v1.LogInResponse] + createProject *connect.Client[v1.CreateProjectRequest, v1.CreateProjectResponse] + listProjects *connect.Client[v1.ListProjectsRequest, v1.ListProjectsResponse] + getProject *connect.Client[v1.GetProjectRequest, v1.GetProjectResponse] + updateProject *connect.Client[v1.UpdateProjectRequest, v1.UpdateProjectResponse] + listDocuments *connect.Client[v1.ListDocumentsRequest, v1.ListDocumentsResponse] + getDocument *connect.Client[v1.GetDocumentRequest, v1.GetDocumentResponse] + removeDocumentByAdmin *connect.Client[v1.RemoveDocumentByAdminRequest, v1.RemoveDocumentByAdminResponse] + getSnapshotMeta *connect.Client[v1.GetSnapshotMetaRequest, v1.GetSnapshotMetaResponse] + searchDocuments *connect.Client[v1.SearchDocumentsRequest, v1.SearchDocumentsResponse] + listChanges *connect.Client[v1.ListChangesRequest, v1.ListChangesResponse] +} + +// SignUp calls yorkie.v1.AdminService.SignUp. +func (c *adminServiceClient) SignUp(ctx context.Context, req *connect.Request[v1.SignUpRequest]) (*connect.Response[v1.SignUpResponse], error) { + return c.signUp.CallUnary(ctx, req) +} + +// LogIn calls yorkie.v1.AdminService.LogIn. +func (c *adminServiceClient) LogIn(ctx context.Context, req *connect.Request[v1.LogInRequest]) (*connect.Response[v1.LogInResponse], error) { + return c.logIn.CallUnary(ctx, req) +} + +// CreateProject calls yorkie.v1.AdminService.CreateProject. +func (c *adminServiceClient) CreateProject(ctx context.Context, req *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) { + return c.createProject.CallUnary(ctx, req) +} + +// ListProjects calls yorkie.v1.AdminService.ListProjects. +func (c *adminServiceClient) ListProjects(ctx context.Context, req *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) { + return c.listProjects.CallUnary(ctx, req) +} + +// GetProject calls yorkie.v1.AdminService.GetProject. +func (c *adminServiceClient) GetProject(ctx context.Context, req *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) { + return c.getProject.CallUnary(ctx, req) +} + +// UpdateProject calls yorkie.v1.AdminService.UpdateProject. +func (c *adminServiceClient) UpdateProject(ctx context.Context, req *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) { + return c.updateProject.CallUnary(ctx, req) +} + +// ListDocuments calls yorkie.v1.AdminService.ListDocuments. +func (c *adminServiceClient) ListDocuments(ctx context.Context, req *connect.Request[v1.ListDocumentsRequest]) (*connect.Response[v1.ListDocumentsResponse], error) { + return c.listDocuments.CallUnary(ctx, req) +} + +// GetDocument calls yorkie.v1.AdminService.GetDocument. +func (c *adminServiceClient) GetDocument(ctx context.Context, req *connect.Request[v1.GetDocumentRequest]) (*connect.Response[v1.GetDocumentResponse], error) { + return c.getDocument.CallUnary(ctx, req) +} + +// RemoveDocumentByAdmin calls yorkie.v1.AdminService.RemoveDocumentByAdmin. +func (c *adminServiceClient) RemoveDocumentByAdmin(ctx context.Context, req *connect.Request[v1.RemoveDocumentByAdminRequest]) (*connect.Response[v1.RemoveDocumentByAdminResponse], error) { + return c.removeDocumentByAdmin.CallUnary(ctx, req) +} + +// GetSnapshotMeta calls yorkie.v1.AdminService.GetSnapshotMeta. +func (c *adminServiceClient) GetSnapshotMeta(ctx context.Context, req *connect.Request[v1.GetSnapshotMetaRequest]) (*connect.Response[v1.GetSnapshotMetaResponse], error) { + return c.getSnapshotMeta.CallUnary(ctx, req) +} + +// SearchDocuments calls yorkie.v1.AdminService.SearchDocuments. +func (c *adminServiceClient) SearchDocuments(ctx context.Context, req *connect.Request[v1.SearchDocumentsRequest]) (*connect.Response[v1.SearchDocumentsResponse], error) { + return c.searchDocuments.CallUnary(ctx, req) +} + +// ListChanges calls yorkie.v1.AdminService.ListChanges. +func (c *adminServiceClient) ListChanges(ctx context.Context, req *connect.Request[v1.ListChangesRequest]) (*connect.Response[v1.ListChangesResponse], error) { + return c.listChanges.CallUnary(ctx, req) +} + +// AdminServiceHandler is an implementation of the yorkie.v1.AdminService service. +type AdminServiceHandler interface { + SignUp(context.Context, *connect.Request[v1.SignUpRequest]) (*connect.Response[v1.SignUpResponse], error) + LogIn(context.Context, *connect.Request[v1.LogInRequest]) (*connect.Response[v1.LogInResponse], error) + CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) + ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) + GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) + UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) + ListDocuments(context.Context, *connect.Request[v1.ListDocumentsRequest]) (*connect.Response[v1.ListDocumentsResponse], error) + GetDocument(context.Context, *connect.Request[v1.GetDocumentRequest]) (*connect.Response[v1.GetDocumentResponse], error) + RemoveDocumentByAdmin(context.Context, *connect.Request[v1.RemoveDocumentByAdminRequest]) (*connect.Response[v1.RemoveDocumentByAdminResponse], error) + GetSnapshotMeta(context.Context, *connect.Request[v1.GetSnapshotMetaRequest]) (*connect.Response[v1.GetSnapshotMetaResponse], error) + SearchDocuments(context.Context, *connect.Request[v1.SearchDocumentsRequest]) (*connect.Response[v1.SearchDocumentsResponse], error) + ListChanges(context.Context, *connect.Request[v1.ListChangesRequest]) (*connect.Response[v1.ListChangesResponse], error) +} + +// NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + adminServiceSignUpHandler := connect.NewUnaryHandler( + AdminServiceSignUpProcedure, + svc.SignUp, + opts..., + ) + adminServiceLogInHandler := connect.NewUnaryHandler( + AdminServiceLogInProcedure, + svc.LogIn, + opts..., + ) + adminServiceCreateProjectHandler := connect.NewUnaryHandler( + AdminServiceCreateProjectProcedure, + svc.CreateProject, + opts..., + ) + adminServiceListProjectsHandler := connect.NewUnaryHandler( + AdminServiceListProjectsProcedure, + svc.ListProjects, + opts..., + ) + adminServiceGetProjectHandler := connect.NewUnaryHandler( + AdminServiceGetProjectProcedure, + svc.GetProject, + opts..., + ) + adminServiceUpdateProjectHandler := connect.NewUnaryHandler( + AdminServiceUpdateProjectProcedure, + svc.UpdateProject, + opts..., + ) + adminServiceListDocumentsHandler := connect.NewUnaryHandler( + AdminServiceListDocumentsProcedure, + svc.ListDocuments, + opts..., + ) + adminServiceGetDocumentHandler := connect.NewUnaryHandler( + AdminServiceGetDocumentProcedure, + svc.GetDocument, + opts..., + ) + adminServiceRemoveDocumentByAdminHandler := connect.NewUnaryHandler( + AdminServiceRemoveDocumentByAdminProcedure, + svc.RemoveDocumentByAdmin, + opts..., + ) + adminServiceGetSnapshotMetaHandler := connect.NewUnaryHandler( + AdminServiceGetSnapshotMetaProcedure, + svc.GetSnapshotMeta, + opts..., + ) + adminServiceSearchDocumentsHandler := connect.NewUnaryHandler( + AdminServiceSearchDocumentsProcedure, + svc.SearchDocuments, + opts..., + ) + adminServiceListChangesHandler := connect.NewUnaryHandler( + AdminServiceListChangesProcedure, + svc.ListChanges, + opts..., + ) + return "/yorkie.v1.AdminService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case AdminServiceSignUpProcedure: + adminServiceSignUpHandler.ServeHTTP(w, r) + case AdminServiceLogInProcedure: + adminServiceLogInHandler.ServeHTTP(w, r) + case AdminServiceCreateProjectProcedure: + adminServiceCreateProjectHandler.ServeHTTP(w, r) + case AdminServiceListProjectsProcedure: + adminServiceListProjectsHandler.ServeHTTP(w, r) + case AdminServiceGetProjectProcedure: + adminServiceGetProjectHandler.ServeHTTP(w, r) + case AdminServiceUpdateProjectProcedure: + adminServiceUpdateProjectHandler.ServeHTTP(w, r) + case AdminServiceListDocumentsProcedure: + adminServiceListDocumentsHandler.ServeHTTP(w, r) + case AdminServiceGetDocumentProcedure: + adminServiceGetDocumentHandler.ServeHTTP(w, r) + case AdminServiceRemoveDocumentByAdminProcedure: + adminServiceRemoveDocumentByAdminHandler.ServeHTTP(w, r) + case AdminServiceGetSnapshotMetaProcedure: + adminServiceGetSnapshotMetaHandler.ServeHTTP(w, r) + case AdminServiceSearchDocumentsProcedure: + adminServiceSearchDocumentsHandler.ServeHTTP(w, r) + case AdminServiceListChangesProcedure: + adminServiceListChangesHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedAdminServiceHandler struct{} + +func (UnimplementedAdminServiceHandler) SignUp(context.Context, *connect.Request[v1.SignUpRequest]) (*connect.Response[v1.SignUpResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.SignUp is not implemented")) +} + +func (UnimplementedAdminServiceHandler) LogIn(context.Context, *connect.Request[v1.LogInRequest]) (*connect.Response[v1.LogInResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.LogIn is not implemented")) +} + +func (UnimplementedAdminServiceHandler) CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.CreateProject is not implemented")) +} + +func (UnimplementedAdminServiceHandler) ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.ListProjects is not implemented")) +} + +func (UnimplementedAdminServiceHandler) GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.GetProject is not implemented")) +} + +func (UnimplementedAdminServiceHandler) UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.UpdateProject is not implemented")) +} + +func (UnimplementedAdminServiceHandler) ListDocuments(context.Context, *connect.Request[v1.ListDocumentsRequest]) (*connect.Response[v1.ListDocumentsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.ListDocuments is not implemented")) +} + +func (UnimplementedAdminServiceHandler) GetDocument(context.Context, *connect.Request[v1.GetDocumentRequest]) (*connect.Response[v1.GetDocumentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.GetDocument is not implemented")) +} + +func (UnimplementedAdminServiceHandler) RemoveDocumentByAdmin(context.Context, *connect.Request[v1.RemoveDocumentByAdminRequest]) (*connect.Response[v1.RemoveDocumentByAdminResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.RemoveDocumentByAdmin is not implemented")) +} + +func (UnimplementedAdminServiceHandler) GetSnapshotMeta(context.Context, *connect.Request[v1.GetSnapshotMetaRequest]) (*connect.Response[v1.GetSnapshotMetaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.GetSnapshotMeta is not implemented")) +} + +func (UnimplementedAdminServiceHandler) SearchDocuments(context.Context, *connect.Request[v1.SearchDocumentsRequest]) (*connect.Response[v1.SearchDocumentsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.SearchDocuments is not implemented")) +} + +func (UnimplementedAdminServiceHandler) ListChanges(context.Context, *connect.Request[v1.ListChangesRequest]) (*connect.Response[v1.ListChangesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.AdminService.ListChanges is not implemented")) +} diff --git a/api/yorkie/v1/v1connect/yorkie.connect.go b/api/yorkie/v1/v1connect/yorkie.connect.go new file mode 100644 index 000000000..79f4d2636 --- /dev/null +++ b/api/yorkie/v1/v1connect/yorkie.connect.go @@ -0,0 +1,308 @@ +// +// Copyright 2020 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: yorkie/v1/yorkie.proto + +package v1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // YorkieServiceName is the fully-qualified name of the YorkieService service. + YorkieServiceName = "yorkie.v1.YorkieService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // YorkieServiceActivateClientProcedure is the fully-qualified name of the YorkieService's + // ActivateClient RPC. + YorkieServiceActivateClientProcedure = "/yorkie.v1.YorkieService/ActivateClient" + // YorkieServiceDeactivateClientProcedure is the fully-qualified name of the YorkieService's + // DeactivateClient RPC. + YorkieServiceDeactivateClientProcedure = "/yorkie.v1.YorkieService/DeactivateClient" + // YorkieServiceAttachDocumentProcedure is the fully-qualified name of the YorkieService's + // AttachDocument RPC. + YorkieServiceAttachDocumentProcedure = "/yorkie.v1.YorkieService/AttachDocument" + // YorkieServiceDetachDocumentProcedure is the fully-qualified name of the YorkieService's + // DetachDocument RPC. + YorkieServiceDetachDocumentProcedure = "/yorkie.v1.YorkieService/DetachDocument" + // YorkieServiceRemoveDocumentProcedure is the fully-qualified name of the YorkieService's + // RemoveDocument RPC. + YorkieServiceRemoveDocumentProcedure = "/yorkie.v1.YorkieService/RemoveDocument" + // YorkieServicePushPullChangesProcedure is the fully-qualified name of the YorkieService's + // PushPullChanges RPC. + YorkieServicePushPullChangesProcedure = "/yorkie.v1.YorkieService/PushPullChanges" + // YorkieServiceWatchDocumentProcedure is the fully-qualified name of the YorkieService's + // WatchDocument RPC. + YorkieServiceWatchDocumentProcedure = "/yorkie.v1.YorkieService/WatchDocument" + // YorkieServiceBroadcastProcedure is the fully-qualified name of the YorkieService's Broadcast RPC. + YorkieServiceBroadcastProcedure = "/yorkie.v1.YorkieService/Broadcast" +) + +// YorkieServiceClient is a client for the yorkie.v1.YorkieService service. +type YorkieServiceClient interface { + ActivateClient(context.Context, *connect.Request[v1.ActivateClientRequest]) (*connect.Response[v1.ActivateClientResponse], error) + DeactivateClient(context.Context, *connect.Request[v1.DeactivateClientRequest]) (*connect.Response[v1.DeactivateClientResponse], error) + AttachDocument(context.Context, *connect.Request[v1.AttachDocumentRequest]) (*connect.Response[v1.AttachDocumentResponse], error) + DetachDocument(context.Context, *connect.Request[v1.DetachDocumentRequest]) (*connect.Response[v1.DetachDocumentResponse], error) + RemoveDocument(context.Context, *connect.Request[v1.RemoveDocumentRequest]) (*connect.Response[v1.RemoveDocumentResponse], error) + PushPullChanges(context.Context, *connect.Request[v1.PushPullChangesRequest]) (*connect.Response[v1.PushPullChangesResponse], error) + WatchDocument(context.Context, *connect.Request[v1.WatchDocumentRequest]) (*connect.ServerStreamForClient[v1.WatchDocumentResponse], error) + Broadcast(context.Context, *connect.Request[v1.BroadcastRequest]) (*connect.Response[v1.BroadcastResponse], error) +} + +// NewYorkieServiceClient constructs a client for the yorkie.v1.YorkieService service. By default, +// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and +// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() +// or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewYorkieServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) YorkieServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &yorkieServiceClient{ + activateClient: connect.NewClient[v1.ActivateClientRequest, v1.ActivateClientResponse]( + httpClient, + baseURL+YorkieServiceActivateClientProcedure, + opts..., + ), + deactivateClient: connect.NewClient[v1.DeactivateClientRequest, v1.DeactivateClientResponse]( + httpClient, + baseURL+YorkieServiceDeactivateClientProcedure, + opts..., + ), + attachDocument: connect.NewClient[v1.AttachDocumentRequest, v1.AttachDocumentResponse]( + httpClient, + baseURL+YorkieServiceAttachDocumentProcedure, + opts..., + ), + detachDocument: connect.NewClient[v1.DetachDocumentRequest, v1.DetachDocumentResponse]( + httpClient, + baseURL+YorkieServiceDetachDocumentProcedure, + opts..., + ), + removeDocument: connect.NewClient[v1.RemoveDocumentRequest, v1.RemoveDocumentResponse]( + httpClient, + baseURL+YorkieServiceRemoveDocumentProcedure, + opts..., + ), + pushPullChanges: connect.NewClient[v1.PushPullChangesRequest, v1.PushPullChangesResponse]( + httpClient, + baseURL+YorkieServicePushPullChangesProcedure, + opts..., + ), + watchDocument: connect.NewClient[v1.WatchDocumentRequest, v1.WatchDocumentResponse]( + httpClient, + baseURL+YorkieServiceWatchDocumentProcedure, + opts..., + ), + broadcast: connect.NewClient[v1.BroadcastRequest, v1.BroadcastResponse]( + httpClient, + baseURL+YorkieServiceBroadcastProcedure, + opts..., + ), + } +} + +// yorkieServiceClient implements YorkieServiceClient. +type yorkieServiceClient struct { + activateClient *connect.Client[v1.ActivateClientRequest, v1.ActivateClientResponse] + deactivateClient *connect.Client[v1.DeactivateClientRequest, v1.DeactivateClientResponse] + attachDocument *connect.Client[v1.AttachDocumentRequest, v1.AttachDocumentResponse] + detachDocument *connect.Client[v1.DetachDocumentRequest, v1.DetachDocumentResponse] + removeDocument *connect.Client[v1.RemoveDocumentRequest, v1.RemoveDocumentResponse] + pushPullChanges *connect.Client[v1.PushPullChangesRequest, v1.PushPullChangesResponse] + watchDocument *connect.Client[v1.WatchDocumentRequest, v1.WatchDocumentResponse] + broadcast *connect.Client[v1.BroadcastRequest, v1.BroadcastResponse] +} + +// ActivateClient calls yorkie.v1.YorkieService.ActivateClient. +func (c *yorkieServiceClient) ActivateClient(ctx context.Context, req *connect.Request[v1.ActivateClientRequest]) (*connect.Response[v1.ActivateClientResponse], error) { + return c.activateClient.CallUnary(ctx, req) +} + +// DeactivateClient calls yorkie.v1.YorkieService.DeactivateClient. +func (c *yorkieServiceClient) DeactivateClient(ctx context.Context, req *connect.Request[v1.DeactivateClientRequest]) (*connect.Response[v1.DeactivateClientResponse], error) { + return c.deactivateClient.CallUnary(ctx, req) +} + +// AttachDocument calls yorkie.v1.YorkieService.AttachDocument. +func (c *yorkieServiceClient) AttachDocument(ctx context.Context, req *connect.Request[v1.AttachDocumentRequest]) (*connect.Response[v1.AttachDocumentResponse], error) { + return c.attachDocument.CallUnary(ctx, req) +} + +// DetachDocument calls yorkie.v1.YorkieService.DetachDocument. +func (c *yorkieServiceClient) DetachDocument(ctx context.Context, req *connect.Request[v1.DetachDocumentRequest]) (*connect.Response[v1.DetachDocumentResponse], error) { + return c.detachDocument.CallUnary(ctx, req) +} + +// RemoveDocument calls yorkie.v1.YorkieService.RemoveDocument. +func (c *yorkieServiceClient) RemoveDocument(ctx context.Context, req *connect.Request[v1.RemoveDocumentRequest]) (*connect.Response[v1.RemoveDocumentResponse], error) { + return c.removeDocument.CallUnary(ctx, req) +} + +// PushPullChanges calls yorkie.v1.YorkieService.PushPullChanges. +func (c *yorkieServiceClient) PushPullChanges(ctx context.Context, req *connect.Request[v1.PushPullChangesRequest]) (*connect.Response[v1.PushPullChangesResponse], error) { + return c.pushPullChanges.CallUnary(ctx, req) +} + +// WatchDocument calls yorkie.v1.YorkieService.WatchDocument. +func (c *yorkieServiceClient) WatchDocument(ctx context.Context, req *connect.Request[v1.WatchDocumentRequest]) (*connect.ServerStreamForClient[v1.WatchDocumentResponse], error) { + return c.watchDocument.CallServerStream(ctx, req) +} + +// Broadcast calls yorkie.v1.YorkieService.Broadcast. +func (c *yorkieServiceClient) Broadcast(ctx context.Context, req *connect.Request[v1.BroadcastRequest]) (*connect.Response[v1.BroadcastResponse], error) { + return c.broadcast.CallUnary(ctx, req) +} + +// YorkieServiceHandler is an implementation of the yorkie.v1.YorkieService service. +type YorkieServiceHandler interface { + ActivateClient(context.Context, *connect.Request[v1.ActivateClientRequest]) (*connect.Response[v1.ActivateClientResponse], error) + DeactivateClient(context.Context, *connect.Request[v1.DeactivateClientRequest]) (*connect.Response[v1.DeactivateClientResponse], error) + AttachDocument(context.Context, *connect.Request[v1.AttachDocumentRequest]) (*connect.Response[v1.AttachDocumentResponse], error) + DetachDocument(context.Context, *connect.Request[v1.DetachDocumentRequest]) (*connect.Response[v1.DetachDocumentResponse], error) + RemoveDocument(context.Context, *connect.Request[v1.RemoveDocumentRequest]) (*connect.Response[v1.RemoveDocumentResponse], error) + PushPullChanges(context.Context, *connect.Request[v1.PushPullChangesRequest]) (*connect.Response[v1.PushPullChangesResponse], error) + WatchDocument(context.Context, *connect.Request[v1.WatchDocumentRequest], *connect.ServerStream[v1.WatchDocumentResponse]) error + Broadcast(context.Context, *connect.Request[v1.BroadcastRequest]) (*connect.Response[v1.BroadcastResponse], error) +} + +// NewYorkieServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewYorkieServiceHandler(svc YorkieServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + yorkieServiceActivateClientHandler := connect.NewUnaryHandler( + YorkieServiceActivateClientProcedure, + svc.ActivateClient, + opts..., + ) + yorkieServiceDeactivateClientHandler := connect.NewUnaryHandler( + YorkieServiceDeactivateClientProcedure, + svc.DeactivateClient, + opts..., + ) + yorkieServiceAttachDocumentHandler := connect.NewUnaryHandler( + YorkieServiceAttachDocumentProcedure, + svc.AttachDocument, + opts..., + ) + yorkieServiceDetachDocumentHandler := connect.NewUnaryHandler( + YorkieServiceDetachDocumentProcedure, + svc.DetachDocument, + opts..., + ) + yorkieServiceRemoveDocumentHandler := connect.NewUnaryHandler( + YorkieServiceRemoveDocumentProcedure, + svc.RemoveDocument, + opts..., + ) + yorkieServicePushPullChangesHandler := connect.NewUnaryHandler( + YorkieServicePushPullChangesProcedure, + svc.PushPullChanges, + opts..., + ) + yorkieServiceWatchDocumentHandler := connect.NewServerStreamHandler( + YorkieServiceWatchDocumentProcedure, + svc.WatchDocument, + opts..., + ) + yorkieServiceBroadcastHandler := connect.NewUnaryHandler( + YorkieServiceBroadcastProcedure, + svc.Broadcast, + opts..., + ) + return "/yorkie.v1.YorkieService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case YorkieServiceActivateClientProcedure: + yorkieServiceActivateClientHandler.ServeHTTP(w, r) + case YorkieServiceDeactivateClientProcedure: + yorkieServiceDeactivateClientHandler.ServeHTTP(w, r) + case YorkieServiceAttachDocumentProcedure: + yorkieServiceAttachDocumentHandler.ServeHTTP(w, r) + case YorkieServiceDetachDocumentProcedure: + yorkieServiceDetachDocumentHandler.ServeHTTP(w, r) + case YorkieServiceRemoveDocumentProcedure: + yorkieServiceRemoveDocumentHandler.ServeHTTP(w, r) + case YorkieServicePushPullChangesProcedure: + yorkieServicePushPullChangesHandler.ServeHTTP(w, r) + case YorkieServiceWatchDocumentProcedure: + yorkieServiceWatchDocumentHandler.ServeHTTP(w, r) + case YorkieServiceBroadcastProcedure: + yorkieServiceBroadcastHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedYorkieServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedYorkieServiceHandler struct{} + +func (UnimplementedYorkieServiceHandler) ActivateClient(context.Context, *connect.Request[v1.ActivateClientRequest]) (*connect.Response[v1.ActivateClientResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.ActivateClient is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) DeactivateClient(context.Context, *connect.Request[v1.DeactivateClientRequest]) (*connect.Response[v1.DeactivateClientResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.DeactivateClient is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) AttachDocument(context.Context, *connect.Request[v1.AttachDocumentRequest]) (*connect.Response[v1.AttachDocumentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.AttachDocument is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) DetachDocument(context.Context, *connect.Request[v1.DetachDocumentRequest]) (*connect.Response[v1.DetachDocumentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.DetachDocument is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) RemoveDocument(context.Context, *connect.Request[v1.RemoveDocumentRequest]) (*connect.Response[v1.RemoveDocumentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.RemoveDocument is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) PushPullChanges(context.Context, *connect.Request[v1.PushPullChangesRequest]) (*connect.Response[v1.PushPullChangesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.PushPullChanges is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) WatchDocument(context.Context, *connect.Request[v1.WatchDocumentRequest], *connect.ServerStream[v1.WatchDocumentResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.WatchDocument is not implemented")) +} + +func (UnimplementedYorkieServiceHandler) Broadcast(context.Context, *connect.Request[v1.BroadcastRequest]) (*connect.Response[v1.BroadcastResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.YorkieService.Broadcast is not implemented")) +} diff --git a/api/yorkie/v1/yorkie.pb.go b/api/yorkie/v1/yorkie.pb.go index 5e71c30ca..9c8c4b4c6 100644 --- a/api/yorkie/v1/yorkie.pb.go +++ b/api/yorkie/v1/yorkie.pb.go @@ -985,52 +985,53 @@ func init() { func init() { proto.RegisterFile("yorkie/v1/yorkie.proto", fileDescriptor_40070c858814ab24) } var fileDescriptor_40070c858814ab24 = []byte{ - // 715 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x4f, 0xdb, 0x4a, - 0x10, 0xcf, 0xf2, 0xef, 0x91, 0xc9, 0x83, 0x07, 0x0b, 0x09, 0x79, 0xe1, 0xbd, 0x90, 0x6e, 0x2f, - 0x48, 0x48, 0x49, 0x03, 0x2a, 0x97, 0x9e, 0x80, 0x54, 0x22, 0xaa, 0xd4, 0xa6, 0x6e, 0x55, 0x04, - 0x52, 0x65, 0x2d, 0xf6, 0xd2, 0xac, 0x62, 0xbc, 0xc6, 0xde, 0x58, 0x72, 0x4f, 0xfd, 0x02, 0xbd, - 0xf7, 0x3b, 0xf4, 0x5b, 0xf4, 0xd4, 0x23, 0xc7, 0x1e, 0x2b, 0xfa, 0x45, 0xaa, 0x78, 0x9d, 0x60, - 0x1b, 0x37, 0xd0, 0x82, 0xd4, 0xde, 0xb2, 0xb3, 0x33, 0xbf, 0xfd, 0xcd, 0x78, 0x7e, 0x33, 0x81, - 0x52, 0x20, 0xdc, 0x1e, 0x67, 0x0d, 0xbf, 0xd9, 0x50, 0xbf, 0xea, 0x8e, 0x2b, 0xa4, 0xc0, 0xf9, - 0xe8, 0xe4, 0x37, 0x2b, 0xff, 0x5e, 0xba, 0xb8, 0xcc, 0x13, 0x7d, 0xd7, 0x60, 0x9e, 0xf2, 0x22, - 0xdb, 0x50, 0xdc, 0x31, 0x24, 0xf7, 0xa9, 0x64, 0x7b, 0x16, 0x67, 0xb6, 0xd4, 0xd8, 0x59, 0x9f, - 0x79, 0x12, 0xff, 0x0f, 0x60, 0x84, 0x06, 0xbd, 0xc7, 0x82, 0x32, 0xaa, 0xa1, 0xf5, 0xbc, 0x96, - 0x57, 0x96, 0x27, 0x2c, 0x20, 0x0f, 0xa1, 0x94, 0x8e, 0xf3, 0x1c, 0x61, 0x7b, 0x0c, 0xaf, 0x42, - 0xe4, 0xa6, 0x73, 0x33, 0x8a, 0x9b, 0x55, 0x86, 0xb6, 0x49, 0xb6, 0x61, 0xa5, 0xc5, 0x68, 0xe6, - 0x83, 0x63, 0xe3, 0x2a, 0x50, 0xbe, 0x1a, 0xa7, 0x1e, 0x24, 0x16, 0x14, 0x77, 0xa4, 0xa4, 0x46, - 0xb7, 0x25, 0x8c, 0xfe, 0xe9, 0x0d, 0x11, 0xf1, 0x36, 0x14, 0x8c, 0x2e, 0xb5, 0xdf, 0x30, 0xdd, - 0xa1, 0x46, 0xaf, 0x3c, 0x51, 0x43, 0xeb, 0x85, 0xcd, 0x62, 0x7d, 0x54, 0xb4, 0xfa, 0x5e, 0x78, - 0xdb, 0xa1, 0x46, 0x4f, 0x03, 0x63, 0xf4, 0x9b, 0x9c, 0x41, 0x29, 0xfd, 0x5a, 0x94, 0xf8, 0x1a, - 0x14, 0xcc, 0xc8, 0x76, 0xf9, 0x20, 0x0c, 0x4d, 0xb7, 0x78, 0xf2, 0x13, 0x82, 0x62, 0x8b, 0xfd, - 0x74, 0x86, 0x29, 0x3e, 0x13, 0xd7, 0xf1, 0x99, 0xbc, 0x21, 0x1f, 0xbc, 0x05, 0x25, 0x97, 0x9d, - 0x0a, 0x9f, 0xe9, 0xfc, 0x44, 0xb7, 0x85, 0xd4, 0x69, 0x58, 0x10, 0x66, 0x96, 0xa7, 0x6a, 0x68, - 0x7d, 0x56, 0x5b, 0x52, 0xb7, 0xed, 0x93, 0xa7, 0x42, 0xee, 0x44, 0x57, 0xa4, 0x03, 0xa5, 0x74, - 0x0e, 0x51, 0xdd, 0x7e, 0xb5, 0x2c, 0x2f, 0x61, 0xf9, 0x80, 0xca, 0x3b, 0x2e, 0x0a, 0xf9, 0x82, - 0xa0, 0x98, 0x82, 0x8d, 0x78, 0x1e, 0xc2, 0x3c, 0xb7, 0xb9, 0xe4, 0xd4, 0xe2, 0x6f, 0xa9, 0xe4, - 0xc2, 0x0e, 0xc1, 0x0b, 0x9b, 0x8d, 0x18, 0xd5, 0xcc, 0xc8, 0x7a, 0x3b, 0x11, 0xb6, 0x9f, 0xd3, - 0x52, 0x40, 0x78, 0x03, 0xa6, 0x99, 0xcf, 0x6c, 0x19, 0x25, 0xbf, 0x14, 0x43, 0x6c, 0x09, 0xe3, - 0xf1, 0xe0, 0x6a, 0x3f, 0xa7, 0x29, 0x9f, 0x4a, 0x03, 0xe6, 0x93, 0x80, 0x31, 0xad, 0x72, 0xd3, - 0x2b, 0xa3, 0xda, 0xe4, 0xa5, 0x56, 0xdb, 0xa6, 0xb7, 0x3b, 0x03, 0x53, 0xc7, 0xc2, 0x0c, 0xc8, - 0x7b, 0x04, 0x45, 0x2d, 0xfc, 0x34, 0x7f, 0x44, 0x1f, 0x0d, 0x5a, 0x22, 0x4d, 0x27, 0xbb, 0x25, - 0xd0, 0x4d, 0x11, 0x3f, 0x22, 0x28, 0x75, 0xfa, 0x5e, 0xb7, 0xd3, 0xb7, 0x2c, 0xe5, 0xe2, 0xfd, - 0x5e, 0xa9, 0xac, 0x42, 0xde, 0xe9, 0x7b, 0x5d, 0x5d, 0xd8, 0x56, 0x10, 0xa9, 0x63, 0x76, 0x60, - 0x78, 0x66, 0x5b, 0x01, 0x79, 0x0e, 0x2b, 0x57, 0xc8, 0xde, 0xb2, 0x00, 0xef, 0x10, 0x2c, 0xec, - 0xba, 0x82, 0x9a, 0x06, 0xf5, 0xee, 0xe8, 0xeb, 0x2e, 0xc3, 0xb4, 0x14, 0x0e, 0x37, 0xc2, 0xa4, - 0xf3, 0x9a, 0x3a, 0xe0, 0x32, 0xfc, 0xe5, 0xd0, 0xc0, 0x12, 0x54, 0x89, 0xfe, 0x6f, 0x6d, 0x78, - 0x24, 0x4b, 0xb0, 0x18, 0x63, 0xa0, 0xf2, 0xd9, 0x3c, 0x9f, 0x86, 0xb9, 0xc3, 0x90, 0xfc, 0x0b, - 0xe6, 0xfa, 0xdc, 0x60, 0xf8, 0x00, 0xe6, 0x93, 0x0b, 0x04, 0xd7, 0x62, 0xe9, 0x65, 0xee, 0xa4, - 0xca, 0xbd, 0x31, 0x1e, 0xd1, 0x32, 0xc8, 0xe1, 0xd7, 0xb0, 0x90, 0x5e, 0x15, 0x98, 0xc4, 0x05, - 0x95, 0xbd, 0x7f, 0x2a, 0xf7, 0xc7, 0xfa, 0x8c, 0xe0, 0x07, 0xbc, 0x13, 0xf3, 0x3f, 0xc9, 0x3b, - 0x6b, 0x11, 0x25, 0x79, 0x67, 0x2e, 0x0f, 0x05, 0x9c, 0x1c, 0x90, 0x09, 0xe0, 0xcc, 0xf9, 0x9f, - 0x00, 0xce, 0x9e, 0xae, 0x0a, 0x38, 0x29, 0xb3, 0x04, 0x70, 0xe6, 0x40, 0x48, 0x00, 0x67, 0x6b, - 0x94, 0xe4, 0xf0, 0x11, 0xfc, 0x93, 0xea, 0x5f, 0x1c, 0x8f, 0xcb, 0x16, 0x62, 0x85, 0x8c, 0x73, - 0x19, 0x61, 0xbf, 0x82, 0xb9, 0xc4, 0x2c, 0xc5, 0x6b, 0x3f, 0x9e, 0xb2, 0x0a, 0xb7, 0x76, 0xdd, - 0x18, 0x26, 0xb9, 0x07, 0x08, 0xef, 0x43, 0x7e, 0xd4, 0x9d, 0x78, 0x35, 0x16, 0x92, 0x56, 0x4d, - 0xe5, 0xbf, 0xec, 0xcb, 0x21, 0xd6, 0xee, 0xc6, 0xe7, 0x8b, 0x2a, 0x3a, 0xbf, 0xa8, 0xa2, 0xaf, - 0x17, 0x55, 0xf4, 0xe1, 0x5b, 0x35, 0x07, 0x8b, 0x26, 0xf3, 0x87, 0x41, 0xd4, 0xe1, 0x75, 0xbf, - 0xd9, 0x41, 0x47, 0x53, 0xf5, 0x47, 0x7e, 0xf3, 0x78, 0x26, 0xfc, 0xb7, 0xb5, 0xf5, 0x3d, 0x00, - 0x00, 0xff, 0xff, 0x99, 0x77, 0x1a, 0xa9, 0xad, 0x09, 0x00, 0x00, + // 736 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdf, 0x4e, 0x13, 0x4f, + 0x14, 0xee, 0xf0, 0xef, 0x47, 0x4f, 0x7f, 0x20, 0x0c, 0xb4, 0xd4, 0xa2, 0xa5, 0x8e, 0x37, 0x24, + 0xc6, 0xd6, 0x42, 0xe4, 0xc6, 0x2b, 0xa0, 0x26, 0x34, 0x26, 0x5a, 0xd7, 0x3f, 0x04, 0x12, 0xd3, + 0x0c, 0xb3, 0x03, 0x9d, 0x74, 0xd9, 0x59, 0xba, 0xd3, 0x4d, 0xea, 0x95, 0x2f, 0xe0, 0xbd, 0xef, + 0xe0, 0x5b, 0x78, 0xe5, 0x25, 0x97, 0x5e, 0x1a, 0x7c, 0x11, 0xd3, 0x9d, 0x6d, 0xd9, 0x5d, 0xd6, + 0x82, 0x42, 0xa2, 0x77, 0x3b, 0x67, 0xce, 0xf9, 0xe6, 0x3b, 0x67, 0xe7, 0x3b, 0x67, 0x20, 0xd7, + 0x93, 0x9d, 0xb6, 0xe0, 0x15, 0xaf, 0x5a, 0xd1, 0x5f, 0x65, 0xa7, 0x23, 0x95, 0xc4, 0xe9, 0x60, + 0xe5, 0x55, 0x0b, 0xb7, 0xcf, 0x5d, 0x3a, 0xdc, 0x95, 0xdd, 0x0e, 0xe3, 0xae, 0xf6, 0x22, 0x1b, + 0x90, 0xdd, 0x64, 0x4a, 0x78, 0x54, 0xf1, 0x6d, 0x4b, 0x70, 0x5b, 0x19, 0xfc, 0xa4, 0xcb, 0x5d, + 0x85, 0xef, 0x02, 0x30, 0xdf, 0xd0, 0x6c, 0xf3, 0x5e, 0x1e, 0x95, 0xd0, 0x6a, 0xda, 0x48, 0x6b, + 0xcb, 0x33, 0xde, 0x23, 0x8f, 0x21, 0x17, 0x8f, 0x73, 0x1d, 0x69, 0xbb, 0x1c, 0x2f, 0x43, 0xe0, + 0xd6, 0x14, 0x66, 0x10, 0x37, 0xad, 0x0d, 0x75, 0x93, 0x6c, 0xc0, 0x52, 0x8d, 0xd3, 0xc4, 0x03, + 0x47, 0xc6, 0x15, 0x20, 0x7f, 0x31, 0x4e, 0x1f, 0x48, 0x2c, 0xc8, 0x6e, 0x2a, 0x45, 0x59, 0xab, + 0x26, 0x59, 0xf7, 0xf8, 0x8a, 0x88, 0x78, 0x03, 0x32, 0xac, 0x45, 0xed, 0x23, 0xde, 0x74, 0x28, + 0x6b, 0xe7, 0xc7, 0x4a, 0x68, 0x35, 0xb3, 0x96, 0x2d, 0x0f, 0x8b, 0x56, 0xde, 0xf6, 0x77, 0x1b, + 0x94, 0xb5, 0x0d, 0x60, 0xc3, 0x6f, 0x72, 0x02, 0xb9, 0xf8, 0x69, 0x41, 0xe2, 0x2b, 0x90, 0x31, + 0x03, 0xdb, 0xf9, 0x81, 0x30, 0x30, 0x5d, 0xe3, 0xc8, 0x2f, 0x08, 0xb2, 0x35, 0xfe, 0xdb, 0x19, + 0xc6, 0xf8, 0x8c, 0x5d, 0xc6, 0x67, 0xfc, 0x8a, 0x7c, 0xf0, 0x3a, 0xe4, 0x3a, 0xfc, 0x58, 0x7a, + 0xbc, 0x29, 0x0e, 0x9b, 0xb6, 0x54, 0x4d, 0xea, 0x17, 0x84, 0x9b, 0xf9, 0x89, 0x12, 0x5a, 0x9d, + 0x36, 0x16, 0xf4, 0x6e, 0xfd, 0xf0, 0xb9, 0x54, 0x9b, 0xc1, 0x16, 0x69, 0x40, 0x2e, 0x9e, 0x43, + 0x50, 0xb7, 0x3f, 0x2d, 0xcb, 0x6b, 0x58, 0xdc, 0xa5, 0xea, 0x86, 0x8b, 0x42, 0xbe, 0x21, 0xc8, + 0xc6, 0x60, 0x03, 0x9e, 0x7b, 0x30, 0x2b, 0x6c, 0xa1, 0x04, 0xb5, 0xc4, 0x7b, 0xaa, 0x84, 0xb4, + 0x7d, 0xf0, 0xcc, 0x5a, 0x25, 0x44, 0x35, 0x31, 0xb2, 0x5c, 0x8f, 0x84, 0xed, 0xa4, 0x8c, 0x18, + 0x10, 0x7e, 0x00, 0x93, 0xdc, 0xe3, 0xb6, 0x0a, 0x92, 0x5f, 0x08, 0x21, 0xd6, 0x24, 0x7b, 0xda, + 0xdf, 0xda, 0x49, 0x19, 0xda, 0xa7, 0x50, 0x81, 0xd9, 0x28, 0x60, 0x48, 0xab, 0xc2, 0x74, 0xf3, + 0xa8, 0x34, 0x7e, 0xae, 0xd5, 0xba, 0xe9, 0x6e, 0x4d, 0xc1, 0xc4, 0x81, 0x34, 0x7b, 0xe4, 0x23, + 0x82, 0xac, 0xe1, 0xff, 0x9a, 0x7f, 0xe2, 0x1e, 0xf5, 0xaf, 0x44, 0x9c, 0x4e, 0xf2, 0x95, 0x40, + 0x57, 0x45, 0xfc, 0x8c, 0x20, 0xd7, 0xe8, 0xba, 0xad, 0x46, 0xd7, 0xb2, 0xb4, 0x8b, 0xfb, 0x77, + 0xa5, 0xb2, 0x0c, 0x69, 0xa7, 0xeb, 0xb6, 0x9a, 0xd2, 0xb6, 0x7a, 0x81, 0x3a, 0xa6, 0xfb, 0x86, + 0x17, 0xb6, 0xd5, 0x23, 0x2f, 0x61, 0xe9, 0x02, 0xd9, 0x6b, 0x16, 0xe0, 0x03, 0x82, 0xb9, 0xad, + 0x8e, 0xa4, 0x26, 0xa3, 0xee, 0x0d, 0xfd, 0xdd, 0x45, 0x98, 0x54, 0xd2, 0x11, 0xcc, 0x4f, 0x3a, + 0x6d, 0xe8, 0x05, 0xce, 0xc3, 0x7f, 0x0e, 0xed, 0x59, 0x92, 0x6a, 0xd1, 0xff, 0x6f, 0x0c, 0x96, + 0x64, 0x01, 0xe6, 0x43, 0x0c, 0x74, 0x3e, 0x6b, 0xa7, 0x93, 0x30, 0xb3, 0xe7, 0x93, 0x7f, 0xc5, + 0x3b, 0x9e, 0x60, 0x1c, 0xef, 0xc2, 0x6c, 0x74, 0x80, 0xe0, 0x52, 0x28, 0xbd, 0xc4, 0x99, 0x54, + 0xb8, 0x37, 0xc2, 0x23, 0x18, 0x06, 0x29, 0xfc, 0x0e, 0xe6, 0xe2, 0xa3, 0x02, 0x93, 0xb0, 0xa0, + 0x92, 0xe7, 0x4f, 0xe1, 0xfe, 0x48, 0x9f, 0x21, 0x7c, 0x9f, 0x77, 0xa4, 0xff, 0x47, 0x79, 0x27, + 0x0d, 0xa2, 0x28, 0xef, 0xc4, 0xe1, 0xa1, 0x81, 0xa3, 0x0d, 0x32, 0x02, 0x9c, 0xd8, 0xff, 0x23, + 0xc0, 0xc9, 0xdd, 0x55, 0x03, 0x47, 0x65, 0x16, 0x01, 0x4e, 0x6c, 0x08, 0x11, 0xe0, 0x64, 0x8d, + 0x92, 0x14, 0xde, 0x87, 0x5b, 0xb1, 0xfb, 0x8b, 0xc3, 0x71, 0xc9, 0x42, 0x2c, 0x90, 0x51, 0x2e, + 0x43, 0xec, 0xb7, 0x30, 0x13, 0xe9, 0xa5, 0x78, 0xe5, 0xd7, 0x5d, 0x56, 0xe3, 0x96, 0x2e, 0x6b, + 0xc3, 0x24, 0xf5, 0x08, 0xe1, 0x1d, 0x48, 0x0f, 0x6f, 0x27, 0x5e, 0x0e, 0x85, 0xc4, 0x55, 0x53, + 0xb8, 0x93, 0xbc, 0x39, 0xc0, 0xda, 0x7a, 0xf3, 0xf5, 0xac, 0x88, 0x4e, 0xcf, 0x8a, 0xe8, 0xfb, + 0x59, 0x11, 0x7d, 0xfa, 0x51, 0x4c, 0xc1, 0xbc, 0xc9, 0xbd, 0x41, 0x10, 0x75, 0x44, 0xd9, 0xab, + 0x36, 0xd0, 0x7e, 0xf9, 0x48, 0xa8, 0x56, 0xf7, 0xa0, 0xcc, 0xe4, 0x71, 0xf0, 0x3e, 0x7b, 0xa8, + 0x38, 0x1d, 0x7c, 0x57, 0xa8, 0x23, 0x2a, 0xc3, 0xd7, 0xd9, 0x13, 0xaf, 0x7a, 0x30, 0xe5, 0xbf, + 0xcb, 0xd6, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x48, 0x7a, 0xbe, 0x77, 0xd7, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/api/yorkie/v1/yorkie.proto b/api/yorkie/v1/yorkie.proto index da71d6a11..8ca20e120 100644 --- a/api/yorkie/v1/yorkie.proto +++ b/api/yorkie/v1/yorkie.proto @@ -19,7 +19,7 @@ package yorkie.v1; import "yorkie/v1/resources.proto"; -option go_package = ".;v1"; +option go_package = "github.com/yorkie-team/yorkie/api/yorkie/v1;v1"; option java_multiple_files = true; option java_package = "dev.yorkie.api.v1"; diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 000000000..903a949cb --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - plugin: gofast + out: api + opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1,plugins=grpc,paths=source_relative + - plugin: connect-go + out: api + opt: paths=source_relative diff --git a/go.mod b/go.mod index 222f3101c..e477caa42 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/yorkie-team/yorkie go 1.21 require ( + connectrpc.com/connect v1.12.0 github.com/go-playground/locales v0.14.0 github.com/go-playground/universal-translator v0.18.0 github.com/go-playground/validator/v10 v10.11.1 diff --git a/go.sum b/go.sum index 6b3a8531a..16a0838cc 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +connectrpc.com/connect v1.12.0 h1:HwKdOY0lGhhoHdsza+hW55aqHEC64pYpObRNoAgn70g= +connectrpc.com/connect v1.12.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= From ea113725cddefde280bf6db890dba0871964e327 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Tue, 31 Oct 2023 13:04:36 +0900 Subject: [PATCH 02/33] Chnage yorkie rpc server to connect rpc server --- server/rpc/yorkie_server.go | 122 ++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/server/rpc/yorkie_server.go b/server/rpc/yorkie_server.go index f3fa6bc67..7d4fcdc90 100644 --- a/server/rpc/yorkie_server.go +++ b/server/rpc/yorkie_server.go @@ -17,6 +17,7 @@ package rpc import ( + "connectrpc.com/connect" "context" "fmt" @@ -51,9 +52,9 @@ func newYorkieServer(serviceCtx context.Context, be *backend.Backend) *yorkieSer // ActivateClient activates the given client. func (s *yorkieServer) ActivateClient( ctx context.Context, - req *api.ActivateClientRequest, -) (*api.ActivateClientResponse, error) { - if req.ClientKey == "" { + req *connect.Request[api.ActivateClientRequest], +) (*connect.Response[api.ActivateClientResponse], error) { + if req.Msg.ClientKey == "" { return nil, clients.ErrInvalidClientKey } @@ -64,22 +65,22 @@ func (s *yorkieServer) ActivateClient( } project := projects.From(ctx) - cli, err := clients.Activate(ctx, s.backend.DB, project, req.ClientKey) + cli, err := clients.Activate(ctx, s.backend.DB, project, req.Msg.ClientKey) if err != nil { return nil, err } - return &api.ActivateClientResponse{ + return connect.NewResponse(&api.ActivateClientResponse{ ClientId: cli.ID.String(), - }, nil + }), nil } // DeactivateClient deactivates the given client. func (s *yorkieServer) DeactivateClient( ctx context.Context, - req *api.DeactivateClientRequest, -) (*api.DeactivateClientResponse, error) { - actorID, err := time.ActorIDFromHex(req.ClientId) + req *connect.Request[api.DeactivateClientRequest], +) (*connect.Response[api.DeactivateClientResponse], error) { + actorID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return nil, err } @@ -96,20 +97,20 @@ func (s *yorkieServer) DeactivateClient( return nil, err } - return &api.DeactivateClientResponse{}, nil + return connect.NewResponse(&api.DeactivateClientResponse{}), nil } // AttachDocument attaches the given document to the client. func (s *yorkieServer) AttachDocument( ctx context.Context, - req *api.AttachDocumentRequest, -) (*api.AttachDocumentResponse, error) { - actorID, err := time.ActorIDFromHex(req.ClientId) + req *connect.Request[api.AttachDocumentRequest], +) (*connect.Response[api.AttachDocumentResponse], error) { + actorID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return nil, err } - pack, err := converter.FromChangePack(req.ChangePack) + pack, err := converter.FromChangePack(req.Msg.ChangePack) if err != nil { return nil, err } @@ -162,27 +163,27 @@ func (s *yorkieServer) AttachDocument( return nil, err } - return &api.AttachDocumentResponse{ + return connect.NewResponse(&api.AttachDocumentResponse{ ChangePack: pbChangePack, DocumentId: docInfo.ID.String(), - }, nil + }), nil } // DetachDocument detaches the given document to the client. func (s *yorkieServer) DetachDocument( ctx context.Context, - req *api.DetachDocumentRequest, -) (*api.DetachDocumentResponse, error) { - actorID, err := time.ActorIDFromHex(req.ClientId) + req *connect.Request[api.DetachDocumentRequest], +) (*connect.Response[api.DetachDocumentResponse], error) { + actorID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return nil, err } - pack, err := converter.FromChangePack(req.ChangePack) + pack, err := converter.FromChangePack(req.Msg.ChangePack) if err != nil { return nil, err } - docID := types.ID(req.DocumentId) + docID := types.ID(req.Msg.DocumentId) if err := docID.Validate(); err != nil { return nil, err } @@ -223,7 +224,7 @@ func (s *yorkieServer) DetachDocument( return nil, err } - if req.RemoveIfNotAttached && !isAttached { + if req.Msg.RemoveIfNotAttached && !isAttached { pack.IsRemoved = true if err := clientInfo.RemoveDocument(docInfo.ID); err != nil { return nil, err @@ -244,27 +245,27 @@ func (s *yorkieServer) DetachDocument( return nil, err } - return &api.DetachDocumentResponse{ + return connect.NewResponse(&api.DetachDocumentResponse{ ChangePack: pbChangePack, - }, nil + }), nil } // PushPullChanges stores the changes sent by the client and delivers the changes // accumulated in the server to the client. func (s *yorkieServer) PushPullChanges( ctx context.Context, - req *api.PushPullChangesRequest, -) (*api.PushPullChangesResponse, error) { - actorID, err := time.ActorIDFromHex(req.ClientId) + req *connect.Request[api.PushPullChangesRequest], +) (*connect.Response[api.PushPullChangesResponse], error) { + actorID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return nil, err } - pack, err := converter.FromChangePack(req.ChangePack) + pack, err := converter.FromChangePack(req.Msg.ChangePack) if err != nil { return nil, err } - docID := types.ID(req.DocumentId) + docID := types.ID(req.Msg.DocumentId) if err := docID.Validate(); err != nil { return nil, err } @@ -297,7 +298,7 @@ func (s *yorkieServer) PushPullChanges( } syncMode := types.SyncModePushPull - if req.PushOnly { + if req.Msg.PushOnly { syncMode = types.SyncModePushOnly } @@ -324,56 +325,57 @@ func (s *yorkieServer) PushPullChanges( return nil, err } - return &api.PushPullChangesResponse{ + return connect.NewResponse(&api.PushPullChangesResponse{ ChangePack: pbChangePack, - }, nil + }), nil } // WatchDocument connects the stream to deliver events from the given documents // to the requesting client. func (s *yorkieServer) WatchDocument( - req *api.WatchDocumentRequest, - stream api.YorkieService_WatchDocumentServer, + ctx context.Context, + req *connect.Request[api.WatchDocumentRequest], + stream connect.ServerStream[api.WatchDocumentResponse], ) error { - clientID, err := time.ActorIDFromHex(req.ClientId) + clientID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return err } - docID, err := converter.FromDocumentID(req.DocumentId) + docID, err := converter.FromDocumentID(req.Msg.DocumentId) if err != nil { return err } docInfo, err := documents.FindDocInfo( - stream.Context(), + ctx, s.backend, - projects.From(stream.Context()), + projects.From(ctx), docID, ) if err != nil { return nil } - if err := auth.VerifyAccess(stream.Context(), s.backend, &types.AccessInfo{ + if err := auth.VerifyAccess(ctx, s.backend, &types.AccessInfo{ Method: types.WatchDocuments, Attributes: types.NewAccessAttributes([]key.Key{docInfo.Key}, types.Read), }); err != nil { return err } - project := projects.From(stream.Context()) - if _, err = clients.FindClientInfo(stream.Context(), s.backend.DB, project, clientID); err != nil { + project := projects.From(ctx) + if _, err = clients.FindClientInfo(ctx, s.backend.DB, project, clientID); err != nil { return err } locker, err := s.backend.Coordinator.NewLocker( - stream.Context(), + ctx, sync.NewKey(fmt.Sprintf("watchdoc-%s-%s", clientID.String(), docID)), ) if err != nil { return err } - if err := locker.Lock(stream.Context()); err != nil { + if err := locker.Lock(ctx); err != nil { return err } defer func() { @@ -382,9 +384,9 @@ func (s *yorkieServer) WatchDocument( } }() - subscription, clientIDs, err := s.watchDoc(stream.Context(), clientID, docID) + subscription, clientIDs, err := s.watchDoc(ctx, clientID, docID) if err != nil { - logging.From(stream.Context()).Error(err) + logging.From(ctx).Error(err) return err } defer func() { @@ -409,7 +411,7 @@ func (s *yorkieServer) WatchDocument( select { case <-s.serviceCtx.Done(): return nil - case <-stream.Context().Done(): + case <-ctx.Done(): return nil case event := <-subscription.Events(): eventType, err := converter.ToDocEventType(event.Type) @@ -438,18 +440,18 @@ func (s *yorkieServer) WatchDocument( // RemoveDocument removes the given document. func (s *yorkieServer) RemoveDocument( ctx context.Context, - req *api.RemoveDocumentRequest, -) (*api.RemoveDocumentResponse, error) { - actorID, err := time.ActorIDFromHex(req.ClientId) + req *connect.Request[api.RemoveDocumentRequest], +) (*connect.Response[api.RemoveDocumentResponse], error) { + actorID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return nil, err } - pack, err := converter.FromChangePack(req.ChangePack) + pack, err := converter.FromChangePack(req.Msg.ChangePack) if err != nil { return nil, err } - docID := types.ID(req.DocumentId) + docID := types.ID(req.Msg.DocumentId) if err := docID.Validate(); err != nil { return nil, err } @@ -501,9 +503,9 @@ func (s *yorkieServer) RemoveDocument( return nil, err } - return &api.RemoveDocumentResponse{ + return connect.NewResponse(&api.RemoveDocumentResponse{ ChangePack: pbChangePack, - }, nil + }), nil } func (s *yorkieServer) watchDoc( @@ -549,14 +551,14 @@ func (s *yorkieServer) unwatchDoc( func (s *yorkieServer) Broadcast( ctx context.Context, - req *api.BroadcastRequest, -) (*api.BroadcastResponse, error) { - clientID, err := time.ActorIDFromHex(req.ClientId) + req *connect.Request[api.BroadcastRequest], +) (*connect.Response[api.BroadcastResponse], error) { + clientID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { return nil, err } - docID, err := converter.FromDocumentID(req.DocumentId) + docID, err := converter.FromDocumentID(req.Msg.DocumentId) if err != nil { return nil, err } @@ -592,11 +594,11 @@ func (s *yorkieServer) Broadcast( Publisher: clientID, DocumentID: docID, Body: types.DocEventBody{ - Topic: req.Topic, - Payload: req.Payload, + Topic: req.Msg.Topic, + Payload: req.Msg.Payload, }, }, ) - return &api.BroadcastResponse{}, nil + return connect.NewResponse(&api.BroadcastResponse{}), nil } From 84a33a6cf0e25c9f597361bae034c6c777fdb5de Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Tue, 31 Oct 2023 14:20:06 +0900 Subject: [PATCH 03/33] Change interceptors and helper --- server/rpc/grpchelper/status.go | 82 ++++++++++---------- server/rpc/interceptors/context.go | 118 ++++++++++++----------------- 2 files changed, 90 insertions(+), 110 deletions(-) diff --git a/server/rpc/grpchelper/status.go b/server/rpc/grpchelper/status.go index 723f2a49d..642e08db6 100644 --- a/server/rpc/grpchelper/status.go +++ b/server/rpc/grpchelper/status.go @@ -17,12 +17,10 @@ package grpchelper import ( + "connectrpc.com/connect" "errors" "fmt" - "google.golang.org/genproto/googleapis/rpc/errdetails" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "google.golang.org/protobuf/runtime/protoiface" "github.com/yorkie-team/yorkie/api/converter" @@ -38,50 +36,50 @@ import ( ) // errorToCode maps an error to gRPC status code. -var errorToCode = map[error]codes.Code{ +var errorToCode = map[error]connect.Code{ // InvalidArgument means the request is malformed. - converter.ErrPackRequired: codes.InvalidArgument, - converter.ErrCheckpointRequired: codes.InvalidArgument, - time.ErrInvalidHexString: codes.InvalidArgument, - time.ErrInvalidActorID: codes.InvalidArgument, - types.ErrInvalidID: codes.InvalidArgument, - clients.ErrInvalidClientID: codes.InvalidArgument, - clients.ErrInvalidClientKey: codes.InvalidArgument, - key.ErrInvalidKey: codes.InvalidArgument, - types.ErrEmptyProjectFields: codes.InvalidArgument, + converter.ErrPackRequired: connect.CodeInvalidArgument, + converter.ErrCheckpointRequired: connect.CodeInvalidArgument, + time.ErrInvalidHexString: connect.CodeInvalidArgument, + time.ErrInvalidActorID: connect.CodeInvalidArgument, + types.ErrInvalidID: connect.CodeInvalidArgument, + clients.ErrInvalidClientID: connect.CodeInvalidArgument, + clients.ErrInvalidClientKey: connect.CodeInvalidArgument, + key.ErrInvalidKey: connect.CodeInvalidArgument, + types.ErrEmptyProjectFields: connect.CodeInvalidArgument, // NotFound means the requested resource does not exist. - database.ErrProjectNotFound: codes.NotFound, - database.ErrClientNotFound: codes.NotFound, - database.ErrDocumentNotFound: codes.NotFound, - database.ErrUserNotFound: codes.NotFound, + database.ErrProjectNotFound: connect.CodeNotFound, + database.ErrClientNotFound: connect.CodeNotFound, + database.ErrDocumentNotFound: connect.CodeNotFound, + database.ErrUserNotFound: connect.CodeNotFound, // AlreadyExists means the requested resource already exists. - database.ErrProjectAlreadyExists: codes.AlreadyExists, - database.ErrProjectNameAlreadyExists: codes.AlreadyExists, - database.ErrUserAlreadyExists: codes.AlreadyExists, + database.ErrProjectAlreadyExists: connect.CodeAlreadyExists, + database.ErrProjectNameAlreadyExists: connect.CodeAlreadyExists, + database.ErrUserAlreadyExists: connect.CodeAlreadyExists, // FailedPrecondition means the request is rejected because the state of the // system is not the desired state. - database.ErrClientNotActivated: codes.FailedPrecondition, - database.ErrDocumentNotAttached: codes.FailedPrecondition, - database.ErrDocumentAlreadyAttached: codes.FailedPrecondition, - documents.ErrDocumentAttached: codes.FailedPrecondition, - packs.ErrInvalidServerSeq: codes.FailedPrecondition, - database.ErrConflictOnUpdate: codes.FailedPrecondition, + database.ErrClientNotActivated: connect.CodeFailedPrecondition, + database.ErrDocumentNotAttached: connect.CodeFailedPrecondition, + database.ErrDocumentAlreadyAttached: connect.CodeFailedPrecondition, + documents.ErrDocumentAttached: connect.CodeFailedPrecondition, + packs.ErrInvalidServerSeq: connect.CodeFailedPrecondition, + database.ErrConflictOnUpdate: connect.CodeFailedPrecondition, // Unimplemented means the server does not implement the functionality. - converter.ErrUnsupportedOperation: codes.Unimplemented, - converter.ErrUnsupportedElement: codes.Unimplemented, - converter.ErrUnsupportedEventType: codes.Unimplemented, - converter.ErrUnsupportedValueType: codes.Unimplemented, - converter.ErrUnsupportedCounterType: codes.Unimplemented, + converter.ErrUnsupportedOperation: connect.CodeUnimplemented, + converter.ErrUnsupportedElement: connect.CodeUnimplemented, + converter.ErrUnsupportedEventType: connect.CodeUnimplemented, + converter.ErrUnsupportedValueType: connect.CodeUnimplemented, + converter.ErrUnsupportedCounterType: connect.CodeUnimplemented, // Unauthenticated means the request does not have valid authentication - auth.ErrNotAllowed: codes.Unauthenticated, - auth.ErrUnexpectedStatusCode: codes.Unauthenticated, - auth.ErrWebhookTimeout: codes.Unauthenticated, - database.ErrMismatchedPassword: codes.Unauthenticated, + auth.ErrNotAllowed: connect.CodeUnauthenticated, + auth.ErrUnexpectedStatusCode: connect.CodeUnauthenticated, + auth.ErrWebhookTimeout: connect.CodeUnauthenticated, + database.ErrMismatchedPassword: connect.CodeUnauthenticated, } func detailsFromError(err error) (protoiface.MessageV1, bool) { @@ -111,21 +109,21 @@ func ToStatusError(err error) error { cause = errors.Unwrap(cause) } if code, ok := errorToCode[cause]; ok { - return status.Error(code, err.Error()) + return connect.NewError(code, err) } // NOTE(hackerwins): InvalidFieldsError has details of invalid fields in // the error message. var invalidFieldsError *validation.StructError if errors.As(err, &invalidFieldsError) { - st := status.New(codes.InvalidArgument, err.Error()) - if details, ok := detailsFromError(err); ok { - st, _ = st.WithDetails(details) - } - return st.Err() + st := connect.NewError(connect.CodeInvalidArgument, err) + //if details, ok := detailsFromError(err); ok { + // st, _ = st.AddDetail(details) + //} + return st } - if err := status.Error(codes.Internal, err.Error()); err != nil { + if err := connect.NewError(connect.CodeInternal, err); err != nil { return fmt.Errorf("create status error: %w", err) } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 8f75d9fdf..946b545c2 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -18,15 +18,12 @@ package interceptors import ( + "connectrpc.com/connect" "context" + "errors" + "net/http" "strings" - grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - grpcmetadata "google.golang.org/grpc/metadata" - grpcstatus "google.golang.org/grpc/status" - "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/pkg/cache" "github.com/yorkie-team/yorkie/server/backend" @@ -55,75 +52,64 @@ func NewContextInterceptor(be *backend.Backend) *ContextInterceptor { } // Unary creates a unary server interceptor for building additional context. -func (i *ContextInterceptor) Unary() grpc.UnaryServerInterceptor { +func (i *ContextInterceptor) Unary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, - ) (resp interface{}, err error) { - if !isYorkieService(info.FullMethod) { - return handler(ctx, req) - } + req connect.AnyRequest, + ) (connect.AnyResponse, error) { + //if !isYorkieService(info.FullMethod) { + // return handler(ctx, req) + //} - ctx, err = i.buildContext(ctx) + ctx, err := i.buildContext(ctx, req.Header()) if err != nil { return nil, err } - resp, err = handler(ctx, req) - - data, ok := grpcmetadata.FromIncomingContext(ctx) - if ok { - sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) - i.backend.Metrics.AddUserAgent( - i.backend.Config.Hostname, - projects.From(ctx), - sdkType, - sdkVersion, - info.FullMethod, - ) - } - - return resp, err + //data, ok := grpcmetadata.FromIncomingContext(ctx) + //if ok { + // sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) + // i.backend.Metrics.AddUserAgent( + // i.backend.Config.Hostname, + // projects.From(ctx), + // sdkType, + // sdkVersion, + // info.FullMethod, + // ) + //} + + return next(ctx, req) } } // Stream creates a stream server interceptor for building additional context. -func (i *ContextInterceptor) Stream() grpc.StreamServerInterceptor { +func (i *ContextInterceptor) Stream(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( - srv interface{}, - ss grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, - ) (err error) { - if !isYorkieService(info.FullMethod) { - return handler(srv, ss) - } + ctx context.Context, + conn connect.StreamingHandlerConn, + ) error { + //if !isYorkieService(info.FullMethod) { + // return handler(srv, ss) + //} - ctx, err := i.buildContext(ss.Context()) + ctx, err := i.buildContext(ctx, conn.RequestHeader()) if err != nil { return err } - wrapped := grpcmiddleware.WrapServerStream(ss) - wrapped.WrappedContext = ctx - - err = handler(srv, wrapped) - - data, ok := grpcmetadata.FromIncomingContext(ctx) - if ok { - sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) - i.backend.Metrics.AddUserAgent( - i.backend.Config.Hostname, - projects.From(ctx), - sdkType, - sdkVersion, - info.FullMethod, - ) - } - - return err + //data, ok := grpcmetadata.FromIncomingContext(ctx) + //if ok { + // sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) + // i.backend.Metrics.AddUserAgent( + // i.backend.Config.Hostname, + // projects.From(ctx), + // sdkType, + // sdkVersion, + // info.FullMethod, + // ) + //} + + return next(ctx, conn) } } @@ -133,25 +119,21 @@ func isYorkieService(method string) bool { // buildContext builds a context data for RPC. It includes the metadata of the // request and the project information. -func (i *ContextInterceptor) buildContext(ctx context.Context) (context.Context, error) { +func (i *ContextInterceptor) buildContext(ctx context.Context, header http.Header) (context.Context, error) { // 01. building metadata md := metadata.Metadata{} - data, ok := grpcmetadata.FromIncomingContext(ctx) - if !ok { - return nil, grpcstatus.Errorf(codes.Unauthenticated, "metadata is not provided") - } - apiKey := data[types.APIKeyKey] + apiKey := header.Get(types.APIKeyKey) if len(apiKey) == 0 && !i.backend.Config.UseDefaultProject { - return nil, grpcstatus.Errorf(codes.Unauthenticated, "api key is not provided") + return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("api key is not provided")) } if len(apiKey) > 0 { - md.APIKey = apiKey[0] + md.APIKey = apiKey } - authorization := data[types.AuthorizationKey] + authorization := header.Get(types.AuthorizationKey) if len(authorization) > 0 { - md.Authorization = authorization[0] + md.Authorization = authorization } ctx = metadata.With(ctx, md) cacheKey := md.APIKey From 7b37ddcd3106576cf992bea41c3bacc16bdde48a Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Thu, 2 Nov 2023 12:48:46 +0900 Subject: [PATCH 04/33] Update protobuf related codes --- api/converter/from_pb.go | 33 +- api/converter/to_pb.go | 40 +- api/yorkie/v1/admin.pb.go | 7007 ++------ api/yorkie/v1/resources.pb.go | 20058 +++++------------------ api/yorkie/v1/yorkie.pb.go | 5204 ++---- buf.gen.yaml | 7 +- go.mod | 2 +- go.sum | 84 +- server/backend/database/change_info.go | 5 +- server/rpc/server.go | 242 +- server/rpc/yorkie_server.go | 3 +- 11 files changed, 6558 insertions(+), 26127 deletions(-) diff --git a/api/converter/from_pb.go b/api/converter/from_pb.go index 6ef645b1c..603b753d8 100644 --- a/api/converter/from_pb.go +++ b/api/converter/from_pb.go @@ -18,9 +18,6 @@ package converter import ( "fmt" - - protoTypes "github.com/gogo/protobuf/types" - "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/change" @@ -33,10 +30,7 @@ import ( // FromUser converts the given Protobuf formats to model format. func FromUser(pbUser *api.User) (*types.User, error) { - createdAt, err := protoTypes.TimestampFromProto(pbUser.CreatedAt) - if err != nil { - return nil, fmt.Errorf("convert createdAt to timestamp: %w", err) - } + createdAt := pbUser.CreatedAt.AsTime() return &types.User{ ID: types.ID(pbUser.Id), @@ -60,14 +54,8 @@ func FromProjects(pbProjects []*api.Project) ([]*types.Project, error) { // FromProject converts the given Protobuf formats to model format. func FromProject(pbProject *api.Project) (*types.Project, error) { - createdAt, err := protoTypes.TimestampFromProto(pbProject.CreatedAt) - if err != nil { - return nil, fmt.Errorf("convert createdAt to timestamp: %w", err) - } - updatedAt, err := protoTypes.TimestampFromProto(pbProject.UpdatedAt) - if err != nil { - return nil, fmt.Errorf("convert updatedAt to timestamp: %w", err) - } + createdAt := pbProject.CreatedAt.AsTime() + updatedAt := pbProject.UpdatedAt.AsTime() return &types.Project{ ID: types.ID(pbProject.Id), @@ -97,18 +85,9 @@ func FromDocumentSummaries(pbSummaries []*api.DocumentSummary) ([]*types.Documen // FromDocumentSummary converts the given Protobuf formats to model format. func FromDocumentSummary(pbSummary *api.DocumentSummary) (*types.DocumentSummary, error) { - createdAt, err := protoTypes.TimestampFromProto(pbSummary.CreatedAt) - if err != nil { - return nil, fmt.Errorf("convert createdAt to timestamp: %w", err) - } - accessedAt, err := protoTypes.TimestampFromProto(pbSummary.AccessedAt) - if err != nil { - return nil, fmt.Errorf("convert accessedAt to timestamp: %w", err) - } - updatedAt, err := protoTypes.TimestampFromProto(pbSummary.UpdatedAt) - if err != nil { - return nil, fmt.Errorf("convert updatedAt to timestamp: %w", err) - } + createdAt := pbSummary.CreatedAt.AsTime() + accessedAt := pbSummary.AccessedAt.AsTime() + updatedAt := pbSummary.UpdatedAt.AsTime() return &types.DocumentSummary{ ID: types.ID(pbSummary.Id), Key: key.Key(pbSummary.Key), diff --git a/api/converter/to_pb.go b/api/converter/to_pb.go index 1eb7f6424..de78afbe3 100644 --- a/api/converter/to_pb.go +++ b/api/converter/to_pb.go @@ -18,10 +18,10 @@ package converter import ( "fmt" + "google.golang.org/protobuf/types/known/timestamppb" + "google.golang.org/protobuf/types/known/wrapperspb" "reflect" - protoTypes "github.com/gogo/protobuf/types" - "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/change" @@ -33,10 +33,7 @@ import ( // ToUser converts the given model format to Protobuf format. func ToUser(user *types.User) (*api.User, error) { - pbCreatedAt, err := protoTypes.TimestampProto(user.CreatedAt) - if err != nil { - return nil, fmt.Errorf("convert createdAt to protobuf: %w", err) - } + pbCreatedAt := timestamppb.New(user.CreatedAt) return &api.User{ Id: user.ID.String(), @@ -61,14 +58,8 @@ func ToProjects(projects []*types.Project) ([]*api.Project, error) { // ToProject converts the given model to Protobuf. func ToProject(project *types.Project) (*api.Project, error) { - pbCreatedAt, err := protoTypes.TimestampProto(project.CreatedAt) - if err != nil { - return nil, fmt.Errorf("convert createdAt to protobuf: %w", err) - } - pbUpdatedAt, err := protoTypes.TimestampProto(project.UpdatedAt) - if err != nil { - return nil, fmt.Errorf("convert updatedAt to protobuf: %w", err) - } + pbCreatedAt := timestamppb.New(project.CreatedAt) + pbUpdatedAt := timestamppb.New(project.UpdatedAt) return &api.Project{ Id: project.ID.String(), @@ -98,18 +89,9 @@ func ToDocumentSummaries(summaries []*types.DocumentSummary) ([]*api.DocumentSum // ToDocumentSummary converts the given model to Protobuf format. func ToDocumentSummary(summary *types.DocumentSummary) (*api.DocumentSummary, error) { - pbCreatedAt, err := protoTypes.TimestampProto(summary.CreatedAt) - if err != nil { - return nil, fmt.Errorf("convert createdAt to protobuf: %w", err) - } - pbAccessedAt, err := protoTypes.TimestampProto(summary.AccessedAt) - if err != nil { - return nil, fmt.Errorf("convert accessedAt to protobuf: %w", err) - } - pbUpdatedAt, err := protoTypes.TimestampProto(summary.UpdatedAt) - if err != nil { - return nil, fmt.Errorf("convert updatedAt to protobuf: %w", err) - } + pbCreatedAt := timestamppb.New(summary.CreatedAt) + pbAccessedAt := timestamppb.New(summary.AccessedAt) + pbUpdatedAt := timestamppb.New(summary.UpdatedAt) return &api.DocumentSummary{ Id: summary.ID.String(), @@ -530,10 +512,10 @@ func toCounterType(valueType crdt.CounterType) (api.ValueType, error) { func ToUpdatableProjectFields(fields *types.UpdatableProjectFields) (*api.UpdatableProjectFields, error) { pbUpdatableProjectFields := &api.UpdatableProjectFields{} if fields.Name != nil { - pbUpdatableProjectFields.Name = &protoTypes.StringValue{Value: *fields.Name} + pbUpdatableProjectFields.Name = &wrapperspb.StringValue{Value: *fields.Name} } if fields.AuthWebhookURL != nil { - pbUpdatableProjectFields.AuthWebhookUrl = &protoTypes.StringValue{Value: *fields.AuthWebhookURL} + pbUpdatableProjectFields.AuthWebhookUrl = &wrapperspb.StringValue{Value: *fields.AuthWebhookURL} } if fields.AuthWebhookMethods != nil { pbUpdatableProjectFields.AuthWebhookMethods = &api.UpdatableProjectFields_AuthWebhookMethods{ @@ -543,7 +525,7 @@ func ToUpdatableProjectFields(fields *types.UpdatableProjectFields) (*api.Updata pbUpdatableProjectFields.AuthWebhookMethods = nil } if fields.ClientDeactivateThreshold != nil { - pbUpdatableProjectFields.ClientDeactivateThreshold = &protoTypes.StringValue{ + pbUpdatableProjectFields.ClientDeactivateThreshold = &wrapperspb.StringValue{ Value: *fields.ClientDeactivateThreshold, } } diff --git a/api/yorkie/v1/admin.pb.go b/api/yorkie/v1/admin.pb.go index 728dd021a..7ff402031 100644 --- a/api/yorkie/v1/admin.pb.go +++ b/api/yorkie/v1/admin.pb.go @@ -1,5888 +1,1913 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// +// Copyright 2022 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: yorkie/v1/admin.proto package v1 import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 SignUpRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (m *SignUpRequest) Reset() { *m = SignUpRequest{} } -func (m *SignUpRequest) String() string { return proto.CompactTextString(m) } -func (*SignUpRequest) ProtoMessage() {} -func (*SignUpRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{0} -} -func (m *SignUpRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignUpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignUpRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *SignUpRequest) Reset() { + *x = SignUpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *SignUpRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignUpRequest.Merge(m, src) -} -func (m *SignUpRequest) XXX_Size() int { - return m.Size() + +func (x *SignUpRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SignUpRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignUpRequest.DiscardUnknown(m) + +func (*SignUpRequest) ProtoMessage() {} + +func (x *SignUpRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_SignUpRequest proto.InternalMessageInfo +// Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead. +func (*SignUpRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{0} +} -func (m *SignUpRequest) GetUsername() string { - if m != nil { - return m.Username +func (x *SignUpRequest) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *SignUpRequest) GetPassword() string { - if m != nil { - return m.Password +func (x *SignUpRequest) GetPassword() string { + if x != nil { + return x.Password } return "" } type SignUpResponse struct { - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` } -func (m *SignUpResponse) Reset() { *m = SignUpResponse{} } -func (m *SignUpResponse) String() string { return proto.CompactTextString(m) } -func (*SignUpResponse) ProtoMessage() {} -func (*SignUpResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{1} -} -func (m *SignUpResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignUpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignUpResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *SignUpResponse) Reset() { + *x = SignUpResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *SignUpResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignUpResponse.Merge(m, src) -} -func (m *SignUpResponse) XXX_Size() int { - return m.Size() + +func (x *SignUpResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SignUpResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignUpResponse.DiscardUnknown(m) + +func (*SignUpResponse) ProtoMessage() {} + +func (x *SignUpResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_SignUpResponse proto.InternalMessageInfo +// Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead. +func (*SignUpResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{1} +} -func (m *SignUpResponse) GetUser() *User { - if m != nil { - return m.User +func (x *SignUpResponse) GetUser() *User { + if x != nil { + return x.User } return nil } type LogInRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (m *LogInRequest) Reset() { *m = LogInRequest{} } -func (m *LogInRequest) String() string { return proto.CompactTextString(m) } -func (*LogInRequest) ProtoMessage() {} -func (*LogInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{2} -} -func (m *LogInRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogInRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *LogInRequest) Reset() { + *x = LogInRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *LogInRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogInRequest.Merge(m, src) -} -func (m *LogInRequest) XXX_Size() int { - return m.Size() + +func (x *LogInRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogInRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogInRequest.DiscardUnknown(m) + +func (*LogInRequest) ProtoMessage() {} + +func (x *LogInRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_LogInRequest proto.InternalMessageInfo +// Deprecated: Use LogInRequest.ProtoReflect.Descriptor instead. +func (*LogInRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{2} +} -func (m *LogInRequest) GetUsername() string { - if m != nil { - return m.Username +func (x *LogInRequest) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *LogInRequest) GetPassword() string { - if m != nil { - return m.Password +func (x *LogInRequest) GetPassword() string { + if x != nil { + return x.Password } return "" } type LogInResponse struct { - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` } -func (m *LogInResponse) Reset() { *m = LogInResponse{} } -func (m *LogInResponse) String() string { return proto.CompactTextString(m) } -func (*LogInResponse) ProtoMessage() {} -func (*LogInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{3} -} -func (m *LogInResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogInResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *LogInResponse) Reset() { + *x = LogInResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *LogInResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogInResponse.Merge(m, src) -} -func (m *LogInResponse) XXX_Size() int { - return m.Size() + +func (x *LogInResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogInResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogInResponse.DiscardUnknown(m) + +func (*LogInResponse) ProtoMessage() {} + +func (x *LogInResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_LogInResponse proto.InternalMessageInfo +// Deprecated: Use LogInResponse.ProtoReflect.Descriptor instead. +func (*LogInResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{3} +} -func (m *LogInResponse) GetToken() string { - if m != nil { - return m.Token +func (x *LogInResponse) GetToken() string { + if x != nil { + return x.Token } return "" } type CreateProjectRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *CreateProjectRequest) Reset() { *m = CreateProjectRequest{} } -func (m *CreateProjectRequest) String() string { return proto.CompactTextString(m) } -func (*CreateProjectRequest) ProtoMessage() {} -func (*CreateProjectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{4} -} -func (m *CreateProjectRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateProjectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateProjectRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *CreateProjectRequest) Reset() { + *x = CreateProjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *CreateProjectRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateProjectRequest.Merge(m, src) -} -func (m *CreateProjectRequest) XXX_Size() int { - return m.Size() + +func (x *CreateProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateProjectRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateProjectRequest.DiscardUnknown(m) + +func (*CreateProjectRequest) ProtoMessage() {} + +func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_CreateProjectRequest proto.InternalMessageInfo +// Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead. +func (*CreateProjectRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{4} +} -func (m *CreateProjectRequest) GetName() string { - if m != nil { - return m.Name +func (x *CreateProjectRequest) GetName() string { + if x != nil { + return x.Name } return "" } type CreateProjectResponse struct { - Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` } -func (m *CreateProjectResponse) Reset() { *m = CreateProjectResponse{} } -func (m *CreateProjectResponse) String() string { return proto.CompactTextString(m) } -func (*CreateProjectResponse) ProtoMessage() {} -func (*CreateProjectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{5} -} -func (m *CreateProjectResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateProjectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateProjectResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *CreateProjectResponse) Reset() { + *x = CreateProjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *CreateProjectResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateProjectResponse.Merge(m, src) -} -func (m *CreateProjectResponse) XXX_Size() int { - return m.Size() + +func (x *CreateProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateProjectResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateProjectResponse.DiscardUnknown(m) + +func (*CreateProjectResponse) ProtoMessage() {} + +func (x *CreateProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_CreateProjectResponse proto.InternalMessageInfo +// Deprecated: Use CreateProjectResponse.ProtoReflect.Descriptor instead. +func (*CreateProjectResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{5} +} -func (m *CreateProjectResponse) GetProject() *Project { - if m != nil { - return m.Project +func (x *CreateProjectResponse) GetProject() *Project { + if x != nil { + return x.Project } return nil } type GetProjectRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *GetProjectRequest) Reset() { *m = GetProjectRequest{} } -func (m *GetProjectRequest) String() string { return proto.CompactTextString(m) } -func (*GetProjectRequest) ProtoMessage() {} -func (*GetProjectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{6} -} -func (m *GetProjectRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetProjectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetProjectRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetProjectRequest) Reset() { + *x = GetProjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *GetProjectRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetProjectRequest.Merge(m, src) -} -func (m *GetProjectRequest) XXX_Size() int { - return m.Size() + +func (x *GetProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetProjectRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetProjectRequest.DiscardUnknown(m) + +func (*GetProjectRequest) ProtoMessage() {} + +func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_GetProjectRequest proto.InternalMessageInfo +// Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead. +func (*GetProjectRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{6} +} -func (m *GetProjectRequest) GetName() string { - if m != nil { - return m.Name +func (x *GetProjectRequest) GetName() string { + if x != nil { + return x.Name } return "" } type GetProjectResponse struct { - Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` } -func (m *GetProjectResponse) Reset() { *m = GetProjectResponse{} } -func (m *GetProjectResponse) String() string { return proto.CompactTextString(m) } -func (*GetProjectResponse) ProtoMessage() {} -func (*GetProjectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{7} -} -func (m *GetProjectResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetProjectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetProjectResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetProjectResponse) Reset() { + *x = GetProjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *GetProjectResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetProjectResponse.Merge(m, src) -} -func (m *GetProjectResponse) XXX_Size() int { - return m.Size() + +func (x *GetProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetProjectResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetProjectResponse.DiscardUnknown(m) + +func (*GetProjectResponse) ProtoMessage() {} + +func (x *GetProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_GetProjectResponse proto.InternalMessageInfo +// Deprecated: Use GetProjectResponse.ProtoReflect.Descriptor instead. +func (*GetProjectResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{7} +} -func (m *GetProjectResponse) GetProject() *Project { - if m != nil { - return m.Project +func (x *GetProjectResponse) GetProject() *Project { + if x != nil { + return x.Project } return nil } type ListProjectsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ListProjectsRequest) Reset() { *m = ListProjectsRequest{} } -func (m *ListProjectsRequest) String() string { return proto.CompactTextString(m) } -func (*ListProjectsRequest) ProtoMessage() {} -func (*ListProjectsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{8} -} -func (m *ListProjectsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListProjectsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListProjectsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ListProjectsRequest) Reset() { + *x = ListProjectsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *ListProjectsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListProjectsRequest.Merge(m, src) -} -func (m *ListProjectsRequest) XXX_Size() int { - return m.Size() + +func (x *ListProjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListProjectsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListProjectsRequest.DiscardUnknown(m) + +func (*ListProjectsRequest) ProtoMessage() {} + +func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_ListProjectsRequest proto.InternalMessageInfo +// Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead. +func (*ListProjectsRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{8} +} type ListProjectsResponse struct { - Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` } -func (m *ListProjectsResponse) Reset() { *m = ListProjectsResponse{} } -func (m *ListProjectsResponse) String() string { return proto.CompactTextString(m) } -func (*ListProjectsResponse) ProtoMessage() {} -func (*ListProjectsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{9} -} -func (m *ListProjectsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListProjectsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListProjectsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ListProjectsResponse) Reset() { + *x = ListProjectsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *ListProjectsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListProjectsResponse.Merge(m, src) -} -func (m *ListProjectsResponse) XXX_Size() int { - return m.Size() + +func (x *ListProjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListProjectsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListProjectsResponse.DiscardUnknown(m) + +func (*ListProjectsResponse) ProtoMessage() {} + +func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_ListProjectsResponse proto.InternalMessageInfo +// Deprecated: Use ListProjectsResponse.ProtoReflect.Descriptor instead. +func (*ListProjectsResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{9} +} -func (m *ListProjectsResponse) GetProjects() []*Project { - if m != nil { - return m.Projects +func (x *ListProjectsResponse) GetProjects() []*Project { + if x != nil { + return x.Projects } return nil } type UpdateProjectRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Fields *UpdatableProjectFields `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Fields *UpdatableProjectFields `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` } -func (m *UpdateProjectRequest) Reset() { *m = UpdateProjectRequest{} } -func (m *UpdateProjectRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateProjectRequest) ProtoMessage() {} -func (*UpdateProjectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{10} -} -func (m *UpdateProjectRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateProjectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateProjectRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *UpdateProjectRequest) Reset() { + *x = UpdateProjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *UpdateProjectRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateProjectRequest.Merge(m, src) -} -func (m *UpdateProjectRequest) XXX_Size() int { - return m.Size() + +func (x *UpdateProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdateProjectRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateProjectRequest.DiscardUnknown(m) + +func (*UpdateProjectRequest) ProtoMessage() {} + +func (x *UpdateProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_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) } -var xxx_messageInfo_UpdateProjectRequest proto.InternalMessageInfo +// Deprecated: Use UpdateProjectRequest.ProtoReflect.Descriptor instead. +func (*UpdateProjectRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{10} +} -func (m *UpdateProjectRequest) GetId() string { - if m != nil { - return m.Id +func (x *UpdateProjectRequest) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *UpdateProjectRequest) GetFields() *UpdatableProjectFields { - if m != nil { - return m.Fields +func (x *UpdateProjectRequest) GetFields() *UpdatableProjectFields { + if x != nil { + return x.Fields } return nil } type UpdateProjectResponse struct { - Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` } -func (m *UpdateProjectResponse) Reset() { *m = UpdateProjectResponse{} } -func (m *UpdateProjectResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateProjectResponse) ProtoMessage() {} -func (*UpdateProjectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{11} -} -func (m *UpdateProjectResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateProjectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateProjectResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *UpdateProjectResponse) Reset() { + *x = UpdateProjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *UpdateProjectResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateProjectResponse.Merge(m, src) -} -func (m *UpdateProjectResponse) XXX_Size() int { - return m.Size() + +func (x *UpdateProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdateProjectResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateProjectResponse.DiscardUnknown(m) + +func (*UpdateProjectResponse) ProtoMessage() {} + +func (x *UpdateProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[11] + 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) } -var xxx_messageInfo_UpdateProjectResponse proto.InternalMessageInfo +// Deprecated: Use UpdateProjectResponse.ProtoReflect.Descriptor instead. +func (*UpdateProjectResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{11} +} -func (m *UpdateProjectResponse) GetProject() *Project { - if m != nil { - return m.Project +func (x *UpdateProjectResponse) GetProject() *Project { + if x != nil { + return x.Project } return nil } type ListDocumentsRequest struct { - ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` - PreviousId string `protobuf:"bytes,2,opt,name=previous_id,json=previousId,proto3" json:"previous_id,omitempty"` - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - IsForward bool `protobuf:"varint,4,opt,name=is_forward,json=isForward,proto3" json:"is_forward,omitempty"` - IncludeSnapshot bool `protobuf:"varint,5,opt,name=include_snapshot,json=includeSnapshot,proto3" json:"include_snapshot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListDocumentsRequest) Reset() { *m = ListDocumentsRequest{} } -func (m *ListDocumentsRequest) String() string { return proto.CompactTextString(m) } -func (*ListDocumentsRequest) ProtoMessage() {} -func (*ListDocumentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{12} -} -func (m *ListDocumentsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListDocumentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListDocumentsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + PreviousId string `protobuf:"bytes,2,opt,name=previous_id,json=previousId,proto3" json:"previous_id,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + IsForward bool `protobuf:"varint,4,opt,name=is_forward,json=isForward,proto3" json:"is_forward,omitempty"` + IncludeSnapshot bool `protobuf:"varint,5,opt,name=include_snapshot,json=includeSnapshot,proto3" json:"include_snapshot,omitempty"` } -func (m *ListDocumentsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListDocumentsRequest.Merge(m, src) + +func (x *ListDocumentsRequest) Reset() { + *x = ListDocumentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ListDocumentsRequest) XXX_Size() int { - return m.Size() + +func (x *ListDocumentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListDocumentsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListDocumentsRequest.DiscardUnknown(m) + +func (*ListDocumentsRequest) ProtoMessage() {} + +func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[12] + 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) } -var xxx_messageInfo_ListDocumentsRequest proto.InternalMessageInfo +// Deprecated: Use ListDocumentsRequest.ProtoReflect.Descriptor instead. +func (*ListDocumentsRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{12} +} -func (m *ListDocumentsRequest) GetProjectName() string { - if m != nil { - return m.ProjectName +func (x *ListDocumentsRequest) GetProjectName() string { + if x != nil { + return x.ProjectName } return "" } -func (m *ListDocumentsRequest) GetPreviousId() string { - if m != nil { - return m.PreviousId +func (x *ListDocumentsRequest) GetPreviousId() string { + if x != nil { + return x.PreviousId } return "" } -func (m *ListDocumentsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize +func (x *ListDocumentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize } return 0 } -func (m *ListDocumentsRequest) GetIsForward() bool { - if m != nil { - return m.IsForward +func (x *ListDocumentsRequest) GetIsForward() bool { + if x != nil { + return x.IsForward } return false } -func (m *ListDocumentsRequest) GetIncludeSnapshot() bool { - if m != nil { - return m.IncludeSnapshot +func (x *ListDocumentsRequest) GetIncludeSnapshot() bool { + if x != nil { + return x.IncludeSnapshot } return false } type ListDocumentsResponse struct { - Documents []*DocumentSummary `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Documents []*DocumentSummary `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"` } -func (m *ListDocumentsResponse) Reset() { *m = ListDocumentsResponse{} } -func (m *ListDocumentsResponse) String() string { return proto.CompactTextString(m) } -func (*ListDocumentsResponse) ProtoMessage() {} -func (*ListDocumentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{13} -} -func (m *ListDocumentsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListDocumentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListDocumentsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ListDocumentsResponse) Reset() { + *x = ListDocumentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *ListDocumentsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListDocumentsResponse.Merge(m, src) -} -func (m *ListDocumentsResponse) XXX_Size() int { - return m.Size() + +func (x *ListDocumentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListDocumentsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListDocumentsResponse.DiscardUnknown(m) + +func (*ListDocumentsResponse) ProtoMessage() {} + +func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[13] + 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) } -var xxx_messageInfo_ListDocumentsResponse proto.InternalMessageInfo +// Deprecated: Use ListDocumentsResponse.ProtoReflect.Descriptor instead. +func (*ListDocumentsResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{13} +} -func (m *ListDocumentsResponse) GetDocuments() []*DocumentSummary { - if m != nil { - return m.Documents +func (x *ListDocumentsResponse) GetDocuments() []*DocumentSummary { + if x != nil { + return x.Documents } return nil } type GetDocumentRequest struct { - ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` - DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` } -func (m *GetDocumentRequest) Reset() { *m = GetDocumentRequest{} } -func (m *GetDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*GetDocumentRequest) ProtoMessage() {} -func (*GetDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{14} -} -func (m *GetDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetDocumentRequest) Reset() { + *x = GetDocumentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *GetDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDocumentRequest.Merge(m, src) -} -func (m *GetDocumentRequest) XXX_Size() int { - return m.Size() + +func (x *GetDocumentRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetDocumentRequest.DiscardUnknown(m) + +func (*GetDocumentRequest) ProtoMessage() {} + +func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[14] + 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) } -var xxx_messageInfo_GetDocumentRequest proto.InternalMessageInfo +// Deprecated: Use GetDocumentRequest.ProtoReflect.Descriptor instead. +func (*GetDocumentRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{14} +} -func (m *GetDocumentRequest) GetProjectName() string { - if m != nil { - return m.ProjectName +func (x *GetDocumentRequest) GetProjectName() string { + if x != nil { + return x.ProjectName } return "" } -func (m *GetDocumentRequest) GetDocumentKey() string { - if m != nil { - return m.DocumentKey +func (x *GetDocumentRequest) GetDocumentKey() string { + if x != nil { + return x.DocumentKey } return "" } type GetDocumentResponse struct { - Document *DocumentSummary `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Document *DocumentSummary `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` } -func (m *GetDocumentResponse) Reset() { *m = GetDocumentResponse{} } -func (m *GetDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*GetDocumentResponse) ProtoMessage() {} -func (*GetDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{15} -} -func (m *GetDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetDocumentResponse) Reset() { + *x = GetDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *GetDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDocumentResponse.Merge(m, src) -} -func (m *GetDocumentResponse) XXX_Size() int { - return m.Size() + +func (x *GetDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetDocumentResponse.DiscardUnknown(m) + +func (*GetDocumentResponse) ProtoMessage() {} + +func (x *GetDocumentResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[15] + 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) } -var xxx_messageInfo_GetDocumentResponse proto.InternalMessageInfo +// Deprecated: Use GetDocumentResponse.ProtoReflect.Descriptor instead. +func (*GetDocumentResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{15} +} -func (m *GetDocumentResponse) GetDocument() *DocumentSummary { - if m != nil { - return m.Document +func (x *GetDocumentResponse) GetDocument() *DocumentSummary { + if x != nil { + return x.Document } return nil } type RemoveDocumentByAdminRequest struct { - ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` - DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` - Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` + Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` } -func (m *RemoveDocumentByAdminRequest) Reset() { *m = RemoveDocumentByAdminRequest{} } -func (m *RemoveDocumentByAdminRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveDocumentByAdminRequest) ProtoMessage() {} -func (*RemoveDocumentByAdminRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{16} -} -func (m *RemoveDocumentByAdminRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveDocumentByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveDocumentByAdminRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RemoveDocumentByAdminRequest) Reset() { + *x = RemoveDocumentByAdminRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RemoveDocumentByAdminRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveDocumentByAdminRequest.Merge(m, src) -} -func (m *RemoveDocumentByAdminRequest) XXX_Size() int { - return m.Size() + +func (x *RemoveDocumentByAdminRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RemoveDocumentByAdminRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveDocumentByAdminRequest.DiscardUnknown(m) + +func (*RemoveDocumentByAdminRequest) ProtoMessage() {} + +func (x *RemoveDocumentByAdminRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[16] + 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) } -var xxx_messageInfo_RemoveDocumentByAdminRequest proto.InternalMessageInfo +// Deprecated: Use RemoveDocumentByAdminRequest.ProtoReflect.Descriptor instead. +func (*RemoveDocumentByAdminRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{16} +} -func (m *RemoveDocumentByAdminRequest) GetProjectName() string { - if m != nil { - return m.ProjectName +func (x *RemoveDocumentByAdminRequest) GetProjectName() string { + if x != nil { + return x.ProjectName } return "" } -func (m *RemoveDocumentByAdminRequest) GetDocumentKey() string { - if m != nil { - return m.DocumentKey +func (x *RemoveDocumentByAdminRequest) GetDocumentKey() string { + if x != nil { + return x.DocumentKey } return "" } -func (m *RemoveDocumentByAdminRequest) GetForce() bool { - if m != nil { - return m.Force +func (x *RemoveDocumentByAdminRequest) GetForce() bool { + if x != nil { + return x.Force } return false } type RemoveDocumentByAdminResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RemoveDocumentByAdminResponse) Reset() { *m = RemoveDocumentByAdminResponse{} } -func (m *RemoveDocumentByAdminResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveDocumentByAdminResponse) ProtoMessage() {} -func (*RemoveDocumentByAdminResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{17} -} -func (m *RemoveDocumentByAdminResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveDocumentByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveDocumentByAdminResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RemoveDocumentByAdminResponse) Reset() { + *x = RemoveDocumentByAdminResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RemoveDocumentByAdminResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveDocumentByAdminResponse.Merge(m, src) -} -func (m *RemoveDocumentByAdminResponse) XXX_Size() int { - return m.Size() + +func (x *RemoveDocumentByAdminResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RemoveDocumentByAdminResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveDocumentByAdminResponse.DiscardUnknown(m) + +func (*RemoveDocumentByAdminResponse) ProtoMessage() {} + +func (x *RemoveDocumentByAdminResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[17] + 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) } -var xxx_messageInfo_RemoveDocumentByAdminResponse proto.InternalMessageInfo +// Deprecated: Use RemoveDocumentByAdminResponse.ProtoReflect.Descriptor instead. +func (*RemoveDocumentByAdminResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{17} +} type GetSnapshotMetaRequest struct { - ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` - DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` - ServerSeq int64 `protobuf:"varint,3,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` + ServerSeq int64 `protobuf:"varint,3,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"` } -func (m *GetSnapshotMetaRequest) Reset() { *m = GetSnapshotMetaRequest{} } -func (m *GetSnapshotMetaRequest) String() string { return proto.CompactTextString(m) } -func (*GetSnapshotMetaRequest) ProtoMessage() {} -func (*GetSnapshotMetaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{18} -} -func (m *GetSnapshotMetaRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSnapshotMetaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSnapshotMetaRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetSnapshotMetaRequest) Reset() { + *x = GetSnapshotMetaRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *GetSnapshotMetaRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSnapshotMetaRequest.Merge(m, src) -} -func (m *GetSnapshotMetaRequest) XXX_Size() int { - return m.Size() + +func (x *GetSnapshotMetaRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSnapshotMetaRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetSnapshotMetaRequest.DiscardUnknown(m) + +func (*GetSnapshotMetaRequest) ProtoMessage() {} + +func (x *GetSnapshotMetaRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[18] + 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) } -var xxx_messageInfo_GetSnapshotMetaRequest proto.InternalMessageInfo +// Deprecated: Use GetSnapshotMetaRequest.ProtoReflect.Descriptor instead. +func (*GetSnapshotMetaRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{18} +} -func (m *GetSnapshotMetaRequest) GetProjectName() string { - if m != nil { - return m.ProjectName +func (x *GetSnapshotMetaRequest) GetProjectName() string { + if x != nil { + return x.ProjectName } return "" } -func (m *GetSnapshotMetaRequest) GetDocumentKey() string { - if m != nil { - return m.DocumentKey +func (x *GetSnapshotMetaRequest) GetDocumentKey() string { + if x != nil { + return x.DocumentKey } return "" } -func (m *GetSnapshotMetaRequest) GetServerSeq() int64 { - if m != nil { - return m.ServerSeq +func (x *GetSnapshotMetaRequest) GetServerSeq() int64 { + if x != nil { + return x.ServerSeq } return 0 } type GetSnapshotMetaResponse struct { - Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - Lamport int64 `protobuf:"varint,2,opt,name=lamport,proto3" json:"lamport,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Lamport int64 `protobuf:"varint,2,opt,name=lamport,proto3" json:"lamport,omitempty"` } -func (m *GetSnapshotMetaResponse) Reset() { *m = GetSnapshotMetaResponse{} } -func (m *GetSnapshotMetaResponse) String() string { return proto.CompactTextString(m) } -func (*GetSnapshotMetaResponse) ProtoMessage() {} -func (*GetSnapshotMetaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{19} -} -func (m *GetSnapshotMetaResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSnapshotMetaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSnapshotMetaResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetSnapshotMetaResponse) Reset() { + *x = GetSnapshotMetaResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *GetSnapshotMetaResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSnapshotMetaResponse.Merge(m, src) -} -func (m *GetSnapshotMetaResponse) XXX_Size() int { - return m.Size() + +func (x *GetSnapshotMetaResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSnapshotMetaResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetSnapshotMetaResponse.DiscardUnknown(m) + +func (*GetSnapshotMetaResponse) ProtoMessage() {} + +func (x *GetSnapshotMetaResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[19] + 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) } -var xxx_messageInfo_GetSnapshotMetaResponse proto.InternalMessageInfo +// Deprecated: Use GetSnapshotMetaResponse.ProtoReflect.Descriptor instead. +func (*GetSnapshotMetaResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{19} +} -func (m *GetSnapshotMetaResponse) GetSnapshot() []byte { - if m != nil { - return m.Snapshot +func (x *GetSnapshotMetaResponse) GetSnapshot() []byte { + if x != nil { + return x.Snapshot } return nil } -func (m *GetSnapshotMetaResponse) GetLamport() int64 { - if m != nil { - return m.Lamport +func (x *GetSnapshotMetaResponse) GetLamport() int64 { + if x != nil { + return x.Lamport } return 0 } type SearchDocumentsRequest struct { - ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` - Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` } -func (m *SearchDocumentsRequest) Reset() { *m = SearchDocumentsRequest{} } -func (m *SearchDocumentsRequest) String() string { return proto.CompactTextString(m) } -func (*SearchDocumentsRequest) ProtoMessage() {} -func (*SearchDocumentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{20} -} -func (m *SearchDocumentsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SearchDocumentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SearchDocumentsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *SearchDocumentsRequest) Reset() { + *x = SearchDocumentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *SearchDocumentsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SearchDocumentsRequest.Merge(m, src) -} -func (m *SearchDocumentsRequest) XXX_Size() int { - return m.Size() + +func (x *SearchDocumentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SearchDocumentsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SearchDocumentsRequest.DiscardUnknown(m) + +func (*SearchDocumentsRequest) ProtoMessage() {} + +func (x *SearchDocumentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[20] + 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) } -var xxx_messageInfo_SearchDocumentsRequest proto.InternalMessageInfo +// Deprecated: Use SearchDocumentsRequest.ProtoReflect.Descriptor instead. +func (*SearchDocumentsRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{20} +} -func (m *SearchDocumentsRequest) GetProjectName() string { - if m != nil { - return m.ProjectName +func (x *SearchDocumentsRequest) GetProjectName() string { + if x != nil { + return x.ProjectName } return "" } -func (m *SearchDocumentsRequest) GetQuery() string { - if m != nil { - return m.Query +func (x *SearchDocumentsRequest) GetQuery() string { + if x != nil { + return x.Query } return "" } -func (m *SearchDocumentsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize +func (x *SearchDocumentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize } return 0 } type SearchDocumentsResponse struct { - TotalCount int32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - Documents []*DocumentSummary `protobuf:"bytes,2,rep,name=documents,proto3" json:"documents,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalCount int32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` + Documents []*DocumentSummary `protobuf:"bytes,2,rep,name=documents,proto3" json:"documents,omitempty"` } -func (m *SearchDocumentsResponse) Reset() { *m = SearchDocumentsResponse{} } -func (m *SearchDocumentsResponse) String() string { return proto.CompactTextString(m) } -func (*SearchDocumentsResponse) ProtoMessage() {} -func (*SearchDocumentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{21} -} -func (m *SearchDocumentsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SearchDocumentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SearchDocumentsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *SearchDocumentsResponse) Reset() { + *x = SearchDocumentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *SearchDocumentsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SearchDocumentsResponse.Merge(m, src) -} -func (m *SearchDocumentsResponse) XXX_Size() int { - return m.Size() + +func (x *SearchDocumentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SearchDocumentsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SearchDocumentsResponse.DiscardUnknown(m) + +func (*SearchDocumentsResponse) ProtoMessage() {} + +func (x *SearchDocumentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[21] + 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) } -var xxx_messageInfo_SearchDocumentsResponse proto.InternalMessageInfo +// Deprecated: Use SearchDocumentsResponse.ProtoReflect.Descriptor instead. +func (*SearchDocumentsResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{21} +} -func (m *SearchDocumentsResponse) GetTotalCount() int32 { - if m != nil { - return m.TotalCount +func (x *SearchDocumentsResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount } return 0 } -func (m *SearchDocumentsResponse) GetDocuments() []*DocumentSummary { - if m != nil { - return m.Documents +func (x *SearchDocumentsResponse) GetDocuments() []*DocumentSummary { + if x != nil { + return x.Documents } return nil } type ListChangesRequest struct { - ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` - DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` - PreviousSeq int64 `protobuf:"varint,3,opt,name=previous_seq,json=previousSeq,proto3" json:"previous_seq,omitempty"` - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - IsForward bool `protobuf:"varint,5,opt,name=is_forward,json=isForward,proto3" json:"is_forward,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListChangesRequest) Reset() { *m = ListChangesRequest{} } -func (m *ListChangesRequest) String() string { return proto.CompactTextString(m) } -func (*ListChangesRequest) ProtoMessage() {} -func (*ListChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{22} -} -func (m *ListChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListChangesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListChangesRequest.Merge(m, src) + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + DocumentKey string `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` + PreviousSeq int64 `protobuf:"varint,3,opt,name=previous_seq,json=previousSeq,proto3" json:"previous_seq,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + IsForward bool `protobuf:"varint,5,opt,name=is_forward,json=isForward,proto3" json:"is_forward,omitempty"` } -func (m *ListChangesRequest) XXX_Size() int { - return m.Size() + +func (x *ListChangesRequest) Reset() { + *x = ListChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ListChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListChangesRequest.DiscardUnknown(m) + +func (x *ListChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ListChangesRequest proto.InternalMessageInfo +func (*ListChangesRequest) ProtoMessage() {} -func (m *ListChangesRequest) GetProjectName() string { - if m != nil { - return m.ProjectName - } - return "" -} - -func (m *ListChangesRequest) GetDocumentKey() string { - if m != nil { - return m.DocumentKey - } - return "" -} - -func (m *ListChangesRequest) GetPreviousSeq() int64 { - if m != nil { - return m.PreviousSeq - } - return 0 -} - -func (m *ListChangesRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListChangesRequest) GetIsForward() bool { - if m != nil { - return m.IsForward - } - return false -} - -type ListChangesResponse struct { - Changes []*Change `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListChangesResponse) Reset() { *m = ListChangesResponse{} } -func (m *ListChangesResponse) String() string { return proto.CompactTextString(m) } -func (*ListChangesResponse) ProtoMessage() {} -func (*ListChangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ef4cd0843a14163, []int{23} -} -func (m *ListChangesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListChangesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListChangesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListChangesResponse.Merge(m, src) -} -func (m *ListChangesResponse) XXX_Size() int { - return m.Size() -} -func (m *ListChangesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListChangesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListChangesResponse proto.InternalMessageInfo - -func (m *ListChangesResponse) GetChanges() []*Change { - if m != nil { - return m.Changes - } - return nil -} - -func init() { - proto.RegisterType((*SignUpRequest)(nil), "yorkie.v1.SignUpRequest") - proto.RegisterType((*SignUpResponse)(nil), "yorkie.v1.SignUpResponse") - proto.RegisterType((*LogInRequest)(nil), "yorkie.v1.LogInRequest") - proto.RegisterType((*LogInResponse)(nil), "yorkie.v1.LogInResponse") - proto.RegisterType((*CreateProjectRequest)(nil), "yorkie.v1.CreateProjectRequest") - proto.RegisterType((*CreateProjectResponse)(nil), "yorkie.v1.CreateProjectResponse") - proto.RegisterType((*GetProjectRequest)(nil), "yorkie.v1.GetProjectRequest") - proto.RegisterType((*GetProjectResponse)(nil), "yorkie.v1.GetProjectResponse") - proto.RegisterType((*ListProjectsRequest)(nil), "yorkie.v1.ListProjectsRequest") - proto.RegisterType((*ListProjectsResponse)(nil), "yorkie.v1.ListProjectsResponse") - proto.RegisterType((*UpdateProjectRequest)(nil), "yorkie.v1.UpdateProjectRequest") - proto.RegisterType((*UpdateProjectResponse)(nil), "yorkie.v1.UpdateProjectResponse") - proto.RegisterType((*ListDocumentsRequest)(nil), "yorkie.v1.ListDocumentsRequest") - proto.RegisterType((*ListDocumentsResponse)(nil), "yorkie.v1.ListDocumentsResponse") - proto.RegisterType((*GetDocumentRequest)(nil), "yorkie.v1.GetDocumentRequest") - proto.RegisterType((*GetDocumentResponse)(nil), "yorkie.v1.GetDocumentResponse") - proto.RegisterType((*RemoveDocumentByAdminRequest)(nil), "yorkie.v1.RemoveDocumentByAdminRequest") - proto.RegisterType((*RemoveDocumentByAdminResponse)(nil), "yorkie.v1.RemoveDocumentByAdminResponse") - proto.RegisterType((*GetSnapshotMetaRequest)(nil), "yorkie.v1.GetSnapshotMetaRequest") - proto.RegisterType((*GetSnapshotMetaResponse)(nil), "yorkie.v1.GetSnapshotMetaResponse") - proto.RegisterType((*SearchDocumentsRequest)(nil), "yorkie.v1.SearchDocumentsRequest") - proto.RegisterType((*SearchDocumentsResponse)(nil), "yorkie.v1.SearchDocumentsResponse") - proto.RegisterType((*ListChangesRequest)(nil), "yorkie.v1.ListChangesRequest") - proto.RegisterType((*ListChangesResponse)(nil), "yorkie.v1.ListChangesResponse") -} - -func init() { proto.RegisterFile("yorkie/v1/admin.proto", fileDescriptor_7ef4cd0843a14163) } - -var fileDescriptor_7ef4cd0843a14163 = []byte{ - // 1022 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x52, 0xe3, 0xc6, - 0x13, 0x47, 0x80, 0xc1, 0x6e, 0x9b, 0xe5, 0xcf, 0x2c, 0x2c, 0x5e, 0xfd, 0xc1, 0xd8, 0x93, 0xda, - 0x5a, 0xf2, 0x65, 0x07, 0x52, 0x49, 0x25, 0x95, 0x54, 0xa5, 0x62, 0x12, 0xa8, 0xad, 0xfd, 0xa8, - 0x5d, 0x39, 0x5c, 0xb8, 0xb8, 0x84, 0xd4, 0x18, 0x05, 0x5b, 0x92, 0x67, 0x24, 0x6f, 0x99, 0x5b, - 0xde, 0x22, 0x2f, 0x93, 0x43, 0x6e, 0x39, 0xe6, 0x11, 0x52, 0xe4, 0x19, 0x72, 0x4f, 0x49, 0x33, - 0x23, 0x24, 0xf9, 0x23, 0x59, 0xc2, 0xcd, 0xd3, 0xfd, 0xeb, 0x5f, 0x7f, 0xcd, 0x74, 0x5b, 0xb0, - 0x35, 0xf6, 0xd8, 0x95, 0x83, 0xad, 0xd1, 0x41, 0xcb, 0xb4, 0x07, 0x8e, 0xdb, 0xf4, 0x99, 0x17, - 0x78, 0xa4, 0x24, 0xc4, 0xcd, 0xd1, 0x81, 0xfe, 0xf8, 0x16, 0xc1, 0x90, 0x7b, 0x21, 0xb3, 0x90, - 0x0b, 0x14, 0x3d, 0x81, 0xb5, 0x8e, 0xd3, 0x73, 0x4f, 0x7d, 0x03, 0x87, 0x21, 0xf2, 0x80, 0xe8, - 0x50, 0x0c, 0x39, 0x32, 0xd7, 0x1c, 0x60, 0x55, 0xab, 0x6b, 0xfb, 0x25, 0x23, 0x39, 0x47, 0x3a, - 0xdf, 0xe4, 0xfc, 0xad, 0xc7, 0xec, 0xea, 0xa2, 0xd0, 0xa9, 0x33, 0xfd, 0x0c, 0x1e, 0x28, 0x22, - 0xee, 0x7b, 0x2e, 0x47, 0xf2, 0x1e, 0x2c, 0x47, 0x96, 0x31, 0x4b, 0xf9, 0x70, 0xbd, 0x99, 0xc4, - 0xd3, 0x3c, 0xe5, 0xc8, 0x8c, 0x58, 0x49, 0x8f, 0xa1, 0xf2, 0xc2, 0xeb, 0x3d, 0x73, 0xff, 0xab, - 0xfb, 0x27, 0xb0, 0x26, 0x79, 0xa4, 0xf7, 0x4d, 0x28, 0x04, 0xde, 0x15, 0xba, 0x92, 0x45, 0x1c, - 0xe8, 0x07, 0xb0, 0x79, 0xc4, 0xd0, 0x0c, 0xf0, 0x35, 0xf3, 0x7e, 0x44, 0x2b, 0x50, 0x6e, 0x09, - 0x2c, 0xa7, 0x5c, 0xc6, 0xbf, 0xe9, 0xf7, 0xb0, 0x95, 0xc3, 0x4a, 0xea, 0x8f, 0x60, 0xd5, 0x17, - 0x22, 0x99, 0x1b, 0x49, 0xe5, 0xa6, 0xc0, 0x0a, 0x42, 0x9f, 0xc2, 0xc6, 0x09, 0x06, 0xff, 0xc2, - 0x5f, 0x1b, 0x48, 0x1a, 0x78, 0x27, 0x67, 0x5b, 0xf0, 0xf0, 0x85, 0xc3, 0x15, 0x09, 0x97, 0xee, - 0xe8, 0x31, 0x6c, 0x66, 0xc5, 0x92, 0xbc, 0x09, 0x45, 0x69, 0xc9, 0xab, 0x5a, 0x7d, 0x69, 0x06, - 0x7b, 0x82, 0xa1, 0x26, 0x6c, 0x9e, 0xfa, 0xf6, 0x64, 0xf9, 0x1e, 0xc0, 0xa2, 0x63, 0xcb, 0x64, - 0x16, 0x1d, 0x9b, 0x7c, 0x09, 0x2b, 0x17, 0x0e, 0xf6, 0x6d, 0x1e, 0xf7, 0xa9, 0x7c, 0xd8, 0x48, - 0x37, 0x3f, 0x22, 0x30, 0xcf, 0xfb, 0x8a, 0xe3, 0x38, 0x06, 0x1a, 0xd2, 0x20, 0xaa, 0x7a, 0xce, - 0xc5, 0x9d, 0x0a, 0xf1, 0xab, 0x26, 0x52, 0xfe, 0xce, 0xb3, 0xc2, 0x01, 0xba, 0x49, 0x29, 0x48, - 0x03, 0x2a, 0x12, 0xd3, 0x4d, 0x75, 0xa0, 0x2c, 0x65, 0xaf, 0xa2, 0x7b, 0xb6, 0x07, 0x65, 0x9f, - 0xe1, 0xc8, 0xf1, 0x42, 0xde, 0x75, 0xd4, 0x55, 0x03, 0x25, 0x7a, 0x66, 0x93, 0xff, 0x43, 0xc9, - 0x37, 0x7b, 0xd8, 0xe5, 0xce, 0x35, 0x56, 0x97, 0xea, 0xda, 0x7e, 0x21, 0xba, 0x89, 0x3d, 0xec, - 0x38, 0xd7, 0x48, 0x76, 0x01, 0x1c, 0xde, 0xbd, 0xf0, 0xd8, 0x5b, 0x93, 0xd9, 0xd5, 0xe5, 0xba, - 0xb6, 0x5f, 0x34, 0x4a, 0x0e, 0x3f, 0x16, 0x02, 0xf2, 0x3e, 0xfc, 0xcf, 0x71, 0xad, 0x7e, 0x68, - 0x63, 0x97, 0xbb, 0xa6, 0xcf, 0x2f, 0xbd, 0xa0, 0x5a, 0x88, 0x41, 0xeb, 0x52, 0xde, 0x91, 0x62, - 0xfa, 0x06, 0xb6, 0x72, 0x29, 0xc8, 0x52, 0x7c, 0x01, 0x25, 0x5b, 0x09, 0x65, 0xdf, 0xf4, 0x54, - 0x31, 0x94, 0x41, 0x27, 0x1c, 0x0c, 0x4c, 0x36, 0x36, 0x6e, 0xc1, 0xf4, 0x2c, 0xbe, 0x63, 0x0a, - 0xf0, 0x0e, 0x35, 0x69, 0x40, 0x45, 0xb1, 0x74, 0xaf, 0x70, 0x2c, 0x8b, 0x52, 0x56, 0xb2, 0xe7, - 0x38, 0xa6, 0x2f, 0xe1, 0x61, 0x86, 0x5b, 0x06, 0xfb, 0x39, 0x14, 0x15, 0x4a, 0x36, 0x6e, 0x5e, - 0xac, 0x09, 0x96, 0x5e, 0xc3, 0x8e, 0x81, 0x03, 0x6f, 0x84, 0x0a, 0xd2, 0x1e, 0x7f, 0x1b, 0x8d, - 0xb7, 0x7b, 0x0d, 0x3a, 0x1a, 0x13, 0x17, 0x1e, 0xb3, 0x44, 0x1b, 0x8b, 0x86, 0x38, 0xd0, 0x3d, - 0xd8, 0x9d, 0xe1, 0x5b, 0x24, 0x45, 0x7f, 0xd2, 0xe0, 0xd1, 0x09, 0x06, 0xaa, 0x55, 0x2f, 0x31, - 0x30, 0xef, 0x37, 0xae, 0x06, 0x00, 0x47, 0x36, 0x42, 0xd6, 0xe5, 0x38, 0x8c, 0x83, 0x5b, 0x6a, - 0x2f, 0x7e, 0xa2, 0x19, 0x25, 0x21, 0xed, 0xe0, 0x90, 0x76, 0x60, 0x7b, 0x22, 0x04, 0x59, 0x73, - 0x1d, 0x8a, 0xc9, 0xe5, 0x8a, 0xfc, 0x57, 0x8c, 0xe4, 0x4c, 0x76, 0x60, 0xb5, 0x6f, 0x0e, 0x7c, - 0x8f, 0x05, 0xb1, 0x5f, 0x41, 0xab, 0x44, 0xd4, 0x85, 0x47, 0x1d, 0x34, 0x99, 0x75, 0x79, 0x97, - 0x87, 0xb3, 0x09, 0x85, 0x61, 0x88, 0x4c, 0x25, 0x24, 0x0e, 0x73, 0x5f, 0x0b, 0x0d, 0x60, 0x7b, - 0xc2, 0x9f, 0x4c, 0x62, 0x0f, 0xca, 0x81, 0x17, 0x98, 0xfd, 0xae, 0xe5, 0x85, 0xf2, 0xee, 0x14, - 0x0c, 0x88, 0x45, 0x47, 0x91, 0x24, 0xfb, 0x0c, 0x16, 0xdf, 0xe5, 0x19, 0xfc, 0xa2, 0x01, 0x89, - 0x9e, 0xd6, 0xd1, 0xa5, 0xe9, 0xf6, 0x90, 0xdf, 0x6f, 0xeb, 0x9e, 0x44, 0x2c, 0x72, 0x7c, 0x64, - 0x9b, 0x97, 0x8c, 0x95, 0x0e, 0x0e, 0xb3, 0x65, 0x59, 0x9e, 0x3b, 0x44, 0x0a, 0xb9, 0x21, 0x42, - 0xdb, 0x62, 0xcc, 0x27, 0xe1, 0xcb, 0x8a, 0x7d, 0x08, 0xab, 0x96, 0x10, 0xc9, 0xa9, 0xb0, 0x91, - 0x2a, 0x87, 0x00, 0x1b, 0x0a, 0x71, 0xf8, 0xd7, 0x2a, 0x54, 0xe2, 0x4b, 0xdd, 0x41, 0x36, 0x72, - 0x2c, 0x24, 0xdf, 0xc0, 0x8a, 0xd8, 0xe0, 0xa4, 0x9a, 0x32, 0xcb, 0xfc, 0x3b, 0xd0, 0x1f, 0x4f, - 0xd1, 0xc8, 0x27, 0xb1, 0x40, 0xbe, 0x86, 0x42, 0xbc, 0x83, 0xc9, 0x76, 0x0a, 0x95, 0xde, 0xee, - 0x7a, 0x75, 0x52, 0x91, 0x58, 0xff, 0x00, 0x6b, 0x99, 0x75, 0x4b, 0xf6, 0xd2, 0xc1, 0x4f, 0x59, - 0xda, 0x7a, 0x7d, 0x36, 0x20, 0x61, 0x7d, 0x03, 0x95, 0xf4, 0xe6, 0x23, 0xb5, 0x74, 0x04, 0x93, - 0x9b, 0x52, 0xdf, 0x9b, 0xa9, 0x4f, 0x28, 0x9f, 0x03, 0xdc, 0xee, 0x69, 0xb2, 0x93, 0x32, 0x98, - 0xd8, 0xf3, 0xfa, 0xee, 0x0c, 0x6d, 0x3a, 0xeb, 0xcc, 0xba, 0xcb, 0x64, 0x3d, 0x6d, 0xd7, 0x66, - 0xb2, 0x9e, 0xba, 0x29, 0x05, 0x6b, 0x66, 0x73, 0x90, 0x7c, 0x5a, 0xf9, 0xd7, 0x9d, 0x61, 0x9d, - 0xba, 0x74, 0xe8, 0x02, 0x79, 0x05, 0xe5, 0xd4, 0x80, 0x27, 0xb9, 0xdc, 0x72, 0x4b, 0x45, 0xaf, - 0xcd, 0x52, 0x27, 0x7c, 0x7d, 0xd8, 0x9a, 0x3a, 0x65, 0xc9, 0xd3, 0x94, 0xe9, 0xbc, 0x1d, 0xa0, - 0xef, 0xff, 0x33, 0x30, 0xf1, 0x76, 0x06, 0xeb, 0xb9, 0x71, 0x49, 0x1a, 0xd9, 0x10, 0xa7, 0x4c, - 0x73, 0x9d, 0xce, 0x83, 0xa4, 0xb9, 0x73, 0x53, 0x2c, 0xc3, 0x3d, 0x7d, 0xa2, 0x66, 0xb8, 0x67, - 0x0c, 0x41, 0x51, 0xf5, 0xd4, 0x5b, 0xcf, 0x54, 0x7d, 0x72, 0x84, 0xe9, 0xb5, 0x59, 0x6a, 0xc5, - 0xd7, 0x3e, 0xfd, 0xed, 0xa6, 0xa6, 0xfd, 0x7e, 0x53, 0xd3, 0xfe, 0xb8, 0xa9, 0x69, 0x3f, 0xff, - 0x59, 0x5b, 0x80, 0x0d, 0x1b, 0x47, 0xca, 0xcc, 0xf4, 0x9d, 0xe6, 0xe8, 0xe0, 0xb5, 0x76, 0xd6, - 0xec, 0x39, 0xc1, 0x65, 0x78, 0xde, 0xb4, 0xbc, 0x41, 0x4b, 0xe8, 0x3e, 0x0e, 0xd0, 0x54, 0xbf, - 0x5b, 0xa6, 0xef, 0xb4, 0x92, 0xaf, 0x8a, 0xaf, 0x46, 0x07, 0xe7, 0x2b, 0xf1, 0xf7, 0xc4, 0xa7, - 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xc3, 0x25, 0x59, 0x8e, 0x0c, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// AdminServiceClient is the client API for AdminService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AdminServiceClient interface { - SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error) - LogIn(ctx context.Context, in *LogInRequest, opts ...grpc.CallOption) (*LogInResponse, error) - CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*CreateProjectResponse, error) - ListProjects(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error) - GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*GetProjectResponse, error) - UpdateProject(ctx context.Context, in *UpdateProjectRequest, opts ...grpc.CallOption) (*UpdateProjectResponse, error) - ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error) - GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*GetDocumentResponse, error) - RemoveDocumentByAdmin(ctx context.Context, in *RemoveDocumentByAdminRequest, opts ...grpc.CallOption) (*RemoveDocumentByAdminResponse, error) - GetSnapshotMeta(ctx context.Context, in *GetSnapshotMetaRequest, opts ...grpc.CallOption) (*GetSnapshotMetaResponse, error) - SearchDocuments(ctx context.Context, in *SearchDocumentsRequest, opts ...grpc.CallOption) (*SearchDocumentsResponse, error) - ListChanges(ctx context.Context, in *ListChangesRequest, opts ...grpc.CallOption) (*ListChangesResponse, error) -} - -type adminServiceClient struct { - cc *grpc.ClientConn -} - -func NewAdminServiceClient(cc *grpc.ClientConn) AdminServiceClient { - return &adminServiceClient{cc} -} - -func (c *adminServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error) { - out := new(SignUpResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/SignUp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) LogIn(ctx context.Context, in *LogInRequest, opts ...grpc.CallOption) (*LogInResponse, error) { - out := new(LogInResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/LogIn", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*CreateProjectResponse, error) { - out := new(CreateProjectResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/CreateProject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) ListProjects(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error) { - out := new(ListProjectsResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/ListProjects", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*GetProjectResponse, error) { - out := new(GetProjectResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/GetProject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) UpdateProject(ctx context.Context, in *UpdateProjectRequest, opts ...grpc.CallOption) (*UpdateProjectResponse, error) { - out := new(UpdateProjectResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/UpdateProject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error) { - out := new(ListDocumentsResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/ListDocuments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*GetDocumentResponse, error) { - out := new(GetDocumentResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/GetDocument", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) RemoveDocumentByAdmin(ctx context.Context, in *RemoveDocumentByAdminRequest, opts ...grpc.CallOption) (*RemoveDocumentByAdminResponse, error) { - out := new(RemoveDocumentByAdminResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/RemoveDocumentByAdmin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) GetSnapshotMeta(ctx context.Context, in *GetSnapshotMetaRequest, opts ...grpc.CallOption) (*GetSnapshotMetaResponse, error) { - out := new(GetSnapshotMetaResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/GetSnapshotMeta", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) SearchDocuments(ctx context.Context, in *SearchDocumentsRequest, opts ...grpc.CallOption) (*SearchDocumentsResponse, error) { - out := new(SearchDocumentsResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/SearchDocuments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *adminServiceClient) ListChanges(ctx context.Context, in *ListChangesRequest, opts ...grpc.CallOption) (*ListChangesResponse, error) { - out := new(ListChangesResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.AdminService/ListChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AdminServiceServer is the server API for AdminService service. -type AdminServiceServer interface { - SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error) - LogIn(context.Context, *LogInRequest) (*LogInResponse, error) - CreateProject(context.Context, *CreateProjectRequest) (*CreateProjectResponse, error) - ListProjects(context.Context, *ListProjectsRequest) (*ListProjectsResponse, error) - GetProject(context.Context, *GetProjectRequest) (*GetProjectResponse, error) - UpdateProject(context.Context, *UpdateProjectRequest) (*UpdateProjectResponse, error) - ListDocuments(context.Context, *ListDocumentsRequest) (*ListDocumentsResponse, error) - GetDocument(context.Context, *GetDocumentRequest) (*GetDocumentResponse, error) - RemoveDocumentByAdmin(context.Context, *RemoveDocumentByAdminRequest) (*RemoveDocumentByAdminResponse, error) - GetSnapshotMeta(context.Context, *GetSnapshotMetaRequest) (*GetSnapshotMetaResponse, error) - SearchDocuments(context.Context, *SearchDocumentsRequest) (*SearchDocumentsResponse, error) - ListChanges(context.Context, *ListChangesRequest) (*ListChangesResponse, error) -} - -// UnimplementedAdminServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAdminServiceServer struct { -} - -func (*UnimplementedAdminServiceServer) SignUp(ctx context.Context, req *SignUpRequest) (*SignUpResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignUp not implemented") -} -func (*UnimplementedAdminServiceServer) LogIn(ctx context.Context, req *LogInRequest) (*LogInResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LogIn not implemented") -} -func (*UnimplementedAdminServiceServer) CreateProject(ctx context.Context, req *CreateProjectRequest) (*CreateProjectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateProject not implemented") -} -func (*UnimplementedAdminServiceServer) ListProjects(ctx context.Context, req *ListProjectsRequest) (*ListProjectsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListProjects not implemented") -} -func (*UnimplementedAdminServiceServer) GetProject(ctx context.Context, req *GetProjectRequest) (*GetProjectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProject not implemented") -} -func (*UnimplementedAdminServiceServer) UpdateProject(ctx context.Context, req *UpdateProjectRequest) (*UpdateProjectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateProject not implemented") -} -func (*UnimplementedAdminServiceServer) ListDocuments(ctx context.Context, req *ListDocumentsRequest) (*ListDocumentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDocuments not implemented") -} -func (*UnimplementedAdminServiceServer) GetDocument(ctx context.Context, req *GetDocumentRequest) (*GetDocumentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDocument not implemented") -} -func (*UnimplementedAdminServiceServer) RemoveDocumentByAdmin(ctx context.Context, req *RemoveDocumentByAdminRequest) (*RemoveDocumentByAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveDocumentByAdmin not implemented") -} -func (*UnimplementedAdminServiceServer) GetSnapshotMeta(ctx context.Context, req *GetSnapshotMetaRequest) (*GetSnapshotMetaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSnapshotMeta not implemented") -} -func (*UnimplementedAdminServiceServer) SearchDocuments(ctx context.Context, req *SearchDocumentsRequest) (*SearchDocumentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchDocuments not implemented") -} -func (*UnimplementedAdminServiceServer) ListChanges(ctx context.Context, req *ListChangesRequest) (*ListChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListChanges not implemented") -} - -func RegisterAdminServiceServer(s *grpc.Server, srv AdminServiceServer) { - s.RegisterService(&_AdminService_serviceDesc, srv) -} - -func _AdminService_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignUpRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).SignUp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/SignUp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).SignUp(ctx, req.(*SignUpRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_LogIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LogInRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).LogIn(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/LogIn", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).LogIn(ctx, req.(*LogInRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_CreateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).CreateProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/CreateProject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).CreateProject(ctx, req.(*CreateProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_ListProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListProjectsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).ListProjects(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/ListProjects", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).ListProjects(ctx, req.(*ListProjectsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_GetProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).GetProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/GetProject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).GetProject(ctx, req.(*GetProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_UpdateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).UpdateProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/UpdateProject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).UpdateProject(ctx, req.(*UpdateProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_ListDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDocumentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).ListDocuments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/ListDocuments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).ListDocuments(ctx, req.(*ListDocumentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_GetDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDocumentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).GetDocument(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/GetDocument", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).GetDocument(ctx, req.(*GetDocumentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_RemoveDocumentByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveDocumentByAdminRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).RemoveDocumentByAdmin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/RemoveDocumentByAdmin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).RemoveDocumentByAdmin(ctx, req.(*RemoveDocumentByAdminRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_GetSnapshotMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSnapshotMetaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).GetSnapshotMeta(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/GetSnapshotMeta", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).GetSnapshotMeta(ctx, req.(*GetSnapshotMetaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_SearchDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchDocumentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).SearchDocuments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/SearchDocuments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).SearchDocuments(ctx, req.(*SearchDocumentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AdminService_ListChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminServiceServer).ListChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.AdminService/ListChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).ListChanges(ctx, req.(*ListChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AdminService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "yorkie.v1.AdminService", - HandlerType: (*AdminServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SignUp", - Handler: _AdminService_SignUp_Handler, - }, - { - MethodName: "LogIn", - Handler: _AdminService_LogIn_Handler, - }, - { - MethodName: "CreateProject", - Handler: _AdminService_CreateProject_Handler, - }, - { - MethodName: "ListProjects", - Handler: _AdminService_ListProjects_Handler, - }, - { - MethodName: "GetProject", - Handler: _AdminService_GetProject_Handler, - }, - { - MethodName: "UpdateProject", - Handler: _AdminService_UpdateProject_Handler, - }, - { - MethodName: "ListDocuments", - Handler: _AdminService_ListDocuments_Handler, - }, - { - MethodName: "GetDocument", - Handler: _AdminService_GetDocument_Handler, - }, - { - MethodName: "RemoveDocumentByAdmin", - Handler: _AdminService_RemoveDocumentByAdmin_Handler, - }, - { - MethodName: "GetSnapshotMeta", - Handler: _AdminService_GetSnapshotMeta_Handler, - }, - { - MethodName: "SearchDocuments", - Handler: _AdminService_SearchDocuments_Handler, - }, - { - MethodName: "ListChanges", - Handler: _AdminService_ListChanges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "yorkie/v1/admin.proto", -} - -func (m *SignUpRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignUpRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignUpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignUpResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignUpResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignUpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.User != nil { - { - size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) +func (x *ListChangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogInRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogInRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogInRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogInResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *LogInResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use ListChangesRequest.ProtoReflect.Descriptor instead. +func (*ListChangesRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{22} } -func (m *LogInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Token))) - i-- - dAtA[i] = 0xa +func (x *ListChangesRequest) GetProjectName() string { + if x != nil { + return x.ProjectName } - return len(dAtA) - i, nil + return "" } -func (m *CreateProjectRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *ListChangesRequest) GetDocumentKey() string { + if x != nil { + return x.DocumentKey } - return dAtA[:n], nil -} - -func (m *CreateProjectRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *CreateProjectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *ListChangesRequest) GetPreviousSeq() int64 { + if x != nil { + return x.PreviousSeq } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return 0 } -func (m *CreateProjectResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *ListChangesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize } - return dAtA[:n], nil -} - -func (m *CreateProjectResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return 0 } -func (m *CreateProjectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Project != nil { - { - size, err := m.Project.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *ListChangesRequest) GetIsForward() bool { + if x != nil { + return x.IsForward } - return len(dAtA) - i, nil + return false } -func (m *GetProjectRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +type ListChangesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetProjectRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + Changes []*Change `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` } -func (m *GetProjectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *ListChangesResponse) Reset() { + *x = ListChangesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil } -func (m *GetProjectResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *ListChangesResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetProjectResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*ListChangesResponse) ProtoMessage() {} -func (m *GetProjectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Project != nil { - { - size, err := m.Project.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) +func (x *ListChangesResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_admin_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListProjectsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + return ms } - return dAtA[:n], nil -} - -func (m *ListProjectsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *ListProjectsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil +// Deprecated: Use ListChangesResponse.ProtoReflect.Descriptor instead. +func (*ListChangesResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_admin_proto_rawDescGZIP(), []int{23} } -func (m *ListProjectsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *ListChangesResponse) GetChanges() []*Change { + if x != nil { + return x.Changes } - return dAtA[:n], nil -} - -func (m *ListProjectsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *ListProjectsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Projects) > 0 { - for iNdEx := len(m.Projects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Projects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +var File_yorkie_v1_admin_proto protoreflect.FileDescriptor + +var file_yorkie_v1_admin_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x1a, 0x19, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, + 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x35, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x46, 0x0a, + 0x0c, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2a, 0x0a, 0x14, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, + 0x27, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, + 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x15, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x61, 0x0a, 0x14, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x45, + 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xc1, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x29, + 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x51, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x5a, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x4d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x08, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7a, 0x0a, 0x1c, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x30, 0x01, 0x52, 0x09, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x71, 0x22, 0x53, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, + 0x1c, 0x0a, 0x07, 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x02, 0x30, 0x01, 0x52, 0x07, 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x6e, 0x0a, + 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x74, 0x0a, + 0x17, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x65, 0x71, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x30, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x53, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x22, 0x42, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x32, 0xf5, 0x07, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, + 0x55, 0x70, 0x12, 0x18, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x05, 0x4c, 0x6f, 0x67, + 0x49, 0x6e, 0x12, 0x17, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x6f, 0x67, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, + 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1e, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1c, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x47, 0x65, 0x74, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x21, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4e, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x1d, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x45, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2d, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -func (m *UpdateProjectRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +var ( + file_yorkie_v1_admin_proto_rawDescOnce sync.Once + file_yorkie_v1_admin_proto_rawDescData = file_yorkie_v1_admin_proto_rawDesc +) -func (m *UpdateProjectRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func file_yorkie_v1_admin_proto_rawDescGZIP() []byte { + file_yorkie_v1_admin_proto_rawDescOnce.Do(func() { + file_yorkie_v1_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_yorkie_v1_admin_proto_rawDescData) + }) + return file_yorkie_v1_admin_proto_rawDescData +} + +var file_yorkie_v1_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_yorkie_v1_admin_proto_goTypes = []interface{}{ + (*SignUpRequest)(nil), // 0: yorkie.v1.SignUpRequest + (*SignUpResponse)(nil), // 1: yorkie.v1.SignUpResponse + (*LogInRequest)(nil), // 2: yorkie.v1.LogInRequest + (*LogInResponse)(nil), // 3: yorkie.v1.LogInResponse + (*CreateProjectRequest)(nil), // 4: yorkie.v1.CreateProjectRequest + (*CreateProjectResponse)(nil), // 5: yorkie.v1.CreateProjectResponse + (*GetProjectRequest)(nil), // 6: yorkie.v1.GetProjectRequest + (*GetProjectResponse)(nil), // 7: yorkie.v1.GetProjectResponse + (*ListProjectsRequest)(nil), // 8: yorkie.v1.ListProjectsRequest + (*ListProjectsResponse)(nil), // 9: yorkie.v1.ListProjectsResponse + (*UpdateProjectRequest)(nil), // 10: yorkie.v1.UpdateProjectRequest + (*UpdateProjectResponse)(nil), // 11: yorkie.v1.UpdateProjectResponse + (*ListDocumentsRequest)(nil), // 12: yorkie.v1.ListDocumentsRequest + (*ListDocumentsResponse)(nil), // 13: yorkie.v1.ListDocumentsResponse + (*GetDocumentRequest)(nil), // 14: yorkie.v1.GetDocumentRequest + (*GetDocumentResponse)(nil), // 15: yorkie.v1.GetDocumentResponse + (*RemoveDocumentByAdminRequest)(nil), // 16: yorkie.v1.RemoveDocumentByAdminRequest + (*RemoveDocumentByAdminResponse)(nil), // 17: yorkie.v1.RemoveDocumentByAdminResponse + (*GetSnapshotMetaRequest)(nil), // 18: yorkie.v1.GetSnapshotMetaRequest + (*GetSnapshotMetaResponse)(nil), // 19: yorkie.v1.GetSnapshotMetaResponse + (*SearchDocumentsRequest)(nil), // 20: yorkie.v1.SearchDocumentsRequest + (*SearchDocumentsResponse)(nil), // 21: yorkie.v1.SearchDocumentsResponse + (*ListChangesRequest)(nil), // 22: yorkie.v1.ListChangesRequest + (*ListChangesResponse)(nil), // 23: yorkie.v1.ListChangesResponse + (*User)(nil), // 24: yorkie.v1.User + (*Project)(nil), // 25: yorkie.v1.Project + (*UpdatableProjectFields)(nil), // 26: yorkie.v1.UpdatableProjectFields + (*DocumentSummary)(nil), // 27: yorkie.v1.DocumentSummary + (*Change)(nil), // 28: yorkie.v1.Change +} +var file_yorkie_v1_admin_proto_depIdxs = []int32{ + 24, // 0: yorkie.v1.SignUpResponse.user:type_name -> yorkie.v1.User + 25, // 1: yorkie.v1.CreateProjectResponse.project:type_name -> yorkie.v1.Project + 25, // 2: yorkie.v1.GetProjectResponse.project:type_name -> yorkie.v1.Project + 25, // 3: yorkie.v1.ListProjectsResponse.projects:type_name -> yorkie.v1.Project + 26, // 4: yorkie.v1.UpdateProjectRequest.fields:type_name -> yorkie.v1.UpdatableProjectFields + 25, // 5: yorkie.v1.UpdateProjectResponse.project:type_name -> yorkie.v1.Project + 27, // 6: yorkie.v1.ListDocumentsResponse.documents:type_name -> yorkie.v1.DocumentSummary + 27, // 7: yorkie.v1.GetDocumentResponse.document:type_name -> yorkie.v1.DocumentSummary + 27, // 8: yorkie.v1.SearchDocumentsResponse.documents:type_name -> yorkie.v1.DocumentSummary + 28, // 9: yorkie.v1.ListChangesResponse.changes:type_name -> yorkie.v1.Change + 0, // 10: yorkie.v1.AdminService.SignUp:input_type -> yorkie.v1.SignUpRequest + 2, // 11: yorkie.v1.AdminService.LogIn:input_type -> yorkie.v1.LogInRequest + 4, // 12: yorkie.v1.AdminService.CreateProject:input_type -> yorkie.v1.CreateProjectRequest + 8, // 13: yorkie.v1.AdminService.ListProjects:input_type -> yorkie.v1.ListProjectsRequest + 6, // 14: yorkie.v1.AdminService.GetProject:input_type -> yorkie.v1.GetProjectRequest + 10, // 15: yorkie.v1.AdminService.UpdateProject:input_type -> yorkie.v1.UpdateProjectRequest + 12, // 16: yorkie.v1.AdminService.ListDocuments:input_type -> yorkie.v1.ListDocumentsRequest + 14, // 17: yorkie.v1.AdminService.GetDocument:input_type -> yorkie.v1.GetDocumentRequest + 16, // 18: yorkie.v1.AdminService.RemoveDocumentByAdmin:input_type -> yorkie.v1.RemoveDocumentByAdminRequest + 18, // 19: yorkie.v1.AdminService.GetSnapshotMeta:input_type -> yorkie.v1.GetSnapshotMetaRequest + 20, // 20: yorkie.v1.AdminService.SearchDocuments:input_type -> yorkie.v1.SearchDocumentsRequest + 22, // 21: yorkie.v1.AdminService.ListChanges:input_type -> yorkie.v1.ListChangesRequest + 1, // 22: yorkie.v1.AdminService.SignUp:output_type -> yorkie.v1.SignUpResponse + 3, // 23: yorkie.v1.AdminService.LogIn:output_type -> yorkie.v1.LogInResponse + 5, // 24: yorkie.v1.AdminService.CreateProject:output_type -> yorkie.v1.CreateProjectResponse + 9, // 25: yorkie.v1.AdminService.ListProjects:output_type -> yorkie.v1.ListProjectsResponse + 7, // 26: yorkie.v1.AdminService.GetProject:output_type -> yorkie.v1.GetProjectResponse + 11, // 27: yorkie.v1.AdminService.UpdateProject:output_type -> yorkie.v1.UpdateProjectResponse + 13, // 28: yorkie.v1.AdminService.ListDocuments:output_type -> yorkie.v1.ListDocumentsResponse + 15, // 29: yorkie.v1.AdminService.GetDocument:output_type -> yorkie.v1.GetDocumentResponse + 17, // 30: yorkie.v1.AdminService.RemoveDocumentByAdmin:output_type -> yorkie.v1.RemoveDocumentByAdminResponse + 19, // 31: yorkie.v1.AdminService.GetSnapshotMeta:output_type -> yorkie.v1.GetSnapshotMetaResponse + 21, // 32: yorkie.v1.AdminService.SearchDocuments:output_type -> yorkie.v1.SearchDocumentsResponse + 23, // 33: yorkie.v1.AdminService.ListChanges:output_type -> yorkie.v1.ListChangesResponse + 22, // [22:34] is the sub-list for method output_type + 10, // [10:22] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_yorkie_v1_admin_proto_init() } +func file_yorkie_v1_admin_proto_init() { + if File_yorkie_v1_admin_proto != nil { + return + } + file_yorkie_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_yorkie_v1_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignUpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignUpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogInRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogInResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateProjectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateProjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProjectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListProjectsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListProjectsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateProjectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateProjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDocumentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDocumentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDocumentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDocumentByAdminRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDocumentByAdminResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotMetaRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotMetaResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchDocumentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchDocumentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_admin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListChangesResponse); 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_yorkie_v1_admin_proto_rawDesc, + NumEnums: 0, + NumMessages: 24, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_yorkie_v1_admin_proto_goTypes, + DependencyIndexes: file_yorkie_v1_admin_proto_depIdxs, + MessageInfos: file_yorkie_v1_admin_proto_msgTypes, + }.Build() + File_yorkie_v1_admin_proto = out.File + file_yorkie_v1_admin_proto_rawDesc = nil + file_yorkie_v1_admin_proto_goTypes = nil + file_yorkie_v1_admin_proto_depIdxs = nil } - -func (m *UpdateProjectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Fields != nil { - { - size, err := m.Fields.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UpdateProjectResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdateProjectResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateProjectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Project != nil { - { - size, err := m.Project.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListDocumentsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListDocumentsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListDocumentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IncludeSnapshot { - i-- - if m.IncludeSnapshot { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.IsForward { - i-- - if m.IsForward { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.PageSize != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.PreviousId) > 0 { - i -= len(m.PreviousId) - copy(dAtA[i:], m.PreviousId) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.PreviousId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProjectName) > 0 { - i -= len(m.ProjectName) - copy(dAtA[i:], m.ProjectName) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.ProjectName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListDocumentsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListDocumentsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListDocumentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Documents) > 0 { - for iNdEx := len(m.Documents) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Documents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *GetDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DocumentKey) > 0 { - i -= len(m.DocumentKey) - copy(dAtA[i:], m.DocumentKey) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.DocumentKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProjectName) > 0 { - i -= len(m.ProjectName) - copy(dAtA[i:], m.ProjectName) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.ProjectName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Document != nil { - { - size, err := m.Document.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveDocumentByAdminRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoveDocumentByAdminRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveDocumentByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Force { - i-- - if m.Force { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.DocumentKey) > 0 { - i -= len(m.DocumentKey) - copy(dAtA[i:], m.DocumentKey) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.DocumentKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProjectName) > 0 { - i -= len(m.ProjectName) - copy(dAtA[i:], m.ProjectName) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.ProjectName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveDocumentByAdminResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoveDocumentByAdminResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveDocumentByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *GetSnapshotMetaRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetSnapshotMetaRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetSnapshotMetaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ServerSeq != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.ServerSeq)) - i-- - dAtA[i] = 0x18 - } - if len(m.DocumentKey) > 0 { - i -= len(m.DocumentKey) - copy(dAtA[i:], m.DocumentKey) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.DocumentKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProjectName) > 0 { - i -= len(m.ProjectName) - copy(dAtA[i:], m.ProjectName) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.ProjectName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetSnapshotMetaResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetSnapshotMetaResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetSnapshotMetaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Lamport != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.Lamport)) - i-- - dAtA[i] = 0x10 - } - if len(m.Snapshot) > 0 { - i -= len(m.Snapshot) - copy(dAtA[i:], m.Snapshot) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Snapshot))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SearchDocumentsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SearchDocumentsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SearchDocumentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PageSize != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.Query))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProjectName) > 0 { - i -= len(m.ProjectName) - copy(dAtA[i:], m.ProjectName) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.ProjectName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SearchDocumentsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SearchDocumentsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SearchDocumentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Documents) > 0 { - for iNdEx := len(m.Documents) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Documents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.TotalCount != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.TotalCount)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListChangesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListChangesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsForward { - i-- - if m.IsForward { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.PageSize != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x20 - } - if m.PreviousSeq != 0 { - i = encodeVarintAdmin(dAtA, i, uint64(m.PreviousSeq)) - i-- - dAtA[i] = 0x18 - } - if len(m.DocumentKey) > 0 { - i -= len(m.DocumentKey) - copy(dAtA[i:], m.DocumentKey) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.DocumentKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProjectName) > 0 { - i -= len(m.ProjectName) - copy(dAtA[i:], m.ProjectName) - i = encodeVarintAdmin(dAtA, i, uint64(len(m.ProjectName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListChangesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListChangesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdmin(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintAdmin(dAtA []byte, offset int, v uint64) int { - offset -= sovAdmin(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SignUpRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignUpResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.User != nil { - l = m.User.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LogInRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LogInResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Token) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CreateProjectRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CreateProjectResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Project != nil { - l = m.Project.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetProjectRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetProjectResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Project != nil { - l = m.Project.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListProjectsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListProjectsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Projects) > 0 { - for _, e := range m.Projects { - l = e.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdateProjectRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.Fields != nil { - l = m.Fields.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdateProjectResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Project != nil { - l = m.Project.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListDocumentsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProjectName) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.PreviousId) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.PageSize != 0 { - n += 1 + sovAdmin(uint64(m.PageSize)) - } - if m.IsForward { - n += 2 - } - if m.IncludeSnapshot { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListDocumentsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Documents) > 0 { - for _, e := range m.Documents { - l = e.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProjectName) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.DocumentKey) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Document != nil { - l = m.Document.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RemoveDocumentByAdminRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProjectName) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.DocumentKey) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.Force { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RemoveDocumentByAdminResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetSnapshotMetaRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProjectName) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.DocumentKey) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.ServerSeq != 0 { - n += 1 + sovAdmin(uint64(m.ServerSeq)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetSnapshotMetaResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Snapshot) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.Lamport != 0 { - n += 1 + sovAdmin(uint64(m.Lamport)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SearchDocumentsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProjectName) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.PageSize != 0 { - n += 1 + sovAdmin(uint64(m.PageSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SearchDocumentsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TotalCount != 0 { - n += 1 + sovAdmin(uint64(m.TotalCount)) - } - if len(m.Documents) > 0 { - for _, e := range m.Documents { - l = e.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProjectName) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - l = len(m.DocumentKey) - if l > 0 { - n += 1 + l + sovAdmin(uint64(l)) - } - if m.PreviousSeq != 0 { - n += 1 + sovAdmin(uint64(m.PreviousSeq)) - } - if m.PageSize != 0 { - n += 1 + sovAdmin(uint64(m.PageSize)) - } - if m.IsForward { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListChangesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovAdmin(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAdmin(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAdmin(x uint64) (n int) { - return sovAdmin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SignUpRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignUpRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignUpRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignUpResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignUpResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignUpResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.User == nil { - m.User = &User{} - } - if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogInRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogInRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogInRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogInResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogInResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogInResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateProjectRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateProjectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateProjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateProjectResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateProjectResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateProjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Project", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Project == nil { - m.Project = &Project{} - } - if err := m.Project.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetProjectRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetProjectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetProjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetProjectResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetProjectResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetProjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Project", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Project == nil { - m.Project = &Project{} - } - if err := m.Project.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListProjectsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListProjectsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListProjectsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListProjectsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListProjectsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListProjectsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Projects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Projects = append(m.Projects, &Project{}) - if err := m.Projects[len(m.Projects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateProjectRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateProjectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateProjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fields == nil { - m.Fields = &UpdatableProjectFields{} - } - if err := m.Fields.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateProjectResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateProjectResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateProjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Project", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Project == nil { - m.Project = &Project{} - } - if err := m.Project.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListDocumentsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListDocumentsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListDocumentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreviousId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsForward", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsForward = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeSnapshot", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeSnapshot = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListDocumentsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListDocumentsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListDocumentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Documents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Documents = append(m.Documents, &DocumentSummary{}) - if err := m.Documents[len(m.Documents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Document == nil { - m.Document = &DocumentSummary{} - } - if err := m.Document.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveDocumentByAdminRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoveDocumentByAdminRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveDocumentByAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Force", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Force = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveDocumentByAdminResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoveDocumentByAdminResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveDocumentByAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSnapshotMetaRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSnapshotMetaRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSnapshotMetaRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerSeq", wireType) - } - m.ServerSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ServerSeq |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSnapshotMetaResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSnapshotMetaResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSnapshotMetaResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Snapshot = append(m.Snapshot[:0], dAtA[iNdEx:postIndex]...) - if m.Snapshot == nil { - m.Snapshot = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lamport", wireType) - } - m.Lamport = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lamport |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchDocumentsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchDocumentsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchDocumentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchDocumentsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchDocumentsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchDocumentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalCount", wireType) - } - m.TotalCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Documents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Documents = append(m.Documents, &DocumentSummary{}) - if err := m.Documents[len(m.Documents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListChangesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousSeq", wireType) - } - m.PreviousSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PreviousSeq |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsForward", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsForward = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListChangesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdmin - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdmin - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdmin - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &Change{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdmin(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdmin - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAdmin(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAdmin - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAdmin - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAdmin - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAdmin - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAdmin - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAdmin - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAdmin = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAdmin = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAdmin = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/yorkie/v1/resources.pb.go b/api/yorkie/v1/resources.pb.go index 92d21ed72..cbd9529d8 100644 --- a/api/yorkie/v1/resources.pb.go +++ b/api/yorkie/v1/resources.pb.go @@ -1,27 +1,41 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// +// Copyright 2022 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: yorkie/v1/resources.proto package v1 import ( - fmt "fmt" - types "github.com/gogo/protobuf/types" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 ValueType int32 @@ -42,46 +56,67 @@ const ( ValueType_VALUE_TYPE_TREE ValueType = 13 ) -var ValueType_name = map[int32]string{ - 0: "VALUE_TYPE_NULL", - 1: "VALUE_TYPE_BOOLEAN", - 2: "VALUE_TYPE_INTEGER", - 3: "VALUE_TYPE_LONG", - 4: "VALUE_TYPE_DOUBLE", - 5: "VALUE_TYPE_STRING", - 6: "VALUE_TYPE_BYTES", - 7: "VALUE_TYPE_DATE", - 8: "VALUE_TYPE_JSON_OBJECT", - 9: "VALUE_TYPE_JSON_ARRAY", - 10: "VALUE_TYPE_TEXT", - 11: "VALUE_TYPE_INTEGER_CNT", - 12: "VALUE_TYPE_LONG_CNT", - 13: "VALUE_TYPE_TREE", -} - -var ValueType_value = map[string]int32{ - "VALUE_TYPE_NULL": 0, - "VALUE_TYPE_BOOLEAN": 1, - "VALUE_TYPE_INTEGER": 2, - "VALUE_TYPE_LONG": 3, - "VALUE_TYPE_DOUBLE": 4, - "VALUE_TYPE_STRING": 5, - "VALUE_TYPE_BYTES": 6, - "VALUE_TYPE_DATE": 7, - "VALUE_TYPE_JSON_OBJECT": 8, - "VALUE_TYPE_JSON_ARRAY": 9, - "VALUE_TYPE_TEXT": 10, - "VALUE_TYPE_INTEGER_CNT": 11, - "VALUE_TYPE_LONG_CNT": 12, - "VALUE_TYPE_TREE": 13, +// Enum value maps for ValueType. +var ( + ValueType_name = map[int32]string{ + 0: "VALUE_TYPE_NULL", + 1: "VALUE_TYPE_BOOLEAN", + 2: "VALUE_TYPE_INTEGER", + 3: "VALUE_TYPE_LONG", + 4: "VALUE_TYPE_DOUBLE", + 5: "VALUE_TYPE_STRING", + 6: "VALUE_TYPE_BYTES", + 7: "VALUE_TYPE_DATE", + 8: "VALUE_TYPE_JSON_OBJECT", + 9: "VALUE_TYPE_JSON_ARRAY", + 10: "VALUE_TYPE_TEXT", + 11: "VALUE_TYPE_INTEGER_CNT", + 12: "VALUE_TYPE_LONG_CNT", + 13: "VALUE_TYPE_TREE", + } + ValueType_value = map[string]int32{ + "VALUE_TYPE_NULL": 0, + "VALUE_TYPE_BOOLEAN": 1, + "VALUE_TYPE_INTEGER": 2, + "VALUE_TYPE_LONG": 3, + "VALUE_TYPE_DOUBLE": 4, + "VALUE_TYPE_STRING": 5, + "VALUE_TYPE_BYTES": 6, + "VALUE_TYPE_DATE": 7, + "VALUE_TYPE_JSON_OBJECT": 8, + "VALUE_TYPE_JSON_ARRAY": 9, + "VALUE_TYPE_TEXT": 10, + "VALUE_TYPE_INTEGER_CNT": 11, + "VALUE_TYPE_LONG_CNT": 12, + "VALUE_TYPE_TREE": 13, + } +) + +func (x ValueType) Enum() *ValueType { + p := new(ValueType) + *p = x + return p } func (x ValueType) String() string { - return proto.EnumName(ValueType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ValueType) Descriptor() protoreflect.EnumDescriptor { + return file_yorkie_v1_resources_proto_enumTypes[0].Descriptor() +} + +func (ValueType) Type() protoreflect.EnumType { + return &file_yorkie_v1_resources_proto_enumTypes[0] +} + +func (x ValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ValueType.Descriptor instead. func (ValueType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{0} + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{0} } type DocEventType int32 @@ -93,26 +128,47 @@ const ( DocEventType_DOC_EVENT_TYPE_DOCUMENT_BROADCAST DocEventType = 3 ) -var DocEventType_name = map[int32]string{ - 0: "DOC_EVENT_TYPE_DOCUMENT_CHANGED", - 1: "DOC_EVENT_TYPE_DOCUMENT_WATCHED", - 2: "DOC_EVENT_TYPE_DOCUMENT_UNWATCHED", - 3: "DOC_EVENT_TYPE_DOCUMENT_BROADCAST", -} +// Enum value maps for DocEventType. +var ( + DocEventType_name = map[int32]string{ + 0: "DOC_EVENT_TYPE_DOCUMENT_CHANGED", + 1: "DOC_EVENT_TYPE_DOCUMENT_WATCHED", + 2: "DOC_EVENT_TYPE_DOCUMENT_UNWATCHED", + 3: "DOC_EVENT_TYPE_DOCUMENT_BROADCAST", + } + DocEventType_value = map[string]int32{ + "DOC_EVENT_TYPE_DOCUMENT_CHANGED": 0, + "DOC_EVENT_TYPE_DOCUMENT_WATCHED": 1, + "DOC_EVENT_TYPE_DOCUMENT_UNWATCHED": 2, + "DOC_EVENT_TYPE_DOCUMENT_BROADCAST": 3, + } +) -var DocEventType_value = map[string]int32{ - "DOC_EVENT_TYPE_DOCUMENT_CHANGED": 0, - "DOC_EVENT_TYPE_DOCUMENT_WATCHED": 1, - "DOC_EVENT_TYPE_DOCUMENT_UNWATCHED": 2, - "DOC_EVENT_TYPE_DOCUMENT_BROADCAST": 3, +func (x DocEventType) Enum() *DocEventType { + p := new(DocEventType) + *p = x + return p } func (x DocEventType) String() string { - return proto.EnumName(DocEventType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DocEventType) Descriptor() protoreflect.EnumDescriptor { + return file_yorkie_v1_resources_proto_enumTypes[1].Descriptor() +} + +func (DocEventType) Type() protoreflect.EnumType { + return &file_yorkie_v1_resources_proto_enumTypes[1] +} + +func (x DocEventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use DocEventType.Descriptor instead. func (DocEventType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{1} + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{1} } type PresenceChange_ChangeType int32 @@ -124,82 +180,103 @@ const ( PresenceChange_CHANGE_TYPE_CLEAR PresenceChange_ChangeType = 3 ) -var PresenceChange_ChangeType_name = map[int32]string{ - 0: "CHANGE_TYPE_UNSPECIFIED", - 1: "CHANGE_TYPE_PUT", - 2: "CHANGE_TYPE_DELETE", - 3: "CHANGE_TYPE_CLEAR", -} +// Enum value maps for PresenceChange_ChangeType. +var ( + PresenceChange_ChangeType_name = map[int32]string{ + 0: "CHANGE_TYPE_UNSPECIFIED", + 1: "CHANGE_TYPE_PUT", + 2: "CHANGE_TYPE_DELETE", + 3: "CHANGE_TYPE_CLEAR", + } + PresenceChange_ChangeType_value = map[string]int32{ + "CHANGE_TYPE_UNSPECIFIED": 0, + "CHANGE_TYPE_PUT": 1, + "CHANGE_TYPE_DELETE": 2, + "CHANGE_TYPE_CLEAR": 3, + } +) -var PresenceChange_ChangeType_value = map[string]int32{ - "CHANGE_TYPE_UNSPECIFIED": 0, - "CHANGE_TYPE_PUT": 1, - "CHANGE_TYPE_DELETE": 2, - "CHANGE_TYPE_CLEAR": 3, +func (x PresenceChange_ChangeType) Enum() *PresenceChange_ChangeType { + p := new(PresenceChange_ChangeType) + *p = x + return p } func (x PresenceChange_ChangeType) String() string { - return proto.EnumName(PresenceChange_ChangeType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PresenceChange_ChangeType) Descriptor() protoreflect.EnumDescriptor { + return file_yorkie_v1_resources_proto_enumTypes[2].Descriptor() +} + +func (PresenceChange_ChangeType) Type() protoreflect.EnumType { + return &file_yorkie_v1_resources_proto_enumTypes[2] +} + +func (x PresenceChange_ChangeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use PresenceChange_ChangeType.Descriptor instead. func (PresenceChange_ChangeType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{20, 0} + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{20, 0} } // /////////////////////////////////////// // Messages for Snapshot // // /////////////////////////////////////// type Snapshot struct { - Root *JSONElement `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - Presences map[string]*Presence `protobuf:"bytes,2,rep,name=presences,proto3" json:"presences,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Root *JSONElement `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` + Presences map[string]*Presence `protobuf:"bytes,2,rep,name=presences,proto3" json:"presences,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{0} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Snapshot) Reset() { + *x = Snapshot{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(m, src) -} -func (m *Snapshot) XXX_Size() int { - return m.Size() + +func (x *Snapshot) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) + +func (*Snapshot) ProtoMessage() {} + +func (x *Snapshot) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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) } -var xxx_messageInfo_Snapshot proto.InternalMessageInfo +// Deprecated: Use Snapshot.ProtoReflect.Descriptor instead. +func (*Snapshot) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{0} +} -func (m *Snapshot) GetRoot() *JSONElement { - if m != nil { - return m.Root +func (x *Snapshot) GetRoot() *JSONElement { + if x != nil { + return x.Root } return nil } -func (m *Snapshot) GetPresences() map[string]*Presence { - if m != nil { - return m.Presences +func (x *Snapshot) GetPresences() map[string]*Presence { + if x != nil { + return x.Presences } return nil } @@ -207,236 +284,240 @@ func (m *Snapshot) GetPresences() map[string]*Presence { // ChangePack is a message that contains all changes that occurred in a document. // It is used to synchronize changes between clients and servers. type ChangePack struct { - DocumentKey string `protobuf:"bytes,1,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` - Checkpoint *Checkpoint `protobuf:"bytes,2,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` - Snapshot []byte `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - Changes []*Change `protobuf:"bytes,4,rep,name=changes,proto3" json:"changes,omitempty"` - MinSyncedTicket *TimeTicket `protobuf:"bytes,5,opt,name=min_synced_ticket,json=minSyncedTicket,proto3" json:"min_synced_ticket,omitempty"` - IsRemoved bool `protobuf:"varint,6,opt,name=is_removed,json=isRemoved,proto3" json:"is_removed,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChangePack) Reset() { *m = ChangePack{} } -func (m *ChangePack) String() string { return proto.CompactTextString(m) } -func (*ChangePack) ProtoMessage() {} -func (*ChangePack) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{1} -} -func (m *ChangePack) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChangePack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChangePack.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DocumentKey string `protobuf:"bytes,1,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` + Checkpoint *Checkpoint `protobuf:"bytes,2,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` + Snapshot []byte `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Changes []*Change `protobuf:"bytes,4,rep,name=changes,proto3" json:"changes,omitempty"` + MinSyncedTicket *TimeTicket `protobuf:"bytes,5,opt,name=min_synced_ticket,json=minSyncedTicket,proto3" json:"min_synced_ticket,omitempty"` + IsRemoved bool `protobuf:"varint,6,opt,name=is_removed,json=isRemoved,proto3" json:"is_removed,omitempty"` } -func (m *ChangePack) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangePack.Merge(m, src) + +func (x *ChangePack) Reset() { + *x = ChangePack{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChangePack) XXX_Size() int { - return m.Size() + +func (x *ChangePack) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ChangePack) XXX_DiscardUnknown() { - xxx_messageInfo_ChangePack.DiscardUnknown(m) + +func (*ChangePack) ProtoMessage() {} + +func (x *ChangePack) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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) } -var xxx_messageInfo_ChangePack proto.InternalMessageInfo +// Deprecated: Use ChangePack.ProtoReflect.Descriptor instead. +func (*ChangePack) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{1} +} -func (m *ChangePack) GetDocumentKey() string { - if m != nil { - return m.DocumentKey +func (x *ChangePack) GetDocumentKey() string { + if x != nil { + return x.DocumentKey } return "" } -func (m *ChangePack) GetCheckpoint() *Checkpoint { - if m != nil { - return m.Checkpoint +func (x *ChangePack) GetCheckpoint() *Checkpoint { + if x != nil { + return x.Checkpoint } return nil } -func (m *ChangePack) GetSnapshot() []byte { - if m != nil { - return m.Snapshot +func (x *ChangePack) GetSnapshot() []byte { + if x != nil { + return x.Snapshot } return nil } -func (m *ChangePack) GetChanges() []*Change { - if m != nil { - return m.Changes +func (x *ChangePack) GetChanges() []*Change { + if x != nil { + return x.Changes } return nil } -func (m *ChangePack) GetMinSyncedTicket() *TimeTicket { - if m != nil { - return m.MinSyncedTicket +func (x *ChangePack) GetMinSyncedTicket() *TimeTicket { + if x != nil { + return x.MinSyncedTicket } return nil } -func (m *ChangePack) GetIsRemoved() bool { - if m != nil { - return m.IsRemoved +func (x *ChangePack) GetIsRemoved() bool { + if x != nil { + return x.IsRemoved } return false } type Change struct { - Id *ChangeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Operations []*Operation `protobuf:"bytes,3,rep,name=operations,proto3" json:"operations,omitempty"` - PresenceChange *PresenceChange `protobuf:"bytes,4,opt,name=presence_change,json=presenceChange,proto3" json:"presence_change,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Change) Reset() { *m = Change{} } -func (m *Change) String() string { return proto.CompactTextString(m) } -func (*Change) ProtoMessage() {} -func (*Change) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{2} -} -func (m *Change) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Change.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *ChangeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Operations []*Operation `protobuf:"bytes,3,rep,name=operations,proto3" json:"operations,omitempty"` + PresenceChange *PresenceChange `protobuf:"bytes,4,opt,name=presence_change,json=presenceChange,proto3" json:"presence_change,omitempty"` } -func (m *Change) XXX_Merge(src proto.Message) { - xxx_messageInfo_Change.Merge(m, src) + +func (x *Change) Reset() { + *x = Change{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Change) XXX_Size() int { - return m.Size() + +func (x *Change) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Change) XXX_DiscardUnknown() { - xxx_messageInfo_Change.DiscardUnknown(m) + +func (*Change) ProtoMessage() {} + +func (x *Change) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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) } -var xxx_messageInfo_Change proto.InternalMessageInfo +// Deprecated: Use Change.ProtoReflect.Descriptor instead. +func (*Change) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{2} +} -func (m *Change) GetId() *ChangeID { - if m != nil { - return m.Id +func (x *Change) GetId() *ChangeID { + if x != nil { + return x.Id } return nil } -func (m *Change) GetMessage() string { - if m != nil { - return m.Message +func (x *Change) GetMessage() string { + if x != nil { + return x.Message } return "" } -func (m *Change) GetOperations() []*Operation { - if m != nil { - return m.Operations +func (x *Change) GetOperations() []*Operation { + if x != nil { + return x.Operations } return nil } -func (m *Change) GetPresenceChange() *PresenceChange { - if m != nil { - return m.PresenceChange +func (x *Change) GetPresenceChange() *PresenceChange { + if x != nil { + return x.PresenceChange } return nil } type ChangeID struct { - ClientSeq uint32 `protobuf:"varint,1,opt,name=client_seq,json=clientSeq,proto3" json:"client_seq,omitempty"` - ServerSeq int64 `protobuf:"varint,2,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"` - Lamport int64 `protobuf:"varint,3,opt,name=lamport,proto3" json:"lamport,omitempty"` - ActorId []byte `protobuf:"bytes,4,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChangeID) Reset() { *m = ChangeID{} } -func (m *ChangeID) String() string { return proto.CompactTextString(m) } -func (*ChangeID) ProtoMessage() {} -func (*ChangeID) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{3} -} -func (m *ChangeID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChangeID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChangeID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientSeq uint32 `protobuf:"varint,1,opt,name=client_seq,json=clientSeq,proto3" json:"client_seq,omitempty"` + ServerSeq int64 `protobuf:"varint,2,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"` + Lamport int64 `protobuf:"varint,3,opt,name=lamport,proto3" json:"lamport,omitempty"` + ActorId []byte `protobuf:"bytes,4,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` } -func (m *ChangeID) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangeID.Merge(m, src) + +func (x *ChangeID) Reset() { + *x = ChangeID{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChangeID) XXX_Size() int { - return m.Size() + +func (x *ChangeID) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ChangeID) XXX_DiscardUnknown() { - xxx_messageInfo_ChangeID.DiscardUnknown(m) + +func (*ChangeID) ProtoMessage() {} + +func (x *ChangeID) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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) } -var xxx_messageInfo_ChangeID proto.InternalMessageInfo +// Deprecated: Use ChangeID.ProtoReflect.Descriptor instead. +func (*ChangeID) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{3} +} -func (m *ChangeID) GetClientSeq() uint32 { - if m != nil { - return m.ClientSeq +func (x *ChangeID) GetClientSeq() uint32 { + if x != nil { + return x.ClientSeq } return 0 } -func (m *ChangeID) GetServerSeq() int64 { - if m != nil { - return m.ServerSeq +func (x *ChangeID) GetServerSeq() int64 { + if x != nil { + return x.ServerSeq } return 0 } -func (m *ChangeID) GetLamport() int64 { - if m != nil { - return m.Lamport +func (x *ChangeID) GetLamport() int64 { + if x != nil { + return x.Lamport } return 0 } -func (m *ChangeID) GetActorId() []byte { - if m != nil { - return m.ActorId +func (x *ChangeID) GetActorId() []byte { + if x != nil { + return x.ActorId } return nil } type Operation struct { - // Types that are valid to be assigned to Body: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Body: // // *Operation_Set_ // *Operation_Add_ @@ -448,92 +529,40 @@ type Operation struct { // *Operation_Increase_ // *Operation_TreeEdit_ // *Operation_TreeStyle_ - Body isOperation_Body `protobuf_oneof:"body"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Body isOperation_Body `protobuf_oneof:"body"` } -func (m *Operation) Reset() { *m = Operation{} } -func (m *Operation) String() string { return proto.CompactTextString(m) } -func (*Operation) ProtoMessage() {} -func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4} -} -func (m *Operation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *Operation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation.Merge(m, src) -} -func (m *Operation) XXX_Size() int { - return m.Size() -} -func (m *Operation) XXX_DiscardUnknown() { - xxx_messageInfo_Operation.DiscardUnknown(m) + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Operation proto.InternalMessageInfo +func (*Operation) ProtoMessage() {} -type isOperation_Body interface { - isOperation_Body() - MarshalTo([]byte) (int, error) - Size() int +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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) } -type Operation_Set_ struct { - Set *Operation_Set `protobuf:"bytes,1,opt,name=set,proto3,oneof" json:"set,omitempty"` -} -type Operation_Add_ struct { - Add *Operation_Add `protobuf:"bytes,2,opt,name=add,proto3,oneof" json:"add,omitempty"` -} -type Operation_Move_ struct { - Move *Operation_Move `protobuf:"bytes,3,opt,name=move,proto3,oneof" json:"move,omitempty"` -} -type Operation_Remove_ struct { - Remove *Operation_Remove `protobuf:"bytes,4,opt,name=remove,proto3,oneof" json:"remove,omitempty"` -} -type Operation_Edit_ struct { - Edit *Operation_Edit `protobuf:"bytes,5,opt,name=edit,proto3,oneof" json:"edit,omitempty"` -} -type Operation_Select_ struct { - Select *Operation_Select `protobuf:"bytes,6,opt,name=select,proto3,oneof" json:"select,omitempty"` -} -type Operation_Style_ struct { - Style *Operation_Style `protobuf:"bytes,7,opt,name=style,proto3,oneof" json:"style,omitempty"` -} -type Operation_Increase_ struct { - Increase *Operation_Increase `protobuf:"bytes,8,opt,name=increase,proto3,oneof" json:"increase,omitempty"` -} -type Operation_TreeEdit_ struct { - TreeEdit *Operation_TreeEdit `protobuf:"bytes,9,opt,name=tree_edit,json=treeEdit,proto3,oneof" json:"tree_edit,omitempty"` +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4} } -type Operation_TreeStyle_ struct { - TreeStyle *Operation_TreeStyle `protobuf:"bytes,10,opt,name=tree_style,json=treeStyle,proto3,oneof" json:"tree_style,omitempty"` -} - -func (*Operation_Set_) isOperation_Body() {} -func (*Operation_Add_) isOperation_Body() {} -func (*Operation_Move_) isOperation_Body() {} -func (*Operation_Remove_) isOperation_Body() {} -func (*Operation_Edit_) isOperation_Body() {} -func (*Operation_Select_) isOperation_Body() {} -func (*Operation_Style_) isOperation_Body() {} -func (*Operation_Increase_) isOperation_Body() {} -func (*Operation_TreeEdit_) isOperation_Body() {} -func (*Operation_TreeStyle_) isOperation_Body() {} func (m *Operation) GetBody() isOperation_Body { if m != nil { @@ -542,16935 +571,4374 @@ func (m *Operation) GetBody() isOperation_Body { return nil } -func (m *Operation) GetSet() *Operation_Set { - if x, ok := m.GetBody().(*Operation_Set_); ok { +func (x *Operation) GetSet() *Operation_Set { + if x, ok := x.GetBody().(*Operation_Set_); ok { return x.Set } return nil } -func (m *Operation) GetAdd() *Operation_Add { - if x, ok := m.GetBody().(*Operation_Add_); ok { +func (x *Operation) GetAdd() *Operation_Add { + if x, ok := x.GetBody().(*Operation_Add_); ok { return x.Add } return nil } -func (m *Operation) GetMove() *Operation_Move { - if x, ok := m.GetBody().(*Operation_Move_); ok { +func (x *Operation) GetMove() *Operation_Move { + if x, ok := x.GetBody().(*Operation_Move_); ok { return x.Move } return nil } -func (m *Operation) GetRemove() *Operation_Remove { - if x, ok := m.GetBody().(*Operation_Remove_); ok { +func (x *Operation) GetRemove() *Operation_Remove { + if x, ok := x.GetBody().(*Operation_Remove_); ok { return x.Remove } return nil } -func (m *Operation) GetEdit() *Operation_Edit { - if x, ok := m.GetBody().(*Operation_Edit_); ok { +func (x *Operation) GetEdit() *Operation_Edit { + if x, ok := x.GetBody().(*Operation_Edit_); ok { return x.Edit } return nil } -func (m *Operation) GetSelect() *Operation_Select { - if x, ok := m.GetBody().(*Operation_Select_); ok { +func (x *Operation) GetSelect() *Operation_Select { + if x, ok := x.GetBody().(*Operation_Select_); ok { return x.Select } return nil } -func (m *Operation) GetStyle() *Operation_Style { - if x, ok := m.GetBody().(*Operation_Style_); ok { +func (x *Operation) GetStyle() *Operation_Style { + if x, ok := x.GetBody().(*Operation_Style_); ok { return x.Style } return nil } -func (m *Operation) GetIncrease() *Operation_Increase { - if x, ok := m.GetBody().(*Operation_Increase_); ok { +func (x *Operation) GetIncrease() *Operation_Increase { + if x, ok := x.GetBody().(*Operation_Increase_); ok { return x.Increase } return nil } -func (m *Operation) GetTreeEdit() *Operation_TreeEdit { - if x, ok := m.GetBody().(*Operation_TreeEdit_); ok { +func (x *Operation) GetTreeEdit() *Operation_TreeEdit { + if x, ok := x.GetBody().(*Operation_TreeEdit_); ok { return x.TreeEdit } return nil } -func (m *Operation) GetTreeStyle() *Operation_TreeStyle { - if x, ok := m.GetBody().(*Operation_TreeStyle_); ok { +func (x *Operation) GetTreeStyle() *Operation_TreeStyle { + if x, ok := x.GetBody().(*Operation_TreeStyle_); ok { return x.TreeStyle } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Operation) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Operation_Set_)(nil), - (*Operation_Add_)(nil), - (*Operation_Move_)(nil), - (*Operation_Remove_)(nil), - (*Operation_Edit_)(nil), - (*Operation_Select_)(nil), - (*Operation_Style_)(nil), - (*Operation_Increase_)(nil), - (*Operation_TreeEdit_)(nil), - (*Operation_TreeStyle_)(nil), - } +type isOperation_Body interface { + isOperation_Body() } -type Operation_Set struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Value *JSONElementSimple `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_Set) Reset() { *m = Operation_Set{} } -func (m *Operation_Set) String() string { return proto.CompactTextString(m) } -func (*Operation_Set) ProtoMessage() {} -func (*Operation_Set) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 0} -} -func (m *Operation_Set) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Set) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Set.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type Operation_Set_ struct { + Set *Operation_Set `protobuf:"bytes,1,opt,name=set,proto3,oneof"` } -func (m *Operation_Set) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Set.Merge(m, src) + +type Operation_Add_ struct { + Add *Operation_Add `protobuf:"bytes,2,opt,name=add,proto3,oneof"` } -func (m *Operation_Set) XXX_Size() int { - return m.Size() + +type Operation_Move_ struct { + Move *Operation_Move `protobuf:"bytes,3,opt,name=move,proto3,oneof"` } -func (m *Operation_Set) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Set.DiscardUnknown(m) + +type Operation_Remove_ struct { + Remove *Operation_Remove `protobuf:"bytes,4,opt,name=remove,proto3,oneof"` } -var xxx_messageInfo_Operation_Set proto.InternalMessageInfo +type Operation_Edit_ struct { + Edit *Operation_Edit `protobuf:"bytes,5,opt,name=edit,proto3,oneof"` +} -func (m *Operation_Set) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt - } - return nil +type Operation_Select_ struct { + Select *Operation_Select `protobuf:"bytes,6,opt,name=select,proto3,oneof"` } -func (m *Operation_Set) GetKey() string { - if m != nil { - return m.Key - } - return "" +type Operation_Style_ struct { + Style *Operation_Style `protobuf:"bytes,7,opt,name=style,proto3,oneof"` } -func (m *Operation_Set) GetValue() *JSONElementSimple { - if m != nil { - return m.Value - } - return nil +type Operation_Increase_ struct { + Increase *Operation_Increase `protobuf:"bytes,8,opt,name=increase,proto3,oneof"` } -func (m *Operation_Set) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt - } - return nil +type Operation_TreeEdit_ struct { + TreeEdit *Operation_TreeEdit `protobuf:"bytes,9,opt,name=tree_edit,json=treeEdit,proto3,oneof"` } -type Operation_Add struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - PrevCreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=prev_created_at,json=prevCreatedAt,proto3" json:"prev_created_at,omitempty"` - Value *JSONElementSimple `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_Add) Reset() { *m = Operation_Add{} } -func (m *Operation_Add) String() string { return proto.CompactTextString(m) } -func (*Operation_Add) ProtoMessage() {} -func (*Operation_Add) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 1} -} -func (m *Operation_Add) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Add) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Add.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type Operation_TreeStyle_ struct { + TreeStyle *Operation_TreeStyle `protobuf:"bytes,10,opt,name=tree_style,json=treeStyle,proto3,oneof"` } -func (m *Operation_Add) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Add.Merge(m, src) + +func (*Operation_Set_) isOperation_Body() {} + +func (*Operation_Add_) isOperation_Body() {} + +func (*Operation_Move_) isOperation_Body() {} + +func (*Operation_Remove_) isOperation_Body() {} + +func (*Operation_Edit_) isOperation_Body() {} + +func (*Operation_Select_) isOperation_Body() {} + +func (*Operation_Style_) isOperation_Body() {} + +func (*Operation_Increase_) isOperation_Body() {} + +func (*Operation_TreeEdit_) isOperation_Body() {} + +func (*Operation_TreeStyle_) isOperation_Body() {} + +type JSONElementSimple struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,2,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,3,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` + Type ValueType `protobuf:"varint,4,opt,name=type,proto3,enum=yorkie.v1.ValueType" json:"type,omitempty"` + Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Operation_Add) XXX_Size() int { - return m.Size() + +func (x *JSONElementSimple) Reset() { + *x = JSONElementSimple{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Operation_Add) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Add.DiscardUnknown(m) + +func (x *JSONElementSimple) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Operation_Add proto.InternalMessageInfo +func (*JSONElementSimple) ProtoMessage() {} -func (m *Operation_Add) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *JSONElementSimple) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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 nil + return mi.MessageOf(x) } -func (m *Operation_Add) GetPrevCreatedAt() *TimeTicket { - if m != nil { - return m.PrevCreatedAt - } - return nil +// Deprecated: Use JSONElementSimple.ProtoReflect.Descriptor instead. +func (*JSONElementSimple) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{5} } -func (m *Operation_Add) GetValue() *JSONElementSimple { - if m != nil { - return m.Value +func (x *JSONElementSimple) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } return nil } -func (m *Operation_Add) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt +func (x *JSONElementSimple) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt } return nil } -type Operation_Move struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - PrevCreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=prev_created_at,json=prevCreatedAt,proto3" json:"prev_created_at,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_Move) Reset() { *m = Operation_Move{} } -func (m *Operation_Move) String() string { return proto.CompactTextString(m) } -func (*Operation_Move) ProtoMessage() {} -func (*Operation_Move) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 2} -} -func (m *Operation_Move) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Move) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Move.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *JSONElementSimple) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } + return nil } -func (m *Operation_Move) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Move.Merge(m, src) -} -func (m *Operation_Move) XXX_Size() int { - return m.Size() -} -func (m *Operation_Move) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Move.DiscardUnknown(m) -} - -var xxx_messageInfo_Operation_Move proto.InternalMessageInfo -func (m *Operation_Move) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *JSONElementSimple) GetType() ValueType { + if x != nil { + return x.Type } - return nil + return ValueType_VALUE_TYPE_NULL } -func (m *Operation_Move) GetPrevCreatedAt() *TimeTicket { - if m != nil { - return m.PrevCreatedAt +func (x *JSONElementSimple) GetValue() []byte { + if x != nil { + return x.Value } return nil } -func (m *Operation_Move) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt - } - return nil +type JSONElement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Body: + // + // *JSONElement_JsonObject + // *JSONElement_JsonArray + // *JSONElement_Primitive_ + // *JSONElement_Text_ + // *JSONElement_Counter_ + // *JSONElement_Tree_ + Body isJSONElement_Body `protobuf_oneof:"body"` } -func (m *Operation_Move) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt +func (x *JSONElement) Reset() { + *x = JSONElement{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type Operation_Remove struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *JSONElement) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation_Remove) Reset() { *m = Operation_Remove{} } -func (m *Operation_Remove) String() string { return proto.CompactTextString(m) } -func (*Operation_Remove) ProtoMessage() {} -func (*Operation_Remove) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 3} -} -func (m *Operation_Remove) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Remove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Remove.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*JSONElement) ProtoMessage() {} + +func (x *JSONElement) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *Operation_Remove) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Remove.Merge(m, src) -} -func (m *Operation_Remove) XXX_Size() int { - return m.Size() -} -func (m *Operation_Remove) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Remove.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_Operation_Remove proto.InternalMessageInfo +// Deprecated: Use JSONElement.ProtoReflect.Descriptor instead. +func (*JSONElement) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6} +} -func (m *Operation_Remove) GetParentCreatedAt() *TimeTicket { +func (m *JSONElement) GetBody() isJSONElement_Body { if m != nil { - return m.ParentCreatedAt + return m.Body } return nil } -func (m *Operation_Remove) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *JSONElement) GetJsonObject() *JSONElement_JSONObject { + if x, ok := x.GetBody().(*JSONElement_JsonObject); ok { + return x.JsonObject } return nil } -func (m *Operation_Remove) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt +func (x *JSONElement) GetJsonArray() *JSONElement_JSONArray { + if x, ok := x.GetBody().(*JSONElement_JsonArray); ok { + return x.JsonArray } return nil } -type Operation_Edit struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - From *TextNodePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To *TextNodePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - CreatedAtMapByActor map[string]*TimeTicket `protobuf:"bytes,4,rep,name=created_at_map_by_actor,json=createdAtMapByActor,proto3" json:"created_at_map_by_actor,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,6,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - Attributes map[string]string `protobuf:"bytes,7,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_Edit) Reset() { *m = Operation_Edit{} } -func (m *Operation_Edit) String() string { return proto.CompactTextString(m) } -func (*Operation_Edit) ProtoMessage() {} -func (*Operation_Edit) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 4} -} -func (m *Operation_Edit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Edit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Edit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *JSONElement) GetPrimitive() *JSONElement_Primitive { + if x, ok := x.GetBody().(*JSONElement_Primitive_); ok { + return x.Primitive } -} -func (m *Operation_Edit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Edit.Merge(m, src) -} -func (m *Operation_Edit) XXX_Size() int { - return m.Size() -} -func (m *Operation_Edit) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Edit.DiscardUnknown(m) + return nil } -var xxx_messageInfo_Operation_Edit proto.InternalMessageInfo - -func (m *Operation_Edit) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *JSONElement) GetText() *JSONElement_Text { + if x, ok := x.GetBody().(*JSONElement_Text_); ok { + return x.Text } return nil } -func (m *Operation_Edit) GetFrom() *TextNodePos { - if m != nil { - return m.From +func (x *JSONElement) GetCounter() *JSONElement_Counter { + if x, ok := x.GetBody().(*JSONElement_Counter_); ok { + return x.Counter } return nil } -func (m *Operation_Edit) GetTo() *TextNodePos { - if m != nil { - return m.To +func (x *JSONElement) GetTree() *JSONElement_Tree { + if x, ok := x.GetBody().(*JSONElement_Tree_); ok { + return x.Tree } return nil } -func (m *Operation_Edit) GetCreatedAtMapByActor() map[string]*TimeTicket { - if m != nil { - return m.CreatedAtMapByActor - } - return nil +type isJSONElement_Body interface { + isJSONElement_Body() } -func (m *Operation_Edit) GetContent() string { - if m != nil { - return m.Content - } - return "" +type JSONElement_JsonObject struct { + JsonObject *JSONElement_JSONObject `protobuf:"bytes,1,opt,name=json_object,json=jsonObject,proto3,oneof"` } -func (m *Operation_Edit) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt - } - return nil +type JSONElement_JsonArray struct { + JsonArray *JSONElement_JSONArray `protobuf:"bytes,2,opt,name=json_array,json=jsonArray,proto3,oneof"` } -func (m *Operation_Edit) GetAttributes() map[string]string { - if m != nil { - return m.Attributes - } - return nil +type JSONElement_Primitive_ struct { + Primitive *JSONElement_Primitive `protobuf:"bytes,3,opt,name=primitive,proto3,oneof"` } -// NOTE(hackerwins): Select Operation is not used in the current version. -// In the previous version, it was used to represent selection of Text. -// However, it has been replaced by Presence now. It is retained for backward -// compatibility purposes. -type Operation_Select struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - From *TextNodePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To *TextNodePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_Select) Reset() { *m = Operation_Select{} } -func (m *Operation_Select) String() string { return proto.CompactTextString(m) } -func (*Operation_Select) ProtoMessage() {} -func (*Operation_Select) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 5} -} -func (m *Operation_Select) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Select) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Select.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Operation_Select) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Select.Merge(m, src) +type JSONElement_Text_ struct { + Text *JSONElement_Text `protobuf:"bytes,5,opt,name=text,proto3,oneof"` } -func (m *Operation_Select) XXX_Size() int { - return m.Size() + +type JSONElement_Counter_ struct { + Counter *JSONElement_Counter `protobuf:"bytes,6,opt,name=counter,proto3,oneof"` } -func (m *Operation_Select) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Select.DiscardUnknown(m) + +type JSONElement_Tree_ struct { + Tree *JSONElement_Tree `protobuf:"bytes,7,opt,name=tree,proto3,oneof"` } -var xxx_messageInfo_Operation_Select proto.InternalMessageInfo +func (*JSONElement_JsonObject) isJSONElement_Body() {} -func (m *Operation_Select) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt - } - return nil -} +func (*JSONElement_JsonArray) isJSONElement_Body() {} -func (m *Operation_Select) GetFrom() *TextNodePos { - if m != nil { - return m.From - } - return nil -} +func (*JSONElement_Primitive_) isJSONElement_Body() {} -func (m *Operation_Select) GetTo() *TextNodePos { - if m != nil { - return m.To - } - return nil -} +func (*JSONElement_Text_) isJSONElement_Body() {} -func (m *Operation_Select) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt - } - return nil +func (*JSONElement_Counter_) isJSONElement_Body() {} + +func (*JSONElement_Tree_) isJSONElement_Body() {} + +type RHTNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Element *JSONElement `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"` } -type Operation_Style struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - From *TextNodePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To *TextNodePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ExecutedAt *TimeTicket `protobuf:"bytes,5,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - CreatedAtMapByActor map[string]*TimeTicket `protobuf:"bytes,6,rep,name=created_at_map_by_actor,json=createdAtMapByActor,proto3" json:"created_at_map_by_actor,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_Style) Reset() { *m = Operation_Style{} } -func (m *Operation_Style) String() string { return proto.CompactTextString(m) } -func (*Operation_Style) ProtoMessage() {} -func (*Operation_Style) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 6} -} -func (m *Operation_Style) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Style) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Style.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RHTNode) Reset() { + *x = RHTNode{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *Operation_Style) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Style.Merge(m, src) -} -func (m *Operation_Style) XXX_Size() int { - return m.Size() -} -func (m *Operation_Style) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Style.DiscardUnknown(m) + +func (x *RHTNode) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Operation_Style proto.InternalMessageInfo +func (*RHTNode) ProtoMessage() {} -func (m *Operation_Style) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *RHTNode) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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 nil + return mi.MessageOf(x) } -func (m *Operation_Style) GetFrom() *TextNodePos { - if m != nil { - return m.From - } - return nil +// Deprecated: Use RHTNode.ProtoReflect.Descriptor instead. +func (*RHTNode) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{7} } -func (m *Operation_Style) GetTo() *TextNodePos { - if m != nil { - return m.To +func (x *RHTNode) GetKey() string { + if x != nil { + return x.Key } - return nil + return "" } -func (m *Operation_Style) GetAttributes() map[string]string { - if m != nil { - return m.Attributes +func (x *RHTNode) GetElement() *JSONElement { + if x != nil { + return x.Element } return nil } -func (m *Operation_Style) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt - } - return nil +type RGANode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Next *RGANode `protobuf:"bytes,1,opt,name=next,proto3" json:"next,omitempty"` + Element *JSONElement `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"` } -func (m *Operation_Style) GetCreatedAtMapByActor() map[string]*TimeTicket { - if m != nil { - return m.CreatedAtMapByActor +func (x *RGANode) Reset() { + *x = RGANode{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type Operation_Increase struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - Value *JSONElementSimple `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *RGANode) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation_Increase) Reset() { *m = Operation_Increase{} } -func (m *Operation_Increase) String() string { return proto.CompactTextString(m) } -func (*Operation_Increase) ProtoMessage() {} -func (*Operation_Increase) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 7} -} -func (m *Operation_Increase) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_Increase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_Increase.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*RGANode) ProtoMessage() {} + +func (x *RGANode) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *Operation_Increase) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_Increase.Merge(m, src) -} -func (m *Operation_Increase) XXX_Size() int { - return m.Size() -} -func (m *Operation_Increase) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_Increase.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_Operation_Increase proto.InternalMessageInfo +// Deprecated: Use RGANode.ProtoReflect.Descriptor instead. +func (*RGANode) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{8} +} -func (m *Operation_Increase) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *RGANode) GetNext() *RGANode { + if x != nil { + return x.Next } return nil } -func (m *Operation_Increase) GetValue() *JSONElementSimple { - if m != nil { - return m.Value +func (x *RGANode) GetElement() *JSONElement { + if x != nil { + return x.Element } return nil } -func (m *Operation_Increase) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt - } - return nil +type NodeAttr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + UpdatedAt *TimeTicket `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -type Operation_TreeEdit struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - From *TreePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To *TreePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - CreatedAtMapByActor map[string]*TimeTicket `protobuf:"bytes,4,rep,name=created_at_map_by_actor,json=createdAtMapByActor,proto3" json:"created_at_map_by_actor,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Contents []*TreeNodes `protobuf:"bytes,5,rep,name=contents,proto3" json:"contents,omitempty"` - SplitLevel int32 `protobuf:"varint,7,opt,name=split_level,json=splitLevel,proto3" json:"split_level,omitempty"` - ExecutedAt *TimeTicket `protobuf:"bytes,6,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_TreeEdit) Reset() { *m = Operation_TreeEdit{} } -func (m *Operation_TreeEdit) String() string { return proto.CompactTextString(m) } -func (*Operation_TreeEdit) ProtoMessage() {} -func (*Operation_TreeEdit) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 8} -} -func (m *Operation_TreeEdit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_TreeEdit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_TreeEdit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *NodeAttr) Reset() { + *x = NodeAttr{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *Operation_TreeEdit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_TreeEdit.Merge(m, src) -} -func (m *Operation_TreeEdit) XXX_Size() int { - return m.Size() -} -func (m *Operation_TreeEdit) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_TreeEdit.DiscardUnknown(m) + +func (x *NodeAttr) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Operation_TreeEdit proto.InternalMessageInfo +func (*NodeAttr) ProtoMessage() {} -func (m *Operation_TreeEdit) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *NodeAttr) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_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 nil + return mi.MessageOf(x) } -func (m *Operation_TreeEdit) GetFrom() *TreePos { - if m != nil { - return m.From - } - return nil +// Deprecated: Use NodeAttr.ProtoReflect.Descriptor instead. +func (*NodeAttr) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{9} } -func (m *Operation_TreeEdit) GetTo() *TreePos { - if m != nil { - return m.To +func (x *NodeAttr) GetValue() string { + if x != nil { + return x.Value } - return nil + return "" } -func (m *Operation_TreeEdit) GetCreatedAtMapByActor() map[string]*TimeTicket { - if m != nil { - return m.CreatedAtMapByActor +func (x *NodeAttr) GetUpdatedAt() *TimeTicket { + if x != nil { + return x.UpdatedAt } return nil } -func (m *Operation_TreeEdit) GetContents() []*TreeNodes { - if m != nil { - return m.Contents - } - return nil +type TextNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *TextNodeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,3,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` + InsPrevId *TextNodeID `protobuf:"bytes,4,opt,name=ins_prev_id,json=insPrevId,proto3" json:"ins_prev_id,omitempty"` + Attributes map[string]*NodeAttr `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *Operation_TreeEdit) GetSplitLevel() int32 { - if m != nil { - return m.SplitLevel +func (x *TextNode) Reset() { + *x = TextNode{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *Operation_TreeEdit) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt - } - return nil +func (x *TextNode) String() string { + return protoimpl.X.MessageStringOf(x) } -type Operation_TreeStyle struct { - ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` - From *TreePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To *TreePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ExecutedAt *TimeTicket `protobuf:"bytes,5,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation_TreeStyle) Reset() { *m = Operation_TreeStyle{} } -func (m *Operation_TreeStyle) String() string { return proto.CompactTextString(m) } -func (*Operation_TreeStyle) ProtoMessage() {} -func (*Operation_TreeStyle) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{4, 9} -} -func (m *Operation_TreeStyle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation_TreeStyle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation_TreeStyle.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*TextNode) ProtoMessage() {} + +func (x *TextNode) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *Operation_TreeStyle) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation_TreeStyle.Merge(m, src) -} -func (m *Operation_TreeStyle) XXX_Size() int { - return m.Size() -} -func (m *Operation_TreeStyle) XXX_DiscardUnknown() { - xxx_messageInfo_Operation_TreeStyle.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_Operation_TreeStyle proto.InternalMessageInfo +// Deprecated: Use TextNode.ProtoReflect.Descriptor instead. +func (*TextNode) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{10} +} -func (m *Operation_TreeStyle) GetParentCreatedAt() *TimeTicket { - if m != nil { - return m.ParentCreatedAt +func (x *TextNode) GetId() *TextNodeID { + if x != nil { + return x.Id } return nil } -func (m *Operation_TreeStyle) GetFrom() *TreePos { - if m != nil { - return m.From +func (x *TextNode) GetValue() string { + if x != nil { + return x.Value } - return nil + return "" } -func (m *Operation_TreeStyle) GetTo() *TreePos { - if m != nil { - return m.To +func (x *TextNode) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } return nil } -func (m *Operation_TreeStyle) GetAttributes() map[string]string { - if m != nil { - return m.Attributes +func (x *TextNode) GetInsPrevId() *TextNodeID { + if x != nil { + return x.InsPrevId } return nil } -func (m *Operation_TreeStyle) GetExecutedAt() *TimeTicket { - if m != nil { - return m.ExecutedAt +func (x *TextNode) GetAttributes() map[string]*NodeAttr { + if x != nil { + return x.Attributes } return nil } -type JSONElementSimple struct { - CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,2,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,3,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - Type ValueType `protobuf:"varint,4,opt,name=type,proto3,enum=yorkie.v1.ValueType" json:"type,omitempty"` - Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElementSimple) Reset() { *m = JSONElementSimple{} } -func (m *JSONElementSimple) String() string { return proto.CompactTextString(m) } -func (*JSONElementSimple) ProtoMessage() {} -func (*JSONElementSimple) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{5} -} -func (m *JSONElementSimple) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElementSimple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElementSimple.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *JSONElementSimple) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElementSimple.Merge(m, src) +type TextNodeID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` } -func (m *JSONElementSimple) XXX_Size() int { - return m.Size() + +func (x *TextNodeID) Reset() { + *x = TextNodeID{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *JSONElementSimple) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElementSimple.DiscardUnknown(m) + +func (x *TextNodeID) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElementSimple proto.InternalMessageInfo +func (*TextNodeID) ProtoMessage() {} -func (m *JSONElementSimple) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *TextNodeID) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *JSONElementSimple) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt - } - return nil +// Deprecated: Use TextNodeID.ProtoReflect.Descriptor instead. +func (*TextNodeID) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{11} } -func (m *JSONElementSimple) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt +func (x *TextNodeID) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } return nil } -func (m *JSONElementSimple) GetType() ValueType { - if m != nil { - return m.Type +func (x *TextNodeID) GetOffset() int32 { + if x != nil { + return x.Offset } - return ValueType_VALUE_TYPE_NULL + return 0 } -func (m *JSONElementSimple) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} +type TreeNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -type JSONElement struct { - // Types that are valid to be assigned to Body: - // - // *JSONElement_JsonObject - // *JSONElement_JsonArray - // *JSONElement_Primitive_ - // *JSONElement_Text_ - // *JSONElement_Counter_ - // *JSONElement_Tree_ - Body isJSONElement_Body `protobuf_oneof:"body"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id *TreeNodeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` + InsPrevId *TreeNodeID `protobuf:"bytes,5,opt,name=ins_prev_id,json=insPrevId,proto3" json:"ins_prev_id,omitempty"` + InsNextId *TreeNodeID `protobuf:"bytes,6,opt,name=ins_next_id,json=insNextId,proto3" json:"ins_next_id,omitempty"` + Depth int32 `protobuf:"varint,7,opt,name=depth,proto3" json:"depth,omitempty"` + Attributes map[string]*NodeAttr `protobuf:"bytes,8,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *JSONElement) Reset() { *m = JSONElement{} } -func (m *JSONElement) String() string { return proto.CompactTextString(m) } -func (*JSONElement) ProtoMessage() {} -func (*JSONElement) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6} -} -func (m *JSONElement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *TreeNode) Reset() { + *x = TreeNode{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *JSONElement) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement.Merge(m, src) -} -func (m *JSONElement) XXX_Size() int { - return m.Size() -} -func (m *JSONElement) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement.DiscardUnknown(m) + +func (x *TreeNode) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElement proto.InternalMessageInfo +func (*TreeNode) ProtoMessage() {} -type isJSONElement_Body interface { - isJSONElement_Body() - MarshalTo([]byte) (int, error) - Size() int +func (x *TreeNode) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[12] + 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) } -type JSONElement_JsonObject struct { - JsonObject *JSONElement_JSONObject `protobuf:"bytes,1,opt,name=json_object,json=jsonObject,proto3,oneof" json:"json_object,omitempty"` -} -type JSONElement_JsonArray struct { - JsonArray *JSONElement_JSONArray `protobuf:"bytes,2,opt,name=json_array,json=jsonArray,proto3,oneof" json:"json_array,omitempty"` -} -type JSONElement_Primitive_ struct { - Primitive *JSONElement_Primitive `protobuf:"bytes,3,opt,name=primitive,proto3,oneof" json:"primitive,omitempty"` -} -type JSONElement_Text_ struct { - Text *JSONElement_Text `protobuf:"bytes,5,opt,name=text,proto3,oneof" json:"text,omitempty"` -} -type JSONElement_Counter_ struct { - Counter *JSONElement_Counter `protobuf:"bytes,6,opt,name=counter,proto3,oneof" json:"counter,omitempty"` -} -type JSONElement_Tree_ struct { - Tree *JSONElement_Tree `protobuf:"bytes,7,opt,name=tree,proto3,oneof" json:"tree,omitempty"` +// Deprecated: Use TreeNode.ProtoReflect.Descriptor instead. +func (*TreeNode) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{12} } -func (*JSONElement_JsonObject) isJSONElement_Body() {} -func (*JSONElement_JsonArray) isJSONElement_Body() {} -func (*JSONElement_Primitive_) isJSONElement_Body() {} -func (*JSONElement_Text_) isJSONElement_Body() {} -func (*JSONElement_Counter_) isJSONElement_Body() {} -func (*JSONElement_Tree_) isJSONElement_Body() {} - -func (m *JSONElement) GetBody() isJSONElement_Body { - if m != nil { - return m.Body +func (x *TreeNode) GetId() *TreeNodeID { + if x != nil { + return x.Id } return nil } -func (m *JSONElement) GetJsonObject() *JSONElement_JSONObject { - if x, ok := m.GetBody().(*JSONElement_JsonObject); ok { - return x.JsonObject +func (x *TreeNode) GetType() string { + if x != nil { + return x.Type } - return nil + return "" } -func (m *JSONElement) GetJsonArray() *JSONElement_JSONArray { - if x, ok := m.GetBody().(*JSONElement_JsonArray); ok { - return x.JsonArray +func (x *TreeNode) GetValue() string { + if x != nil { + return x.Value } - return nil + return "" } -func (m *JSONElement) GetPrimitive() *JSONElement_Primitive { - if x, ok := m.GetBody().(*JSONElement_Primitive_); ok { - return x.Primitive +func (x *TreeNode) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } return nil } -func (m *JSONElement) GetText() *JSONElement_Text { - if x, ok := m.GetBody().(*JSONElement_Text_); ok { - return x.Text +func (x *TreeNode) GetInsPrevId() *TreeNodeID { + if x != nil { + return x.InsPrevId } return nil } -func (m *JSONElement) GetCounter() *JSONElement_Counter { - if x, ok := m.GetBody().(*JSONElement_Counter_); ok { - return x.Counter +func (x *TreeNode) GetInsNextId() *TreeNodeID { + if x != nil { + return x.InsNextId } return nil } -func (m *JSONElement) GetTree() *JSONElement_Tree { - if x, ok := m.GetBody().(*JSONElement_Tree_); ok { - return x.Tree +func (x *TreeNode) GetDepth() int32 { + if x != nil { + return x.Depth } - return nil + return 0 } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*JSONElement) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*JSONElement_JsonObject)(nil), - (*JSONElement_JsonArray)(nil), - (*JSONElement_Primitive_)(nil), - (*JSONElement_Text_)(nil), - (*JSONElement_Counter_)(nil), - (*JSONElement_Tree_)(nil), +func (x *TreeNode) GetAttributes() map[string]*NodeAttr { + if x != nil { + return x.Attributes } + return nil } -type JSONElement_JSONObject struct { - Nodes []*RHTNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElement_JSONObject) Reset() { *m = JSONElement_JSONObject{} } -func (m *JSONElement_JSONObject) String() string { return proto.CompactTextString(m) } -func (*JSONElement_JSONObject) ProtoMessage() {} -func (*JSONElement_JSONObject) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6, 0} -} -func (m *JSONElement_JSONObject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement_JSONObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement_JSONObject.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *JSONElement_JSONObject) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement_JSONObject.Merge(m, src) +type TreeNodes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content []*TreeNode `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` } -func (m *JSONElement_JSONObject) XXX_Size() int { - return m.Size() + +func (x *TreeNodes) Reset() { + *x = TreeNodes{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *JSONElement_JSONObject) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement_JSONObject.DiscardUnknown(m) + +func (x *TreeNodes) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElement_JSONObject proto.InternalMessageInfo +func (*TreeNodes) ProtoMessage() {} -func (m *JSONElement_JSONObject) GetNodes() []*RHTNode { - if m != nil { - return m.Nodes +func (x *TreeNodes) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *JSONElement_JSONObject) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt - } - return nil +// Deprecated: Use TreeNodes.ProtoReflect.Descriptor instead. +func (*TreeNodes) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{13} } -func (m *JSONElement_JSONObject) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt +func (x *TreeNodes) GetContent() []*TreeNode { + if x != nil { + return x.Content } return nil } -func (m *JSONElement_JSONObject) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt - } - return nil +type TreeNodeID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` } -type JSONElement_JSONArray struct { - Nodes []*RGANode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElement_JSONArray) Reset() { *m = JSONElement_JSONArray{} } -func (m *JSONElement_JSONArray) String() string { return proto.CompactTextString(m) } -func (*JSONElement_JSONArray) ProtoMessage() {} -func (*JSONElement_JSONArray) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6, 1} -} -func (m *JSONElement_JSONArray) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement_JSONArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement_JSONArray.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *TreeNodeID) Reset() { + *x = TreeNodeID{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *JSONElement_JSONArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement_JSONArray.Merge(m, src) -} -func (m *JSONElement_JSONArray) XXX_Size() int { - return m.Size() -} -func (m *JSONElement_JSONArray) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement_JSONArray.DiscardUnknown(m) + +func (x *TreeNodeID) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElement_JSONArray proto.InternalMessageInfo +func (*TreeNodeID) ProtoMessage() {} -func (m *JSONElement_JSONArray) GetNodes() []*RGANode { - if m != nil { - return m.Nodes +func (x *TreeNodeID) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *JSONElement_JSONArray) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt - } - return nil +// Deprecated: Use TreeNodeID.ProtoReflect.Descriptor instead. +func (*TreeNodeID) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{14} } -func (m *JSONElement_JSONArray) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt +func (x *TreeNodeID) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } return nil } -func (m *JSONElement_JSONArray) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt +func (x *TreeNodeID) GetOffset() int32 { + if x != nil { + return x.Offset } - return nil + return 0 } -type JSONElement_Primitive struct { - Type ValueType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.ValueType" json:"type,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,4,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,5,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElement_Primitive) Reset() { *m = JSONElement_Primitive{} } -func (m *JSONElement_Primitive) String() string { return proto.CompactTextString(m) } -func (*JSONElement_Primitive) ProtoMessage() {} -func (*JSONElement_Primitive) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6, 2} -} -func (m *JSONElement_Primitive) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement_Primitive) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement_Primitive.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *JSONElement_Primitive) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement_Primitive.Merge(m, src) +type TreePos struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId *TreeNodeID `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + LeftSiblingId *TreeNodeID `protobuf:"bytes,2,opt,name=left_sibling_id,json=leftSiblingId,proto3" json:"left_sibling_id,omitempty"` } -func (m *JSONElement_Primitive) XXX_Size() int { - return m.Size() + +func (x *TreePos) Reset() { + *x = TreePos{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *JSONElement_Primitive) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement_Primitive.DiscardUnknown(m) + +func (x *TreePos) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElement_Primitive proto.InternalMessageInfo +func (*TreePos) ProtoMessage() {} -func (m *JSONElement_Primitive) GetType() ValueType { - if m != nil { - return m.Type +func (x *TreePos) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return ValueType_VALUE_TYPE_NULL + return mi.MessageOf(x) } -func (m *JSONElement_Primitive) GetValue() []byte { - if m != nil { - return m.Value - } - return nil +// Deprecated: Use TreePos.ProtoReflect.Descriptor instead. +func (*TreePos) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{15} } -func (m *JSONElement_Primitive) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *TreePos) GetParentId() *TreeNodeID { + if x != nil { + return x.ParentId } return nil } -func (m *JSONElement_Primitive) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt +func (x *TreePos) GetLeftSiblingId() *TreeNodeID { + if x != nil { + return x.LeftSiblingId } return nil } -func (m *JSONElement_Primitive) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt - } - return nil +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } -type JSONElement_Text struct { - Nodes []*TextNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElement_Text) Reset() { *m = JSONElement_Text{} } -func (m *JSONElement_Text) String() string { return proto.CompactTextString(m) } -func (*JSONElement_Text) ProtoMessage() {} -func (*JSONElement_Text) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6, 3} -} -func (m *JSONElement_Text) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement_Text) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement_Text.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *JSONElement_Text) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement_Text.Merge(m, src) -} -func (m *JSONElement_Text) XXX_Size() int { - return m.Size() -} -func (m *JSONElement_Text) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement_Text.DiscardUnknown(m) + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElement_Text proto.InternalMessageInfo +func (*User) ProtoMessage() {} -func (m *JSONElement_Text) GetNodes() []*TextNode { - if m != nil { - return m.Nodes +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *JSONElement_Text) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt - } - return nil +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{16} } -func (m *JSONElement_Text) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt +func (x *User) GetId() string { + if x != nil { + return x.Id } - return nil + return "" } -func (m *JSONElement_Text) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt +func (x *User) GetUsername() string { + if x != nil { + return x.Username } - return nil + return "" } -type JSONElement_Counter struct { - Type ValueType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.ValueType" json:"type,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,4,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,5,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElement_Counter) Reset() { *m = JSONElement_Counter{} } -func (m *JSONElement_Counter) String() string { return proto.CompactTextString(m) } -func (*JSONElement_Counter) ProtoMessage() {} -func (*JSONElement_Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6, 4} -} -func (m *JSONElement_Counter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement_Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement_Counter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *User) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt } + return nil } -func (m *JSONElement_Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement_Counter.Merge(m, src) + +type Project struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + SecretKey string `protobuf:"bytes,4,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` + AuthWebhookUrl string `protobuf:"bytes,5,opt,name=auth_webhook_url,json=authWebhookUrl,proto3" json:"auth_webhook_url,omitempty"` + AuthWebhookMethods []string `protobuf:"bytes,6,rep,name=auth_webhook_methods,json=authWebhookMethods,proto3" json:"auth_webhook_methods,omitempty"` + ClientDeactivateThreshold string `protobuf:"bytes,7,opt,name=client_deactivate_threshold,json=clientDeactivateThreshold,proto3" json:"client_deactivate_threshold,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (m *JSONElement_Counter) XXX_Size() int { - return m.Size() + +func (x *Project) Reset() { + *x = Project{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *JSONElement_Counter) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement_Counter.DiscardUnknown(m) + +func (x *Project) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_JSONElement_Counter proto.InternalMessageInfo +func (*Project) ProtoMessage() {} -func (m *JSONElement_Counter) GetType() ValueType { - if m != nil { - return m.Type +func (x *Project) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return ValueType_VALUE_TYPE_NULL + return mi.MessageOf(x) } -func (m *JSONElement_Counter) GetValue() []byte { - if m != nil { - return m.Value - } - return nil +// Deprecated: Use Project.ProtoReflect.Descriptor instead. +func (*Project) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{17} } -func (m *JSONElement_Counter) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *Project) GetId() string { + if x != nil { + return x.Id } - return nil + return "" } -func (m *JSONElement_Counter) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt +func (x *Project) GetName() string { + if x != nil { + return x.Name } - return nil + return "" } -func (m *JSONElement_Counter) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt +func (x *Project) GetPublicKey() string { + if x != nil { + return x.PublicKey } - return nil + return "" } -type JSONElement_Tree struct { - Nodes []*TreeNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` - CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JSONElement_Tree) Reset() { *m = JSONElement_Tree{} } -func (m *JSONElement_Tree) String() string { return proto.CompactTextString(m) } -func (*JSONElement_Tree) ProtoMessage() {} -func (*JSONElement_Tree) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{6, 5} -} -func (m *JSONElement_Tree) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONElement_Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JSONElement_Tree.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Project) GetSecretKey() string { + if x != nil { + return x.SecretKey } -} -func (m *JSONElement_Tree) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONElement_Tree.Merge(m, src) -} -func (m *JSONElement_Tree) XXX_Size() int { - return m.Size() -} -func (m *JSONElement_Tree) XXX_DiscardUnknown() { - xxx_messageInfo_JSONElement_Tree.DiscardUnknown(m) + return "" } -var xxx_messageInfo_JSONElement_Tree proto.InternalMessageInfo +func (x *Project) GetAuthWebhookUrl() string { + if x != nil { + return x.AuthWebhookUrl + } + return "" +} -func (m *JSONElement_Tree) GetNodes() []*TreeNode { - if m != nil { - return m.Nodes +func (x *Project) GetAuthWebhookMethods() []string { + if x != nil { + return x.AuthWebhookMethods } return nil } -func (m *JSONElement_Tree) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *Project) GetClientDeactivateThreshold() string { + if x != nil { + return x.ClientDeactivateThreshold } - return nil + return "" } -func (m *JSONElement_Tree) GetMovedAt() *TimeTicket { - if m != nil { - return m.MovedAt +func (x *Project) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt } return nil } -func (m *JSONElement_Tree) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt +func (x *Project) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt } return nil } -type RHTNode struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Element *JSONElement `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type UpdatableProjectFields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + AuthWebhookUrl *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=auth_webhook_url,json=authWebhookUrl,proto3" json:"auth_webhook_url,omitempty"` + AuthWebhookMethods *UpdatableProjectFields_AuthWebhookMethods `protobuf:"bytes,3,opt,name=auth_webhook_methods,json=authWebhookMethods,proto3" json:"auth_webhook_methods,omitempty"` + ClientDeactivateThreshold *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=client_deactivate_threshold,json=clientDeactivateThreshold,proto3" json:"client_deactivate_threshold,omitempty"` } -func (m *RHTNode) Reset() { *m = RHTNode{} } -func (m *RHTNode) String() string { return proto.CompactTextString(m) } -func (*RHTNode) ProtoMessage() {} -func (*RHTNode) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{7} -} -func (m *RHTNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RHTNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RHTNode.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *UpdatableProjectFields) Reset() { + *x = UpdatableProjectFields{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RHTNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_RHTNode.Merge(m, src) -} -func (m *RHTNode) XXX_Size() int { - return m.Size() -} -func (m *RHTNode) XXX_DiscardUnknown() { - xxx_messageInfo_RHTNode.DiscardUnknown(m) + +func (x *UpdatableProjectFields) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_RHTNode proto.InternalMessageInfo +func (*UpdatableProjectFields) ProtoMessage() {} -func (m *RHTNode) GetKey() string { - if m != nil { - return m.Key +func (x *UpdatableProjectFields) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *RHTNode) GetElement() *JSONElement { - if m != nil { - return m.Element - } - return nil +// Deprecated: Use UpdatableProjectFields.ProtoReflect.Descriptor instead. +func (*UpdatableProjectFields) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{18} } -type RGANode struct { - Next *RGANode `protobuf:"bytes,1,opt,name=next,proto3" json:"next,omitempty"` - Element *JSONElement `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *UpdatableProjectFields) GetName() *wrapperspb.StringValue { + if x != nil { + return x.Name + } + return nil } -func (m *RGANode) Reset() { *m = RGANode{} } -func (m *RGANode) String() string { return proto.CompactTextString(m) } -func (*RGANode) ProtoMessage() {} -func (*RGANode) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{8} -} -func (m *RGANode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RGANode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RGANode.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *UpdatableProjectFields) GetAuthWebhookUrl() *wrapperspb.StringValue { + if x != nil { + return x.AuthWebhookUrl } -} -func (m *RGANode) XXX_Merge(src proto.Message) { - xxx_messageInfo_RGANode.Merge(m, src) -} -func (m *RGANode) XXX_Size() int { - return m.Size() -} -func (m *RGANode) XXX_DiscardUnknown() { - xxx_messageInfo_RGANode.DiscardUnknown(m) + return nil } -var xxx_messageInfo_RGANode proto.InternalMessageInfo - -func (m *RGANode) GetNext() *RGANode { - if m != nil { - return m.Next +func (x *UpdatableProjectFields) GetAuthWebhookMethods() *UpdatableProjectFields_AuthWebhookMethods { + if x != nil { + return x.AuthWebhookMethods } return nil } -func (m *RGANode) GetElement() *JSONElement { - if m != nil { - return m.Element +func (x *UpdatableProjectFields) GetClientDeactivateThreshold() *wrapperspb.StringValue { + if x != nil { + return x.ClientDeactivateThreshold } return nil } -type NodeAttr struct { - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - UpdatedAt *TimeTicket `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type DocumentSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Snapshot string `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + AccessedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=accessed_at,json=accessedAt,proto3" json:"accessed_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (m *NodeAttr) Reset() { *m = NodeAttr{} } -func (m *NodeAttr) String() string { return proto.CompactTextString(m) } -func (*NodeAttr) ProtoMessage() {} -func (*NodeAttr) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{9} -} -func (m *NodeAttr) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeAttr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeAttr.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DocumentSummary) Reset() { + *x = DocumentSummary{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *NodeAttr) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeAttr.Merge(m, src) -} -func (m *NodeAttr) XXX_Size() int { - return m.Size() -} -func (m *NodeAttr) XXX_DiscardUnknown() { - xxx_messageInfo_NodeAttr.DiscardUnknown(m) + +func (x *DocumentSummary) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_NodeAttr proto.InternalMessageInfo +func (*DocumentSummary) ProtoMessage() {} -func (m *NodeAttr) GetValue() string { - if m != nil { - return m.Value +func (x *DocumentSummary) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *NodeAttr) GetUpdatedAt() *TimeTicket { - if m != nil { - return m.UpdatedAt - } - return nil +// Deprecated: Use DocumentSummary.ProtoReflect.Descriptor instead. +func (*DocumentSummary) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{19} } -type TextNode struct { - Id *TextNodeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,3,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - InsPrevId *TextNodeID `protobuf:"bytes,4,opt,name=ins_prev_id,json=insPrevId,proto3" json:"ins_prev_id,omitempty"` - Attributes map[string]*NodeAttr `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TextNode) Reset() { *m = TextNode{} } -func (m *TextNode) String() string { return proto.CompactTextString(m) } -func (*TextNode) ProtoMessage() {} -func (*TextNode) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{10} -} -func (m *TextNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TextNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TextNode.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DocumentSummary) GetId() string { + if x != nil { + return x.Id } + return "" } -func (m *TextNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_TextNode.Merge(m, src) -} -func (m *TextNode) XXX_Size() int { - return m.Size() -} -func (m *TextNode) XXX_DiscardUnknown() { - xxx_messageInfo_TextNode.DiscardUnknown(m) -} - -var xxx_messageInfo_TextNode proto.InternalMessageInfo -func (m *TextNode) GetId() *TextNodeID { - if m != nil { - return m.Id +func (x *DocumentSummary) GetKey() string { + if x != nil { + return x.Key } - return nil + return "" } -func (m *TextNode) GetValue() string { - if m != nil { - return m.Value +func (x *DocumentSummary) GetSnapshot() string { + if x != nil { + return x.Snapshot } return "" } -func (m *TextNode) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt +func (x *DocumentSummary) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt } return nil } -func (m *TextNode) GetInsPrevId() *TextNodeID { - if m != nil { - return m.InsPrevId +func (x *DocumentSummary) GetAccessedAt() *timestamppb.Timestamp { + if x != nil { + return x.AccessedAt } return nil } -func (m *TextNode) GetAttributes() map[string]*NodeAttr { - if m != nil { - return m.Attributes +func (x *DocumentSummary) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt } return nil } -type TextNodeID struct { - CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type PresenceChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type PresenceChange_ChangeType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.PresenceChange_ChangeType" json:"type,omitempty"` + Presence *Presence `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"` } -func (m *TextNodeID) Reset() { *m = TextNodeID{} } -func (m *TextNodeID) String() string { return proto.CompactTextString(m) } -func (*TextNodeID) ProtoMessage() {} -func (*TextNodeID) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{11} -} -func (m *TextNodeID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TextNodeID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TextNodeID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *PresenceChange) Reset() { + *x = PresenceChange{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *TextNodeID) XXX_Merge(src proto.Message) { - xxx_messageInfo_TextNodeID.Merge(m, src) -} -func (m *TextNodeID) XXX_Size() int { - return m.Size() -} -func (m *TextNodeID) XXX_DiscardUnknown() { - xxx_messageInfo_TextNodeID.DiscardUnknown(m) + +func (x *PresenceChange) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TextNodeID proto.InternalMessageInfo +func (*PresenceChange) ProtoMessage() {} -func (m *TextNodeID) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *PresenceChange) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *TextNodeID) GetOffset() int32 { - if m != nil { - return m.Offset - } - return 0 +// Deprecated: Use PresenceChange.ProtoReflect.Descriptor instead. +func (*PresenceChange) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{20} } -type TreeNode struct { - Id *TreeNodeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` - InsPrevId *TreeNodeID `protobuf:"bytes,5,opt,name=ins_prev_id,json=insPrevId,proto3" json:"ins_prev_id,omitempty"` - InsNextId *TreeNodeID `protobuf:"bytes,6,opt,name=ins_next_id,json=insNextId,proto3" json:"ins_next_id,omitempty"` - Depth int32 `protobuf:"varint,7,opt,name=depth,proto3" json:"depth,omitempty"` - Attributes map[string]*NodeAttr `protobuf:"bytes,8,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TreeNode) Reset() { *m = TreeNode{} } -func (m *TreeNode) String() string { return proto.CompactTextString(m) } -func (*TreeNode) ProtoMessage() {} -func (*TreeNode) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{12} -} -func (m *TreeNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeNode.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *PresenceChange) GetType() PresenceChange_ChangeType { + if x != nil { + return x.Type } + return PresenceChange_CHANGE_TYPE_UNSPECIFIED } -func (m *TreeNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeNode.Merge(m, src) -} -func (m *TreeNode) XXX_Size() int { - return m.Size() -} -func (m *TreeNode) XXX_DiscardUnknown() { - xxx_messageInfo_TreeNode.DiscardUnknown(m) -} - -var xxx_messageInfo_TreeNode proto.InternalMessageInfo -func (m *TreeNode) GetId() *TreeNodeID { - if m != nil { - return m.Id +func (x *PresenceChange) GetPresence() *Presence { + if x != nil { + return x.Presence } return nil } -func (m *TreeNode) GetType() string { - if m != nil { - return m.Type - } - return "" +type Presence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data map[string]string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *TreeNode) GetValue() string { - if m != nil { - return m.Value +func (x *Presence) Reset() { + *x = Presence{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (m *TreeNode) GetRemovedAt() *TimeTicket { - if m != nil { - return m.RemovedAt - } - return nil +func (x *Presence) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeNode) GetInsPrevId() *TreeNodeID { - if m != nil { - return m.InsPrevId +func (*Presence) ProtoMessage() {} + +func (x *Presence) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *TreeNode) GetInsNextId() *TreeNodeID { - if m != nil { - return m.InsNextId +// Deprecated: Use Presence.ProtoReflect.Descriptor instead. +func (*Presence) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{21} +} + +func (x *Presence) GetData() map[string]string { + if x != nil { + return x.Data } return nil } -func (m *TreeNode) GetDepth() int32 { - if m != nil { - return m.Depth - } - return 0 +type Checkpoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerSeq int64 `protobuf:"varint,1,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"` + ClientSeq uint32 `protobuf:"varint,2,opt,name=client_seq,json=clientSeq,proto3" json:"client_seq,omitempty"` } -func (m *TreeNode) GetAttributes() map[string]*NodeAttr { - if m != nil { - return m.Attributes +func (x *Checkpoint) Reset() { + *x = Checkpoint{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type TreeNodes struct { - Content []*TreeNode `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Checkpoint) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeNodes) Reset() { *m = TreeNodes{} } -func (m *TreeNodes) String() string { return proto.CompactTextString(m) } -func (*TreeNodes) ProtoMessage() {} -func (*TreeNodes) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{13} -} -func (m *TreeNodes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeNodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeNodes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*Checkpoint) ProtoMessage() {} + +func (x *Checkpoint) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *TreeNodes) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeNodes.Merge(m, src) + +// Deprecated: Use Checkpoint.ProtoReflect.Descriptor instead. +func (*Checkpoint) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{22} } -func (m *TreeNodes) XXX_Size() int { - return m.Size() + +func (x *Checkpoint) GetServerSeq() int64 { + if x != nil { + return x.ServerSeq + } + return 0 } -func (m *TreeNodes) XXX_DiscardUnknown() { - xxx_messageInfo_TreeNodes.DiscardUnknown(m) + +func (x *Checkpoint) GetClientSeq() uint32 { + if x != nil { + return x.ClientSeq + } + return 0 } -var xxx_messageInfo_TreeNodes proto.InternalMessageInfo +type TextNodePos struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TreeNodes) GetContent() []*TreeNode { - if m != nil { - return m.Content + CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + RelativeOffset int32 `protobuf:"varint,3,opt,name=relative_offset,json=relativeOffset,proto3" json:"relative_offset,omitempty"` +} + +func (x *TextNodePos) Reset() { + *x = TextNodePos{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type TreeNodeID struct { - CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *TextNodePos) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeNodeID) Reset() { *m = TreeNodeID{} } -func (m *TreeNodeID) String() string { return proto.CompactTextString(m) } -func (*TreeNodeID) ProtoMessage() {} -func (*TreeNodeID) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{14} -} -func (m *TreeNodeID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeNodeID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeNodeID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*TextNodePos) ProtoMessage() {} + +func (x *TextNodePos) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *TreeNodeID) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeNodeID.Merge(m, src) -} -func (m *TreeNodeID) XXX_Size() int { - return m.Size() -} -func (m *TreeNodeID) XXX_DiscardUnknown() { - xxx_messageInfo_TreeNodeID.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_TreeNodeID proto.InternalMessageInfo +// Deprecated: Use TextNodePos.ProtoReflect.Descriptor instead. +func (*TextNodePos) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{23} +} -func (m *TreeNodeID) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *TextNodePos) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } return nil } -func (m *TreeNodeID) GetOffset() int32 { - if m != nil { - return m.Offset +func (x *TextNodePos) GetOffset() int32 { + if x != nil { + return x.Offset } return 0 } -type TreePos struct { - ParentId *TreeNodeID `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - LeftSiblingId *TreeNodeID `protobuf:"bytes,2,opt,name=left_sibling_id,json=leftSiblingId,proto3" json:"left_sibling_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *TextNodePos) GetRelativeOffset() int32 { + if x != nil { + return x.RelativeOffset + } + return 0 } -func (m *TreePos) Reset() { *m = TreePos{} } -func (m *TreePos) String() string { return proto.CompactTextString(m) } -func (*TreePos) ProtoMessage() {} -func (*TreePos) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{15} -} -func (m *TreePos) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreePos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreePos.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +type TimeTicket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Lamport int64 `protobuf:"varint,1,opt,name=lamport,proto3" json:"lamport,omitempty"` + Delimiter uint32 `protobuf:"varint,2,opt,name=delimiter,proto3" json:"delimiter,omitempty"` + ActorId []byte `protobuf:"bytes,3,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` +} + +func (x *TimeTicket) Reset() { + *x = TimeTicket{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *TreePos) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreePos.Merge(m, src) + +func (x *TimeTicket) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreePos) XXX_Size() int { - return m.Size() + +func (*TimeTicket) ProtoMessage() {} + +func (x *TimeTicket) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[24] + 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) } -func (m *TreePos) XXX_DiscardUnknown() { - xxx_messageInfo_TreePos.DiscardUnknown(m) + +// Deprecated: Use TimeTicket.ProtoReflect.Descriptor instead. +func (*TimeTicket) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{24} } -var xxx_messageInfo_TreePos proto.InternalMessageInfo +func (x *TimeTicket) GetLamport() int64 { + if x != nil { + return x.Lamport + } + return 0 +} -func (m *TreePos) GetParentId() *TreeNodeID { - if m != nil { - return m.ParentId +func (x *TimeTicket) GetDelimiter() uint32 { + if x != nil { + return x.Delimiter } - return nil + return 0 } -func (m *TreePos) GetLeftSiblingId() *TreeNodeID { - if m != nil { - return m.LeftSiblingId +func (x *TimeTicket) GetActorId() []byte { + if x != nil { + return x.ActorId } return nil } -type User struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - CreatedAt *types.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type DocEventBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{16} -} -func (m *User) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_User.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DocEventBody) Reset() { + *x = DocEventBody{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(m, src) -} -func (m *User) XXX_Size() int { - return m.Size() -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) + +func (x *DocEventBody) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_User proto.InternalMessageInfo +func (*DocEventBody) ProtoMessage() {} -func (m *User) GetId() string { - if m != nil { - return m.Id +func (x *DocEventBody) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *User) GetUsername() string { - if m != nil { - return m.Username +// Deprecated: Use DocEventBody.ProtoReflect.Descriptor instead. +func (*DocEventBody) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{25} +} + +func (x *DocEventBody) GetTopic() string { + if x != nil { + return x.Topic } return "" } -func (m *User) GetCreatedAt() *types.Timestamp { - if m != nil { - return m.CreatedAt +func (x *DocEventBody) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -type Project struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - SecretKey string `protobuf:"bytes,4,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` - AuthWebhookUrl string `protobuf:"bytes,5,opt,name=auth_webhook_url,json=authWebhookUrl,proto3" json:"auth_webhook_url,omitempty"` - AuthWebhookMethods []string `protobuf:"bytes,6,rep,name=auth_webhook_methods,json=authWebhookMethods,proto3" json:"auth_webhook_methods,omitempty"` - ClientDeactivateThreshold string `protobuf:"bytes,7,opt,name=client_deactivate_threshold,json=clientDeactivateThreshold,proto3" json:"client_deactivate_threshold,omitempty"` - CreatedAt *types.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *types.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Project) Reset() { *m = Project{} } -func (m *Project) String() string { return proto.CompactTextString(m) } -func (*Project) ProtoMessage() {} -func (*Project) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{17} -} -func (m *Project) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Project) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Project.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type DocEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type DocEventType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.DocEventType" json:"type,omitempty"` + Publisher string `protobuf:"bytes,2,opt,name=publisher,proto3" json:"publisher,omitempty"` + Body *DocEventBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` } -func (m *Project) XXX_Merge(src proto.Message) { - xxx_messageInfo_Project.Merge(m, src) + +func (x *DocEvent) Reset() { + *x = DocEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Project) XXX_Size() int { - return m.Size() + +func (x *DocEvent) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Project) XXX_DiscardUnknown() { - xxx_messageInfo_Project.DiscardUnknown(m) + +func (*DocEvent) ProtoMessage() {} + +func (x *DocEvent) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[26] + 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) } -var xxx_messageInfo_Project proto.InternalMessageInfo +// Deprecated: Use DocEvent.ProtoReflect.Descriptor instead. +func (*DocEvent) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{26} +} -func (m *Project) GetId() string { - if m != nil { - return m.Id +func (x *DocEvent) GetType() DocEventType { + if x != nil { + return x.Type } - return "" + return DocEventType_DOC_EVENT_TYPE_DOCUMENT_CHANGED } -func (m *Project) GetName() string { - if m != nil { - return m.Name +func (x *DocEvent) GetPublisher() string { + if x != nil { + return x.Publisher } return "" } -func (m *Project) GetPublicKey() string { - if m != nil { - return m.PublicKey +func (x *DocEvent) GetBody() *DocEventBody { + if x != nil { + return x.Body } - return "" + return nil } -func (m *Project) GetSecretKey() string { - if m != nil { - return m.SecretKey +type Operation_Set struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Value *JSONElementSimple `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` +} + +func (x *Operation_Set) Reset() { + *x = Operation_Set{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (m *Project) GetAuthWebhookUrl() string { - if m != nil { - return m.AuthWebhookUrl +func (x *Operation_Set) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation_Set) ProtoMessage() {} + +func (x *Operation_Set) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *Project) GetAuthWebhookMethods() []string { - if m != nil { - return m.AuthWebhookMethods +// Deprecated: Use Operation_Set.ProtoReflect.Descriptor instead. +func (*Operation_Set) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *Operation_Set) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -func (m *Project) GetClientDeactivateThreshold() string { - if m != nil { - return m.ClientDeactivateThreshold +func (x *Operation_Set) GetKey() string { + if x != nil { + return x.Key } return "" } -func (m *Project) GetCreatedAt() *types.Timestamp { - if m != nil { - return m.CreatedAt +func (x *Operation_Set) GetValue() *JSONElementSimple { + if x != nil { + return x.Value } return nil } -func (m *Project) GetUpdatedAt() *types.Timestamp { - if m != nil { - return m.UpdatedAt +func (x *Operation_Set) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } return nil } -type UpdatableProjectFields struct { - Name *types.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - AuthWebhookUrl *types.StringValue `protobuf:"bytes,2,opt,name=auth_webhook_url,json=authWebhookUrl,proto3" json:"auth_webhook_url,omitempty"` - AuthWebhookMethods *UpdatableProjectFields_AuthWebhookMethods `protobuf:"bytes,3,opt,name=auth_webhook_methods,json=authWebhookMethods,proto3" json:"auth_webhook_methods,omitempty"` - ClientDeactivateThreshold *types.StringValue `protobuf:"bytes,4,opt,name=client_deactivate_threshold,json=clientDeactivateThreshold,proto3" json:"client_deactivate_threshold,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Operation_Add struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + PrevCreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=prev_created_at,json=prevCreatedAt,proto3" json:"prev_created_at,omitempty"` + Value *JSONElementSimple `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *UpdatableProjectFields) Reset() { *m = UpdatableProjectFields{} } -func (m *UpdatableProjectFields) String() string { return proto.CompactTextString(m) } -func (*UpdatableProjectFields) ProtoMessage() {} -func (*UpdatableProjectFields) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{18} -} -func (m *UpdatableProjectFields) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdatableProjectFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdatableProjectFields.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Add) Reset() { + *x = Operation_Add{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *UpdatableProjectFields) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdatableProjectFields.Merge(m, src) -} -func (m *UpdatableProjectFields) XXX_Size() int { - return m.Size() + +func (x *Operation_Add) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdatableProjectFields) XXX_DiscardUnknown() { - xxx_messageInfo_UpdatableProjectFields.DiscardUnknown(m) + +func (*Operation_Add) ProtoMessage() {} + +func (x *Operation_Add) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[29] + 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) } -var xxx_messageInfo_UpdatableProjectFields proto.InternalMessageInfo +// Deprecated: Use Operation_Add.ProtoReflect.Descriptor instead. +func (*Operation_Add) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 1} +} -func (m *UpdatableProjectFields) GetName() *types.StringValue { - if m != nil { - return m.Name +func (x *Operation_Add) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -func (m *UpdatableProjectFields) GetAuthWebhookUrl() *types.StringValue { - if m != nil { - return m.AuthWebhookUrl +func (x *Operation_Add) GetPrevCreatedAt() *TimeTicket { + if x != nil { + return x.PrevCreatedAt } return nil } -func (m *UpdatableProjectFields) GetAuthWebhookMethods() *UpdatableProjectFields_AuthWebhookMethods { - if m != nil { - return m.AuthWebhookMethods +func (x *Operation_Add) GetValue() *JSONElementSimple { + if x != nil { + return x.Value } return nil } -func (m *UpdatableProjectFields) GetClientDeactivateThreshold() *types.StringValue { - if m != nil { - return m.ClientDeactivateThreshold +func (x *Operation_Add) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } return nil } -type UpdatableProjectFields_AuthWebhookMethods struct { - Methods []string `protobuf:"bytes,1,rep,name=methods,proto3" json:"methods,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Operation_Move struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + PrevCreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=prev_created_at,json=prevCreatedAt,proto3" json:"prev_created_at,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *UpdatableProjectFields_AuthWebhookMethods) Reset() { - *m = UpdatableProjectFields_AuthWebhookMethods{} +func (x *Operation_Move) Reset() { + *x = Operation_Move{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *UpdatableProjectFields_AuthWebhookMethods) String() string { - return proto.CompactTextString(m) + +func (x *Operation_Move) String() string { + return protoimpl.X.MessageStringOf(x) } -func (*UpdatableProjectFields_AuthWebhookMethods) ProtoMessage() {} -func (*UpdatableProjectFields_AuthWebhookMethods) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{18, 0} -} -func (m *UpdatableProjectFields_AuthWebhookMethods) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdatableProjectFields_AuthWebhookMethods) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdatableProjectFields_AuthWebhookMethods.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*Operation_Move) ProtoMessage() {} + +func (x *Operation_Move) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *UpdatableProjectFields_AuthWebhookMethods) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdatableProjectFields_AuthWebhookMethods.Merge(m, src) -} -func (m *UpdatableProjectFields_AuthWebhookMethods) XXX_Size() int { - return m.Size() -} -func (m *UpdatableProjectFields_AuthWebhookMethods) XXX_DiscardUnknown() { - xxx_messageInfo_UpdatableProjectFields_AuthWebhookMethods.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_UpdatableProjectFields_AuthWebhookMethods proto.InternalMessageInfo +// Deprecated: Use Operation_Move.ProtoReflect.Descriptor instead. +func (*Operation_Move) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 2} +} -func (m *UpdatableProjectFields_AuthWebhookMethods) GetMethods() []string { - if m != nil { - return m.Methods +func (x *Operation_Move) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -type DocumentSummary struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Snapshot string `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - CreatedAt *types.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - AccessedAt *types.Timestamp `protobuf:"bytes,5,opt,name=accessed_at,json=accessedAt,proto3" json:"accessed_at,omitempty"` - UpdatedAt *types.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DocumentSummary) Reset() { *m = DocumentSummary{} } -func (m *DocumentSummary) String() string { return proto.CompactTextString(m) } -func (*DocumentSummary) ProtoMessage() {} -func (*DocumentSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{19} -} -func (m *DocumentSummary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DocumentSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DocumentSummary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Move) GetPrevCreatedAt() *TimeTicket { + if x != nil { + return x.PrevCreatedAt } + return nil } -func (m *DocumentSummary) XXX_Merge(src proto.Message) { - xxx_messageInfo_DocumentSummary.Merge(m, src) -} -func (m *DocumentSummary) XXX_Size() int { - return m.Size() + +func (x *Operation_Move) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt + } + return nil } -func (m *DocumentSummary) XXX_DiscardUnknown() { - xxx_messageInfo_DocumentSummary.DiscardUnknown(m) + +func (x *Operation_Move) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt + } + return nil } -var xxx_messageInfo_DocumentSummary proto.InternalMessageInfo +type Operation_Remove struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DocumentSummary) GetId() string { - if m != nil { - return m.Id - } - return "" + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *DocumentSummary) GetKey() string { - if m != nil { - return m.Key +func (x *Operation_Remove) Reset() { + *x = Operation_Remove{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (m *DocumentSummary) GetSnapshot() string { - if m != nil { - return m.Snapshot +func (x *Operation_Remove) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation_Remove) ProtoMessage() {} + +func (x *Operation_Remove) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *DocumentSummary) GetCreatedAt() *types.Timestamp { - if m != nil { - return m.CreatedAt +// Deprecated: Use Operation_Remove.ProtoReflect.Descriptor instead. +func (*Operation_Remove) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 3} +} + +func (x *Operation_Remove) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -func (m *DocumentSummary) GetAccessedAt() *types.Timestamp { - if m != nil { - return m.AccessedAt +func (x *Operation_Remove) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } return nil } -func (m *DocumentSummary) GetUpdatedAt() *types.Timestamp { - if m != nil { - return m.UpdatedAt +func (x *Operation_Remove) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } return nil } -type PresenceChange struct { - Type PresenceChange_ChangeType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.PresenceChange_ChangeType" json:"type,omitempty"` - Presence *Presence `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Operation_Edit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + From *TextNodePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *TextNodePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + CreatedAtMapByActor map[string]*TimeTicket `protobuf:"bytes,4,rep,name=created_at_map_by_actor,json=createdAtMapByActor,proto3" json:"created_at_map_by_actor,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,6,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` + Attributes map[string]string `protobuf:"bytes,7,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *PresenceChange) Reset() { *m = PresenceChange{} } -func (m *PresenceChange) String() string { return proto.CompactTextString(m) } -func (*PresenceChange) ProtoMessage() {} -func (*PresenceChange) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{20} -} -func (m *PresenceChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PresenceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PresenceChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Edit) Reset() { + *x = Operation_Edit{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *PresenceChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_PresenceChange.Merge(m, src) -} -func (m *PresenceChange) XXX_Size() int { - return m.Size() -} -func (m *PresenceChange) XXX_DiscardUnknown() { - xxx_messageInfo_PresenceChange.DiscardUnknown(m) + +func (x *Operation_Edit) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_PresenceChange proto.InternalMessageInfo +func (*Operation_Edit) ProtoMessage() {} -func (m *PresenceChange) GetType() PresenceChange_ChangeType { - if m != nil { - return m.Type +func (x *Operation_Edit) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return PresenceChange_CHANGE_TYPE_UNSPECIFIED + return mi.MessageOf(x) } -func (m *PresenceChange) GetPresence() *Presence { - if m != nil { - return m.Presence +// Deprecated: Use Operation_Edit.ProtoReflect.Descriptor instead. +func (*Operation_Edit) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 4} +} + +func (x *Operation_Edit) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -type Presence struct { - Data map[string]string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Operation_Edit) GetFrom() *TextNodePos { + if x != nil { + return x.From + } + return nil } -func (m *Presence) Reset() { *m = Presence{} } -func (m *Presence) String() string { return proto.CompactTextString(m) } -func (*Presence) ProtoMessage() {} -func (*Presence) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{21} -} -func (m *Presence) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Presence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Presence.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Edit) GetTo() *TextNodePos { + if x != nil { + return x.To } -} -func (m *Presence) XXX_Merge(src proto.Message) { - xxx_messageInfo_Presence.Merge(m, src) -} -func (m *Presence) XXX_Size() int { - return m.Size() -} -func (m *Presence) XXX_DiscardUnknown() { - xxx_messageInfo_Presence.DiscardUnknown(m) + return nil } -var xxx_messageInfo_Presence proto.InternalMessageInfo - -func (m *Presence) GetData() map[string]string { - if m != nil { - return m.Data +func (x *Operation_Edit) GetCreatedAtMapByActor() map[string]*TimeTicket { + if x != nil { + return x.CreatedAtMapByActor } return nil } -type Checkpoint struct { - ServerSeq int64 `protobuf:"varint,1,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"` - ClientSeq uint32 `protobuf:"varint,2,opt,name=client_seq,json=clientSeq,proto3" json:"client_seq,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Operation_Edit) GetContent() string { + if x != nil { + return x.Content + } + return "" } -func (m *Checkpoint) Reset() { *m = Checkpoint{} } -func (m *Checkpoint) String() string { return proto.CompactTextString(m) } -func (*Checkpoint) ProtoMessage() {} -func (*Checkpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{22} -} -func (m *Checkpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Checkpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Edit) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } + return nil } -func (m *Checkpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Checkpoint.Merge(m, src) -} -func (m *Checkpoint) XXX_Size() int { - return m.Size() -} -func (m *Checkpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Checkpoint.DiscardUnknown(m) + +func (x *Operation_Edit) GetAttributes() map[string]string { + if x != nil { + return x.Attributes + } + return nil } -var xxx_messageInfo_Checkpoint proto.InternalMessageInfo +// NOTE(hackerwins): Select Operation is not used in the current version. +// In the previous version, it was used to represent selection of Text. +// However, it has been replaced by Presence now. It is retained for backward +// compatibility purposes. +type Operation_Select struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Checkpoint) GetServerSeq() int64 { - if m != nil { - return m.ServerSeq - } - return 0 + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + From *TextNodePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *TextNodePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,4,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *Checkpoint) GetClientSeq() uint32 { - if m != nil { - return m.ClientSeq +func (x *Operation_Select) Reset() { + *x = Operation_Select{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type TextNodePos struct { - CreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` - RelativeOffset int32 `protobuf:"varint,3,opt,name=relative_offset,json=relativeOffset,proto3" json:"relative_offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Operation_Select) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TextNodePos) Reset() { *m = TextNodePos{} } -func (m *TextNodePos) String() string { return proto.CompactTextString(m) } -func (*TextNodePos) ProtoMessage() {} -func (*TextNodePos) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{23} -} -func (m *TextNodePos) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TextNodePos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TextNodePos.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*Operation_Select) ProtoMessage() {} + +func (x *Operation_Select) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *TextNodePos) XXX_Merge(src proto.Message) { - xxx_messageInfo_TextNodePos.Merge(m, src) -} -func (m *TextNodePos) XXX_Size() int { - return m.Size() -} -func (m *TextNodePos) XXX_DiscardUnknown() { - xxx_messageInfo_TextNodePos.DiscardUnknown(m) + +// Deprecated: Use Operation_Select.ProtoReflect.Descriptor instead. +func (*Operation_Select) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 5} } -var xxx_messageInfo_TextNodePos proto.InternalMessageInfo +func (x *Operation_Select) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt + } + return nil +} -func (m *TextNodePos) GetCreatedAt() *TimeTicket { - if m != nil { - return m.CreatedAt +func (x *Operation_Select) GetFrom() *TextNodePos { + if x != nil { + return x.From } return nil } -func (m *TextNodePos) GetOffset() int32 { - if m != nil { - return m.Offset +func (x *Operation_Select) GetTo() *TextNodePos { + if x != nil { + return x.To } - return 0 + return nil } -func (m *TextNodePos) GetRelativeOffset() int32 { - if m != nil { - return m.RelativeOffset +func (x *Operation_Select) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } - return 0 + return nil } -type TimeTicket struct { - Lamport int64 `protobuf:"varint,1,opt,name=lamport,proto3" json:"lamport,omitempty"` - Delimiter uint32 `protobuf:"varint,2,opt,name=delimiter,proto3" json:"delimiter,omitempty"` - ActorId []byte `protobuf:"bytes,3,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Operation_Style struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + From *TextNodePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *TextNodePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ExecutedAt *TimeTicket `protobuf:"bytes,5,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` + CreatedAtMapByActor map[string]*TimeTicket `protobuf:"bytes,6,rep,name=created_at_map_by_actor,json=createdAtMapByActor,proto3" json:"created_at_map_by_actor,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *TimeTicket) Reset() { *m = TimeTicket{} } -func (m *TimeTicket) String() string { return proto.CompactTextString(m) } -func (*TimeTicket) ProtoMessage() {} -func (*TimeTicket) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{24} -} -func (m *TimeTicket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeTicket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimeTicket.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Style) Reset() { + *x = Operation_Style{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *TimeTicket) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeTicket.Merge(m, src) -} -func (m *TimeTicket) XXX_Size() int { - return m.Size() -} -func (m *TimeTicket) XXX_DiscardUnknown() { - xxx_messageInfo_TimeTicket.DiscardUnknown(m) + +func (x *Operation_Style) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TimeTicket proto.InternalMessageInfo +func (*Operation_Style) ProtoMessage() {} -func (m *TimeTicket) GetLamport() int64 { - if m != nil { - return m.Lamport +func (x *Operation_Style) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *TimeTicket) GetDelimiter() uint32 { - if m != nil { - return m.Delimiter - } - return 0 +// Deprecated: Use Operation_Style.ProtoReflect.Descriptor instead. +func (*Operation_Style) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 6} } -func (m *TimeTicket) GetActorId() []byte { - if m != nil { - return m.ActorId +func (x *Operation_Style) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -type DocEventBody struct { - Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Operation_Style) GetFrom() *TextNodePos { + if x != nil { + return x.From + } + return nil } -func (m *DocEventBody) Reset() { *m = DocEventBody{} } -func (m *DocEventBody) String() string { return proto.CompactTextString(m) } -func (*DocEventBody) ProtoMessage() {} -func (*DocEventBody) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{25} -} -func (m *DocEventBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DocEventBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DocEventBody.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Style) GetTo() *TextNodePos { + if x != nil { + return x.To } -} -func (m *DocEventBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_DocEventBody.Merge(m, src) -} -func (m *DocEventBody) XXX_Size() int { - return m.Size() -} -func (m *DocEventBody) XXX_DiscardUnknown() { - xxx_messageInfo_DocEventBody.DiscardUnknown(m) + return nil } -var xxx_messageInfo_DocEventBody proto.InternalMessageInfo +func (x *Operation_Style) GetAttributes() map[string]string { + if x != nil { + return x.Attributes + } + return nil +} -func (m *DocEventBody) GetTopic() string { - if m != nil { - return m.Topic +func (x *Operation_Style) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } - return "" + return nil } -func (m *DocEventBody) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *Operation_Style) GetCreatedAtMapByActor() map[string]*TimeTicket { + if x != nil { + return x.CreatedAtMapByActor } return nil } -type DocEvent struct { - Type DocEventType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.DocEventType" json:"type,omitempty"` - Publisher string `protobuf:"bytes,2,opt,name=publisher,proto3" json:"publisher,omitempty"` - Body *DocEventBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Operation_Increase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + Value *JSONElementSimple `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *DocEvent) Reset() { *m = DocEvent{} } -func (m *DocEvent) String() string { return proto.CompactTextString(m) } -func (*DocEvent) ProtoMessage() {} -func (*DocEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_36361b2f5d0f0896, []int{26} -} -func (m *DocEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DocEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DocEvent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *Operation_Increase) Reset() { + *x = Operation_Increase{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *DocEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_DocEvent.Merge(m, src) -} -func (m *DocEvent) XXX_Size() int { - return m.Size() -} -func (m *DocEvent) XXX_DiscardUnknown() { - xxx_messageInfo_DocEvent.DiscardUnknown(m) + +func (x *Operation_Increase) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_DocEvent proto.InternalMessageInfo +func (*Operation_Increase) ProtoMessage() {} -func (m *DocEvent) GetType() DocEventType { - if m != nil { - return m.Type +func (x *Operation_Increase) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return DocEventType_DOC_EVENT_TYPE_DOCUMENT_CHANGED + return mi.MessageOf(x) } -func (m *DocEvent) GetPublisher() string { - if m != nil { - return m.Publisher - } - return "" +// Deprecated: Use Operation_Increase.ProtoReflect.Descriptor instead. +func (*Operation_Increase) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 7} } -func (m *DocEvent) GetBody() *DocEventBody { - if m != nil { - return m.Body +func (x *Operation_Increase) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } return nil } -func init() { - proto.RegisterEnum("yorkie.v1.ValueType", ValueType_name, ValueType_value) - proto.RegisterEnum("yorkie.v1.DocEventType", DocEventType_name, DocEventType_value) - proto.RegisterEnum("yorkie.v1.PresenceChange_ChangeType", PresenceChange_ChangeType_name, PresenceChange_ChangeType_value) - proto.RegisterType((*Snapshot)(nil), "yorkie.v1.Snapshot") - proto.RegisterMapType((map[string]*Presence)(nil), "yorkie.v1.Snapshot.PresencesEntry") - proto.RegisterType((*ChangePack)(nil), "yorkie.v1.ChangePack") - proto.RegisterType((*Change)(nil), "yorkie.v1.Change") - proto.RegisterType((*ChangeID)(nil), "yorkie.v1.ChangeID") - proto.RegisterType((*Operation)(nil), "yorkie.v1.Operation") - proto.RegisterType((*Operation_Set)(nil), "yorkie.v1.Operation.Set") - proto.RegisterType((*Operation_Add)(nil), "yorkie.v1.Operation.Add") - proto.RegisterType((*Operation_Move)(nil), "yorkie.v1.Operation.Move") - proto.RegisterType((*Operation_Remove)(nil), "yorkie.v1.Operation.Remove") - proto.RegisterType((*Operation_Edit)(nil), "yorkie.v1.Operation.Edit") - proto.RegisterMapType((map[string]string)(nil), "yorkie.v1.Operation.Edit.AttributesEntry") - proto.RegisterMapType((map[string]*TimeTicket)(nil), "yorkie.v1.Operation.Edit.CreatedAtMapByActorEntry") - proto.RegisterType((*Operation_Select)(nil), "yorkie.v1.Operation.Select") - proto.RegisterType((*Operation_Style)(nil), "yorkie.v1.Operation.Style") - proto.RegisterMapType((map[string]string)(nil), "yorkie.v1.Operation.Style.AttributesEntry") - proto.RegisterMapType((map[string]*TimeTicket)(nil), "yorkie.v1.Operation.Style.CreatedAtMapByActorEntry") - proto.RegisterType((*Operation_Increase)(nil), "yorkie.v1.Operation.Increase") - proto.RegisterType((*Operation_TreeEdit)(nil), "yorkie.v1.Operation.TreeEdit") - proto.RegisterMapType((map[string]*TimeTicket)(nil), "yorkie.v1.Operation.TreeEdit.CreatedAtMapByActorEntry") - proto.RegisterType((*Operation_TreeStyle)(nil), "yorkie.v1.Operation.TreeStyle") - proto.RegisterMapType((map[string]string)(nil), "yorkie.v1.Operation.TreeStyle.AttributesEntry") - proto.RegisterType((*JSONElementSimple)(nil), "yorkie.v1.JSONElementSimple") - proto.RegisterType((*JSONElement)(nil), "yorkie.v1.JSONElement") - proto.RegisterType((*JSONElement_JSONObject)(nil), "yorkie.v1.JSONElement.JSONObject") - proto.RegisterType((*JSONElement_JSONArray)(nil), "yorkie.v1.JSONElement.JSONArray") - proto.RegisterType((*JSONElement_Primitive)(nil), "yorkie.v1.JSONElement.Primitive") - proto.RegisterType((*JSONElement_Text)(nil), "yorkie.v1.JSONElement.Text") - proto.RegisterType((*JSONElement_Counter)(nil), "yorkie.v1.JSONElement.Counter") - proto.RegisterType((*JSONElement_Tree)(nil), "yorkie.v1.JSONElement.Tree") - proto.RegisterType((*RHTNode)(nil), "yorkie.v1.RHTNode") - proto.RegisterType((*RGANode)(nil), "yorkie.v1.RGANode") - proto.RegisterType((*NodeAttr)(nil), "yorkie.v1.NodeAttr") - proto.RegisterType((*TextNode)(nil), "yorkie.v1.TextNode") - proto.RegisterMapType((map[string]*NodeAttr)(nil), "yorkie.v1.TextNode.AttributesEntry") - proto.RegisterType((*TextNodeID)(nil), "yorkie.v1.TextNodeID") - proto.RegisterType((*TreeNode)(nil), "yorkie.v1.TreeNode") - proto.RegisterMapType((map[string]*NodeAttr)(nil), "yorkie.v1.TreeNode.AttributesEntry") - proto.RegisterType((*TreeNodes)(nil), "yorkie.v1.TreeNodes") - proto.RegisterType((*TreeNodeID)(nil), "yorkie.v1.TreeNodeID") - proto.RegisterType((*TreePos)(nil), "yorkie.v1.TreePos") - proto.RegisterType((*User)(nil), "yorkie.v1.User") - proto.RegisterType((*Project)(nil), "yorkie.v1.Project") - proto.RegisterType((*UpdatableProjectFields)(nil), "yorkie.v1.UpdatableProjectFields") - proto.RegisterType((*UpdatableProjectFields_AuthWebhookMethods)(nil), "yorkie.v1.UpdatableProjectFields.AuthWebhookMethods") - proto.RegisterType((*DocumentSummary)(nil), "yorkie.v1.DocumentSummary") - proto.RegisterType((*PresenceChange)(nil), "yorkie.v1.PresenceChange") - proto.RegisterType((*Presence)(nil), "yorkie.v1.Presence") - proto.RegisterMapType((map[string]string)(nil), "yorkie.v1.Presence.DataEntry") - proto.RegisterType((*Checkpoint)(nil), "yorkie.v1.Checkpoint") - proto.RegisterType((*TextNodePos)(nil), "yorkie.v1.TextNodePos") - proto.RegisterType((*TimeTicket)(nil), "yorkie.v1.TimeTicket") - proto.RegisterType((*DocEventBody)(nil), "yorkie.v1.DocEventBody") - proto.RegisterType((*DocEvent)(nil), "yorkie.v1.DocEvent") -} - -func init() { proto.RegisterFile("yorkie/v1/resources.proto", fileDescriptor_36361b2f5d0f0896) } - -var fileDescriptor_36361b2f5d0f0896 = []byte{ - // 2717 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcd, 0x8f, 0x23, 0x47, - 0x15, 0x9f, 0xb6, 0xdb, 0x1f, 0xfd, 0x66, 0x77, 0xc7, 0x5b, 0xfb, 0xe5, 0xf5, 0xee, 0x4e, 0x76, - 0x1d, 0x12, 0x26, 0x1b, 0xe2, 0xd9, 0x9d, 0x7c, 0x10, 0x12, 0x12, 0xf0, 0xd8, 0x9d, 0x9d, 0x49, - 0x66, 0x3d, 0x43, 0xdb, 0xb3, 0x21, 0x11, 0xa8, 0xd5, 0xd3, 0x5d, 0x3b, 0xd3, 0x59, 0xdb, 0xdd, - 0xe9, 0x2e, 0x3b, 0x6b, 0x89, 0x53, 0x14, 0x24, 0xae, 0xdc, 0xf8, 0x0b, 0x90, 0x10, 0x12, 0xf7, - 0x1c, 0xe1, 0x80, 0x90, 0x10, 0x02, 0x89, 0x48, 0x5c, 0x21, 0x1c, 0x10, 0xdc, 0x22, 0x24, 0x6e, - 0x48, 0xa8, 0xbe, 0xda, 0x6d, 0xbb, 0xed, 0xf5, 0x38, 0x93, 0x68, 0x23, 0x6e, 0x5d, 0x55, 0xbf, - 0x57, 0xf5, 0x5e, 0xd5, 0xef, 0xbd, 0x7a, 0xd5, 0x55, 0x70, 0x79, 0xe0, 0x05, 0x0f, 0x5c, 0xbc, - 0xde, 0xbf, 0xbd, 0x1e, 0xe0, 0xd0, 0xeb, 0x05, 0x36, 0x0e, 0x2b, 0x7e, 0xe0, 0x11, 0x0f, 0x69, - 0xbc, 0xa9, 0xd2, 0xbf, 0x5d, 0x7a, 0xe2, 0xd0, 0xf3, 0x0e, 0xdb, 0x78, 0x9d, 0x35, 0x1c, 0xf4, - 0xee, 0xaf, 0x13, 0xb7, 0x83, 0x43, 0x62, 0x75, 0x7c, 0x8e, 0x2d, 0xad, 0x8e, 0x03, 0x3e, 0x08, - 0x2c, 0xdf, 0xc7, 0x81, 0xe8, 0xab, 0xfc, 0x7b, 0x05, 0xf2, 0xcd, 0xae, 0xe5, 0x87, 0x47, 0x1e, - 0x41, 0x37, 0x41, 0x0d, 0x3c, 0x8f, 0x14, 0x95, 0xeb, 0xca, 0xda, 0xf2, 0xc6, 0xc5, 0x4a, 0x34, - 0x4e, 0xe5, 0xcd, 0xe6, 0x6e, 0x43, 0x6f, 0xe3, 0x0e, 0xee, 0x12, 0x83, 0x61, 0xd0, 0x77, 0x41, - 0xf3, 0x03, 0x1c, 0xe2, 0xae, 0x8d, 0xc3, 0x62, 0xea, 0x7a, 0x7a, 0x6d, 0x79, 0xa3, 0x1c, 0x13, - 0x90, 0x7d, 0x56, 0xf6, 0x24, 0x48, 0xef, 0x92, 0x60, 0x60, 0x0c, 0x85, 0x4a, 0xdf, 0x83, 0x33, - 0xa3, 0x8d, 0xa8, 0x00, 0xe9, 0x07, 0x78, 0xc0, 0x86, 0xd7, 0x0c, 0xfa, 0x89, 0x9e, 0x81, 0x4c, - 0xdf, 0x6a, 0xf7, 0x70, 0x31, 0xc5, 0x54, 0x3a, 0x17, 0x1b, 0x41, 0xca, 0x1a, 0x1c, 0xf1, 0x4a, - 0xea, 0x65, 0xa5, 0xfc, 0xd3, 0x14, 0x40, 0xed, 0xc8, 0xea, 0x1e, 0xe2, 0x3d, 0xcb, 0x7e, 0x80, - 0x6e, 0xc0, 0x29, 0xc7, 0xb3, 0x7b, 0x54, 0x6b, 0x73, 0xd8, 0xf1, 0xb2, 0xac, 0x7b, 0x0b, 0x0f, - 0xd0, 0x8b, 0x00, 0xf6, 0x11, 0xb6, 0x1f, 0xf8, 0x9e, 0xdb, 0x25, 0x62, 0x94, 0x0b, 0xb1, 0x51, - 0x6a, 0x51, 0xa3, 0x11, 0x03, 0xa2, 0x12, 0xe4, 0x43, 0x61, 0x61, 0x31, 0x7d, 0x5d, 0x59, 0x3b, - 0x65, 0x44, 0x65, 0xf4, 0x2c, 0xe4, 0x6c, 0xa6, 0x43, 0x58, 0x54, 0xd9, 0xbc, 0x9c, 0x1d, 0xe9, - 0x8f, 0xb6, 0x18, 0x12, 0x81, 0xaa, 0x70, 0xb6, 0xe3, 0x76, 0xcd, 0x70, 0xd0, 0xb5, 0xb1, 0x63, - 0x12, 0xd7, 0x7e, 0x80, 0x49, 0x31, 0x33, 0xa1, 0x46, 0xcb, 0xed, 0xe0, 0x16, 0x6b, 0x34, 0x56, - 0x3a, 0x6e, 0xb7, 0xc9, 0xe0, 0xbc, 0x02, 0x5d, 0x03, 0x70, 0x43, 0x33, 0xc0, 0x1d, 0xaf, 0x8f, - 0x9d, 0x62, 0xf6, 0xba, 0xb2, 0x96, 0x37, 0x34, 0x37, 0x34, 0x78, 0x45, 0xf9, 0xd7, 0x0a, 0x64, - 0xf9, 0xa8, 0xe8, 0x49, 0x48, 0xb9, 0x8e, 0x58, 0xdd, 0x73, 0x13, 0x4a, 0x6d, 0xd7, 0x8d, 0x94, - 0xeb, 0xa0, 0x22, 0xe4, 0x3a, 0x38, 0x0c, 0xad, 0x43, 0x3e, 0xe9, 0x9a, 0x21, 0x8b, 0xe8, 0x05, - 0x00, 0xcf, 0xc7, 0x81, 0x45, 0x5c, 0xaf, 0x1b, 0x16, 0xd3, 0xcc, 0xb6, 0xf3, 0xb1, 0x6e, 0x76, - 0x65, 0xa3, 0x11, 0xc3, 0xa1, 0x4d, 0x58, 0x91, 0x6b, 0x6e, 0x72, 0xab, 0x8b, 0x2a, 0xd3, 0xe0, - 0x72, 0xc2, 0x62, 0x8a, 0xe9, 0x39, 0xe3, 0x8f, 0x94, 0xcb, 0x3f, 0x56, 0x20, 0x2f, 0x95, 0xa4, - 0xf6, 0xda, 0x6d, 0x97, 0xae, 0x69, 0x88, 0xdf, 0x67, 0xd6, 0x9c, 0x36, 0x34, 0x5e, 0xd3, 0xc4, - 0xef, 0xa3, 0x1b, 0x00, 0x21, 0x0e, 0xfa, 0x38, 0x60, 0xcd, 0xd4, 0x84, 0xf4, 0x66, 0xea, 0x96, - 0x62, 0x68, 0xbc, 0x96, 0x42, 0xae, 0x42, 0xae, 0x6d, 0x75, 0x7c, 0x2f, 0xe0, 0x8b, 0xc7, 0xdb, - 0x65, 0x15, 0xba, 0x0c, 0x79, 0xcb, 0x26, 0x5e, 0x60, 0xba, 0x0e, 0xd3, 0xf4, 0x94, 0x91, 0x63, - 0xe5, 0x6d, 0xa7, 0xfc, 0xd1, 0x2a, 0x68, 0x91, 0x95, 0xe8, 0x1b, 0x90, 0x0e, 0xb1, 0xf4, 0x96, - 0x62, 0xd2, 0x44, 0x54, 0x9a, 0x98, 0x6c, 0x2d, 0x19, 0x14, 0x46, 0xd1, 0x96, 0xe3, 0x08, 0x8a, - 0x25, 0xa3, 0xab, 0x8e, 0x43, 0xd1, 0x96, 0xe3, 0xa0, 0x75, 0x50, 0xe9, 0xf2, 0x31, 0xfd, 0x46, - 0xa7, 0x6a, 0x08, 0xbf, 0xeb, 0xf5, 0xf1, 0xd6, 0x92, 0xc1, 0x80, 0xe8, 0x45, 0xc8, 0x72, 0x0a, - 0x88, 0xd9, 0xbd, 0x92, 0x28, 0xc2, 0x49, 0xb1, 0xb5, 0x64, 0x08, 0x30, 0x1d, 0x07, 0x3b, 0xae, - 0xa4, 0x5c, 0xf2, 0x38, 0xba, 0xe3, 0x52, 0x2b, 0x18, 0x90, 0x8e, 0x13, 0xe2, 0x36, 0xb6, 0x09, - 0x63, 0xda, 0xb4, 0x71, 0x9a, 0x0c, 0x42, 0xc7, 0xe1, 0x60, 0xb4, 0x01, 0x99, 0x90, 0x0c, 0xda, - 0xb8, 0x98, 0x63, 0x52, 0xa5, 0x64, 0x29, 0x8a, 0xd8, 0x5a, 0x32, 0x38, 0x14, 0xbd, 0x0a, 0x79, - 0xb7, 0x6b, 0x07, 0xd8, 0x0a, 0x71, 0x31, 0xcf, 0xc4, 0xae, 0x25, 0x8a, 0x6d, 0x0b, 0xd0, 0xd6, - 0x92, 0x11, 0x09, 0xa0, 0x6f, 0x83, 0x46, 0x02, 0x8c, 0x4d, 0x66, 0x9d, 0x36, 0x43, 0xba, 0x15, - 0x60, 0x2c, 0x2c, 0xcc, 0x13, 0xf1, 0x8d, 0xbe, 0x03, 0xc0, 0xa4, 0xb9, 0xce, 0xc0, 0xc4, 0x57, - 0xa7, 0x8a, 0x4b, 0xbd, 0xd9, 0x88, 0xac, 0x50, 0xfa, 0xad, 0x02, 0xe9, 0x26, 0x26, 0xd4, 0xbf, - 0x7d, 0x2b, 0xa0, 0x64, 0xa5, 0x7a, 0x11, 0xec, 0x98, 0x96, 0x64, 0xcc, 0x34, 0xff, 0xe6, 0xf8, - 0x1a, 0x87, 0x57, 0x89, 0x8c, 0x8a, 0xa9, 0x61, 0x54, 0xdc, 0x90, 0x51, 0x91, 0xb3, 0xe3, 0x6a, - 0x72, 0xa0, 0x6e, 0xba, 0x1d, 0xbf, 0x2d, 0xc3, 0x23, 0x7a, 0x09, 0x96, 0xf1, 0x43, 0x6c, 0xf7, - 0x84, 0x0a, 0xea, 0x2c, 0x15, 0x40, 0x22, 0xab, 0xa4, 0xf4, 0x6f, 0x05, 0xd2, 0x55, 0xc7, 0x39, - 0x09, 0x43, 0x5e, 0x63, 0x91, 0xa0, 0x1f, 0xef, 0x20, 0x35, 0xab, 0x83, 0xd3, 0x14, 0x3d, 0x14, - 0xff, 0x32, 0xad, 0xfe, 0x8f, 0x02, 0x2a, 0x75, 0xaf, 0xc7, 0xc0, 0xec, 0x17, 0x00, 0x62, 0x92, - 0xe9, 0x59, 0x92, 0x9a, 0x1d, 0x49, 0x2d, 0x6a, 0xf8, 0xc7, 0x0a, 0x64, 0x79, 0x90, 0x38, 0x09, - 0xd3, 0x47, 0x75, 0x4f, 0x2d, 0xa6, 0x7b, 0x7a, 0x5e, 0xdd, 0x7f, 0xa3, 0x82, 0xca, 0xbc, 0xf7, - 0x04, 0x34, 0xbf, 0x09, 0xea, 0xfd, 0xc0, 0xeb, 0x08, 0x9d, 0xe3, 0xa9, 0x50, 0x0b, 0x3f, 0x24, - 0x0d, 0xcf, 0xc1, 0x7b, 0x5e, 0x68, 0x30, 0x0c, 0x7a, 0x1a, 0x52, 0xc4, 0x13, 0x6a, 0x4e, 0x43, - 0xa6, 0x88, 0x87, 0x8e, 0xe0, 0xd2, 0x50, 0x1f, 0xb3, 0x63, 0xf9, 0xe6, 0xc1, 0xc0, 0x64, 0x5b, - 0x8b, 0x48, 0x14, 0x36, 0xa6, 0x86, 0xdf, 0x4a, 0xa4, 0xd9, 0x5d, 0xcb, 0xdf, 0x1c, 0x54, 0xa9, - 0x10, 0x4f, 0xa8, 0xce, 0xd9, 0x93, 0x2d, 0x74, 0x0f, 0xb7, 0xbd, 0x2e, 0xc1, 0x5d, 0x1e, 0xd8, - 0x35, 0x43, 0x16, 0xc7, 0xe7, 0x36, 0x3b, 0xe7, 0xdc, 0xa2, 0x6d, 0x00, 0x8b, 0x90, 0xc0, 0x3d, - 0xe8, 0x11, 0x1c, 0x16, 0x73, 0x4c, 0xdd, 0x67, 0xa6, 0xab, 0x5b, 0x8d, 0xb0, 0x5c, 0xcb, 0x98, - 0x70, 0xe9, 0x87, 0x50, 0x9c, 0x66, 0x4d, 0x42, 0x06, 0xf8, 0xec, 0x68, 0x06, 0x38, 0x45, 0xd5, - 0x61, 0x0e, 0x58, 0x7a, 0x0d, 0x56, 0xc6, 0x46, 0x4f, 0xe8, 0xf5, 0x7c, 0xbc, 0x57, 0x2d, 0x2e, - 0xfe, 0x17, 0x05, 0xb2, 0x7c, 0xf7, 0x7a, 0x5c, 0x69, 0xb4, 0xa8, 0x6b, 0xff, 0x52, 0x85, 0x0c, - 0xdb, 0x9c, 0x1e, 0x57, 0xc3, 0xde, 0x1c, 0xe1, 0x18, 0x77, 0x89, 0x9b, 0xd3, 0x13, 0x85, 0x59, - 0x24, 0x1b, 0x9f, 0xa4, 0xcc, 0xbc, 0x3c, 0x77, 0xa7, 0xfb, 0x68, 0x96, 0x29, 0xf4, 0xfc, 0x0c, - 0x85, 0x8e, 0xe5, 0xa4, 0x9f, 0x97, 0xa8, 0x5f, 0xb0, 0x1b, 0x7d, 0xac, 0x40, 0x5e, 0x26, 0x56, - 0x27, 0x41, 0x98, 0x8d, 0x51, 0x05, 0x16, 0xd9, 0xbd, 0xe7, 0xde, 0x08, 0x3e, 0x4b, 0x43, 0x5e, - 0xa6, 0x75, 0x27, 0xa1, 0xfb, 0xd3, 0x23, 0x64, 0x47, 0x71, 0xa9, 0x00, 0xc7, 0x88, 0x5e, 0x8e, - 0x11, 0x3d, 0x09, 0x45, 0x49, 0xde, 0x7e, 0xd4, 0x26, 0xf0, 0xd2, 0xcc, 0x2c, 0xf5, 0x98, 0x1b, - 0xc1, 0x2d, 0xc8, 0x8b, 0xc8, 0x1f, 0x16, 0x33, 0x13, 0x07, 0x36, 0xda, 0x29, 0x75, 0xc0, 0xd0, - 0x88, 0x50, 0xe8, 0x09, 0x58, 0x0e, 0xfd, 0xb6, 0x4b, 0xcc, 0x36, 0xee, 0xe3, 0x36, 0x4b, 0xd7, - 0x33, 0x06, 0xb0, 0xaa, 0x1d, 0x5a, 0xb3, 0xe8, 0x0e, 0xf2, 0x45, 0xf3, 0xf5, 0x6f, 0x29, 0xd0, - 0xa2, 0x5c, 0xfc, 0x71, 0x5b, 0xf4, 0x46, 0x42, 0x64, 0xab, 0xcc, 0x3e, 0x4e, 0x7c, 0x11, 0xd1, - 0xed, 0x73, 0x86, 0x9c, 0xcd, 0x2c, 0xa8, 0x07, 0x9e, 0x33, 0x28, 0x7f, 0xa6, 0xc0, 0xd9, 0x09, - 0xa7, 0x1d, 0x4b, 0xf6, 0x94, 0x39, 0x93, 0xbd, 0x5b, 0x90, 0x67, 0xff, 0x29, 0x1e, 0x99, 0x20, - 0xe6, 0x18, 0x8c, 0x27, 0x95, 0xe2, 0x67, 0xc7, 0xa3, 0x13, 0x62, 0x01, 0xac, 0x12, 0xb4, 0x06, - 0x2a, 0x19, 0xf8, 0xfc, 0x74, 0x7c, 0x66, 0xc4, 0x0b, 0xee, 0x51, 0xfb, 0x5a, 0x03, 0x1f, 0x1b, - 0x0c, 0x31, 0xb4, 0x3f, 0xc3, 0x0e, 0xff, 0xbc, 0x50, 0xfe, 0xc5, 0x69, 0x58, 0x8e, 0xd9, 0x8c, - 0xea, 0xb0, 0xfc, 0x5e, 0xe8, 0x75, 0x4d, 0xef, 0xe0, 0x3d, 0x7a, 0x18, 0xe6, 0xe6, 0xde, 0x48, - 0x8e, 0x6a, 0xec, 0x7b, 0x97, 0x01, 0xb7, 0x96, 0x0c, 0xa0, 0x72, 0xbc, 0x84, 0xaa, 0xc0, 0x4a, - 0xa6, 0x15, 0x04, 0xd6, 0x40, 0xd8, 0x7f, 0x7d, 0x46, 0x27, 0x55, 0x8a, 0xa3, 0x27, 0x4d, 0x2a, - 0xc5, 0x0a, 0xfc, 0x47, 0x9c, 0xdb, 0x71, 0x89, 0x1b, 0xfd, 0x2e, 0x98, 0xd6, 0xc3, 0x9e, 0xc4, - 0xd1, 0x1e, 0x22, 0x21, 0x74, 0x1b, 0x54, 0x82, 0x1f, 0x4a, 0x1a, 0x5d, 0x99, 0x22, 0x4c, 0x77, - 0xeb, 0xad, 0x25, 0x83, 0x41, 0xd1, 0x2b, 0x34, 0xc1, 0xec, 0x75, 0x09, 0x0e, 0x44, 0x00, 0x58, - 0x9d, 0x22, 0x55, 0xe3, 0xa8, 0xad, 0x25, 0x43, 0x0a, 0xb0, 0xe1, 0x02, 0x2c, 0xff, 0x04, 0x4c, - 0x1d, 0x2e, 0xc0, 0xec, 0xe7, 0x06, 0x85, 0x96, 0x3e, 0x51, 0x00, 0x86, 0x73, 0x88, 0xd6, 0x20, - 0xd3, 0xa5, 0x61, 0xab, 0xa8, 0x30, 0x4f, 0x8a, 0x7b, 0x9d, 0xb1, 0xd5, 0xa2, 0x11, 0xcd, 0xe0, - 0x80, 0x05, 0x0f, 0x20, 0x71, 0x4e, 0xa6, 0x17, 0xe0, 0xa4, 0x3a, 0x1f, 0x27, 0x4b, 0x7f, 0x56, - 0x40, 0x8b, 0x56, 0x75, 0xa6, 0x55, 0x77, 0xaa, 0x5f, 0x1d, 0xab, 0xfe, 0xa9, 0x80, 0x16, 0x31, - 0x2d, 0xf2, 0x3b, 0x65, 0x7e, 0xbf, 0x4b, 0xc5, 0xfc, 0x6e, 0xc1, 0xe3, 0x6f, 0xdc, 0x56, 0x75, - 0x01, 0x5b, 0x33, 0x73, 0xda, 0xfa, 0x47, 0x05, 0x54, 0xea, 0x18, 0xe8, 0x99, 0xd1, 0xc5, 0x3b, - 0x97, 0x90, 0xe6, 0x7e, 0x35, 0x56, 0xef, 0x1f, 0x0a, 0xe4, 0x84, 0xd3, 0xfe, 0x3f, 0xac, 0x5d, - 0x80, 0xf1, 0xcc, 0xb5, 0x13, 0x19, 0xd2, 0x57, 0x62, 0xed, 0xa2, 0xfd, 0xf9, 0x2e, 0xe4, 0x44, - 0x1c, 0x4c, 0xd8, 0xde, 0x6f, 0x41, 0x0e, 0xf3, 0x18, 0x9b, 0x70, 0x78, 0x8b, 0xdf, 0xf3, 0x48, - 0x58, 0xd9, 0x86, 0x9c, 0x08, 0x40, 0x34, 0x29, 0xea, 0xd2, 0xad, 0x42, 0x99, 0x48, 0x77, 0x64, - 0x88, 0x62, 0xed, 0x0b, 0x0c, 0x72, 0x0f, 0xf2, 0x54, 0x9e, 0xa6, 0x27, 0x43, 0x36, 0x29, 0xb1, - 0x0c, 0x84, 0xce, 0x49, 0xcf, 0x77, 0xe6, 0x9b, 0x7b, 0x01, 0xac, 0x92, 0xf2, 0x1f, 0x52, 0x90, - 0x97, 0x1e, 0x88, 0x9e, 0x8a, 0x5d, 0x80, 0x5c, 0x48, 0x70, 0x51, 0x71, 0x05, 0x92, 0x98, 0x01, - 0x2d, 0x98, 0x77, 0xbc, 0x08, 0xcb, 0x6e, 0x37, 0x34, 0xd9, 0x1f, 0x40, 0x71, 0xa1, 0x30, 0x75, - 0x6c, 0xcd, 0xed, 0x86, 0x7b, 0x01, 0xee, 0x6f, 0x3b, 0xa8, 0x36, 0x92, 0x31, 0xf2, 0xd4, 0xfd, - 0xc9, 0x04, 0xa9, 0x99, 0x7f, 0x5a, 0x8c, 0x79, 0xd2, 0xbd, 0x19, 0x57, 0x6c, 0x72, 0x41, 0xe2, - 0x57, 0x6c, 0xef, 0x02, 0x0c, 0x35, 0x5e, 0x30, 0xe7, 0xbb, 0x08, 0x59, 0xef, 0xfe, 0xfd, 0x10, - 0xf3, 0x55, 0xcc, 0x18, 0xa2, 0x54, 0xfe, 0x95, 0x38, 0xb7, 0xcd, 0x5e, 0x2b, 0x01, 0x10, 0x6b, - 0x85, 0x44, 0x8c, 0xe2, 0x4b, 0x35, 0x16, 0x8d, 0xd2, 0xd3, 0xd7, 0x4f, 0x5d, 0x6c, 0xfd, 0x32, - 0xb3, 0xf4, 0x89, 0xad, 0x9f, 0x10, 0xa3, 0xce, 0x40, 0xc5, 0xb2, 0x8f, 0x12, 0x6b, 0xe0, 0x87, - 0x64, 0x9b, 0x31, 0xcf, 0xc1, 0x3e, 0x39, 0x12, 0xe7, 0x2e, 0x5e, 0x18, 0x23, 0x43, 0x7e, 0x92, - 0x0c, 0xa2, 0xaf, 0x2f, 0x9d, 0x0c, 0xaf, 0xf0, 0x33, 0x17, 0x3b, 0x43, 0xa2, 0xe7, 0x86, 0x3f, - 0x1d, 0x67, 0x04, 0x52, 0x89, 0x61, 0x44, 0x8a, 0xe6, 0xe0, 0x84, 0x89, 0xf4, 0x23, 0xc8, 0x89, - 0xe3, 0x17, 0xda, 0x00, 0x4d, 0x9c, 0x04, 0x1f, 0xc5, 0xa6, 0x3c, 0xc7, 0x6d, 0x3b, 0xe8, 0x35, - 0x58, 0x69, 0xe3, 0xfb, 0xc4, 0x0c, 0xdd, 0x83, 0xb6, 0xdb, 0x3d, 0xa4, 0x92, 0xa9, 0x59, 0x92, - 0xa7, 0x29, 0xba, 0xc9, 0xc1, 0xdb, 0x4e, 0xb9, 0x03, 0xea, 0x7e, 0x88, 0x03, 0x74, 0x26, 0x62, - 0xb0, 0xc6, 0xa8, 0x5a, 0x82, 0x7c, 0x2f, 0xc4, 0x41, 0xd7, 0xea, 0x48, 0xba, 0x46, 0x65, 0xf4, - 0xad, 0x84, 0xad, 0xb2, 0x54, 0xe1, 0x97, 0xf7, 0x15, 0x79, 0x79, 0xcf, 0x66, 0x81, 0xdd, 0xee, - 0xc7, 0x26, 0xa1, 0xfc, 0xdf, 0x14, 0xe4, 0xf6, 0x02, 0x8f, 0x65, 0xc6, 0xe3, 0x43, 0x22, 0x50, - 0x63, 0xc3, 0xb1, 0x6f, 0x74, 0x0d, 0xc0, 0xef, 0x1d, 0xb4, 0x5d, 0x9b, 0xdd, 0x89, 0x73, 0x17, - 0xd1, 0x78, 0xcd, 0x5b, 0x78, 0x40, 0x9b, 0x43, 0x6c, 0x07, 0x98, 0x5f, 0x99, 0xab, 0xbc, 0x99, - 0xd7, 0xd0, 0xe6, 0x35, 0x28, 0x58, 0x3d, 0x72, 0x64, 0x7e, 0x80, 0x0f, 0x8e, 0x3c, 0xef, 0x81, - 0xd9, 0x0b, 0xda, 0xe2, 0x1f, 0xf3, 0x19, 0x5a, 0xff, 0x36, 0xaf, 0xde, 0x0f, 0xda, 0xe8, 0x16, - 0x9c, 0x1f, 0x41, 0x76, 0x30, 0x39, 0xf2, 0x9c, 0x90, 0xfd, 0x47, 0xd3, 0x0c, 0x14, 0x43, 0xdf, - 0xe5, 0x2d, 0xe8, 0x75, 0xb8, 0x22, 0x6e, 0x76, 0x1d, 0x6c, 0xd9, 0xc4, 0xed, 0x5b, 0x04, 0x9b, - 0xe4, 0x28, 0xc0, 0xe1, 0x91, 0xd7, 0x76, 0x98, 0x4f, 0x68, 0xc6, 0x65, 0x0e, 0xa9, 0x47, 0x88, - 0x96, 0x04, 0x8c, 0x4d, 0x62, 0xfe, 0x18, 0x93, 0x48, 0x45, 0x63, 0x9b, 0x8b, 0xf6, 0x68, 0xd1, - 0xe1, 0x0e, 0xf3, 0x93, 0x34, 0x5c, 0xdc, 0xa7, 0x25, 0xeb, 0xa0, 0x8d, 0xc5, 0x42, 0xbc, 0xe1, - 0xe2, 0xb6, 0x13, 0xa2, 0x5b, 0x62, 0xfa, 0x15, 0xf1, 0xcf, 0x6b, 0xbc, 0xbf, 0x26, 0x09, 0xdc, - 0xee, 0x21, 0x4b, 0xa6, 0xc4, 0xe2, 0xbc, 0x91, 0x30, 0xbd, 0xa9, 0x39, 0xa4, 0xc7, 0x27, 0xff, - 0xfe, 0x94, 0xc9, 0xe7, 0xcc, 0x7a, 0x21, 0xc6, 0xe3, 0x64, 0xd5, 0x2b, 0xd5, 0x89, 0xe5, 0x49, - 0x5c, 0xb2, 0x1f, 0xcc, 0x5e, 0x32, 0x75, 0x0e, 0xd5, 0xa7, 0x2f, 0x68, 0xa9, 0x02, 0x68, 0x52, - 0x0f, 0xfe, 0x42, 0x81, 0x9b, 0xa3, 0x30, 0x2e, 0xc9, 0x62, 0xf9, 0xc3, 0x14, 0xac, 0xd4, 0xc5, - 0xeb, 0x8e, 0x66, 0xaf, 0xd3, 0xb1, 0x82, 0xc1, 0x84, 0x4b, 0x4c, 0x5e, 0xa7, 0x8e, 0x3f, 0xe6, - 0xd0, 0x62, 0x8f, 0x39, 0x46, 0x29, 0xa5, 0x1e, 0x87, 0x52, 0xaf, 0xc2, 0xb2, 0x65, 0xdb, 0x38, - 0x0c, 0xe3, 0x69, 0xe9, 0x2c, 0x59, 0x90, 0xf0, 0x09, 0x3e, 0x66, 0x8f, 0xc3, 0xc7, 0x7f, 0x29, - 0xc3, 0x87, 0x35, 0xe2, 0xe1, 0xc7, 0xcb, 0x23, 0x89, 0xfc, 0xd7, 0xa6, 0x3e, 0xbc, 0x10, 0x2f, - 0x41, 0x62, 0x89, 0xfd, 0x3a, 0xe4, 0xe5, 0x5b, 0x8c, 0x59, 0x6f, 0x70, 0x22, 0x50, 0xb9, 0x23, - 0x5f, 0xe0, 0xd0, 0x4e, 0xd0, 0x15, 0xb8, 0x54, 0xdb, 0xaa, 0x36, 0xee, 0xe8, 0x66, 0xeb, 0x9d, - 0x3d, 0xdd, 0xdc, 0x6f, 0x34, 0xf7, 0xf4, 0xda, 0xf6, 0x1b, 0xdb, 0x7a, 0xbd, 0xb0, 0x84, 0xce, - 0xc1, 0x4a, 0xbc, 0x71, 0x6f, 0xbf, 0x55, 0x50, 0xd0, 0x45, 0x40, 0xf1, 0xca, 0xba, 0xbe, 0xa3, - 0xb7, 0xf4, 0x42, 0x0a, 0x5d, 0x80, 0xb3, 0xf1, 0xfa, 0xda, 0x8e, 0x5e, 0x35, 0x0a, 0xe9, 0x72, - 0x1f, 0xf2, 0x52, 0x09, 0x74, 0x1b, 0x54, 0x4a, 0x65, 0xb1, 0xfb, 0x5c, 0x4b, 0xd0, 0xb3, 0x52, - 0xb7, 0x88, 0xc5, 0xb7, 0x46, 0x06, 0x2d, 0x7d, 0x13, 0xb4, 0xa8, 0xea, 0x38, 0xbf, 0xc2, 0xca, - 0x0d, 0x6a, 0x66, 0xf4, 0x1c, 0x68, 0xf4, 0xcd, 0x89, 0x92, 0xf4, 0xe6, 0x64, 0xf4, 0xd5, 0x4a, - 0x6a, 0xec, 0xd5, 0x4a, 0xf9, 0x23, 0x05, 0x96, 0x63, 0xf7, 0x21, 0x27, 0xbb, 0x1f, 0xa2, 0xaf, - 0xc3, 0x4a, 0x80, 0xdb, 0x16, 0x3d, 0x90, 0x9b, 0x02, 0x90, 0x66, 0x80, 0x33, 0xb2, 0x7a, 0x97, - 0x6f, 0x9c, 0x36, 0xc0, 0xb0, 0xe7, 0xf8, 0x3b, 0x19, 0x65, 0xf2, 0x9d, 0xcc, 0x55, 0xd0, 0x1c, - 0xdc, 0xa6, 0xe7, 0x7c, 0x1c, 0x48, 0x83, 0xa2, 0x8a, 0x91, 0x57, 0x34, 0xe9, 0xd1, 0x57, 0x34, - 0xaf, 0xc3, 0xa9, 0xba, 0x67, 0xeb, 0x7d, 0xdc, 0x25, 0x9b, 0x9e, 0xc3, 0x66, 0x99, 0x78, 0xbe, - 0x6b, 0xcb, 0x74, 0x9f, 0x15, 0xa8, 0x97, 0xfb, 0xd6, 0xa0, 0xed, 0x59, 0x8e, 0x38, 0x54, 0xca, - 0x62, 0xf9, 0x43, 0x05, 0xf2, 0xb2, 0x03, 0xf4, 0xec, 0x08, 0xb5, 0x2f, 0xc5, 0xa6, 0x48, 0x42, - 0x62, 0x6c, 0xbe, 0x0a, 0x7c, 0xa3, 0x0b, 0x8f, 0x84, 0xca, 0x72, 0xe7, 0xa3, 0x15, 0xb4, 0x2b, - 0x7a, 0x7c, 0x12, 0x31, 0x32, 0xa9, 0x2b, 0xaa, 0xae, 0xc1, 0x40, 0x37, 0x3f, 0x49, 0x81, 0x16, - 0x9d, 0x82, 0x29, 0x95, 0xef, 0x55, 0x77, 0xf6, 0x05, 0x39, 0x1b, 0xfb, 0x3b, 0x3b, 0x85, 0x25, - 0x4a, 0xe5, 0x58, 0xe5, 0xe6, 0xee, 0xee, 0x8e, 0x5e, 0x6d, 0x70, 0x8a, 0xc7, 0xea, 0xb7, 0x1b, - 0x2d, 0xfd, 0x8e, 0x6e, 0x14, 0x52, 0x63, 0x9d, 0xec, 0xec, 0x36, 0xee, 0x14, 0xd2, 0x94, 0xf7, - 0xb1, 0xca, 0xfa, 0xee, 0xfe, 0xe6, 0x8e, 0x5e, 0x50, 0xc7, 0xaa, 0x9b, 0x2d, 0x63, 0xbb, 0x71, - 0xa7, 0x90, 0x41, 0xe7, 0xa1, 0x10, 0x1f, 0xf2, 0x9d, 0x96, 0xde, 0x2c, 0x64, 0xc7, 0x3a, 0xae, - 0x57, 0x5b, 0x7a, 0x21, 0x87, 0x4a, 0x70, 0x31, 0x56, 0x49, 0xcf, 0x64, 0xe6, 0xee, 0xe6, 0x9b, - 0x7a, 0xad, 0x55, 0xc8, 0xa3, 0xcb, 0x70, 0x61, 0xbc, 0xad, 0x6a, 0x18, 0xd5, 0x77, 0x0a, 0xda, - 0x58, 0x5f, 0x2d, 0xfd, 0xfb, 0xad, 0x02, 0x8c, 0xf5, 0x25, 0x2c, 0x32, 0x6b, 0x8d, 0x56, 0x61, - 0x19, 0x5d, 0x82, 0x73, 0x63, 0x56, 0xb1, 0x86, 0x53, 0xe3, 0x3d, 0x19, 0xba, 0x5e, 0x38, 0x7d, - 0xf3, 0xe7, 0xca, 0x90, 0x1c, 0x6c, 0x66, 0x9f, 0x84, 0x27, 0xea, 0xbb, 0x35, 0x53, 0xbf, 0xa7, - 0x37, 0x5a, 0x72, 0x0e, 0x6a, 0xfb, 0x77, 0x69, 0x89, 0xc7, 0x03, 0x1a, 0x49, 0x66, 0x80, 0xde, - 0xae, 0xb6, 0x6a, 0x5b, 0x7a, 0xbd, 0xa0, 0xa0, 0xa7, 0xe0, 0xc6, 0x34, 0xd0, 0x7e, 0x43, 0xc2, - 0x52, 0xb3, 0x60, 0x9b, 0xc6, 0x6e, 0xb5, 0x5e, 0xab, 0x36, 0x5b, 0x85, 0xf4, 0xe6, 0xfe, 0xef, - 0x3e, 0x5d, 0x55, 0xfe, 0xf4, 0xe9, 0xaa, 0xf2, 0xd7, 0x4f, 0x57, 0x95, 0x9f, 0xfd, 0x7d, 0x75, - 0x09, 0xce, 0x3a, 0xb8, 0x2f, 0x39, 0x63, 0xf9, 0x6e, 0xa5, 0x7f, 0x7b, 0x4f, 0x79, 0xb7, 0x72, - 0xe8, 0x92, 0xa3, 0xde, 0x41, 0xc5, 0xf6, 0x3a, 0xeb, 0xbc, 0xed, 0x39, 0x82, 0x2d, 0xf9, 0xbd, - 0x6e, 0xf9, 0xee, 0x7a, 0xf4, 0xd0, 0xf3, 0xd5, 0xfe, 0xed, 0x83, 0x2c, 0x8b, 0xed, 0xcf, 0xff, - 0x2f, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x8d, 0x1a, 0x90, 0xff, 0x29, 0x00, 0x00, -} - -func (m *Snapshot) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Presences) > 0 { - for k := range m.Presences { - v := m.Presences[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if m.Root != nil { - { - size, err := m.Root.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *Operation_Increase) GetValue() *JSONElementSimple { + if x != nil { + return x.Value } - return len(dAtA) - i, nil + return nil } -func (m *ChangePack) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *Operation_Increase) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } - return dAtA[:n], nil + return nil } -func (m *ChangePack) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +type Operation_TreeEdit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ChangePack) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsRemoved { - i-- - if m.IsRemoved { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.MinSyncedTicket != nil { - { - size, err := m.MinSyncedTicket.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Snapshot) > 0 { - i -= len(m.Snapshot) - copy(dAtA[i:], m.Snapshot) - i = encodeVarintResources(dAtA, i, uint64(len(m.Snapshot))) - i-- - dAtA[i] = 0x1a - } - if m.Checkpoint != nil { - { - size, err := m.Checkpoint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DocumentKey) > 0 { - i -= len(m.DocumentKey) - copy(dAtA[i:], m.DocumentKey) - i = encodeVarintResources(dAtA, i, uint64(len(m.DocumentKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + From *TreePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *TreePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + CreatedAtMapByActor map[string]*TimeTicket `protobuf:"bytes,4,rep,name=created_at_map_by_actor,json=createdAtMapByActor,proto3" json:"created_at_map_by_actor,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Contents []*TreeNodes `protobuf:"bytes,5,rep,name=contents,proto3" json:"contents,omitempty"` + SplitLevel int32 `protobuf:"varint,7,opt,name=split_level,json=splitLevel,proto3" json:"split_level,omitempty"` + ExecutedAt *TimeTicket `protobuf:"bytes,6,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *Change) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *Operation_TreeEdit) Reset() { + *x = Operation_TreeEdit{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return dAtA[:n], nil } -func (m *Change) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *Operation_TreeEdit) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Change) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PresenceChange != nil { - { - size, err := m.PresenceChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Operations) > 0 { - for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Operations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintResources(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (*Operation_TreeEdit) ProtoMessage() {} + +func (x *Operation_TreeEdit) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0xa + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *ChangeID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// Deprecated: Use Operation_TreeEdit.ProtoReflect.Descriptor instead. +func (*Operation_TreeEdit) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 8} } -func (m *ChangeID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *Operation_TreeEdit) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt + } + return nil } -func (m *ChangeID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ActorId) > 0 { - i -= len(m.ActorId) - copy(dAtA[i:], m.ActorId) - i = encodeVarintResources(dAtA, i, uint64(len(m.ActorId))) - i-- - dAtA[i] = 0x22 +func (x *Operation_TreeEdit) GetFrom() *TreePos { + if x != nil { + return x.From } - if m.Lamport != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Lamport)) - i-- - dAtA[i] = 0x18 - } - if m.ServerSeq != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.ServerSeq)) - i-- - dAtA[i] = 0x10 - } - if m.ClientSeq != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.ClientSeq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return nil } -func (m *Operation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *Operation_TreeEdit) GetTo() *TreePos { + if x != nil { + return x.To } - return dAtA[:n], nil + return nil } -func (m *Operation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *Operation_TreeEdit) GetCreatedAtMapByActor() map[string]*TimeTicket { + if x != nil { + return x.CreatedAtMapByActor + } + return nil } -func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *Operation_TreeEdit) GetContents() []*TreeNodes { + if x != nil { + return x.Contents } - if m.Body != nil { - { - size := m.Body.Size() - i -= size - if _, err := m.Body.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil + return nil } -func (m *Operation_Set_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *Operation_TreeEdit) GetSplitLevel() int32 { + if x != nil { + return x.SplitLevel + } + return 0 } -func (m *Operation_Set_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Set != nil { - { - size, err := m.Set.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *Operation_TreeEdit) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } - return len(dAtA) - i, nil + return nil } -func (m *Operation_Add_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +type Operation_TreeStyle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentCreatedAt *TimeTicket `protobuf:"bytes,1,opt,name=parent_created_at,json=parentCreatedAt,proto3" json:"parent_created_at,omitempty"` + From *TreePos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *TreePos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ExecutedAt *TimeTicket `protobuf:"bytes,5,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` } -func (m *Operation_Add_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Add != nil { - { - size, err := m.Add.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 +func (x *Operation_TreeStyle) Reset() { + *x = Operation_TreeStyle{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return len(dAtA) - i, nil } -func (m *Operation_Move_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +func (x *Operation_TreeStyle) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation_Move_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Move != nil { - { - size, err := m.Move.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (*Operation_TreeStyle) ProtoMessage() {} + +func (x *Operation_TreeStyle) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x1a + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *Operation_Remove_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +// Deprecated: Use Operation_TreeStyle.ProtoReflect.Descriptor instead. +func (*Operation_TreeStyle) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{4, 9} } -func (m *Operation_Remove_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Remove != nil { - { - size, err := m.Remove.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 +func (x *Operation_TreeStyle) GetParentCreatedAt() *TimeTicket { + if x != nil { + return x.ParentCreatedAt } - return len(dAtA) - i, nil -} -func (m *Operation_Edit_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *Operation_Edit_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Edit != nil { - { - size, err := m.Edit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a +func (x *Operation_TreeStyle) GetFrom() *TreePos { + if x != nil { + return x.From } - return len(dAtA) - i, nil -} -func (m *Operation_Select_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *Operation_Select_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Select != nil { - { - size, err := m.Select.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 +func (x *Operation_TreeStyle) GetTo() *TreePos { + if x != nil { + return x.To } - return len(dAtA) - i, nil -} -func (m *Operation_Style_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *Operation_Style_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Style != nil { - { - size, err := m.Style.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a +func (x *Operation_TreeStyle) GetAttributes() map[string]string { + if x != nil { + return x.Attributes } - return len(dAtA) - i, nil -} -func (m *Operation_Increase_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *Operation_Increase_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Increase != nil { - { - size, err := m.Increase.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 +func (x *Operation_TreeStyle) GetExecutedAt() *TimeTicket { + if x != nil { + return x.ExecutedAt } - return len(dAtA) - i, nil + return nil } -func (m *Operation_TreeEdit_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +type JSONElement_JSONObject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*RHTNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` } -func (m *Operation_TreeEdit_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.TreeEdit != nil { - { - size, err := m.TreeEdit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a +func (x *JSONElement_JSONObject) Reset() { + *x = JSONElement_JSONObject{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return len(dAtA) - i, nil } -func (m *Operation_TreeStyle_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +func (x *JSONElement_JSONObject) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation_TreeStyle_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.TreeStyle != nil { - { - size, err := m.TreeStyle.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (*JSONElement_JSONObject) ProtoMessage() {} + +func (x *JSONElement_JSONObject) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *Operation_Set) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *Operation_Set) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use JSONElement_JSONObject.ProtoReflect.Descriptor instead. +func (*JSONElement_JSONObject) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6, 0} } -func (m *Operation_Set) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *JSONElement_JSONObject) GetNodes() []*RHTNode { + if x != nil { + return x.Nodes } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintResources(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return nil } -func (m *Operation_Add) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_JSONObject) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } - return dAtA[:n], nil -} - -func (m *Operation_Add) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *Operation_Add) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PrevCreatedAt != nil { - { - size, err := m.PrevCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *JSONElement_JSONObject) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt } - return len(dAtA) - i, nil + return nil } -func (m *Operation_Move) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_JSONObject) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } - return dAtA[:n], nil + return nil } -func (m *Operation_Move) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +type JSONElement_JSONArray struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Operation_Move) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PrevCreatedAt != nil { - { - size, err := m.PrevCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + Nodes []*RGANode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` } -func (m *Operation_Remove) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_JSONArray) Reset() { + *x = JSONElement_JSONArray{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return dAtA[:n], nil } -func (m *Operation_Remove) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_JSONArray) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation_Remove) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Operation_Edit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Operation_Edit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Operation_Edit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintResources(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Content) > 0 { - i -= len(m.Content) - copy(dAtA[i:], m.Content) - i = encodeVarintResources(dAtA, i, uint64(len(m.Content))) - i-- - dAtA[i] = 0x2a - } - if len(m.CreatedAtMapByActor) > 0 { - for k := range m.CreatedAtMapByActor { - v := m.CreatedAtMapByActor[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (*JSONElement_JSONArray) ProtoMessage() {} + +func (x *JSONElement_JSONArray) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0xa + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *Operation_Select) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// Deprecated: Use JSONElement_JSONArray.ProtoReflect.Descriptor instead. +func (*JSONElement_JSONArray) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6, 1} } -func (m *Operation_Select) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_JSONArray) GetNodes() []*RGANode { + if x != nil { + return x.Nodes + } + return nil } -func (m *Operation_Select) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Operation_Style) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Operation_Style) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Operation_Style) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.CreatedAtMapByActor) > 0 { - for k := range m.CreatedAtMapByActor { - v := m.CreatedAtMapByActor[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintResources(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *JSONElement_JSONArray) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } - return len(dAtA) - i, nil + return nil } -func (m *Operation_Increase) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_JSONArray) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt } - return dAtA[:n], nil + return nil } -func (m *Operation_Increase) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_JSONArray) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt + } + return nil } -func (m *Operation_Increase) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type JSONElement_Primitive struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type ValueType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.ValueType" json:"type,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,4,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,5,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` } -func (m *Operation_TreeEdit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_Primitive) Reset() { + *x = JSONElement_Primitive{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return dAtA[:n], nil } -func (m *Operation_TreeEdit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_Primitive) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation_TreeEdit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SplitLevel != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.SplitLevel)) - i-- - dAtA[i] = 0x38 - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Contents) > 0 { - for iNdEx := len(m.Contents) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Contents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.CreatedAtMapByActor) > 0 { - for k := range m.CreatedAtMapByActor { - v := m.CreatedAtMapByActor[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (*JSONElement_Primitive) ProtoMessage() {} + +func (x *JSONElement_Primitive) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0xa + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *Operation_TreeStyle) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// Deprecated: Use JSONElement_Primitive.ProtoReflect.Descriptor instead. +func (*JSONElement_Primitive) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6, 2} } -func (m *Operation_TreeStyle) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_Primitive) GetType() ValueType { + if x != nil { + return x.Type + } + return ValueType_VALUE_TYPE_NULL } -func (m *Operation_TreeStyle) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExecutedAt != nil { - { - size, err := m.ExecutedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintResources(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentCreatedAt != nil { - { - size, err := m.ParentCreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *JSONElement_Primitive) GetValue() []byte { + if x != nil { + return x.Value } - return len(dAtA) - i, nil + return nil } -func (m *JSONElementSimple) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_Primitive) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } - return dAtA[:n], nil + return nil } -func (m *JSONElementSimple) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_Primitive) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt + } + return nil } -func (m *JSONElementSimple) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintResources(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x2a - } - if m.Type != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x20 - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *JSONElement_Primitive) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } - return len(dAtA) - i, nil + return nil +} + +type JSONElement_Text struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*TextNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` } -func (m *JSONElement) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_Text) Reset() { + *x = JSONElement_Text{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return dAtA[:n], nil } -func (m *JSONElement) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_Text) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *JSONElement) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Body != nil { - { - size := m.Body.Size() - i -= size - if _, err := m.Body.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } +func (*JSONElement_Text) ProtoMessage() {} + +func (x *JSONElement_Text) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *JSONElement_JsonObject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use JSONElement_Text.ProtoReflect.Descriptor instead. +func (*JSONElement_Text) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6, 3} } -func (m *JSONElement_JsonObject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.JsonObject != nil { - { - size, err := m.JsonObject.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *JSONElement_Text) GetNodes() []*TextNode { + if x != nil { + return x.Nodes } - return len(dAtA) - i, nil -} -func (m *JSONElement_JsonArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *JSONElement_JsonArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.JsonArray != nil { - { - size, err := m.JsonArray.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 +func (x *JSONElement_Text) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt } - return len(dAtA) - i, nil + return nil } -func (m *JSONElement_Primitive_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +func (x *JSONElement_Text) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt + } + return nil } -func (m *JSONElement_Primitive_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Primitive != nil { - { - size, err := m.Primitive.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a +func (x *JSONElement_Text) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } - return len(dAtA) - i, nil + return nil } -func (m *JSONElement_Text_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +type JSONElement_Counter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type ValueType `protobuf:"varint,1,opt,name=type,proto3,enum=yorkie.v1.ValueType" json:"type,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,4,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,5,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` } -func (m *JSONElement_Text_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Text != nil { - { - size, err := m.Text.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a +func (x *JSONElement_Counter) Reset() { + *x = JSONElement_Counter{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return len(dAtA) - i, nil } -func (m *JSONElement_Counter_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +func (x *JSONElement_Counter) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *JSONElement_Counter_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Counter != nil { - { - size, err := m.Counter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (*JSONElement_Counter) ProtoMessage() {} + +func (x *JSONElement_Counter) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x32 + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *JSONElement_Tree_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + +// Deprecated: Use JSONElement_Counter.ProtoReflect.Descriptor instead. +func (*JSONElement_Counter) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6, 4} } -func (m *JSONElement_Tree_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Tree != nil { - { - size, err := m.Tree.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a +func (x *JSONElement_Counter) GetType() ValueType { + if x != nil { + return x.Type } - return len(dAtA) - i, nil + return ValueType_VALUE_TYPE_NULL } -func (m *JSONElement_JSONObject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + +func (x *JSONElement_Counter) GetValue() []byte { + if x != nil { + return x.Value } - return dAtA[:n], nil + return nil } -func (m *JSONElement_JSONObject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_Counter) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt + } + return nil } -func (m *JSONElement_JSONObject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Nodes) > 0 { - for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func (x *JSONElement_Counter) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt } - return len(dAtA) - i, nil + return nil } -func (m *JSONElement_JSONArray) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_Counter) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } - return dAtA[:n], nil + return nil } -func (m *JSONElement_JSONArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type JSONElement_Tree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*TreeNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + CreatedAt *TimeTicket `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + MovedAt *TimeTicket `protobuf:"bytes,3,opt,name=moved_at,json=movedAt,proto3" json:"moved_at,omitempty"` + RemovedAt *TimeTicket `protobuf:"bytes,4,opt,name=removed_at,json=removedAt,proto3" json:"removed_at,omitempty"` } -func (m *JSONElement_JSONArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *JSONElement_Tree) Reset() { + *x = JSONElement_Tree{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Nodes) > 0 { - for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +} + +func (x *JSONElement_Tree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONElement_Tree) ProtoMessage() {} + +func (x *JSONElement_Tree) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) +} + +// Deprecated: Use JSONElement_Tree.ProtoReflect.Descriptor instead. +func (*JSONElement_Tree) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{6, 5} } -func (m *JSONElement_Primitive) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *JSONElement_Tree) GetNodes() []*TreeNode { + if x != nil { + return x.Nodes } - return dAtA[:n], nil + return nil } -func (m *JSONElement_Primitive) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *JSONElement_Tree) GetCreatedAt() *TimeTicket { + if x != nil { + return x.CreatedAt + } + return nil } -func (m *JSONElement_Primitive) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *JSONElement_Tree) GetMovedAt() *TimeTicket { + if x != nil { + return x.MovedAt } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintResources(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *JSONElement_Text) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONElement_Text) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONElement_Text) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Nodes) > 0 { - for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *JSONElement_Counter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONElement_Counter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONElement_Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintResources(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *JSONElement_Tree) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONElement_Tree) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONElement_Tree) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MovedAt != nil { - { - size, err := m.MovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Nodes) > 0 { - for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RHTNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RHTNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RHTNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Element != nil { - { - size, err := m.Element.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintResources(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RGANode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RGANode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RGANode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Element != nil { - { - size, err := m.Element.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Next != nil { - { - size, err := m.Next.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NodeAttr) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeAttr) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeAttr) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.UpdatedAt != nil { - { - size, err := m.UpdatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintResources(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TextNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TextNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TextNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.InsPrevId != nil { - { - size, err := m.InsPrevId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintResources(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TextNodeID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TextNodeID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TextNodeID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Offset != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x10 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreeNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x42 - } - } - if m.Depth != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Depth)) - i-- - dAtA[i] = 0x38 - } - if m.InsNextId != nil { - { - size, err := m.InsNextId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.InsPrevId != nil { - { - size, err := m.InsPrevId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.RemovedAt != nil { - { - size, err := m.RemovedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintResources(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintResources(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreeNodes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeNodes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeNodes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Content) > 0 { - for iNdEx := len(m.Content) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Content[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TreeNodeID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeNodeID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeNodeID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Offset != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x10 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreePos) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreePos) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreePos) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.LeftSiblingId != nil { - { - size, err := m.LeftSiblingId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ParentId != nil { - { - size, err := m.ParentId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *User) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *User) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintResources(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintResources(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Project) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Project) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Project) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.UpdatedAt != nil { - { - size, err := m.UpdatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.ClientDeactivateThreshold) > 0 { - i -= len(m.ClientDeactivateThreshold) - copy(dAtA[i:], m.ClientDeactivateThreshold) - i = encodeVarintResources(dAtA, i, uint64(len(m.ClientDeactivateThreshold))) - i-- - dAtA[i] = 0x3a - } - if len(m.AuthWebhookMethods) > 0 { - for iNdEx := len(m.AuthWebhookMethods) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AuthWebhookMethods[iNdEx]) - copy(dAtA[i:], m.AuthWebhookMethods[iNdEx]) - i = encodeVarintResources(dAtA, i, uint64(len(m.AuthWebhookMethods[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.AuthWebhookUrl) > 0 { - i -= len(m.AuthWebhookUrl) - copy(dAtA[i:], m.AuthWebhookUrl) - i = encodeVarintResources(dAtA, i, uint64(len(m.AuthWebhookUrl))) - i-- - dAtA[i] = 0x2a - } - if len(m.SecretKey) > 0 { - i -= len(m.SecretKey) - copy(dAtA[i:], m.SecretKey) - i = encodeVarintResources(dAtA, i, uint64(len(m.SecretKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintResources(dAtA, i, uint64(len(m.PublicKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintResources(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintResources(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UpdatableProjectFields) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdatableProjectFields) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdatableProjectFields) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ClientDeactivateThreshold != nil { - { - size, err := m.ClientDeactivateThreshold.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.AuthWebhookMethods != nil { - { - size, err := m.AuthWebhookMethods.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.AuthWebhookUrl != nil { - { - size, err := m.AuthWebhookUrl.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Name != nil { - { - size, err := m.Name.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UpdatableProjectFields_AuthWebhookMethods) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdatableProjectFields_AuthWebhookMethods) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdatableProjectFields_AuthWebhookMethods) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Methods) > 0 { - for iNdEx := len(m.Methods) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Methods[iNdEx]) - copy(dAtA[i:], m.Methods[iNdEx]) - i = encodeVarintResources(dAtA, i, uint64(len(m.Methods[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DocumentSummary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DocumentSummary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return nil } -func (m *DocumentSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.UpdatedAt != nil { - { - size, err := m.UpdatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.AccessedAt != nil { - { - size, err := m.AccessedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Snapshot) > 0 { - i -= len(m.Snapshot) - copy(dAtA[i:], m.Snapshot) - i = encodeVarintResources(dAtA, i, uint64(len(m.Snapshot))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintResources(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintResources(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PresenceChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PresenceChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PresenceChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Presence != nil { - { - size, err := m.Presence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Presence) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Presence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Presence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Data) > 0 { - for k := range m.Data { - v := m.Data[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintResources(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintResources(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintResources(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } +func (x *JSONElement_Tree) GetRemovedAt() *TimeTicket { + if x != nil { + return x.RemovedAt } - return len(dAtA) - i, nil + return nil } -func (m *Checkpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +type UpdatableProjectFields_AuthWebhookMethods struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + Methods []string `protobuf:"bytes,1,rep,name=methods,proto3" json:"methods,omitempty"` } -func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (x *UpdatableProjectFields_AuthWebhookMethods) Reset() { + *x = UpdatableProjectFields_AuthWebhookMethods{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_resources_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - if m.ClientSeq != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.ClientSeq)) - i-- - dAtA[i] = 0x10 - } - if m.ServerSeq != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.ServerSeq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil } -func (m *TextNodePos) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *UpdatableProjectFields_AuthWebhookMethods) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TextNodePos) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*UpdatableProjectFields_AuthWebhookMethods) ProtoMessage() {} -func (m *TextNodePos) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RelativeOffset != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.RelativeOffset)) - i-- - dAtA[i] = 0x18 - } - if m.Offset != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x10 - } - if m.CreatedAt != nil { - { - size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) +func (x *UpdatableProjectFields_AuthWebhookMethods) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_resources_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0xa + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *TimeTicket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// Deprecated: Use UpdatableProjectFields_AuthWebhookMethods.ProtoReflect.Descriptor instead. +func (*UpdatableProjectFields_AuthWebhookMethods) Descriptor() ([]byte, []int) { + return file_yorkie_v1_resources_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *UpdatableProjectFields_AuthWebhookMethods) GetMethods() []string { + if x != nil { + return x.Methods + } + return nil +} + +var File_yorkie_v1_resources_proto protoreflect.FileDescriptor + +var file_yorkie_v1_resources_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, + 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, + 0x12, 0x40, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x1a, 0x51, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x73, 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, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x91, 0x02, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x50, 0x61, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x5f, 0x73, + 0x79, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x53, 0x79, + 0x6e, 0x63, 0x65, 0x64, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, + 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x69, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x85, 0x01, + 0x0a, 0x08, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x0a, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x30, + 0x01, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x07, + 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x30, + 0x01, 0x52, 0x07, 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x84, 0x1e, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, + 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x64, 0x12, + 0x2f, 0x0a, 0x04, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x76, 0x65, + 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x48, 0x00, 0x52, + 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x64, 0x69, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x64, 0x69, 0x74, + 0x48, 0x00, 0x52, 0x04, 0x65, 0x64, 0x69, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, + 0x32, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x63, 0x72, + 0x65, 0x61, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, + 0x12, 0x3c, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x45, 0x64, + 0x69, 0x74, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x65, 0x65, 0x45, 0x64, 0x69, 0x74, 0x12, 0x3f, + 0x0a, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x48, 0x00, 0x52, 0x09, 0x74, 0x72, 0x65, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x1a, + 0xc6, 0x01, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x41, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a, 0x03, 0x41, 0x64, 0x64, + 0x12, 0x41, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, + 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xf6, + 0x01, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x70, 0x72, + 0x65, 0x76, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xb9, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x1a, 0xc2, 0x04, 0x0a, 0x04, 0x45, 0x64, 0x69, 0x74, 0x12, 0x41, 0x0a, 0x11, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x2a, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x6f, 0x73, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x26, 0x0a, 0x02, 0x74, + 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x73, 0x52, + 0x02, 0x74, 0x6f, 0x12, 0x68, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, 0x70, 0x42, 0x79, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x4d, 0x61, 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x49, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xd7, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x73, 0x52, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x12, 0x26, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x73, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x1a, 0xab, 0x04, 0x0a, 0x05, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x11, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x2a, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x6f, 0x73, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x26, 0x0a, 0x02, 0x74, + 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x73, 0x52, + 0x02, 0x74, 0x6f, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, + 0x79, 0x6c, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, + 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x69, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, + 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x5d, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, + 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0xb9, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x41, 0x0a, + 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xf1, 0x03, 0x0a, + 0x08, 0x54, 0x72, 0x65, 0x65, 0x45, 0x64, 0x69, 0x74, 0x12, 0x41, 0x0a, 0x11, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x50, 0x6f, 0x73, 0x52, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x22, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, + 0x65, 0x50, 0x6f, 0x73, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x6c, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x54, 0x72, 0x65, 0x65, 0x45, 0x64, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x4d, 0x61, 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, 0x70, 0x42, + 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x08, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x70, 0x6c, 0x69, + 0x74, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, + 0x70, 0x6c, 0x69, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x1a, 0x5d, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x61, + 0x70, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0xe1, 0x02, 0x0a, 0x09, 0x54, 0x72, 0x65, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x41, + 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x26, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, + 0x50, 0x6f, 0x73, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x22, 0x0a, 0x02, 0x74, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x50, 0x6f, 0x73, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x4e, 0x0a, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x74, 0x79, 0x6c, + 0x65, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x36, 0x0a, + 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xf1, 0x01, 0x0a, + 0x11, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0xa9, 0x0d, 0x0a, 0x0b, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x44, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4a, 0x53, + 0x4f, 0x4e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x61, + 0x72, 0x72, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, 0x09, + 0x6a, 0x73, 0x6f, 0x6e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x70, 0x72, 0x69, + 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x00, + 0x52, 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3a, + 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x72, + 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x1a, 0xd4, 0x01, + 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x48, 0x54, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x30, 0x0a, 0x08, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, + 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x41, 0x74, 0x1a, 0xd3, 0x01, 0x0a, 0x09, 0x4a, 0x53, 0x4f, 0x4e, 0x41, 0x72, 0x72, + 0x61, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x47, + 0x41, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xe9, 0x01, 0x0a, 0x09, 0x50, + 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x30, + 0x0a, 0x08, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xcf, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x12, + 0x29, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x1a, 0xe7, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0a, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x41, 0x74, 0x1a, 0xcf, 0x01, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x30, 0x0a, 0x08, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, + 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x41, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x4d, 0x0a, 0x07, + 0x52, 0x48, 0x54, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x07, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x07, 0x52, + 0x47, 0x41, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x47, 0x41, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x12, 0x30, + 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x56, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xcd, 0x02, 0x0a, 0x08, 0x54, 0x65, 0x78, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x5f, + 0x70, 0x72, 0x65, 0x76, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x44, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x50, 0x72, 0x65, 0x76, 0x49, 0x64, 0x12, + 0x43, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x1a, 0x52, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 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, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5a, 0x0a, 0x0a, 0x54, 0x65, 0x78, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x22, 0xae, 0x03, 0x0a, 0x08, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x25, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x5f, + 0x70, 0x72, 0x65, 0x76, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x44, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x50, 0x72, 0x65, 0x76, 0x49, 0x64, 0x12, + 0x35, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x09, 0x69, 0x6e, 0x73, + 0x4e, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x1a, 0x52, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 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, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, 0x09, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x22, 0x5a, 0x0a, 0x0a, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x12, + 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x7c, 0x0a, + 0x07, 0x54, 0x72, 0x65, 0x65, 0x50, 0x6f, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x44, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0f, + 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0d, 0x6c, 0x65, + 0x66, 0x74, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x04, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xfd, 0x02, 0x0a, 0x07, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x68, + 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x55, + 0x72, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x64, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x88, 0x03, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x68, 0x5f, + 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0e, 0x61, 0x75, 0x74, 0x68, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x12, + 0x66, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x73, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x5c, 0x0a, 0x1b, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x19, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x2e, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xea, 0x01, 0x0a, 0x0e, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x38, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x6d, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, 0x41, 0x4e, + 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, + 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x43, 0x4c, 0x45, 0x41, 0x52, 0x10, 0x03, 0x22, 0x76, 0x0a, 0x08, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x4e, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x21, 0x0a, + 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x02, 0x30, 0x01, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x71, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x71, 0x22, + 0x84, 0x01, 0x0a, 0x0b, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x73, 0x12, + 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x27, 0x0a, + 0x0f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x63, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x6c, 0x61, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x30, 0x01, 0x52, 0x07, 0x6c, 0x61, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x0c, 0x44, + 0x6f, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x08, + 0x44, 0x6f, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, + 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x2a, 0xd4, 0x02, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, + 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x55, 0x4c, + 0x4c, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, + 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, + 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x41, 0x4c, 0x55, + 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x12, + 0x15, 0x0a, 0x11, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, + 0x52, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, + 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x10, + 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x08, 0x12, 0x19, 0x0a, + 0x15, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, + 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x55, + 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x0a, 0x12, 0x1a, 0x0a, + 0x16, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x47, 0x45, 0x52, 0x5f, 0x43, 0x4e, 0x54, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x41, 0x4c, + 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x5f, 0x43, 0x4e, 0x54, + 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x54, 0x52, 0x45, 0x45, 0x10, 0x0d, 0x2a, 0xa6, 0x01, 0x0a, 0x0c, 0x44, 0x6f, 0x63, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x4f, 0x43, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, + 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, + 0x1f, 0x44, 0x4f, 0x43, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x57, 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x4f, 0x43, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, + 0x57, 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x4f, 0x43, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x55, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x03, + 0x42, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2d, 0x74, 0x65, 0x61, 0x6d, 0x2f, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -func (m *TimeTicket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var ( + file_yorkie_v1_resources_proto_rawDescOnce sync.Once + file_yorkie_v1_resources_proto_rawDescData = file_yorkie_v1_resources_proto_rawDesc +) -func (m *TimeTicket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ActorId) > 0 { - i -= len(m.ActorId) - copy(dAtA[i:], m.ActorId) - i = encodeVarintResources(dAtA, i, uint64(len(m.ActorId))) - i-- - dAtA[i] = 0x1a - } - if m.Delimiter != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Delimiter)) - i-- - dAtA[i] = 0x10 - } - if m.Lamport != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Lamport)) - i-- - dAtA[i] = 0x8 +func file_yorkie_v1_resources_proto_rawDescGZIP() []byte { + file_yorkie_v1_resources_proto_rawDescOnce.Do(func() { + file_yorkie_v1_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_yorkie_v1_resources_proto_rawDescData) + }) + return file_yorkie_v1_resources_proto_rawDescData +} + +var file_yorkie_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_yorkie_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 54) +var file_yorkie_v1_resources_proto_goTypes = []interface{}{ + (ValueType)(0), // 0: yorkie.v1.ValueType + (DocEventType)(0), // 1: yorkie.v1.DocEventType + (PresenceChange_ChangeType)(0), // 2: yorkie.v1.PresenceChange.ChangeType + (*Snapshot)(nil), // 3: yorkie.v1.Snapshot + (*ChangePack)(nil), // 4: yorkie.v1.ChangePack + (*Change)(nil), // 5: yorkie.v1.Change + (*ChangeID)(nil), // 6: yorkie.v1.ChangeID + (*Operation)(nil), // 7: yorkie.v1.Operation + (*JSONElementSimple)(nil), // 8: yorkie.v1.JSONElementSimple + (*JSONElement)(nil), // 9: yorkie.v1.JSONElement + (*RHTNode)(nil), // 10: yorkie.v1.RHTNode + (*RGANode)(nil), // 11: yorkie.v1.RGANode + (*NodeAttr)(nil), // 12: yorkie.v1.NodeAttr + (*TextNode)(nil), // 13: yorkie.v1.TextNode + (*TextNodeID)(nil), // 14: yorkie.v1.TextNodeID + (*TreeNode)(nil), // 15: yorkie.v1.TreeNode + (*TreeNodes)(nil), // 16: yorkie.v1.TreeNodes + (*TreeNodeID)(nil), // 17: yorkie.v1.TreeNodeID + (*TreePos)(nil), // 18: yorkie.v1.TreePos + (*User)(nil), // 19: yorkie.v1.User + (*Project)(nil), // 20: yorkie.v1.Project + (*UpdatableProjectFields)(nil), // 21: yorkie.v1.UpdatableProjectFields + (*DocumentSummary)(nil), // 22: yorkie.v1.DocumentSummary + (*PresenceChange)(nil), // 23: yorkie.v1.PresenceChange + (*Presence)(nil), // 24: yorkie.v1.Presence + (*Checkpoint)(nil), // 25: yorkie.v1.Checkpoint + (*TextNodePos)(nil), // 26: yorkie.v1.TextNodePos + (*TimeTicket)(nil), // 27: yorkie.v1.TimeTicket + (*DocEventBody)(nil), // 28: yorkie.v1.DocEventBody + (*DocEvent)(nil), // 29: yorkie.v1.DocEvent + nil, // 30: yorkie.v1.Snapshot.PresencesEntry + (*Operation_Set)(nil), // 31: yorkie.v1.Operation.Set + (*Operation_Add)(nil), // 32: yorkie.v1.Operation.Add + (*Operation_Move)(nil), // 33: yorkie.v1.Operation.Move + (*Operation_Remove)(nil), // 34: yorkie.v1.Operation.Remove + (*Operation_Edit)(nil), // 35: yorkie.v1.Operation.Edit + (*Operation_Select)(nil), // 36: yorkie.v1.Operation.Select + (*Operation_Style)(nil), // 37: yorkie.v1.Operation.Style + (*Operation_Increase)(nil), // 38: yorkie.v1.Operation.Increase + (*Operation_TreeEdit)(nil), // 39: yorkie.v1.Operation.TreeEdit + (*Operation_TreeStyle)(nil), // 40: yorkie.v1.Operation.TreeStyle + nil, // 41: yorkie.v1.Operation.Edit.CreatedAtMapByActorEntry + nil, // 42: yorkie.v1.Operation.Edit.AttributesEntry + nil, // 43: yorkie.v1.Operation.Style.AttributesEntry + nil, // 44: yorkie.v1.Operation.Style.CreatedAtMapByActorEntry + nil, // 45: yorkie.v1.Operation.TreeEdit.CreatedAtMapByActorEntry + nil, // 46: yorkie.v1.Operation.TreeStyle.AttributesEntry + (*JSONElement_JSONObject)(nil), // 47: yorkie.v1.JSONElement.JSONObject + (*JSONElement_JSONArray)(nil), // 48: yorkie.v1.JSONElement.JSONArray + (*JSONElement_Primitive)(nil), // 49: yorkie.v1.JSONElement.Primitive + (*JSONElement_Text)(nil), // 50: yorkie.v1.JSONElement.Text + (*JSONElement_Counter)(nil), // 51: yorkie.v1.JSONElement.Counter + (*JSONElement_Tree)(nil), // 52: yorkie.v1.JSONElement.Tree + nil, // 53: yorkie.v1.TextNode.AttributesEntry + nil, // 54: yorkie.v1.TreeNode.AttributesEntry + (*UpdatableProjectFields_AuthWebhookMethods)(nil), // 55: yorkie.v1.UpdatableProjectFields.AuthWebhookMethods + nil, // 56: yorkie.v1.Presence.DataEntry + (*timestamppb.Timestamp)(nil), // 57: google.protobuf.Timestamp + (*wrapperspb.StringValue)(nil), // 58: google.protobuf.StringValue +} +var file_yorkie_v1_resources_proto_depIdxs = []int32{ + 9, // 0: yorkie.v1.Snapshot.root:type_name -> yorkie.v1.JSONElement + 30, // 1: yorkie.v1.Snapshot.presences:type_name -> yorkie.v1.Snapshot.PresencesEntry + 25, // 2: yorkie.v1.ChangePack.checkpoint:type_name -> yorkie.v1.Checkpoint + 5, // 3: yorkie.v1.ChangePack.changes:type_name -> yorkie.v1.Change + 27, // 4: yorkie.v1.ChangePack.min_synced_ticket:type_name -> yorkie.v1.TimeTicket + 6, // 5: yorkie.v1.Change.id:type_name -> yorkie.v1.ChangeID + 7, // 6: yorkie.v1.Change.operations:type_name -> yorkie.v1.Operation + 23, // 7: yorkie.v1.Change.presence_change:type_name -> yorkie.v1.PresenceChange + 31, // 8: yorkie.v1.Operation.set:type_name -> yorkie.v1.Operation.Set + 32, // 9: yorkie.v1.Operation.add:type_name -> yorkie.v1.Operation.Add + 33, // 10: yorkie.v1.Operation.move:type_name -> yorkie.v1.Operation.Move + 34, // 11: yorkie.v1.Operation.remove:type_name -> yorkie.v1.Operation.Remove + 35, // 12: yorkie.v1.Operation.edit:type_name -> yorkie.v1.Operation.Edit + 36, // 13: yorkie.v1.Operation.select:type_name -> yorkie.v1.Operation.Select + 37, // 14: yorkie.v1.Operation.style:type_name -> yorkie.v1.Operation.Style + 38, // 15: yorkie.v1.Operation.increase:type_name -> yorkie.v1.Operation.Increase + 39, // 16: yorkie.v1.Operation.tree_edit:type_name -> yorkie.v1.Operation.TreeEdit + 40, // 17: yorkie.v1.Operation.tree_style:type_name -> yorkie.v1.Operation.TreeStyle + 27, // 18: yorkie.v1.JSONElementSimple.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 19: yorkie.v1.JSONElementSimple.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 20: yorkie.v1.JSONElementSimple.removed_at:type_name -> yorkie.v1.TimeTicket + 0, // 21: yorkie.v1.JSONElementSimple.type:type_name -> yorkie.v1.ValueType + 47, // 22: yorkie.v1.JSONElement.json_object:type_name -> yorkie.v1.JSONElement.JSONObject + 48, // 23: yorkie.v1.JSONElement.json_array:type_name -> yorkie.v1.JSONElement.JSONArray + 49, // 24: yorkie.v1.JSONElement.primitive:type_name -> yorkie.v1.JSONElement.Primitive + 50, // 25: yorkie.v1.JSONElement.text:type_name -> yorkie.v1.JSONElement.Text + 51, // 26: yorkie.v1.JSONElement.counter:type_name -> yorkie.v1.JSONElement.Counter + 52, // 27: yorkie.v1.JSONElement.tree:type_name -> yorkie.v1.JSONElement.Tree + 9, // 28: yorkie.v1.RHTNode.element:type_name -> yorkie.v1.JSONElement + 11, // 29: yorkie.v1.RGANode.next:type_name -> yorkie.v1.RGANode + 9, // 30: yorkie.v1.RGANode.element:type_name -> yorkie.v1.JSONElement + 27, // 31: yorkie.v1.NodeAttr.updated_at:type_name -> yorkie.v1.TimeTicket + 14, // 32: yorkie.v1.TextNode.id:type_name -> yorkie.v1.TextNodeID + 27, // 33: yorkie.v1.TextNode.removed_at:type_name -> yorkie.v1.TimeTicket + 14, // 34: yorkie.v1.TextNode.ins_prev_id:type_name -> yorkie.v1.TextNodeID + 53, // 35: yorkie.v1.TextNode.attributes:type_name -> yorkie.v1.TextNode.AttributesEntry + 27, // 36: yorkie.v1.TextNodeID.created_at:type_name -> yorkie.v1.TimeTicket + 17, // 37: yorkie.v1.TreeNode.id:type_name -> yorkie.v1.TreeNodeID + 27, // 38: yorkie.v1.TreeNode.removed_at:type_name -> yorkie.v1.TimeTicket + 17, // 39: yorkie.v1.TreeNode.ins_prev_id:type_name -> yorkie.v1.TreeNodeID + 17, // 40: yorkie.v1.TreeNode.ins_next_id:type_name -> yorkie.v1.TreeNodeID + 54, // 41: yorkie.v1.TreeNode.attributes:type_name -> yorkie.v1.TreeNode.AttributesEntry + 15, // 42: yorkie.v1.TreeNodes.content:type_name -> yorkie.v1.TreeNode + 27, // 43: yorkie.v1.TreeNodeID.created_at:type_name -> yorkie.v1.TimeTicket + 17, // 44: yorkie.v1.TreePos.parent_id:type_name -> yorkie.v1.TreeNodeID + 17, // 45: yorkie.v1.TreePos.left_sibling_id:type_name -> yorkie.v1.TreeNodeID + 57, // 46: yorkie.v1.User.created_at:type_name -> google.protobuf.Timestamp + 57, // 47: yorkie.v1.Project.created_at:type_name -> google.protobuf.Timestamp + 57, // 48: yorkie.v1.Project.updated_at:type_name -> google.protobuf.Timestamp + 58, // 49: yorkie.v1.UpdatableProjectFields.name:type_name -> google.protobuf.StringValue + 58, // 50: yorkie.v1.UpdatableProjectFields.auth_webhook_url:type_name -> google.protobuf.StringValue + 55, // 51: yorkie.v1.UpdatableProjectFields.auth_webhook_methods:type_name -> yorkie.v1.UpdatableProjectFields.AuthWebhookMethods + 58, // 52: yorkie.v1.UpdatableProjectFields.client_deactivate_threshold:type_name -> google.protobuf.StringValue + 57, // 53: yorkie.v1.DocumentSummary.created_at:type_name -> google.protobuf.Timestamp + 57, // 54: yorkie.v1.DocumentSummary.accessed_at:type_name -> google.protobuf.Timestamp + 57, // 55: yorkie.v1.DocumentSummary.updated_at:type_name -> google.protobuf.Timestamp + 2, // 56: yorkie.v1.PresenceChange.type:type_name -> yorkie.v1.PresenceChange.ChangeType + 24, // 57: yorkie.v1.PresenceChange.presence:type_name -> yorkie.v1.Presence + 56, // 58: yorkie.v1.Presence.data:type_name -> yorkie.v1.Presence.DataEntry + 27, // 59: yorkie.v1.TextNodePos.created_at:type_name -> yorkie.v1.TimeTicket + 1, // 60: yorkie.v1.DocEvent.type:type_name -> yorkie.v1.DocEventType + 28, // 61: yorkie.v1.DocEvent.body:type_name -> yorkie.v1.DocEventBody + 24, // 62: yorkie.v1.Snapshot.PresencesEntry.value:type_name -> yorkie.v1.Presence + 27, // 63: yorkie.v1.Operation.Set.parent_created_at:type_name -> yorkie.v1.TimeTicket + 8, // 64: yorkie.v1.Operation.Set.value:type_name -> yorkie.v1.JSONElementSimple + 27, // 65: yorkie.v1.Operation.Set.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 66: yorkie.v1.Operation.Add.parent_created_at:type_name -> yorkie.v1.TimeTicket + 27, // 67: yorkie.v1.Operation.Add.prev_created_at:type_name -> yorkie.v1.TimeTicket + 8, // 68: yorkie.v1.Operation.Add.value:type_name -> yorkie.v1.JSONElementSimple + 27, // 69: yorkie.v1.Operation.Add.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 70: yorkie.v1.Operation.Move.parent_created_at:type_name -> yorkie.v1.TimeTicket + 27, // 71: yorkie.v1.Operation.Move.prev_created_at:type_name -> yorkie.v1.TimeTicket + 27, // 72: yorkie.v1.Operation.Move.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 73: yorkie.v1.Operation.Move.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 74: yorkie.v1.Operation.Remove.parent_created_at:type_name -> yorkie.v1.TimeTicket + 27, // 75: yorkie.v1.Operation.Remove.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 76: yorkie.v1.Operation.Remove.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 77: yorkie.v1.Operation.Edit.parent_created_at:type_name -> yorkie.v1.TimeTicket + 26, // 78: yorkie.v1.Operation.Edit.from:type_name -> yorkie.v1.TextNodePos + 26, // 79: yorkie.v1.Operation.Edit.to:type_name -> yorkie.v1.TextNodePos + 41, // 80: yorkie.v1.Operation.Edit.created_at_map_by_actor:type_name -> yorkie.v1.Operation.Edit.CreatedAtMapByActorEntry + 27, // 81: yorkie.v1.Operation.Edit.executed_at:type_name -> yorkie.v1.TimeTicket + 42, // 82: yorkie.v1.Operation.Edit.attributes:type_name -> yorkie.v1.Operation.Edit.AttributesEntry + 27, // 83: yorkie.v1.Operation.Select.parent_created_at:type_name -> yorkie.v1.TimeTicket + 26, // 84: yorkie.v1.Operation.Select.from:type_name -> yorkie.v1.TextNodePos + 26, // 85: yorkie.v1.Operation.Select.to:type_name -> yorkie.v1.TextNodePos + 27, // 86: yorkie.v1.Operation.Select.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 87: yorkie.v1.Operation.Style.parent_created_at:type_name -> yorkie.v1.TimeTicket + 26, // 88: yorkie.v1.Operation.Style.from:type_name -> yorkie.v1.TextNodePos + 26, // 89: yorkie.v1.Operation.Style.to:type_name -> yorkie.v1.TextNodePos + 43, // 90: yorkie.v1.Operation.Style.attributes:type_name -> yorkie.v1.Operation.Style.AttributesEntry + 27, // 91: yorkie.v1.Operation.Style.executed_at:type_name -> yorkie.v1.TimeTicket + 44, // 92: yorkie.v1.Operation.Style.created_at_map_by_actor:type_name -> yorkie.v1.Operation.Style.CreatedAtMapByActorEntry + 27, // 93: yorkie.v1.Operation.Increase.parent_created_at:type_name -> yorkie.v1.TimeTicket + 8, // 94: yorkie.v1.Operation.Increase.value:type_name -> yorkie.v1.JSONElementSimple + 27, // 95: yorkie.v1.Operation.Increase.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 96: yorkie.v1.Operation.TreeEdit.parent_created_at:type_name -> yorkie.v1.TimeTicket + 18, // 97: yorkie.v1.Operation.TreeEdit.from:type_name -> yorkie.v1.TreePos + 18, // 98: yorkie.v1.Operation.TreeEdit.to:type_name -> yorkie.v1.TreePos + 45, // 99: yorkie.v1.Operation.TreeEdit.created_at_map_by_actor:type_name -> yorkie.v1.Operation.TreeEdit.CreatedAtMapByActorEntry + 16, // 100: yorkie.v1.Operation.TreeEdit.contents:type_name -> yorkie.v1.TreeNodes + 27, // 101: yorkie.v1.Operation.TreeEdit.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 102: yorkie.v1.Operation.TreeStyle.parent_created_at:type_name -> yorkie.v1.TimeTicket + 18, // 103: yorkie.v1.Operation.TreeStyle.from:type_name -> yorkie.v1.TreePos + 18, // 104: yorkie.v1.Operation.TreeStyle.to:type_name -> yorkie.v1.TreePos + 46, // 105: yorkie.v1.Operation.TreeStyle.attributes:type_name -> yorkie.v1.Operation.TreeStyle.AttributesEntry + 27, // 106: yorkie.v1.Operation.TreeStyle.executed_at:type_name -> yorkie.v1.TimeTicket + 27, // 107: yorkie.v1.Operation.Edit.CreatedAtMapByActorEntry.value:type_name -> yorkie.v1.TimeTicket + 27, // 108: yorkie.v1.Operation.Style.CreatedAtMapByActorEntry.value:type_name -> yorkie.v1.TimeTicket + 27, // 109: yorkie.v1.Operation.TreeEdit.CreatedAtMapByActorEntry.value:type_name -> yorkie.v1.TimeTicket + 10, // 110: yorkie.v1.JSONElement.JSONObject.nodes:type_name -> yorkie.v1.RHTNode + 27, // 111: yorkie.v1.JSONElement.JSONObject.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 112: yorkie.v1.JSONElement.JSONObject.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 113: yorkie.v1.JSONElement.JSONObject.removed_at:type_name -> yorkie.v1.TimeTicket + 11, // 114: yorkie.v1.JSONElement.JSONArray.nodes:type_name -> yorkie.v1.RGANode + 27, // 115: yorkie.v1.JSONElement.JSONArray.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 116: yorkie.v1.JSONElement.JSONArray.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 117: yorkie.v1.JSONElement.JSONArray.removed_at:type_name -> yorkie.v1.TimeTicket + 0, // 118: yorkie.v1.JSONElement.Primitive.type:type_name -> yorkie.v1.ValueType + 27, // 119: yorkie.v1.JSONElement.Primitive.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 120: yorkie.v1.JSONElement.Primitive.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 121: yorkie.v1.JSONElement.Primitive.removed_at:type_name -> yorkie.v1.TimeTicket + 13, // 122: yorkie.v1.JSONElement.Text.nodes:type_name -> yorkie.v1.TextNode + 27, // 123: yorkie.v1.JSONElement.Text.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 124: yorkie.v1.JSONElement.Text.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 125: yorkie.v1.JSONElement.Text.removed_at:type_name -> yorkie.v1.TimeTicket + 0, // 126: yorkie.v1.JSONElement.Counter.type:type_name -> yorkie.v1.ValueType + 27, // 127: yorkie.v1.JSONElement.Counter.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 128: yorkie.v1.JSONElement.Counter.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 129: yorkie.v1.JSONElement.Counter.removed_at:type_name -> yorkie.v1.TimeTicket + 15, // 130: yorkie.v1.JSONElement.Tree.nodes:type_name -> yorkie.v1.TreeNode + 27, // 131: yorkie.v1.JSONElement.Tree.created_at:type_name -> yorkie.v1.TimeTicket + 27, // 132: yorkie.v1.JSONElement.Tree.moved_at:type_name -> yorkie.v1.TimeTicket + 27, // 133: yorkie.v1.JSONElement.Tree.removed_at:type_name -> yorkie.v1.TimeTicket + 12, // 134: yorkie.v1.TextNode.AttributesEntry.value:type_name -> yorkie.v1.NodeAttr + 12, // 135: yorkie.v1.TreeNode.AttributesEntry.value:type_name -> yorkie.v1.NodeAttr + 136, // [136:136] is the sub-list for method output_type + 136, // [136:136] is the sub-list for method input_type + 136, // [136:136] is the sub-list for extension type_name + 136, // [136:136] is the sub-list for extension extendee + 0, // [0:136] is the sub-list for field type_name +} + +func init() { file_yorkie_v1_resources_proto_init() } +func file_yorkie_v1_resources_proto_init() { + if File_yorkie_v1_resources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_yorkie_v1_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Snapshot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangePack); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Change); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElementSimple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RHTNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RGANode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeAttr); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextNodeID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TreeNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TreeNodes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TreeNodeID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TreePos); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Project); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatableProjectFields); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DocumentSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PresenceChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Presence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Checkpoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextNodePos); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeTicket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DocEventBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DocEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Set); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Add); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Move); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Remove); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Edit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Select); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Style); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_Increase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_TreeEdit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation_TreeStyle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement_JSONObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement_JSONArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement_Primitive); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement_Text); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement_Counter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONElement_Tree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_resources_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatableProjectFields_AuthWebhookMethods); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_yorkie_v1_resources_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*Operation_Set_)(nil), + (*Operation_Add_)(nil), + (*Operation_Move_)(nil), + (*Operation_Remove_)(nil), + (*Operation_Edit_)(nil), + (*Operation_Select_)(nil), + (*Operation_Style_)(nil), + (*Operation_Increase_)(nil), + (*Operation_TreeEdit_)(nil), + (*Operation_TreeStyle_)(nil), } - return len(dAtA) - i, nil -} - -func (m *DocEventBody) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + file_yorkie_v1_resources_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*JSONElement_JsonObject)(nil), + (*JSONElement_JsonArray)(nil), + (*JSONElement_Primitive_)(nil), + (*JSONElement_Text_)(nil), + (*JSONElement_Counter_)(nil), + (*JSONElement_Tree_)(nil), } - return dAtA[:n], nil + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_yorkie_v1_resources_proto_rawDesc, + NumEnums: 3, + NumMessages: 54, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_yorkie_v1_resources_proto_goTypes, + DependencyIndexes: file_yorkie_v1_resources_proto_depIdxs, + EnumInfos: file_yorkie_v1_resources_proto_enumTypes, + MessageInfos: file_yorkie_v1_resources_proto_msgTypes, + }.Build() + File_yorkie_v1_resources_proto = out.File + file_yorkie_v1_resources_proto_rawDesc = nil + file_yorkie_v1_resources_proto_goTypes = nil + file_yorkie_v1_resources_proto_depIdxs = nil } - -func (m *DocEventBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DocEventBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintResources(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if len(m.Topic) > 0 { - i -= len(m.Topic) - copy(dAtA[i:], m.Topic) - i = encodeVarintResources(dAtA, i, uint64(len(m.Topic))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DocEvent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DocEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DocEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Publisher) > 0 { - i -= len(m.Publisher) - copy(dAtA[i:], m.Publisher) - i = encodeVarintResources(dAtA, i, uint64(len(m.Publisher))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintResources(dAtA []byte, offset int, v uint64) int { - offset -= sovResources(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Snapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Root != nil { - l = m.Root.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Presences) > 0 { - for k, v := range m.Presences { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovResources(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + l - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChangePack) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DocumentKey) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.Checkpoint != nil { - l = m.Checkpoint.Size() - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Snapshot) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.MinSyncedTicket != nil { - l = m.MinSyncedTicket.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.IsRemoved { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Change) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Operations) > 0 { - for _, e := range m.Operations { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.PresenceChange != nil { - l = m.PresenceChange.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChangeID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClientSeq != 0 { - n += 1 + sovResources(uint64(m.ClientSeq)) - } - if m.ServerSeq != 0 { - n += 1 + sovResources(uint64(m.ServerSeq)) - } - if m.Lamport != 0 { - n += 1 + sovResources(uint64(m.Lamport)) - } - l = len(m.ActorId) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - n += m.Body.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Set_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Set != nil { - l = m.Set.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Add_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Add != nil { - l = m.Add.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Move_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Move != nil { - l = m.Move.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Remove_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Remove != nil { - l = m.Remove.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Edit_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Edit != nil { - l = m.Edit.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Select_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Select != nil { - l = m.Select.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Style_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Style != nil { - l = m.Style.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Increase_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Increase != nil { - l = m.Increase.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_TreeEdit_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TreeEdit != nil { - l = m.TreeEdit.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_TreeStyle_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TreeStyle != nil { - l = m.TreeStyle.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *Operation_Set) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Add) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.PrevCreatedAt != nil { - l = m.PrevCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Move) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.PrevCreatedAt != nil { - l = m.PrevCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Remove) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Edit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.CreatedAtMapByActor) > 0 { - for k, v := range m.CreatedAtMapByActor { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovResources(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + l - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - l = len(m.Content) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + 1 + len(v) + sovResources(uint64(len(v))) - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Select) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Style) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + 1 + len(v) + sovResources(uint64(len(v))) - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.CreatedAtMapByActor) > 0 { - for k, v := range m.CreatedAtMapByActor { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovResources(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + l - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Increase) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_TreeEdit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.CreatedAtMapByActor) > 0 { - for k, v := range m.CreatedAtMapByActor { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovResources(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + l - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if len(m.Contents) > 0 { - for _, e := range m.Contents { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.SplitLevel != 0 { - n += 1 + sovResources(uint64(m.SplitLevel)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_TreeStyle) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentCreatedAt != nil { - l = m.ParentCreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + 1 + len(v) + sovResources(uint64(len(v))) - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.ExecutedAt != nil { - l = m.ExecutedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElementSimple) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovResources(uint64(m.Type)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - n += m.Body.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement_JsonObject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.JsonObject != nil { - l = m.JsonObject.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *JSONElement_JsonArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.JsonArray != nil { - l = m.JsonArray.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *JSONElement_Primitive_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Primitive != nil { - l = m.Primitive.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *JSONElement_Text_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Text != nil { - l = m.Text.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *JSONElement_Counter_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Counter != nil { - l = m.Counter.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *JSONElement_Tree_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tree != nil { - l = m.Tree.Size() - n += 1 + l + sovResources(uint64(l)) - } - return n -} -func (m *JSONElement_JSONObject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Nodes) > 0 { - for _, e := range m.Nodes { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement_JSONArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Nodes) > 0 { - for _, e := range m.Nodes { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement_Primitive) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovResources(uint64(m.Type)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement_Text) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Nodes) > 0 { - for _, e := range m.Nodes { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement_Counter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovResources(uint64(m.Type)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *JSONElement_Tree) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Nodes) > 0 { - for _, e := range m.Nodes { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.MovedAt != nil { - l = m.MovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RHTNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.Element != nil { - l = m.Element.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RGANode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Next != nil { - l = m.Next.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Element != nil { - l = m.Element.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NodeAttr) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.UpdatedAt != nil { - l = m.UpdatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TextNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.InsPrevId != nil { - l = m.InsPrevId.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovResources(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + l - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TextNodeID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Offset != 0 { - n += 1 + sovResources(uint64(m.Offset)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TreeNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.RemovedAt != nil { - l = m.RemovedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.InsPrevId != nil { - l = m.InsPrevId.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.InsNextId != nil { - l = m.InsNextId.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Depth != 0 { - n += 1 + sovResources(uint64(m.Depth)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovResources(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + l - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TreeNodes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Content) > 0 { - for _, e := range m.Content { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TreeNodeID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Offset != 0 { - n += 1 + sovResources(uint64(m.Offset)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TreePos) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentId != nil { - l = m.ParentId.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.LeftSiblingId != nil { - l = m.LeftSiblingId.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *User) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Project) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.SecretKey) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.AuthWebhookUrl) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if len(m.AuthWebhookMethods) > 0 { - for _, s := range m.AuthWebhookMethods { - l = len(s) - n += 1 + l + sovResources(uint64(l)) - } - } - l = len(m.ClientDeactivateThreshold) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.UpdatedAt != nil { - l = m.UpdatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdatableProjectFields) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Name != nil { - l = m.Name.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.AuthWebhookUrl != nil { - l = m.AuthWebhookUrl.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.AuthWebhookMethods != nil { - l = m.AuthWebhookMethods.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.ClientDeactivateThreshold != nil { - l = m.ClientDeactivateThreshold.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdatableProjectFields_AuthWebhookMethods) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Methods) > 0 { - for _, s := range m.Methods { - l = len(s) - n += 1 + l + sovResources(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DocumentSummary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Snapshot) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.AccessedAt != nil { - l = m.AccessedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.UpdatedAt != nil { - l = m.UpdatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PresenceChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovResources(uint64(m.Type)) - } - if m.Presence != nil { - l = m.Presence.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Presence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Data) > 0 { - for k, v := range m.Data { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovResources(uint64(len(k))) + 1 + len(v) + sovResources(uint64(len(v))) - n += mapEntrySize + 1 + sovResources(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Checkpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ServerSeq != 0 { - n += 1 + sovResources(uint64(m.ServerSeq)) - } - if m.ClientSeq != 0 { - n += 1 + sovResources(uint64(m.ClientSeq)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TextNodePos) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreatedAt != nil { - l = m.CreatedAt.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Offset != 0 { - n += 1 + sovResources(uint64(m.Offset)) - } - if m.RelativeOffset != 0 { - n += 1 + sovResources(uint64(m.RelativeOffset)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TimeTicket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Lamport != 0 { - n += 1 + sovResources(uint64(m.Lamport)) - } - if m.Delimiter != 0 { - n += 1 + sovResources(uint64(m.Delimiter)) - } - l = len(m.ActorId) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DocEventBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Topic) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DocEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovResources(uint64(m.Type)) - } - l = len(m.Publisher) - if l > 0 { - n += 1 + l + sovResources(uint64(l)) - } - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovResources(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResources(x uint64) (n int) { - return sovResources(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Snapshot) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Root == nil { - m.Root = &JSONElement{} - } - if err := m.Root.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Presences", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Presences == nil { - m.Presences = make(map[string]*Presence) - } - var mapkey string - var mapvalue *Presence - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthResources - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthResources - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Presence{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Presences[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChangePack) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChangePack: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChangePack: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Checkpoint == nil { - m.Checkpoint = &Checkpoint{} - } - if err := m.Checkpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Snapshot = append(m.Snapshot[:0], dAtA[iNdEx:postIndex]...) - if m.Snapshot == nil { - m.Snapshot = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &Change{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSyncedTicket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinSyncedTicket == nil { - m.MinSyncedTicket = &TimeTicket{} - } - if err := m.MinSyncedTicket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsRemoved", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsRemoved = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Change) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Change: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Change: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &ChangeID{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operations = append(m.Operations, &Operation{}) - if err := m.Operations[len(m.Operations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PresenceChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PresenceChange == nil { - m.PresenceChange = &PresenceChange{} - } - if err := m.PresenceChange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChangeID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChangeID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChangeID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientSeq", wireType) - } - m.ClientSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClientSeq |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerSeq", wireType) - } - m.ServerSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ServerSeq |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lamport", wireType) - } - m.Lamport = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lamport |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActorId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActorId = append(m.ActorId[:0], dAtA[iNdEx:postIndex]...) - if m.ActorId == nil { - m.ActorId = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Operation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Set{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Set_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Add", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Add{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Add_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Move", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Move{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Move_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Remove", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Remove{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Remove_{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Edit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Edit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Edit_{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Select", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Select{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Select_{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Style{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Style_{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Increase", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_Increase{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_Increase_{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeEdit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_TreeEdit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_TreeEdit_{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeStyle", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Operation_TreeStyle{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &Operation_TreeStyle_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Set) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Set: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Set: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &JSONElementSimple{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Add) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Add: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Add: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrevCreatedAt == nil { - m.PrevCreatedAt = &TimeTicket{} - } - if err := m.PrevCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &JSONElementSimple{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Move) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Move: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Move: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrevCreatedAt == nil { - m.PrevCreatedAt = &TimeTicket{} - } - if err := m.PrevCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Remove) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Remove: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Remove: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Edit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Edit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Edit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &TextNodePos{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &TextNodePos{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAtMapByActor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAtMapByActor == nil { - m.CreatedAtMapByActor = make(map[string]*TimeTicket) - } - var mapkey string - var mapvalue *TimeTicket - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthResources - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthResources - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &TimeTicket{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.CreatedAtMapByActor[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Content = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Select) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Select: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Select: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &TextNodePos{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &TextNodePos{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Style) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Style: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Style: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &TextNodePos{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &TextNodePos{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAtMapByActor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAtMapByActor == nil { - m.CreatedAtMapByActor = make(map[string]*TimeTicket) - } - var mapkey string - var mapvalue *TimeTicket - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthResources - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthResources - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &TimeTicket{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.CreatedAtMapByActor[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_Increase) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Increase: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Increase: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &JSONElementSimple{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_TreeEdit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeEdit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeEdit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &TreePos{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &TreePos{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAtMapByActor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAtMapByActor == nil { - m.CreatedAtMapByActor = make(map[string]*TimeTicket) - } - var mapkey string - var mapvalue *TimeTicket - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthResources - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthResources - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &TimeTicket{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.CreatedAtMapByActor[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contents = append(m.Contents, &TreeNodes{}) - if err := m.Contents[len(m.Contents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SplitLevel", wireType) - } - m.SplitLevel = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SplitLevel |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation_TreeStyle) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeStyle: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeStyle: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentCreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentCreatedAt == nil { - m.ParentCreatedAt = &TimeTicket{} - } - if err := m.ParentCreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &TreePos{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &TreePos{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutedAt == nil { - m.ExecutedAt = &TimeTicket{} - } - if err := m.ExecutedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElementSimple) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONElementSimple: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONElementSimple: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= ValueType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONElement: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONElement: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonObject", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &JSONElement_JSONObject{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &JSONElement_JsonObject{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonArray", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &JSONElement_JSONArray{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &JSONElement_JsonArray{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Primitive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &JSONElement_Primitive{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &JSONElement_Primitive_{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &JSONElement_Text{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &JSONElement_Text_{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &JSONElement_Counter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &JSONElement_Counter_{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &JSONElement_Tree{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &JSONElement_Tree_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement_JSONObject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONObject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONObject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nodes = append(m.Nodes, &RHTNode{}) - if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement_JSONArray) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nodes = append(m.Nodes, &RGANode{}) - if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement_Primitive) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Primitive: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Primitive: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= ValueType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement_Text) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Text: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Text: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nodes = append(m.Nodes, &TextNode{}) - if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement_Counter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Counter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= ValueType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONElement_Tree) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nodes = append(m.Nodes, &TreeNode{}) - if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MovedAt == nil { - m.MovedAt = &TimeTicket{} - } - if err := m.MovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RHTNode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RHTNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RHTNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Element", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Element == nil { - m.Element = &JSONElement{} - } - if err := m.Element.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RGANode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RGANode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RGANode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Next", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Next == nil { - m.Next = &RGANode{} - } - if err := m.Next.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Element", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Element == nil { - m.Element = &JSONElement{} - } - if err := m.Element.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeAttr) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeAttr: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeAttr: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpdatedAt == nil { - m.UpdatedAt = &TimeTicket{} - } - if err := m.UpdatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TextNode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TextNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TextNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &TextNodeID{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsPrevId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InsPrevId == nil { - m.InsPrevId = &TextNodeID{} - } - if err := m.InsPrevId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]*NodeAttr) - } - var mapkey string - var mapvalue *NodeAttr - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthResources - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthResources - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &NodeAttr{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TextNodeID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TextNodeID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TextNodeID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeNode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &TreeNodeID{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RemovedAt == nil { - m.RemovedAt = &TimeTicket{} - } - if err := m.RemovedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsPrevId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InsPrevId == nil { - m.InsPrevId = &TreeNodeID{} - } - if err := m.InsPrevId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsNextId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InsNextId == nil { - m.InsNextId = &TreeNodeID{} - } - if err := m.InsNextId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Depth", wireType) - } - m.Depth = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Depth |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]*NodeAttr) - } - var mapkey string - var mapvalue *NodeAttr - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthResources - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthResources - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &NodeAttr{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeNodes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeNodes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeNodes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Content = append(m.Content, &TreeNode{}) - if err := m.Content[len(m.Content)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeNodeID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeNodeID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeNodeID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreePos) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreePos: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreePos: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentId == nil { - m.ParentId = &TreeNodeID{} - } - if err := m.ParentId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeftSiblingId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LeftSiblingId == nil { - m.LeftSiblingId = &TreeNodeID{} - } - if err := m.LeftSiblingId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *User) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: User: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &types.Timestamp{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Project) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Project: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Project: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SecretKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthWebhookUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthWebhookUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthWebhookMethods", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthWebhookMethods = append(m.AuthWebhookMethods, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientDeactivateThreshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientDeactivateThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &types.Timestamp{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpdatedAt == nil { - m.UpdatedAt = &types.Timestamp{} - } - if err := m.UpdatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdatableProjectFields) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdatableProjectFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdatableProjectFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Name == nil { - m.Name = &types.StringValue{} - } - if err := m.Name.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthWebhookUrl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthWebhookUrl == nil { - m.AuthWebhookUrl = &types.StringValue{} - } - if err := m.AuthWebhookUrl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthWebhookMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthWebhookMethods == nil { - m.AuthWebhookMethods = &UpdatableProjectFields_AuthWebhookMethods{} - } - if err := m.AuthWebhookMethods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientDeactivateThreshold", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientDeactivateThreshold == nil { - m.ClientDeactivateThreshold = &types.StringValue{} - } - if err := m.ClientDeactivateThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdatableProjectFields_AuthWebhookMethods) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthWebhookMethods: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthWebhookMethods: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Methods = append(m.Methods, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DocumentSummary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DocumentSummary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DocumentSummary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Snapshot = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &types.Timestamp{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AccessedAt == nil { - m.AccessedAt = &types.Timestamp{} - } - if err := m.AccessedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpdatedAt == nil { - m.UpdatedAt = &types.Timestamp{} - } - if err := m.UpdatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PresenceChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PresenceChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PresenceChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= PresenceChange_ChangeType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Presence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Presence == nil { - m.Presence = &Presence{} - } - if err := m.Presence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Presence) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Presence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Presence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthResources - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthResources - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Data[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Checkpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Checkpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Checkpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerSeq", wireType) - } - m.ServerSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ServerSeq |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientSeq", wireType) - } - m.ClientSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClientSeq |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TextNodePos) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TextNodePos: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TextNodePos: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreatedAt == nil { - m.CreatedAt = &TimeTicket{} - } - if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RelativeOffset", wireType) - } - m.RelativeOffset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RelativeOffset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimeTicket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeTicket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeTicket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lamport", wireType) - } - m.Lamport = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lamport |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delimiter", wireType) - } - m.Delimiter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Delimiter |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActorId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActorId = append(m.ActorId[:0], dAtA[iNdEx:postIndex]...) - if m.ActorId == nil { - m.ActorId = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DocEventBody) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DocEventBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DocEventBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Topic = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DocEvent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DocEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DocEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= DocEventType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Publisher", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Publisher = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &DocEventBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResources(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResources - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResources - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResources - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthResources - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResources - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResources - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResources = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResources = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResources = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/yorkie/v1/yorkie.pb.go b/api/yorkie/v1/yorkie.pb.go index 9c8c4b4c6..0a49dba9f 100644 --- a/api/yorkie/v1/yorkie.pb.go +++ b/api/yorkie/v1/yorkie.pb.go @@ -1,553 +1,546 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// +// Copyright 2020 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: yorkie/v1/yorkie.proto package v1 import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 ActivateClientRequest struct { - ClientKey string `protobuf:"bytes,1,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientKey string `protobuf:"bytes,1,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` } -func (m *ActivateClientRequest) Reset() { *m = ActivateClientRequest{} } -func (m *ActivateClientRequest) String() string { return proto.CompactTextString(m) } -func (*ActivateClientRequest) ProtoMessage() {} -func (*ActivateClientRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{0} +func (x *ActivateClientRequest) Reset() { + *x = ActivateClientRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ActivateClientRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *ActivateClientRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ActivateClientRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActivateClientRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*ActivateClientRequest) ProtoMessage() {} + +func (x *ActivateClientRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *ActivateClientRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActivateClientRequest.Merge(m, src) -} -func (m *ActivateClientRequest) XXX_Size() int { - return m.Size() -} -func (m *ActivateClientRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ActivateClientRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_ActivateClientRequest proto.InternalMessageInfo +// Deprecated: Use ActivateClientRequest.ProtoReflect.Descriptor instead. +func (*ActivateClientRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{0} +} -func (m *ActivateClientRequest) GetClientKey() string { - if m != nil { - return m.ClientKey +func (x *ActivateClientRequest) GetClientKey() string { + if x != nil { + return x.ClientKey } return "" } type ActivateClientResponse struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` } -func (m *ActivateClientResponse) Reset() { *m = ActivateClientResponse{} } -func (m *ActivateClientResponse) String() string { return proto.CompactTextString(m) } -func (*ActivateClientResponse) ProtoMessage() {} -func (*ActivateClientResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{1} +func (x *ActivateClientResponse) Reset() { + *x = ActivateClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ActivateClientResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *ActivateClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ActivateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActivateClientResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*ActivateClientResponse) ProtoMessage() {} + +func (x *ActivateClientResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *ActivateClientResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActivateClientResponse.Merge(m, src) -} -func (m *ActivateClientResponse) XXX_Size() int { - return m.Size() -} -func (m *ActivateClientResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ActivateClientResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_ActivateClientResponse proto.InternalMessageInfo +// Deprecated: Use ActivateClientResponse.ProtoReflect.Descriptor instead. +func (*ActivateClientResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{1} +} -func (m *ActivateClientResponse) GetClientId() string { - if m != nil { - return m.ClientId +func (x *ActivateClientResponse) GetClientId() string { + if x != nil { + return x.ClientId } return "" } type DeactivateClientRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` } -func (m *DeactivateClientRequest) Reset() { *m = DeactivateClientRequest{} } -func (m *DeactivateClientRequest) String() string { return proto.CompactTextString(m) } -func (*DeactivateClientRequest) ProtoMessage() {} -func (*DeactivateClientRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{2} +func (x *DeactivateClientRequest) Reset() { + *x = DeactivateClientRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeactivateClientRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DeactivateClientRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeactivateClientRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeactivateClientRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DeactivateClientRequest) ProtoMessage() {} + +func (x *DeactivateClientRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *DeactivateClientRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeactivateClientRequest.Merge(m, src) -} -func (m *DeactivateClientRequest) XXX_Size() int { - return m.Size() -} -func (m *DeactivateClientRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeactivateClientRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DeactivateClientRequest proto.InternalMessageInfo +// Deprecated: Use DeactivateClientRequest.ProtoReflect.Descriptor instead. +func (*DeactivateClientRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{2} +} -func (m *DeactivateClientRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *DeactivateClientRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } type DeactivateClientResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DeactivateClientResponse) Reset() { *m = DeactivateClientResponse{} } -func (m *DeactivateClientResponse) String() string { return proto.CompactTextString(m) } -func (*DeactivateClientResponse) ProtoMessage() {} -func (*DeactivateClientResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{3} +func (x *DeactivateClientResponse) Reset() { + *x = DeactivateClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeactivateClientResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DeactivateClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeactivateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeactivateClientResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DeactivateClientResponse) ProtoMessage() {} + +func (x *DeactivateClientResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *DeactivateClientResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeactivateClientResponse.Merge(m, src) -} -func (m *DeactivateClientResponse) XXX_Size() int { - return m.Size() -} -func (m *DeactivateClientResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeactivateClientResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DeactivateClientResponse proto.InternalMessageInfo +// Deprecated: Use DeactivateClientResponse.ProtoReflect.Descriptor instead. +func (*DeactivateClientResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{3} +} type AttachDocumentRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ChangePack *ChangePack `protobuf:"bytes,2,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ChangePack *ChangePack `protobuf:"bytes,2,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` } -func (m *AttachDocumentRequest) Reset() { *m = AttachDocumentRequest{} } -func (m *AttachDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*AttachDocumentRequest) ProtoMessage() {} -func (*AttachDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{4} +func (x *AttachDocumentRequest) Reset() { + *x = AttachDocumentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AttachDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *AttachDocumentRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AttachDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttachDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*AttachDocumentRequest) ProtoMessage() {} + +func (x *AttachDocumentRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *AttachDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttachDocumentRequest.Merge(m, src) -} -func (m *AttachDocumentRequest) XXX_Size() int { - return m.Size() -} -func (m *AttachDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AttachDocumentRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_AttachDocumentRequest proto.InternalMessageInfo +// Deprecated: Use AttachDocumentRequest.ProtoReflect.Descriptor instead. +func (*AttachDocumentRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{4} +} -func (m *AttachDocumentRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *AttachDocumentRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } -func (m *AttachDocumentRequest) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *AttachDocumentRequest) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } type AttachDocumentResponse struct { - DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - ChangePack *ChangePack `protobuf:"bytes,2,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + ChangePack *ChangePack `protobuf:"bytes,2,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` } -func (m *AttachDocumentResponse) Reset() { *m = AttachDocumentResponse{} } -func (m *AttachDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*AttachDocumentResponse) ProtoMessage() {} -func (*AttachDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{5} +func (x *AttachDocumentResponse) Reset() { + *x = AttachDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AttachDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *AttachDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AttachDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttachDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*AttachDocumentResponse) ProtoMessage() {} + +func (x *AttachDocumentResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *AttachDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttachDocumentResponse.Merge(m, src) -} -func (m *AttachDocumentResponse) XXX_Size() int { - return m.Size() -} -func (m *AttachDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AttachDocumentResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_AttachDocumentResponse proto.InternalMessageInfo +// Deprecated: Use AttachDocumentResponse.ProtoReflect.Descriptor instead. +func (*AttachDocumentResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{5} +} -func (m *AttachDocumentResponse) GetDocumentId() string { - if m != nil { - return m.DocumentId +func (x *AttachDocumentResponse) GetDocumentId() string { + if x != nil { + return x.DocumentId } return "" } -func (m *AttachDocumentResponse) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *AttachDocumentResponse) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } type DetachDocumentRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - ChangePack *ChangePack `protobuf:"bytes,3,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - RemoveIfNotAttached bool `protobuf:"varint,4,opt,name=remove_if_not_attached,json=removeIfNotAttached,proto3" json:"remove_if_not_attached,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + ChangePack *ChangePack `protobuf:"bytes,3,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` + RemoveIfNotAttached bool `protobuf:"varint,4,opt,name=remove_if_not_attached,json=removeIfNotAttached,proto3" json:"remove_if_not_attached,omitempty"` } -func (m *DetachDocumentRequest) Reset() { *m = DetachDocumentRequest{} } -func (m *DetachDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*DetachDocumentRequest) ProtoMessage() {} -func (*DetachDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{6} +func (x *DetachDocumentRequest) Reset() { + *x = DetachDocumentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DetachDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DetachDocumentRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DetachDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DetachDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DetachDocumentRequest) ProtoMessage() {} + +func (x *DetachDocumentRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *DetachDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetachDocumentRequest.Merge(m, src) -} -func (m *DetachDocumentRequest) XXX_Size() int { - return m.Size() -} -func (m *DetachDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DetachDocumentRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DetachDocumentRequest proto.InternalMessageInfo +// Deprecated: Use DetachDocumentRequest.ProtoReflect.Descriptor instead. +func (*DetachDocumentRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{6} +} -func (m *DetachDocumentRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *DetachDocumentRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } -func (m *DetachDocumentRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId +func (x *DetachDocumentRequest) GetDocumentId() string { + if x != nil { + return x.DocumentId } return "" } -func (m *DetachDocumentRequest) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *DetachDocumentRequest) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } -func (m *DetachDocumentRequest) GetRemoveIfNotAttached() bool { - if m != nil { - return m.RemoveIfNotAttached +func (x *DetachDocumentRequest) GetRemoveIfNotAttached() bool { + if x != nil { + return x.RemoveIfNotAttached } return false } type DetachDocumentResponse struct { - ChangePack *ChangePack `protobuf:"bytes,2,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangePack *ChangePack `protobuf:"bytes,2,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` } -func (m *DetachDocumentResponse) Reset() { *m = DetachDocumentResponse{} } -func (m *DetachDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*DetachDocumentResponse) ProtoMessage() {} -func (*DetachDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{7} +func (x *DetachDocumentResponse) Reset() { + *x = DetachDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DetachDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DetachDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DetachDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DetachDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DetachDocumentResponse) ProtoMessage() {} + +func (x *DetachDocumentResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *DetachDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetachDocumentResponse.Merge(m, src) -} -func (m *DetachDocumentResponse) XXX_Size() int { - return m.Size() -} -func (m *DetachDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DetachDocumentResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DetachDocumentResponse proto.InternalMessageInfo +// Deprecated: Use DetachDocumentResponse.ProtoReflect.Descriptor instead. +func (*DetachDocumentResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{7} +} -func (m *DetachDocumentResponse) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *DetachDocumentResponse) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } type WatchDocumentRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` } -func (m *WatchDocumentRequest) Reset() { *m = WatchDocumentRequest{} } -func (m *WatchDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*WatchDocumentRequest) ProtoMessage() {} -func (*WatchDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{8} +func (x *WatchDocumentRequest) Reset() { + *x = WatchDocumentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *WatchDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *WatchDocumentRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *WatchDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*WatchDocumentRequest) ProtoMessage() {} + +func (x *WatchDocumentRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *WatchDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchDocumentRequest.Merge(m, src) -} -func (m *WatchDocumentRequest) XXX_Size() int { - return m.Size() -} -func (m *WatchDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WatchDocumentRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_WatchDocumentRequest proto.InternalMessageInfo +// Deprecated: Use WatchDocumentRequest.ProtoReflect.Descriptor instead. +func (*WatchDocumentRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{8} +} -func (m *WatchDocumentRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *WatchDocumentRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } -func (m *WatchDocumentRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId +func (x *WatchDocumentRequest) GetDocumentId() string { + if x != nil { + return x.DocumentId } return "" } type WatchDocumentResponse struct { - // Types that are valid to be assigned to Body: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Body: + // // *WatchDocumentResponse_Initialization_ // *WatchDocumentResponse_Event - Body isWatchDocumentResponse_Body `protobuf_oneof:"body"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Body isWatchDocumentResponse_Body `protobuf_oneof:"body"` } -func (m *WatchDocumentResponse) Reset() { *m = WatchDocumentResponse{} } -func (m *WatchDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*WatchDocumentResponse) ProtoMessage() {} -func (*WatchDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{9} -} -func (m *WatchDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *WatchDocumentResponse) Reset() { + *x = WatchDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *WatchDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchDocumentResponse.Merge(m, src) -} -func (m *WatchDocumentResponse) XXX_Size() int { - return m.Size() -} -func (m *WatchDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WatchDocumentResponse.DiscardUnknown(m) + +func (x *WatchDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_WatchDocumentResponse proto.InternalMessageInfo +func (*WatchDocumentResponse) ProtoMessage() {} -type isWatchDocumentResponse_Body interface { - isWatchDocumentResponse_Body() - MarshalTo([]byte) (int, error) - Size() int +func (x *WatchDocumentResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_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) } -type WatchDocumentResponse_Initialization_ struct { - Initialization *WatchDocumentResponse_Initialization `protobuf:"bytes,1,opt,name=initialization,proto3,oneof" json:"initialization,omitempty"` -} -type WatchDocumentResponse_Event struct { - Event *DocEvent `protobuf:"bytes,2,opt,name=event,proto3,oneof" json:"event,omitempty"` +// Deprecated: Use WatchDocumentResponse.ProtoReflect.Descriptor instead. +func (*WatchDocumentResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{9} } -func (*WatchDocumentResponse_Initialization_) isWatchDocumentResponse_Body() {} -func (*WatchDocumentResponse_Event) isWatchDocumentResponse_Body() {} - func (m *WatchDocumentResponse) GetBody() isWatchDocumentResponse_Body { if m != nil { return m.Body @@ -555,3883 +548,882 @@ func (m *WatchDocumentResponse) GetBody() isWatchDocumentResponse_Body { return nil } -func (m *WatchDocumentResponse) GetInitialization() *WatchDocumentResponse_Initialization { - if x, ok := m.GetBody().(*WatchDocumentResponse_Initialization_); ok { +func (x *WatchDocumentResponse) GetInitialization() *WatchDocumentResponse_Initialization { + if x, ok := x.GetBody().(*WatchDocumentResponse_Initialization_); ok { return x.Initialization } return nil } -func (m *WatchDocumentResponse) GetEvent() *DocEvent { - if x, ok := m.GetBody().(*WatchDocumentResponse_Event); ok { +func (x *WatchDocumentResponse) GetEvent() *DocEvent { + if x, ok := x.GetBody().(*WatchDocumentResponse_Event); ok { return x.Event } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*WatchDocumentResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*WatchDocumentResponse_Initialization_)(nil), - (*WatchDocumentResponse_Event)(nil), - } +type isWatchDocumentResponse_Body interface { + isWatchDocumentResponse_Body() } -type WatchDocumentResponse_Initialization struct { - ClientIds []string `protobuf:"bytes,1,rep,name=client_ids,json=clientIds,proto3" json:"client_ids,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type WatchDocumentResponse_Initialization_ struct { + Initialization *WatchDocumentResponse_Initialization `protobuf:"bytes,1,opt,name=initialization,proto3,oneof"` } -func (m *WatchDocumentResponse_Initialization) Reset() { *m = WatchDocumentResponse_Initialization{} } -func (m *WatchDocumentResponse_Initialization) String() string { return proto.CompactTextString(m) } -func (*WatchDocumentResponse_Initialization) ProtoMessage() {} -func (*WatchDocumentResponse_Initialization) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{9, 0} -} -func (m *WatchDocumentResponse_Initialization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchDocumentResponse_Initialization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchDocumentResponse_Initialization.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchDocumentResponse_Initialization) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchDocumentResponse_Initialization.Merge(m, src) -} -func (m *WatchDocumentResponse_Initialization) XXX_Size() int { - return m.Size() -} -func (m *WatchDocumentResponse_Initialization) XXX_DiscardUnknown() { - xxx_messageInfo_WatchDocumentResponse_Initialization.DiscardUnknown(m) +type WatchDocumentResponse_Event struct { + Event *DocEvent `protobuf:"bytes,2,opt,name=event,proto3,oneof"` } -var xxx_messageInfo_WatchDocumentResponse_Initialization proto.InternalMessageInfo +func (*WatchDocumentResponse_Initialization_) isWatchDocumentResponse_Body() {} -func (m *WatchDocumentResponse_Initialization) GetClientIds() []string { - if m != nil { - return m.ClientIds - } - return nil -} +func (*WatchDocumentResponse_Event) isWatchDocumentResponse_Body() {} type RemoveDocumentRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - ChangePack *ChangePack `protobuf:"bytes,3,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + ChangePack *ChangePack `protobuf:"bytes,3,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` } -func (m *RemoveDocumentRequest) Reset() { *m = RemoveDocumentRequest{} } -func (m *RemoveDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveDocumentRequest) ProtoMessage() {} -func (*RemoveDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{10} +func (x *RemoveDocumentRequest) Reset() { + *x = RemoveDocumentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RemoveDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *RemoveDocumentRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RemoveDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*RemoveDocumentRequest) ProtoMessage() {} + +func (x *RemoveDocumentRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RemoveDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveDocumentRequest.Merge(m, src) -} -func (m *RemoveDocumentRequest) XXX_Size() int { - return m.Size() -} -func (m *RemoveDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveDocumentRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RemoveDocumentRequest proto.InternalMessageInfo +// Deprecated: Use RemoveDocumentRequest.ProtoReflect.Descriptor instead. +func (*RemoveDocumentRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{10} +} -func (m *RemoveDocumentRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *RemoveDocumentRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } -func (m *RemoveDocumentRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId +func (x *RemoveDocumentRequest) GetDocumentId() string { + if x != nil { + return x.DocumentId } return "" } -func (m *RemoveDocumentRequest) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *RemoveDocumentRequest) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } type RemoveDocumentResponse struct { - ChangePack *ChangePack `protobuf:"bytes,1,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangePack *ChangePack `protobuf:"bytes,1,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` } -func (m *RemoveDocumentResponse) Reset() { *m = RemoveDocumentResponse{} } -func (m *RemoveDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveDocumentResponse) ProtoMessage() {} -func (*RemoveDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{11} +func (x *RemoveDocumentResponse) Reset() { + *x = RemoveDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RemoveDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *RemoveDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RemoveDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*RemoveDocumentResponse) ProtoMessage() {} + +func (x *RemoveDocumentResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RemoveDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveDocumentResponse.Merge(m, src) -} -func (m *RemoveDocumentResponse) XXX_Size() int { - return m.Size() -} -func (m *RemoveDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveDocumentResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RemoveDocumentResponse proto.InternalMessageInfo +// Deprecated: Use RemoveDocumentResponse.ProtoReflect.Descriptor instead. +func (*RemoveDocumentResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{11} +} -func (m *RemoveDocumentResponse) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *RemoveDocumentResponse) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } type PushPullChangesRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - ChangePack *ChangePack `protobuf:"bytes,3,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - PushOnly bool `protobuf:"varint,4,opt,name=push_only,json=pushOnly,proto3" json:"push_only,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + ChangePack *ChangePack `protobuf:"bytes,3,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` + PushOnly bool `protobuf:"varint,4,opt,name=push_only,json=pushOnly,proto3" json:"push_only,omitempty"` } -func (m *PushPullChangesRequest) Reset() { *m = PushPullChangesRequest{} } -func (m *PushPullChangesRequest) String() string { return proto.CompactTextString(m) } -func (*PushPullChangesRequest) ProtoMessage() {} -func (*PushPullChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{12} +func (x *PushPullChangesRequest) Reset() { + *x = PushPullChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PushPullChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *PushPullChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PushPullChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PushPullChangesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*PushPullChangesRequest) ProtoMessage() {} + +func (x *PushPullChangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *PushPullChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PushPullChangesRequest.Merge(m, src) -} -func (m *PushPullChangesRequest) XXX_Size() int { - return m.Size() -} -func (m *PushPullChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PushPullChangesRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_PushPullChangesRequest proto.InternalMessageInfo +// Deprecated: Use PushPullChangesRequest.ProtoReflect.Descriptor instead. +func (*PushPullChangesRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{12} +} -func (m *PushPullChangesRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *PushPullChangesRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } -func (m *PushPullChangesRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId +func (x *PushPullChangesRequest) GetDocumentId() string { + if x != nil { + return x.DocumentId } return "" } -func (m *PushPullChangesRequest) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *PushPullChangesRequest) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } -func (m *PushPullChangesRequest) GetPushOnly() bool { - if m != nil { - return m.PushOnly +func (x *PushPullChangesRequest) GetPushOnly() bool { + if x != nil { + return x.PushOnly } return false } type PushPullChangesResponse struct { - ChangePack *ChangePack `protobuf:"bytes,1,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangePack *ChangePack `protobuf:"bytes,1,opt,name=change_pack,json=changePack,proto3" json:"change_pack,omitempty"` } -func (m *PushPullChangesResponse) Reset() { *m = PushPullChangesResponse{} } -func (m *PushPullChangesResponse) String() string { return proto.CompactTextString(m) } -func (*PushPullChangesResponse) ProtoMessage() {} -func (*PushPullChangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{13} +func (x *PushPullChangesResponse) Reset() { + *x = PushPullChangesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PushPullChangesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *PushPullChangesResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PushPullChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PushPullChangesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*PushPullChangesResponse) ProtoMessage() {} + +func (x *PushPullChangesResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *PushPullChangesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PushPullChangesResponse.Merge(m, src) -} -func (m *PushPullChangesResponse) XXX_Size() int { - return m.Size() -} -func (m *PushPullChangesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PushPullChangesResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_PushPullChangesResponse proto.InternalMessageInfo +// Deprecated: Use PushPullChangesResponse.ProtoReflect.Descriptor instead. +func (*PushPullChangesResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{13} +} -func (m *PushPullChangesResponse) GetChangePack() *ChangePack { - if m != nil { - return m.ChangePack +func (x *PushPullChangesResponse) GetChangePack() *ChangePack { + if x != nil { + return x.ChangePack } return nil } type BroadcastRequest struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` - Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *BroadcastRequest) Reset() { *m = BroadcastRequest{} } -func (m *BroadcastRequest) String() string { return proto.CompactTextString(m) } -func (*BroadcastRequest) ProtoMessage() {} -func (*BroadcastRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{14} +func (x *BroadcastRequest) Reset() { + *x = BroadcastRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BroadcastRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *BroadcastRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BroadcastRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*BroadcastRequest) ProtoMessage() {} + +func (x *BroadcastRequest) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *BroadcastRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastRequest.Merge(m, src) -} -func (m *BroadcastRequest) XXX_Size() int { - return m.Size() -} -func (m *BroadcastRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_BroadcastRequest proto.InternalMessageInfo +// Deprecated: Use BroadcastRequest.ProtoReflect.Descriptor instead. +func (*BroadcastRequest) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{14} +} -func (m *BroadcastRequest) GetClientId() string { - if m != nil { - return m.ClientId +func (x *BroadcastRequest) GetClientId() string { + if x != nil { + return x.ClientId } return "" } -func (m *BroadcastRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId +func (x *BroadcastRequest) GetDocumentId() string { + if x != nil { + return x.DocumentId } return "" } -func (m *BroadcastRequest) GetTopic() string { - if m != nil { - return m.Topic +func (x *BroadcastRequest) GetTopic() string { + if x != nil { + return x.Topic } return "" } -func (m *BroadcastRequest) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *BroadcastRequest) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } type BroadcastResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *BroadcastResponse) Reset() { *m = BroadcastResponse{} } -func (m *BroadcastResponse) String() string { return proto.CompactTextString(m) } -func (*BroadcastResponse) ProtoMessage() {} -func (*BroadcastResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_40070c858814ab24, []int{15} -} -func (m *BroadcastResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *BroadcastResponse) Reset() { + *x = BroadcastResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *BroadcastResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastResponse.Merge(m, src) -} -func (m *BroadcastResponse) XXX_Size() int { - return m.Size() -} -func (m *BroadcastResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastResponse.DiscardUnknown(m) -} -var xxx_messageInfo_BroadcastResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ActivateClientRequest)(nil), "yorkie.v1.ActivateClientRequest") - proto.RegisterType((*ActivateClientResponse)(nil), "yorkie.v1.ActivateClientResponse") - proto.RegisterType((*DeactivateClientRequest)(nil), "yorkie.v1.DeactivateClientRequest") - proto.RegisterType((*DeactivateClientResponse)(nil), "yorkie.v1.DeactivateClientResponse") - proto.RegisterType((*AttachDocumentRequest)(nil), "yorkie.v1.AttachDocumentRequest") - proto.RegisterType((*AttachDocumentResponse)(nil), "yorkie.v1.AttachDocumentResponse") - proto.RegisterType((*DetachDocumentRequest)(nil), "yorkie.v1.DetachDocumentRequest") - proto.RegisterType((*DetachDocumentResponse)(nil), "yorkie.v1.DetachDocumentResponse") - proto.RegisterType((*WatchDocumentRequest)(nil), "yorkie.v1.WatchDocumentRequest") - proto.RegisterType((*WatchDocumentResponse)(nil), "yorkie.v1.WatchDocumentResponse") - proto.RegisterType((*WatchDocumentResponse_Initialization)(nil), "yorkie.v1.WatchDocumentResponse.Initialization") - proto.RegisterType((*RemoveDocumentRequest)(nil), "yorkie.v1.RemoveDocumentRequest") - proto.RegisterType((*RemoveDocumentResponse)(nil), "yorkie.v1.RemoveDocumentResponse") - proto.RegisterType((*PushPullChangesRequest)(nil), "yorkie.v1.PushPullChangesRequest") - proto.RegisterType((*PushPullChangesResponse)(nil), "yorkie.v1.PushPullChangesResponse") - proto.RegisterType((*BroadcastRequest)(nil), "yorkie.v1.BroadcastRequest") - proto.RegisterType((*BroadcastResponse)(nil), "yorkie.v1.BroadcastResponse") +func (x *BroadcastResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func init() { proto.RegisterFile("yorkie/v1/yorkie.proto", fileDescriptor_40070c858814ab24) } - -var fileDescriptor_40070c858814ab24 = []byte{ - // 736 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdf, 0x4e, 0x13, 0x4f, - 0x14, 0xee, 0xf0, 0xef, 0x47, 0x4f, 0x7f, 0x20, 0x0c, 0xb4, 0xd4, 0xa2, 0xa5, 0x8e, 0x37, 0x24, - 0xc6, 0xd6, 0x42, 0xe4, 0xc6, 0x2b, 0xa0, 0x26, 0x34, 0x26, 0x5a, 0xd7, 0x3f, 0x04, 0x12, 0xd3, - 0x0c, 0xb3, 0x03, 0x9d, 0x74, 0xd9, 0x59, 0xba, 0xd3, 0x4d, 0xea, 0x95, 0x2f, 0xe0, 0xbd, 0xef, - 0xe0, 0x5b, 0x78, 0xe5, 0x25, 0x97, 0x5e, 0x1a, 0x7c, 0x11, 0xd3, 0x9d, 0x6d, 0xd9, 0x5d, 0xd6, - 0x82, 0x42, 0xa2, 0x77, 0x3b, 0x67, 0xce, 0xf9, 0xe6, 0x3b, 0x67, 0xe7, 0x3b, 0x67, 0x20, 0xd7, - 0x93, 0x9d, 0xb6, 0xe0, 0x15, 0xaf, 0x5a, 0xd1, 0x5f, 0x65, 0xa7, 0x23, 0x95, 0xc4, 0xe9, 0x60, - 0xe5, 0x55, 0x0b, 0xb7, 0xcf, 0x5d, 0x3a, 0xdc, 0x95, 0xdd, 0x0e, 0xe3, 0xae, 0xf6, 0x22, 0x1b, - 0x90, 0xdd, 0x64, 0x4a, 0x78, 0x54, 0xf1, 0x6d, 0x4b, 0x70, 0x5b, 0x19, 0xfc, 0xa4, 0xcb, 0x5d, - 0x85, 0xef, 0x02, 0x30, 0xdf, 0xd0, 0x6c, 0xf3, 0x5e, 0x1e, 0x95, 0xd0, 0x6a, 0xda, 0x48, 0x6b, - 0xcb, 0x33, 0xde, 0x23, 0x8f, 0x21, 0x17, 0x8f, 0x73, 0x1d, 0x69, 0xbb, 0x1c, 0x2f, 0x43, 0xe0, - 0xd6, 0x14, 0x66, 0x10, 0x37, 0xad, 0x0d, 0x75, 0x93, 0x6c, 0xc0, 0x52, 0x8d, 0xd3, 0xc4, 0x03, - 0x47, 0xc6, 0x15, 0x20, 0x7f, 0x31, 0x4e, 0x1f, 0x48, 0x2c, 0xc8, 0x6e, 0x2a, 0x45, 0x59, 0xab, - 0x26, 0x59, 0xf7, 0xf8, 0x8a, 0x88, 0x78, 0x03, 0x32, 0xac, 0x45, 0xed, 0x23, 0xde, 0x74, 0x28, - 0x6b, 0xe7, 0xc7, 0x4a, 0x68, 0x35, 0xb3, 0x96, 0x2d, 0x0f, 0x8b, 0x56, 0xde, 0xf6, 0x77, 0x1b, - 0x94, 0xb5, 0x0d, 0x60, 0xc3, 0x6f, 0x72, 0x02, 0xb9, 0xf8, 0x69, 0x41, 0xe2, 0x2b, 0x90, 0x31, - 0x03, 0xdb, 0xf9, 0x81, 0x30, 0x30, 0x5d, 0xe3, 0xc8, 0x2f, 0x08, 0xb2, 0x35, 0xfe, 0xdb, 0x19, - 0xc6, 0xf8, 0x8c, 0x5d, 0xc6, 0x67, 0xfc, 0x8a, 0x7c, 0xf0, 0x3a, 0xe4, 0x3a, 0xfc, 0x58, 0x7a, - 0xbc, 0x29, 0x0e, 0x9b, 0xb6, 0x54, 0x4d, 0xea, 0x17, 0x84, 0x9b, 0xf9, 0x89, 0x12, 0x5a, 0x9d, - 0x36, 0x16, 0xf4, 0x6e, 0xfd, 0xf0, 0xb9, 0x54, 0x9b, 0xc1, 0x16, 0x69, 0x40, 0x2e, 0x9e, 0x43, - 0x50, 0xb7, 0x3f, 0x2d, 0xcb, 0x6b, 0x58, 0xdc, 0xa5, 0xea, 0x86, 0x8b, 0x42, 0xbe, 0x21, 0xc8, - 0xc6, 0x60, 0x03, 0x9e, 0x7b, 0x30, 0x2b, 0x6c, 0xa1, 0x04, 0xb5, 0xc4, 0x7b, 0xaa, 0x84, 0xb4, - 0x7d, 0xf0, 0xcc, 0x5a, 0x25, 0x44, 0x35, 0x31, 0xb2, 0x5c, 0x8f, 0x84, 0xed, 0xa4, 0x8c, 0x18, - 0x10, 0x7e, 0x00, 0x93, 0xdc, 0xe3, 0xb6, 0x0a, 0x92, 0x5f, 0x08, 0x21, 0xd6, 0x24, 0x7b, 0xda, - 0xdf, 0xda, 0x49, 0x19, 0xda, 0xa7, 0x50, 0x81, 0xd9, 0x28, 0x60, 0x48, 0xab, 0xc2, 0x74, 0xf3, - 0xa8, 0x34, 0x7e, 0xae, 0xd5, 0xba, 0xe9, 0x6e, 0x4d, 0xc1, 0xc4, 0x81, 0x34, 0x7b, 0xe4, 0x23, - 0x82, 0xac, 0xe1, 0xff, 0x9a, 0x7f, 0xe2, 0x1e, 0xf5, 0xaf, 0x44, 0x9c, 0x4e, 0xf2, 0x95, 0x40, - 0x57, 0x45, 0xfc, 0x8c, 0x20, 0xd7, 0xe8, 0xba, 0xad, 0x46, 0xd7, 0xb2, 0xb4, 0x8b, 0xfb, 0x77, - 0xa5, 0xb2, 0x0c, 0x69, 0xa7, 0xeb, 0xb6, 0x9a, 0xd2, 0xb6, 0x7a, 0x81, 0x3a, 0xa6, 0xfb, 0x86, - 0x17, 0xb6, 0xd5, 0x23, 0x2f, 0x61, 0xe9, 0x02, 0xd9, 0x6b, 0x16, 0xe0, 0x03, 0x82, 0xb9, 0xad, - 0x8e, 0xa4, 0x26, 0xa3, 0xee, 0x0d, 0xfd, 0xdd, 0x45, 0x98, 0x54, 0xd2, 0x11, 0xcc, 0x4f, 0x3a, - 0x6d, 0xe8, 0x05, 0xce, 0xc3, 0x7f, 0x0e, 0xed, 0x59, 0x92, 0x6a, 0xd1, 0xff, 0x6f, 0x0c, 0x96, - 0x64, 0x01, 0xe6, 0x43, 0x0c, 0x74, 0x3e, 0x6b, 0xa7, 0x93, 0x30, 0xb3, 0xe7, 0x93, 0x7f, 0xc5, - 0x3b, 0x9e, 0x60, 0x1c, 0xef, 0xc2, 0x6c, 0x74, 0x80, 0xe0, 0x52, 0x28, 0xbd, 0xc4, 0x99, 0x54, - 0xb8, 0x37, 0xc2, 0x23, 0x18, 0x06, 0x29, 0xfc, 0x0e, 0xe6, 0xe2, 0xa3, 0x02, 0x93, 0xb0, 0xa0, - 0x92, 0xe7, 0x4f, 0xe1, 0xfe, 0x48, 0x9f, 0x21, 0x7c, 0x9f, 0x77, 0xa4, 0xff, 0x47, 0x79, 0x27, - 0x0d, 0xa2, 0x28, 0xef, 0xc4, 0xe1, 0xa1, 0x81, 0xa3, 0x0d, 0x32, 0x02, 0x9c, 0xd8, 0xff, 0x23, - 0xc0, 0xc9, 0xdd, 0x55, 0x03, 0x47, 0x65, 0x16, 0x01, 0x4e, 0x6c, 0x08, 0x11, 0xe0, 0x64, 0x8d, - 0x92, 0x14, 0xde, 0x87, 0x5b, 0xb1, 0xfb, 0x8b, 0xc3, 0x71, 0xc9, 0x42, 0x2c, 0x90, 0x51, 0x2e, - 0x43, 0xec, 0xb7, 0x30, 0x13, 0xe9, 0xa5, 0x78, 0xe5, 0xd7, 0x5d, 0x56, 0xe3, 0x96, 0x2e, 0x6b, - 0xc3, 0x24, 0xf5, 0x08, 0xe1, 0x1d, 0x48, 0x0f, 0x6f, 0x27, 0x5e, 0x0e, 0x85, 0xc4, 0x55, 0x53, - 0xb8, 0x93, 0xbc, 0x39, 0xc0, 0xda, 0x7a, 0xf3, 0xf5, 0xac, 0x88, 0x4e, 0xcf, 0x8a, 0xe8, 0xfb, - 0x59, 0x11, 0x7d, 0xfa, 0x51, 0x4c, 0xc1, 0xbc, 0xc9, 0xbd, 0x41, 0x10, 0x75, 0x44, 0xd9, 0xab, - 0x36, 0xd0, 0x7e, 0xf9, 0x48, 0xa8, 0x56, 0xf7, 0xa0, 0xcc, 0xe4, 0x71, 0xf0, 0x3e, 0x7b, 0xa8, - 0x38, 0x1d, 0x7c, 0x57, 0xa8, 0x23, 0x2a, 0xc3, 0xd7, 0xd9, 0x13, 0xaf, 0x7a, 0x30, 0xe5, 0xbf, - 0xcb, 0xd6, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x48, 0x7a, 0xbe, 0x77, 0xd7, 0x09, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +func (*BroadcastResponse) ProtoMessage() {} -// 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.SupportPackageIsVersion4 - -// YorkieServiceClient is the client API for YorkieService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type YorkieServiceClient interface { - ActivateClient(ctx context.Context, in *ActivateClientRequest, opts ...grpc.CallOption) (*ActivateClientResponse, error) - DeactivateClient(ctx context.Context, in *DeactivateClientRequest, opts ...grpc.CallOption) (*DeactivateClientResponse, error) - AttachDocument(ctx context.Context, in *AttachDocumentRequest, opts ...grpc.CallOption) (*AttachDocumentResponse, error) - DetachDocument(ctx context.Context, in *DetachDocumentRequest, opts ...grpc.CallOption) (*DetachDocumentResponse, error) - RemoveDocument(ctx context.Context, in *RemoveDocumentRequest, opts ...grpc.CallOption) (*RemoveDocumentResponse, error) - PushPullChanges(ctx context.Context, in *PushPullChangesRequest, opts ...grpc.CallOption) (*PushPullChangesResponse, error) - WatchDocument(ctx context.Context, in *WatchDocumentRequest, opts ...grpc.CallOption) (YorkieService_WatchDocumentClient, error) - Broadcast(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastResponse, error) +func (x *BroadcastResponse) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[15] + 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) } -type yorkieServiceClient struct { - cc *grpc.ClientConn +// Deprecated: Use BroadcastResponse.ProtoReflect.Descriptor instead. +func (*BroadcastResponse) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{15} } -func NewYorkieServiceClient(cc *grpc.ClientConn) YorkieServiceClient { - return &yorkieServiceClient{cc} -} +type WatchDocumentResponse_Initialization struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (c *yorkieServiceClient) ActivateClient(ctx context.Context, in *ActivateClientRequest, opts ...grpc.CallOption) (*ActivateClientResponse, error) { - out := new(ActivateClientResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/ActivateClient", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil + ClientIds []string `protobuf:"bytes,1,rep,name=client_ids,json=clientIds,proto3" json:"client_ids,omitempty"` } -func (c *yorkieServiceClient) DeactivateClient(ctx context.Context, in *DeactivateClientRequest, opts ...grpc.CallOption) (*DeactivateClientResponse, error) { - out := new(DeactivateClientResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/DeactivateClient", in, out, opts...) - if err != nil { - return nil, err +func (x *WatchDocumentResponse_Initialization) Reset() { + *x = WatchDocumentResponse_Initialization{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *yorkieServiceClient) AttachDocument(ctx context.Context, in *AttachDocumentRequest, opts ...grpc.CallOption) (*AttachDocumentResponse, error) { - out := new(AttachDocumentResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/AttachDocument", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *WatchDocumentResponse_Initialization) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *yorkieServiceClient) DetachDocument(ctx context.Context, in *DetachDocumentRequest, opts ...grpc.CallOption) (*DetachDocumentResponse, error) { - out := new(DetachDocumentResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/DetachDocument", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} +func (*WatchDocumentResponse_Initialization) ProtoMessage() {} -func (c *yorkieServiceClient) RemoveDocument(ctx context.Context, in *RemoveDocumentRequest, opts ...grpc.CallOption) (*RemoveDocumentResponse, error) { - out := new(RemoveDocumentResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/RemoveDocument", in, out, opts...) - if err != nil { - return nil, err +func (x *WatchDocumentResponse_Initialization) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_yorkie_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return out, nil + return mi.MessageOf(x) } -func (c *yorkieServiceClient) PushPullChanges(ctx context.Context, in *PushPullChangesRequest, opts ...grpc.CallOption) (*PushPullChangesResponse, error) { - out := new(PushPullChangesResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/PushPullChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// Deprecated: Use WatchDocumentResponse_Initialization.ProtoReflect.Descriptor instead. +func (*WatchDocumentResponse_Initialization) Descriptor() ([]byte, []int) { + return file_yorkie_v1_yorkie_proto_rawDescGZIP(), []int{9, 0} } -func (c *yorkieServiceClient) WatchDocument(ctx context.Context, in *WatchDocumentRequest, opts ...grpc.CallOption) (YorkieService_WatchDocumentClient, error) { - stream, err := c.cc.NewStream(ctx, &_YorkieService_serviceDesc.Streams[0], "/yorkie.v1.YorkieService/WatchDocument", opts...) - if err != nil { - return nil, err +func (x *WatchDocumentResponse_Initialization) GetClientIds() []string { + if x != nil { + return x.ClientIds } - x := &yorkieServiceWatchDocumentClient{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 + return nil } -type YorkieService_WatchDocumentClient interface { - Recv() (*WatchDocumentResponse, error) - grpc.ClientStream +var File_yorkie_v1_yorkie_proto protoreflect.FileDescriptor + +var file_yorkie_v1_yorkie_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, + 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x35, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x36, 0x0a, + 0x17, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x6c, 0x0a, 0x15, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, + 0x61, 0x63, 0x6b, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x22, + 0x71, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, + 0x63, 0x6b, 0x22, 0xc2, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, + 0x63, 0x6b, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x69, 0x66, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x22, 0x50, 0x0a, 0x16, 0x44, 0x65, 0x74, 0x61, 0x63, + 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x0a, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x22, 0x54, 0x0a, 0x14, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, + 0xd8, 0x01, 0x0a, 0x15, 0x57, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, + 0x74, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x6f, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x1a, 0x2f, 0x0a, 0x0e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x0a, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x22, 0x50, 0x0a, 0x16, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, + 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x22, 0xab, 0x01, 0x0a, + 0x16, 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, + 0x6b, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x51, 0x0a, 0x17, 0x50, 0x75, + 0x73, 0x68, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, + 0x6b, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x22, 0x80, 0x01, + 0x0a, 0x10, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x13, 0x0a, 0x11, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x05, 0x0a, 0x0d, 0x59, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5d, 0x0a, 0x10, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x0e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x44, 0x65, 0x74, 0x61, + 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x79, + 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x50, 0x75, + 0x73, 0x68, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x21, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, + 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, + 0x68, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x48, + 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x79, 0x6f, + 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x2e, + 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2d, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -type yorkieServiceWatchDocumentClient struct { - grpc.ClientStream -} +var ( + file_yorkie_v1_yorkie_proto_rawDescOnce sync.Once + file_yorkie_v1_yorkie_proto_rawDescData = file_yorkie_v1_yorkie_proto_rawDesc +) -func (x *yorkieServiceWatchDocumentClient) Recv() (*WatchDocumentResponse, error) { - m := new(WatchDocumentResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func file_yorkie_v1_yorkie_proto_rawDescGZIP() []byte { + file_yorkie_v1_yorkie_proto_rawDescOnce.Do(func() { + file_yorkie_v1_yorkie_proto_rawDescData = protoimpl.X.CompressGZIP(file_yorkie_v1_yorkie_proto_rawDescData) + }) + return file_yorkie_v1_yorkie_proto_rawDescData +} + +var file_yorkie_v1_yorkie_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_yorkie_v1_yorkie_proto_goTypes = []interface{}{ + (*ActivateClientRequest)(nil), // 0: yorkie.v1.ActivateClientRequest + (*ActivateClientResponse)(nil), // 1: yorkie.v1.ActivateClientResponse + (*DeactivateClientRequest)(nil), // 2: yorkie.v1.DeactivateClientRequest + (*DeactivateClientResponse)(nil), // 3: yorkie.v1.DeactivateClientResponse + (*AttachDocumentRequest)(nil), // 4: yorkie.v1.AttachDocumentRequest + (*AttachDocumentResponse)(nil), // 5: yorkie.v1.AttachDocumentResponse + (*DetachDocumentRequest)(nil), // 6: yorkie.v1.DetachDocumentRequest + (*DetachDocumentResponse)(nil), // 7: yorkie.v1.DetachDocumentResponse + (*WatchDocumentRequest)(nil), // 8: yorkie.v1.WatchDocumentRequest + (*WatchDocumentResponse)(nil), // 9: yorkie.v1.WatchDocumentResponse + (*RemoveDocumentRequest)(nil), // 10: yorkie.v1.RemoveDocumentRequest + (*RemoveDocumentResponse)(nil), // 11: yorkie.v1.RemoveDocumentResponse + (*PushPullChangesRequest)(nil), // 12: yorkie.v1.PushPullChangesRequest + (*PushPullChangesResponse)(nil), // 13: yorkie.v1.PushPullChangesResponse + (*BroadcastRequest)(nil), // 14: yorkie.v1.BroadcastRequest + (*BroadcastResponse)(nil), // 15: yorkie.v1.BroadcastResponse + (*WatchDocumentResponse_Initialization)(nil), // 16: yorkie.v1.WatchDocumentResponse.Initialization + (*ChangePack)(nil), // 17: yorkie.v1.ChangePack + (*DocEvent)(nil), // 18: yorkie.v1.DocEvent +} +var file_yorkie_v1_yorkie_proto_depIdxs = []int32{ + 17, // 0: yorkie.v1.AttachDocumentRequest.change_pack:type_name -> yorkie.v1.ChangePack + 17, // 1: yorkie.v1.AttachDocumentResponse.change_pack:type_name -> yorkie.v1.ChangePack + 17, // 2: yorkie.v1.DetachDocumentRequest.change_pack:type_name -> yorkie.v1.ChangePack + 17, // 3: yorkie.v1.DetachDocumentResponse.change_pack:type_name -> yorkie.v1.ChangePack + 16, // 4: yorkie.v1.WatchDocumentResponse.initialization:type_name -> yorkie.v1.WatchDocumentResponse.Initialization + 18, // 5: yorkie.v1.WatchDocumentResponse.event:type_name -> yorkie.v1.DocEvent + 17, // 6: yorkie.v1.RemoveDocumentRequest.change_pack:type_name -> yorkie.v1.ChangePack + 17, // 7: yorkie.v1.RemoveDocumentResponse.change_pack:type_name -> yorkie.v1.ChangePack + 17, // 8: yorkie.v1.PushPullChangesRequest.change_pack:type_name -> yorkie.v1.ChangePack + 17, // 9: yorkie.v1.PushPullChangesResponse.change_pack:type_name -> yorkie.v1.ChangePack + 0, // 10: yorkie.v1.YorkieService.ActivateClient:input_type -> yorkie.v1.ActivateClientRequest + 2, // 11: yorkie.v1.YorkieService.DeactivateClient:input_type -> yorkie.v1.DeactivateClientRequest + 4, // 12: yorkie.v1.YorkieService.AttachDocument:input_type -> yorkie.v1.AttachDocumentRequest + 6, // 13: yorkie.v1.YorkieService.DetachDocument:input_type -> yorkie.v1.DetachDocumentRequest + 10, // 14: yorkie.v1.YorkieService.RemoveDocument:input_type -> yorkie.v1.RemoveDocumentRequest + 12, // 15: yorkie.v1.YorkieService.PushPullChanges:input_type -> yorkie.v1.PushPullChangesRequest + 8, // 16: yorkie.v1.YorkieService.WatchDocument:input_type -> yorkie.v1.WatchDocumentRequest + 14, // 17: yorkie.v1.YorkieService.Broadcast:input_type -> yorkie.v1.BroadcastRequest + 1, // 18: yorkie.v1.YorkieService.ActivateClient:output_type -> yorkie.v1.ActivateClientResponse + 3, // 19: yorkie.v1.YorkieService.DeactivateClient:output_type -> yorkie.v1.DeactivateClientResponse + 5, // 20: yorkie.v1.YorkieService.AttachDocument:output_type -> yorkie.v1.AttachDocumentResponse + 7, // 21: yorkie.v1.YorkieService.DetachDocument:output_type -> yorkie.v1.DetachDocumentResponse + 11, // 22: yorkie.v1.YorkieService.RemoveDocument:output_type -> yorkie.v1.RemoveDocumentResponse + 13, // 23: yorkie.v1.YorkieService.PushPullChanges:output_type -> yorkie.v1.PushPullChangesResponse + 9, // 24: yorkie.v1.YorkieService.WatchDocument:output_type -> yorkie.v1.WatchDocumentResponse + 15, // 25: yorkie.v1.YorkieService.Broadcast:output_type -> yorkie.v1.BroadcastResponse + 18, // [18:26] is the sub-list for method output_type + 10, // [10:18] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_yorkie_v1_yorkie_proto_init() } +func file_yorkie_v1_yorkie_proto_init() { + if File_yorkie_v1_yorkie_proto != nil { + return + } + file_yorkie_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_yorkie_v1_yorkie_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActivateClientRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActivateClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeactivateClientRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeactivateClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttachDocumentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttachDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DetachDocumentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DetachDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WatchDocumentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WatchDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDocumentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushPullChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushPullChangesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BroadcastRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BroadcastResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_yorkie_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WatchDocumentResponse_Initialization); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_yorkie_v1_yorkie_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*WatchDocumentResponse_Initialization_)(nil), + (*WatchDocumentResponse_Event)(nil), } - return m, nil -} - -func (c *yorkieServiceClient) Broadcast(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastResponse, error) { - out := new(BroadcastResponse) - err := c.cc.Invoke(ctx, "/yorkie.v1.YorkieService/Broadcast", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// YorkieServiceServer is the server API for YorkieService service. -type YorkieServiceServer interface { - ActivateClient(context.Context, *ActivateClientRequest) (*ActivateClientResponse, error) - DeactivateClient(context.Context, *DeactivateClientRequest) (*DeactivateClientResponse, error) - AttachDocument(context.Context, *AttachDocumentRequest) (*AttachDocumentResponse, error) - DetachDocument(context.Context, *DetachDocumentRequest) (*DetachDocumentResponse, error) - RemoveDocument(context.Context, *RemoveDocumentRequest) (*RemoveDocumentResponse, error) - PushPullChanges(context.Context, *PushPullChangesRequest) (*PushPullChangesResponse, error) - WatchDocument(*WatchDocumentRequest, YorkieService_WatchDocumentServer) error - Broadcast(context.Context, *BroadcastRequest) (*BroadcastResponse, error) -} - -// UnimplementedYorkieServiceServer can be embedded to have forward compatible implementations. -type UnimplementedYorkieServiceServer struct { -} - -func (*UnimplementedYorkieServiceServer) ActivateClient(ctx context.Context, req *ActivateClientRequest) (*ActivateClientResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActivateClient not implemented") -} -func (*UnimplementedYorkieServiceServer) DeactivateClient(ctx context.Context, req *DeactivateClientRequest) (*DeactivateClientResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeactivateClient not implemented") -} -func (*UnimplementedYorkieServiceServer) AttachDocument(ctx context.Context, req *AttachDocumentRequest) (*AttachDocumentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AttachDocument not implemented") -} -func (*UnimplementedYorkieServiceServer) DetachDocument(ctx context.Context, req *DetachDocumentRequest) (*DetachDocumentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DetachDocument not implemented") -} -func (*UnimplementedYorkieServiceServer) RemoveDocument(ctx context.Context, req *RemoveDocumentRequest) (*RemoveDocumentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveDocument not implemented") -} -func (*UnimplementedYorkieServiceServer) PushPullChanges(ctx context.Context, req *PushPullChangesRequest) (*PushPullChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushPullChanges not implemented") -} -func (*UnimplementedYorkieServiceServer) WatchDocument(req *WatchDocumentRequest, srv YorkieService_WatchDocumentServer) error { - return status.Errorf(codes.Unimplemented, "method WatchDocument not implemented") -} -func (*UnimplementedYorkieServiceServer) Broadcast(ctx context.Context, req *BroadcastRequest) (*BroadcastResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Broadcast not implemented") -} - -func RegisterYorkieServiceServer(s *grpc.Server, srv YorkieServiceServer) { - s.RegisterService(&_YorkieService_serviceDesc, srv) -} - -func _YorkieService_ActivateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ActivateClientRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).ActivateClient(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/ActivateClient", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).ActivateClient(ctx, req.(*ActivateClientRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _YorkieService_DeactivateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeactivateClientRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).DeactivateClient(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/DeactivateClient", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).DeactivateClient(ctx, req.(*DeactivateClientRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _YorkieService_AttachDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AttachDocumentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).AttachDocument(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/AttachDocument", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).AttachDocument(ctx, req.(*AttachDocumentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _YorkieService_DetachDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DetachDocumentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).DetachDocument(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/DetachDocument", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).DetachDocument(ctx, req.(*DetachDocumentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _YorkieService_RemoveDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveDocumentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).RemoveDocument(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/RemoveDocument", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).RemoveDocument(ctx, req.(*RemoveDocumentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _YorkieService_PushPullChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushPullChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).PushPullChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/PushPullChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).PushPullChanges(ctx, req.(*PushPullChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _YorkieService_WatchDocument_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(WatchDocumentRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(YorkieServiceServer).WatchDocument(m, &yorkieServiceWatchDocumentServer{stream}) -} - -type YorkieService_WatchDocumentServer interface { - Send(*WatchDocumentResponse) error - grpc.ServerStream -} - -type yorkieServiceWatchDocumentServer struct { - grpc.ServerStream -} - -func (x *yorkieServiceWatchDocumentServer) Send(m *WatchDocumentResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _YorkieService_Broadcast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(YorkieServiceServer).Broadcast(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/yorkie.v1.YorkieService/Broadcast", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(YorkieServiceServer).Broadcast(ctx, req.(*BroadcastRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _YorkieService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "yorkie.v1.YorkieService", - HandlerType: (*YorkieServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ActivateClient", - Handler: _YorkieService_ActivateClient_Handler, - }, - { - MethodName: "DeactivateClient", - Handler: _YorkieService_DeactivateClient_Handler, + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_yorkie_v1_yorkie_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, }, - { - MethodName: "AttachDocument", - Handler: _YorkieService_AttachDocument_Handler, - }, - { - MethodName: "DetachDocument", - Handler: _YorkieService_DetachDocument_Handler, - }, - { - MethodName: "RemoveDocument", - Handler: _YorkieService_RemoveDocument_Handler, - }, - { - MethodName: "PushPullChanges", - Handler: _YorkieService_PushPullChanges_Handler, - }, - { - MethodName: "Broadcast", - Handler: _YorkieService_Broadcast_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "WatchDocument", - Handler: _YorkieService_WatchDocument_Handler, - ServerStreams: true, - }, - }, - Metadata: "yorkie/v1/yorkie.proto", -} - -func (m *ActivateClientRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActivateClientRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActivateClientRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ClientKey) > 0 { - i -= len(m.ClientKey) - copy(dAtA[i:], m.ClientKey) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActivateClientResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActivateClientResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActivateClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeactivateClientRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeactivateClientRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeactivateClientRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeactivateClientResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeactivateClientResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeactivateClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *AttachDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttachDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttachDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AttachDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttachDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttachDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DetachDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DetachDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DetachDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RemoveIfNotAttached { - i-- - if m.RemoveIfNotAttached { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DetachDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DetachDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DetachDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *WatchDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Body != nil { - { - size := m.Body.Size() - i -= size - if _, err := m.Body.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *WatchDocumentResponse_Initialization_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchDocumentResponse_Initialization_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Initialization != nil { - { - size, err := m.Initialization.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *WatchDocumentResponse_Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchDocumentResponse_Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Event != nil { - { - size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *WatchDocumentResponse_Initialization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchDocumentResponse_Initialization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchDocumentResponse_Initialization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ClientIds) > 0 { - for iNdEx := len(m.ClientIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ClientIds[iNdEx]) - copy(dAtA[i:], m.ClientIds[iNdEx]) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RemoveDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoveDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoveDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PushPullChangesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PushPullChangesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PushPullChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PushOnly { - i-- - if m.PushOnly { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PushPullChangesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PushPullChangesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PushPullChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChangePack != nil { - { - size, err := m.ChangePack.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintYorkie(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + GoTypes: file_yorkie_v1_yorkie_proto_goTypes, + DependencyIndexes: file_yorkie_v1_yorkie_proto_depIdxs, + MessageInfos: file_yorkie_v1_yorkie_proto_msgTypes, + }.Build() + File_yorkie_v1_yorkie_proto = out.File + file_yorkie_v1_yorkie_proto_rawDesc = nil + file_yorkie_v1_yorkie_proto_goTypes = nil + file_yorkie_v1_yorkie_proto_depIdxs = nil } - -func (m *BroadcastRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BroadcastRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x22 - } - if len(m.Topic) > 0 { - i -= len(m.Topic) - copy(dAtA[i:], m.Topic) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.Topic))) - i-- - dAtA[i] = 0x1a - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintYorkie(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BroadcastResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintYorkie(dAtA []byte, offset int, v uint64) int { - offset -= sovYorkie(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ActivateClientRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientKey) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ActivateClientResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeactivateClientRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeactivateClientResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttachDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttachDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DetachDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.RemoveIfNotAttached { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DetachDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - n += m.Body.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchDocumentResponse_Initialization_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Initialization != nil { - l = m.Initialization.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - return n -} -func (m *WatchDocumentResponse_Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Event != nil { - l = m.Event.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - return n -} -func (m *WatchDocumentResponse_Initialization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ClientIds) > 0 { - for _, s := range m.ClientIds { - l = len(s) - n += 1 + l + sovYorkie(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RemoveDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RemoveDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PushPullChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.PushOnly { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PushPullChangesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChangePack != nil { - l = m.ChangePack.Size() - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BroadcastRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.Topic) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovYorkie(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BroadcastResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovYorkie(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozYorkie(x uint64) (n int) { - return sovYorkie(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ActivateClientRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActivateClientRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActivateClientRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActivateClientResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActivateClientResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActivateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeactivateClientRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeactivateClientRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeactivateClientRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeactivateClientResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeactivateClientResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeactivateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttachDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttachDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttachDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttachDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttachDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttachDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DetachDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DetachDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DetachDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemoveIfNotAttached", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RemoveIfNotAttached = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DetachDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DetachDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DetachDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Initialization", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WatchDocumentResponse_Initialization{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &WatchDocumentResponse_Initialization_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DocEvent{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Body = &WatchDocumentResponse_Event{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchDocumentResponse_Initialization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Initialization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Initialization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientIds = append(m.ClientIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoveDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoveDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PushPullChangesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PushPullChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PushPullChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PushOnly", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PushOnly = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PushPullChangesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PushPullChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PushPullChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePack", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChangePack == nil { - m.ChangePack = &ChangePack{} - } - if err := m.ChangePack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BroadcastRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Topic = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthYorkie - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthYorkie - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYorkie - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BroadcastResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipYorkie(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYorkie - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipYorkie(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowYorkie - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowYorkie - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowYorkie - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthYorkie - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupYorkie - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthYorkie - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthYorkie = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowYorkie = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupYorkie = fmt.Errorf("proto: unexpected end of group") -) diff --git a/buf.gen.yaml b/buf.gen.yaml index 903a949cb..63e8ae622 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,8 +1,11 @@ version: v1 plugins: - - plugin: gofast + - plugin: go out: api - opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1,plugins=grpc,paths=source_relative + opt: paths=source_relative +# - plugin: gofast +# out: api +# opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1,plugins=grpc,paths=source_relative - plugin: connect-go out: api opt: paths=source_relative diff --git a/go.mod b/go.mod index e477caa42..8b98e627c 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,13 @@ require ( github.com/go-playground/validator/v10 v10.11.1 github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt v3.2.2+incompatible - github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/go-memdb v1.3.3 github.com/jedib0t/go-pretty/v6 v6.4.9 github.com/prometheus/client_golang v1.13.0 github.com/rs/xid v1.5.0 + github.com/rs/cors v1.10.1 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 16a0838cc..20c661d33 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -54,7 +52,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -67,7 +64,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -75,9 +71,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -90,19 +83,13 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -131,10 +118,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -148,8 +132,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -169,29 +151,20 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/hackerwins/go-memdb v1.3.3-0.20211225080334-513a74641622 h1:7UYuTq6zV83XV4zqn14gUuTtcywzbxGhUnj+hr/MUrE= github.com/hackerwins/go-memdb v1.3.3-0.20211225080334-513a74641622/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jedib0t/go-pretty/v6 v6.4.9 h1:vZ6bjGg2eBSrJn365qlxGcaWu09Id+LHtrfDWlB2Usc= github.com/jedib0t/go-pretty/v6 v6.4.9/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -205,7 +178,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -214,23 +186,15 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -238,77 +202,58 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -323,28 +268,19 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/undefinedlabs/go-mpatch v1.0.6 h1:h8q5ORH/GaOE1Se1DMhrOyljXZEhRcROO7agMqWXCOY= github.com/undefinedlabs/go-mpatch v1.0.6/go.mod h1:TyJZDQ/5AgyN7FSLiBJ8RO9u2c6wbtRvK827b6AVqY4= -github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.mongodb.org/mongo-driver v1.11.7 h1:LIwYxASDLGUg/8wOhgOOZhX8tQa/9tgZPgzZoVqJvcs= go.mongodb.org/mongo-driver v1.11.7/go.mod h1:G9TgswdsWjX4tmDA5zfs2+6AEPpYJwqblyjsfuh8oXY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -353,15 +289,10 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -374,7 +305,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -386,7 +316,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -448,7 +377,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -472,7 +400,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -522,7 +449,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -534,7 +460,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -655,7 +580,6 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -673,7 +597,6 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -687,27 +610,22 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -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/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/server/backend/database/change_info.go b/server/backend/database/change_info.go index bfbf76680..f17793cc4 100644 --- a/server/backend/database/change_info.go +++ b/server/backend/database/change_info.go @@ -20,6 +20,7 @@ import ( "encoding/json" "errors" "fmt" + "google.golang.org/protobuf/proto" "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" @@ -56,7 +57,7 @@ func EncodeOperations(operations []operations.Operation) ([][]byte, error) { } for _, pbOp := range changes { - encodedOp, err := pbOp.Marshal() + encodedOp, err := proto.Marshal(pbOp) if err != nil { return nil, ErrEncodeOperationFailed } @@ -92,7 +93,7 @@ func (i *ChangeInfo) ToChange() (*change.Change, error) { var pbOps []*api.Operation for _, bytesOp := range i.Operations { pbOp := api.Operation{} - if err := pbOp.Unmarshal(bytesOp); err != nil { + if err := proto.Unmarshal(bytesOp, &pbOp); err != nil { return nil, err } pbOps = append(pbOps, &pbOp) diff --git a/server/rpc/server.go b/server/rpc/server.go index 400c27bff..ee99c1977 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -19,108 +19,131 @@ package rpc import ( + "connectrpc.com/connect" "context" "fmt" - "math" - "net" - "time" - - api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/rs/cors" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/logging" "github.com/yorkie-team/yorkie/server/rpc/auth" - "github.com/yorkie-team/yorkie/server/rpc/grpchelper" "github.com/yorkie-team/yorkie/server/rpc/interceptors" - - grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/health" - healthpb "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/keepalive" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" + "net/http" + "time" ) // Server is a normal server that processes the logic requested by the client. type Server struct { conf *Config - grpcServer *grpc.Server + httpServer *http.Server yorkieServiceCancel context.CancelFunc tokenManager *auth.TokenManager } // NewServer creates a new instance of Server. func NewServer(conf *Config, be *backend.Backend) (*Server, error) { - tokenManager := auth.NewTokenManager( - be.Config.SecretKey, - be.Config.ParseAdminTokenDuration(), + //tokenManager := auth.NewTokenManager( + // be.Config.SecretKey, + // be.Config.ParseAdminTokenDuration(), + //) + // + //loggingInterceptor := grpchelper.NewLoggingInterceptor() + //adminAuthInterceptor := interceptors.NewAdminAuthInterceptor(be, tokenManager) + contextInterceptor := interceptors.NewContextInterceptor(be) + //defaultInterceptor := interceptors.NewDefaultInterceptor() + + //opts := []grpc.ServerOption{ + // grpc.UnaryInterceptor(grpcmiddleware.ChainUnaryServer( + // loggingInterceptor.Unary(), + // be.Metrics.ServerMetrics().UnaryServerInterceptor(), + // adminAuthInterceptor.Unary(), + // contextInterceptor.Unary(), + // defaultInterceptor.Unary(), + // )), + // grpc.StreamInterceptor(grpcmiddleware.ChainStreamServer( + // loggingInterceptor.Stream(), + // be.Metrics.ServerMetrics().StreamServerInterceptor(), + // adminAuthInterceptor.Stream(), + // contextInterceptor.Stream(), + // defaultInterceptor.Stream(), + // )), + //} + + interceptor := connect.WithInterceptors( + connect.UnaryInterceptorFunc(contextInterceptor.Unary), + //connect.StreamingHandlerFunc(contextInterceptor.Stream), ) - loggingInterceptor := grpchelper.NewLoggingInterceptor() - adminAuthInterceptor := interceptors.NewAdminAuthInterceptor(be, tokenManager) - contextInterceptor := interceptors.NewContextInterceptor(be) - defaultInterceptor := interceptors.NewDefaultInterceptor() - - opts := []grpc.ServerOption{ - grpc.UnaryInterceptor(grpcmiddleware.ChainUnaryServer( - loggingInterceptor.Unary(), - be.Metrics.ServerMetrics().UnaryServerInterceptor(), - adminAuthInterceptor.Unary(), - contextInterceptor.Unary(), - defaultInterceptor.Unary(), - )), - grpc.StreamInterceptor(grpcmiddleware.ChainStreamServer( - loggingInterceptor.Stream(), - be.Metrics.ServerMetrics().StreamServerInterceptor(), - adminAuthInterceptor.Stream(), - contextInterceptor.Stream(), - defaultInterceptor.Stream(), - )), - } + //if conf.CertFile != "" && conf.KeyFile != "" { + // creds, err := credentials.NewServerTLSFromFile(conf.CertFile, conf.KeyFile) + // if err != nil { + // return nil, fmt.Errorf("load TLS cert: %w", err) + // } + // opts = append(opts, grpc.Creds(creds)) + //} + // + //maxConnectionAge, err := time.ParseDuration(conf.MaxConnectionAge) + //if err != nil { + // return nil, fmt.Errorf("parse max connection age: %w", err) + //} + // + //maxConnectionAgeGrace, err := time.ParseDuration(conf.MaxConnectionAgeGrace) + //if err != nil { + // return nil, fmt.Errorf("parse max connection age grace: %w", err) + //} + // + //opts = append(opts, grpc.MaxRecvMsgSize(int(conf.MaxRequestBytes))) + //opts = append(opts, grpc.MaxSendMsgSize(math.MaxInt32)) + //opts = append(opts, grpc.MaxConcurrentStreams(math.MaxUint32)) + //opts = append(opts, grpc.KeepaliveParams(keepalive.ServerParameters{ + // MaxConnectionAge: maxConnectionAge, + // MaxConnectionAgeGrace: maxConnectionAgeGrace, + //})) - if conf.CertFile != "" && conf.KeyFile != "" { - creds, err := credentials.NewServerTLSFromFile(conf.CertFile, conf.KeyFile) - if err != nil { - return nil, fmt.Errorf("load TLS cert: %w", err) - } - opts = append(opts, grpc.Creds(creds)) - } - - maxConnectionAge, err := time.ParseDuration(conf.MaxConnectionAge) - if err != nil { - return nil, fmt.Errorf("parse max connection age: %w", err) - } + yorkieServiceCtx, yorkieServiceCancel := context.WithCancel(context.Background()) - maxConnectionAgeGrace, err := time.ParseDuration(conf.MaxConnectionAgeGrace) - if err != nil { - return nil, fmt.Errorf("parse max connection age grace: %w", err) + mux := http.NewServeMux() + mux.Handle(v1connect.NewYorkieServiceHandler( + newYorkieServer(yorkieServiceCtx, be), + interceptor, + )) + + httpServer := &http.Server{ + Addr: fmt.Sprintf(":%d", conf.Port), + Handler: h2c.NewHandler( + newCORS().Handler(mux), + &http2.Server{}, + ), } - opts = append(opts, grpc.MaxRecvMsgSize(int(conf.MaxRequestBytes))) - opts = append(opts, grpc.MaxSendMsgSize(math.MaxInt32)) - opts = append(opts, grpc.MaxConcurrentStreams(math.MaxUint32)) - opts = append(opts, grpc.KeepaliveParams(keepalive.ServerParameters{ - MaxConnectionAge: maxConnectionAge, - MaxConnectionAgeGrace: maxConnectionAgeGrace, - })) - - yorkieServiceCtx, yorkieServiceCancel := context.WithCancel(context.Background()) - - grpcServer := grpc.NewServer(opts...) - healthpb.RegisterHealthServer(grpcServer, health.NewServer()) - api.RegisterYorkieServiceServer(grpcServer, newYorkieServer(yorkieServiceCtx, be)) - api.RegisterAdminServiceServer(grpcServer, newAdminServer(be, tokenManager)) - be.Metrics.RegisterGRPCServer(grpcServer) + //grpcServer := grpc.NewServer(opts...) + //healthpb.RegisterHealthServer(grpcServer, health.NewServer()) + //api.RegisterYorkieServiceServer(grpcServer, newYorkieServer(yorkieServiceCtx, be)) + //api.RegisterAdminServiceServer(grpcServer, newAdminServer(be, tokenManager)) + //be.Metrics.RegisterGRPCServer(grpcServer) return &Server{ conf: conf, - grpcServer: grpcServer, + httpServer: httpServer, yorkieServiceCancel: yorkieServiceCancel, }, nil } // Start starts this server by opening the rpc port. func (s *Server) Start() error { - return s.listenAndServeGRPC() + return s.listenAndServe() +} + +func (s *Server) listenAndServe() error { + go func() { + logging.DefaultLogger().Infof(fmt.Sprintf("serving rpc on %d", s.conf.Port)) + if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { + logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) + } + }() + return nil } // Shutdown shuts down this server. @@ -128,27 +151,68 @@ func (s *Server) Shutdown(graceful bool) { s.yorkieServiceCancel() if graceful { - s.grpcServer.GracefulStop() + s.httpServer.Shutdown(context.Background()) } else { - s.grpcServer.Stop() + s.httpServer.Shutdown(context.Background()) } } -func (s *Server) listenAndServeGRPC() error { - lis, err := net.Listen("tcp", fmt.Sprintf(":%d", s.conf.Port)) - if err != nil { - return fmt.Errorf("listen port %d: %w", s.conf.Port, err) - } - - go func() { - logging.DefaultLogger().Infof("serving RPC on %d", s.conf.Port) - - if err := s.grpcServer.Serve(lis); err != nil { - if err != grpc.ErrServerStopped { - logging.DefaultLogger().Error(err) - } - } - }() - - return nil +//func (s *Server) listenAndServeGRPC() error { +// lis, err := net.Listen("tcp", fmt.Sprintf(":%d", s.conf.Port)) +// if err != nil { +// return fmt.Errorf("listen port %d: %w", s.conf.Port, err) +// } +// +// go func() { +// logging.DefaultLogger().Infof("serving RPC on %d", s.conf.Port) +// +// if err := s.grpcServer.Serve(lis); err != nil { +// if err != grpc.ErrServerStopped { +// logging.DefaultLogger().Error(err) +// } +// } +// }() +// +// return nil +//} + +func newCORS() *cors.Cors { + // To let web developers play with the demo service from browsers, we need a + // very permissive CORS setup. + return cors.New(cors.Options{ + AllowedMethods: []string{ + http.MethodHead, + http.MethodGet, + http.MethodPost, + http.MethodPut, + http.MethodPatch, + http.MethodDelete, + }, + AllowOriginFunc: func(origin string) bool { + // Allow all origins, which effectively disables CORS. + return true + }, + AllowedHeaders: []string{"*"}, + ExposedHeaders: []string{ + // Content-Type is in the default safelist. + "Accept", + "Accept-Encoding", + "Accept-Post", + "Connect-Accept-Encoding", + "Connect-Content-Encoding", + "Content-Encoding", + "Grpc-Accept-Encoding", + "Grpc-Encoding", + "Grpc-Message", + "Grpc-Status", + "Grpc-Status-Details-Bin", + "X-Custom-Header", + "Connect-Protocol-Version", + }, + // Let browsers cache CORS information for longer, which reduces the number + // of preflight requests. Any changes to ExposedHeaders won't take effect + // until the cached data expires. FF caps this value at 24h, and modern + // Chrome caps it at 2h. + MaxAge: int(2 * time.Hour / time.Second), + }) } diff --git a/server/rpc/yorkie_server.go b/server/rpc/yorkie_server.go index 7d4fcdc90..b0aecfc42 100644 --- a/server/rpc/yorkie_server.go +++ b/server/rpc/yorkie_server.go @@ -20,7 +20,6 @@ import ( "connectrpc.com/connect" "context" "fmt" - "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" @@ -335,7 +334,7 @@ func (s *yorkieServer) PushPullChanges( func (s *yorkieServer) WatchDocument( ctx context.Context, req *connect.Request[api.WatchDocumentRequest], - stream connect.ServerStream[api.WatchDocumentResponse], + stream *connect.ServerStream[api.WatchDocumentResponse], ) error { clientID, err := time.ActorIDFromHex(req.Msg.ClientId) if err != nil { From 60590f30bd2a0688bfdfd24ebe6c25120639d1d1 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Thu, 2 Nov 2023 15:23:59 +0900 Subject: [PATCH 05/33] Update client codes --- admin/client.go | 84 +++--- client/client.go | 70 +++-- server/packs/serverpacks.go | 3 +- server/rpc/interceptors/context.go | 19 +- server/rpc/server.go | 6 +- server/rpc/server_test.go | 453 ++++++++++++++--------------- 6 files changed, 310 insertions(+), 325 deletions(-) diff --git a/admin/client.go b/admin/client.go index 493e0600e..8f7e543fb 100644 --- a/admin/client.go +++ b/admin/client.go @@ -18,9 +18,13 @@ package admin import ( + "connectrpc.com/connect" "context" "crypto/tls" "fmt" + api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "net/http" "strings" "go.uber.org/zap" @@ -31,7 +35,6 @@ import ( "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" - api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document" "github.com/yorkie-team/yorkie/pkg/document/key" ) @@ -68,8 +71,8 @@ type Options struct { // Client is a client for admin service. type Client struct { - conn *grpc.ClientConn - client api.AdminServiceClient + conn *http.Client + client v1connect.AdminServiceClient dialOptions []grpc.DialOption authInterceptor *AuthInterceptor logger *zap.Logger @@ -125,22 +128,17 @@ func Dial(rpcAddr string, opts ...Option) (*Client, error) { // Dial dials to the admin service. func (c *Client) Dial(rpcAddr string) error { - conn, err := grpc.Dial(rpcAddr, c.dialOptions...) - if err != nil { - return fmt.Errorf("dial to %s: %w", rpcAddr, err) - } - - c.conn = conn - c.client = api.NewAdminServiceClient(conn) + c.conn = http.DefaultClient + c.client = v1connect.NewAdminServiceClient(c.conn, "http://"+rpcAddr) return nil } // Close closes the connection to the admin service. func (c *Client) Close() error { - if err := c.conn.Close(); err != nil { - return fmt.Errorf("close connection: %w", err) - } + //if err := c.conn.Close(); err != nil { + // return fmt.Errorf("close connection: %w", err) + //} return nil } @@ -151,17 +149,17 @@ func (c *Client) LogIn( username, password string, ) (string, error) { - response, err := c.client.LogIn(ctx, &api.LogInRequest{ + response, err := c.client.LogIn(ctx, connect.NewRequest(&api.LogInRequest{ Username: username, Password: password, - }) + })) if err != nil { return "", err } - c.authInterceptor.SetToken(response.Token) + c.authInterceptor.SetToken(response.Msg.Token) - return response.Token, nil + return response.Msg.Token, nil } // SignUp signs up a new user. @@ -170,56 +168,54 @@ func (c *Client) SignUp( username, password string, ) (*types.User, error) { - response, err := c.client.SignUp(ctx, &api.SignUpRequest{ + response, err := c.client.SignUp(ctx, connect.NewRequest(&api.SignUpRequest{ Username: username, Password: password, - }) + })) if err != nil { return nil, err } - return converter.FromUser(response.User) + return converter.FromUser(response.Msg.User) } // CreateProject creates a new project. func (c *Client) CreateProject(ctx context.Context, name string) (*types.Project, error) { response, err := c.client.CreateProject( ctx, - &api.CreateProjectRequest{ + connect.NewRequest(&api.CreateProjectRequest{ Name: name, }, - ) + )) if err != nil { return nil, err } - return converter.FromProject(response.Project) + return converter.FromProject(response.Msg.Project) } // GetProject gets the project by name. func (c *Client) GetProject(ctx context.Context, name string) (*types.Project, error) { response, err := c.client.GetProject( ctx, - &api.GetProjectRequest{Name: name}, - ) + connect.NewRequest(&api.GetProjectRequest{Name: name})) if err != nil { return nil, err } - return converter.FromProject(response.Project) + return converter.FromProject(response.Msg.Project) } // ListProjects lists all projects. func (c *Client) ListProjects(ctx context.Context) ([]*types.Project, error) { response, err := c.client.ListProjects( ctx, - &api.ListProjectsRequest{}, - ) + connect.NewRequest(&api.ListProjectsRequest{})) if err != nil { return nil, err } - return converter.FromProjects(response.Projects) + return converter.FromProjects(response.Msg.Projects) } // UpdateProject updates an existing project. @@ -233,15 +229,15 @@ func (c *Client) UpdateProject( return nil, err } - response, err := c.client.UpdateProject(ctx, &api.UpdateProjectRequest{ + response, err := c.client.UpdateProject(ctx, connect.NewRequest(&api.UpdateProjectRequest{ Id: id, Fields: pbProjectField, - }) + })) if err != nil { return nil, err } - return converter.FromProject(response.Project) + return converter.FromProject(response.Msg.Project) } // ListDocuments lists documents. @@ -255,19 +251,19 @@ func (c *Client) ListDocuments( ) ([]*types.DocumentSummary, error) { response, err := c.client.ListDocuments( ctx, - &api.ListDocumentsRequest{ + connect.NewRequest(&api.ListDocumentsRequest{ ProjectName: projectName, PreviousId: previousID, PageSize: pageSize, IsForward: isForward, IncludeSnapshot: includeSnapshot, }, - ) + )) if err != nil { return nil, err } - return converter.FromDocumentSummaries(response.Documents) + return converter.FromDocumentSummaries(response.Msg.Documents) } // RemoveDocument removes a document of the given key. @@ -285,12 +281,12 @@ func (c *Client) RemoveDocument( _, err = c.client.RemoveDocumentByAdmin( withShardKey(ctx, apiKey, documentKey), - &api.RemoveDocumentByAdminRequest{ + connect.NewRequest(&api.RemoveDocumentByAdminRequest{ ProjectName: projectName, DocumentKey: documentKey, Force: force, }, - ) + )) return err } @@ -303,19 +299,19 @@ func (c *Client) ListChangeSummaries( pageSize int32, isForward bool, ) ([]*types.ChangeSummary, error) { - resp, err := c.client.ListChanges(ctx, &api.ListChangesRequest{ + resp, err := c.client.ListChanges(ctx, connect.NewRequest(&api.ListChangesRequest{ ProjectName: projectName, DocumentKey: key.String(), PreviousSeq: previousSeq, PageSize: pageSize, IsForward: isForward, - }) + })) if err != nil { return nil, err } - changes, err := converter.FromChanges(resp.Changes) + changes, err := converter.FromChanges(resp.Msg.Changes) if err != nil { return nil, err } @@ -327,11 +323,11 @@ func (c *Client) ListChangeSummaries( seq := changes[0].ServerSeq() - 1 - snapshotMeta, err := c.client.GetSnapshotMeta(ctx, &api.GetSnapshotMetaRequest{ + snapshotMeta, err := c.client.GetSnapshotMeta(ctx, connect.NewRequest(&api.GetSnapshotMetaRequest{ ProjectName: projectName, DocumentKey: key.String(), ServerSeq: seq, - }) + })) if err != nil { return nil, err } @@ -339,8 +335,8 @@ func (c *Client) ListChangeSummaries( newDoc, err := document.NewInternalDocumentFromSnapshot( key, seq, - snapshotMeta.Lamport, - snapshotMeta.Snapshot, + snapshotMeta.Msg.Lamport, + snapshotMeta.Msg.Snapshot, ) if err != nil { diff --git a/client/client.go b/client/client.go index 63e65054c..63ed0022a 100644 --- a/client/client.go +++ b/client/client.go @@ -19,9 +19,12 @@ package client import ( + "connectrpc.com/connect" "context" "errors" "fmt" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "net/http" "strings" "github.com/rs/xid" @@ -77,8 +80,8 @@ type Attachment struct { // It has documents and sends changes of the document in local // to the server to synchronize with other replicas in remote. type Client struct { - conn *grpc.ClientConn - client api.YorkieServiceClient + conn *http.Client + client v1connect.YorkieServiceClient options Options dialOptions []grpc.DialOption logger *zap.Logger @@ -176,13 +179,8 @@ func Dial(rpcAddr string, opts ...Option) (*Client, error) { // Dial dials the given rpcAddr. func (c *Client) Dial(rpcAddr string) error { - conn, err := grpc.Dial(rpcAddr, c.dialOptions...) - if err != nil { - return fmt.Errorf("dial to %s: %w", rpcAddr, err) - } - - c.conn = conn - c.client = api.NewYorkieServiceClient(conn) + c.conn = http.DefaultClient + c.client = v1connect.NewYorkieServiceClient(c.conn, "http://"+rpcAddr) return nil } @@ -193,9 +191,9 @@ func (c *Client) Close() error { return err } - if err := c.conn.Close(); err != nil { - return fmt.Errorf("close connection: %w", err) - } + //if err := c.conn.Close(); err != nil { + // return fmt.Errorf("close connection: %w", err) + //} return nil } @@ -208,14 +206,14 @@ func (c *Client) Activate(ctx context.Context) error { return nil } - response, err := c.client.ActivateClient(withShardKey(ctx, c.options.APIKey), &api.ActivateClientRequest{ + response, err := c.client.ActivateClient(withShardKey(ctx, c.options.APIKey), connect.NewRequest(&api.ActivateClientRequest{ ClientKey: c.key, - }) + })) if err != nil { return err } - clientID, err := time.ActorIDFromHex(response.ClientId) + clientID, err := time.ActorIDFromHex(response.Msg.ClientId) if err != nil { return err } @@ -232,9 +230,9 @@ func (c *Client) Deactivate(ctx context.Context) error { return nil } - _, err := c.client.DeactivateClient(withShardKey(ctx, c.options.APIKey), &api.DeactivateClientRequest{ + _, err := c.client.DeactivateClient(withShardKey(ctx, c.options.APIKey), connect.NewRequest(&api.DeactivateClientRequest{ ClientId: c.id.String(), - }) + })) if err != nil { return err } @@ -276,16 +274,16 @@ func (c *Client) Attach(ctx context.Context, doc *document.Document, options ... res, err := c.client.AttachDocument( withShardKey(ctx, c.options.APIKey, doc.Key().String()), - &api.AttachDocumentRequest{ + connect.NewRequest(&api.AttachDocumentRequest{ ClientId: c.id.String(), ChangePack: pbChangePack, }, - ) + )) if err != nil { return err } - pack, err := converter.FromChangePack(res.ChangePack) + pack, err := converter.FromChangePack(res.Msg.ChangePack) if err != nil { return err } @@ -308,7 +306,7 @@ func (c *Client) Attach(ctx context.Context, doc *document.Document, options ... doc.SetStatus(document.StatusAttached) c.attachments[doc.Key()] = &Attachment{ doc: doc, - docID: types.ID(res.DocumentId), + docID: types.ID(res.Msg.DocumentId), } return nil @@ -349,18 +347,18 @@ func (c *Client) Detach(ctx context.Context, doc *document.Document, options ... res, err := c.client.DetachDocument( withShardKey(ctx, c.options.APIKey, doc.Key().String()), - &api.DetachDocumentRequest{ + connect.NewRequest(&api.DetachDocumentRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), ChangePack: pbChangePack, RemoveIfNotAttached: opts.removeIfNotAttached, }, - ) + )) if err != nil { return err } - pack, err := converter.FromChangePack(res.ChangePack) + pack, err := converter.FromChangePack(res.Msg.ChangePack) if err != nil { return err } @@ -412,16 +410,16 @@ func (c *Client) Watch( rch := make(chan WatchResponse) stream, err := c.client.WatchDocument( withShardKey(ctx, c.options.APIKey, doc.Key().String()), - &api.WatchDocumentRequest{ + connect.NewRequest(&api.WatchDocumentRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), }, - ) + )) if err != nil { return nil, err } - pbResp, err := stream.Recv() + pbResp := stream.Msg() if err != nil { return nil, err } @@ -431,7 +429,7 @@ func (c *Client) Watch( go func() { for { - pbResp, err := stream.Recv() + pbResp := stream.Msg() if err != nil { rch <- WatchResponse{Err: err} close(rch) @@ -609,18 +607,18 @@ func (c *Client) pushPullChanges(ctx context.Context, opt SyncOptions) error { res, err := c.client.PushPullChanges( withShardKey(ctx, c.options.APIKey, opt.key.String()), - &api.PushPullChangesRequest{ + connect.NewRequest(&api.PushPullChangesRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), ChangePack: pbChangePack, PushOnly: opt.mode == types.SyncModePushOnly, }, - ) + )) if err != nil { return err } - pack, err := converter.FromChangePack(res.ChangePack) + pack, err := converter.FromChangePack(res.Msg.ChangePack) if err != nil { return err } @@ -654,17 +652,17 @@ func (c *Client) Remove(ctx context.Context, doc *document.Document) error { res, err := c.client.RemoveDocument( withShardKey(ctx, c.options.APIKey, doc.Key().String()), - &api.RemoveDocumentRequest{ + connect.NewRequest(&api.RemoveDocumentRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), ChangePack: pbChangePack, }, - ) + )) if err != nil { return err } - pack, err := converter.FromChangePack(res.ChangePack) + pack, err := converter.FromChangePack(res.Msg.ChangePack) if err != nil { return err } @@ -691,13 +689,13 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st _, err := c.client.Broadcast( withShardKey(ctx, c.options.APIKey, doc.Key().String()), - &api.BroadcastRequest{ + connect.NewRequest(&api.BroadcastRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), Topic: topic, Payload: payload, }, - ) + )) if err != nil { return err } diff --git a/server/packs/serverpacks.go b/server/packs/serverpacks.go index e36f75009..46e5824e0 100644 --- a/server/packs/serverpacks.go +++ b/server/packs/serverpacks.go @@ -24,6 +24,7 @@ import ( "github.com/yorkie-team/yorkie/pkg/document/key" "github.com/yorkie-team/yorkie/pkg/document/time" "github.com/yorkie-team/yorkie/server/backend/database" + "google.golang.org/protobuf/proto" ) // ServerPack is similar to change.Pack, but has ChangeInfos instead of Changes @@ -96,7 +97,7 @@ func (p *ServerPack) ToPBChangePack() (*api.ChangePack, error) { var pbOps []*api.Operation for _, bytesOp := range info.Operations { pbOp := api.Operation{} - if err := pbOp.Unmarshal(bytesOp); err != nil { + if err := proto.Unmarshal(bytesOp, &pbOp); err != nil { return nil, err } pbOps = append(pbOps, &pbOp) diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 946b545c2..578033590 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -51,8 +51,8 @@ func NewContextInterceptor(be *backend.Backend) *ContextInterceptor { } } -// Unary creates a unary server interceptor for building additional context. -func (i *ContextInterceptor) Unary(next connect.UnaryFunc) connect.UnaryFunc { +// WrapUnary creates a unary server interceptor for building additional context. +func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, req connect.AnyRequest, @@ -82,8 +82,19 @@ func (i *ContextInterceptor) Unary(next connect.UnaryFunc) connect.UnaryFunc { } } -// Stream creates a stream server interceptor for building additional context. -func (i *ContextInterceptor) Stream(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { +// WrapStreamingClient creates a stream client interceptor for building additional context. +func (i *ContextInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { + return func( + ctx context.Context, + spec connect.Spec, + ) connect.StreamingClientConn { + conn := next(ctx, spec) + return conn + } +} + +// WrapStreamingHandler creates a stream server interceptor for building additional context. +func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( ctx context.Context, conn connect.StreamingHandlerConn, diff --git a/server/rpc/server.go b/server/rpc/server.go index ee99c1977..cf1d28061 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -51,7 +51,6 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { // //loggingInterceptor := grpchelper.NewLoggingInterceptor() //adminAuthInterceptor := interceptors.NewAdminAuthInterceptor(be, tokenManager) - contextInterceptor := interceptors.NewContextInterceptor(be) //defaultInterceptor := interceptors.NewDefaultInterceptor() //opts := []grpc.ServerOption{ @@ -71,10 +70,7 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { // )), //} - interceptor := connect.WithInterceptors( - connect.UnaryInterceptorFunc(contextInterceptor.Unary), - //connect.StreamingHandlerFunc(contextInterceptor.Stream), - ) + interceptor := connect.WithInterceptors(interceptors.NewContextInterceptor(be)) //if conf.CertFile != "" && conf.KeyFile != "" { // creds, err := credentials.NewServerTLSFromFile(conf.CertFile, conf.KeyFile) diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index b52e60f5f..7b215b2c4 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -17,15 +17,19 @@ package rpc_test import ( + "connectrpc.com/connect" "context" "encoding/hex" "fmt" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "github.com/yorkie-team/yorkie/server/rpc/interceptors" + "google.golang.org/protobuf/types/known/wrapperspb" "log" + "net/http" "os" "testing" "time" - "github.com/gogo/protobuf/types" "github.com/stretchr/testify/assert" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -54,9 +58,9 @@ var ( testRPCServer *rpc.Server testRPCAddr = fmt.Sprintf("localhost:%d", helper.RPCPort) - testClient api.YorkieServiceClient + testClient v1connect.YorkieServiceClient testAdminAuthInterceptor *admin.AuthInterceptor - testAdminClient api.AdminServiceClient + testAdminClient v1connect.AdminServiceClient invalidChangePack = &api.ChangePack{ DocumentKey: "invalid", @@ -79,6 +83,7 @@ func TestMain(m *testing.M) { ProjectInfoCacheSize: helper.ProjectInfoCacheSize, ProjectInfoCacheTTL: helper.ProjectInfoCacheTTL.String(), AdminTokenDuration: helper.AdminTokenDuration, + UseDefaultProject: true, }, &mongo.Config{ ConnectionURI: helper.MongoConnectionURI, YorkieDatabase: helper.TestDBName(), @@ -121,11 +126,10 @@ func TestMain(m *testing.M) { dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) dialOptions = append(dialOptions, grpc.WithTransportCredentials(insecure.NewCredentials())) - conn, err := grpc.Dial(testRPCAddr, dialOptions...) - if err != nil { - log.Fatal(err) - } - testClient = api.NewYorkieServiceClient(conn) + conn := http.DefaultClient + contextInterceptor := interceptors.NewContextInterceptor(be) + interceptor := connect.WithInterceptors(connect.UnaryInterceptorFunc(contextInterceptor.Unary)) + testClient = v1connect.NewYorkieServiceClient(conn, "http://"+testRPCAddr, interceptor) credentials := grpc.WithTransportCredentials(insecure.NewCredentials()) dialOptions = []grpc.DialOption{credentials} @@ -134,11 +138,8 @@ func TestMain(m *testing.M) { dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(testAdminAuthInterceptor.Unary())) dialOptions = append(dialOptions, grpc.WithStreamInterceptor(testAdminAuthInterceptor.Stream())) - adminConn, err := grpc.Dial(testRPCAddr, dialOptions...) - if err != nil { - log.Fatal(err) - } - testAdminClient = api.NewAdminServiceClient(adminConn) + adminConn := http.DefaultClient + testAdminClient = v1connect.NewAdminServiceClient(adminConn, "http://"+testRPCAddr) code := m.Run() @@ -153,42 +154,36 @@ func TestSDKRPCServerBackend(t *testing.T) { t.Run("activate/deactivate client test", func(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) _, err = testClient.DeactivateClient( context.Background(), - &api.DeactivateClientRequest{ClientId: activateResp.ClientId}, - ) + connect.NewRequest(&api.DeactivateClientRequest{ClientId: activateResp.Msg.ClientId})) assert.NoError(t, err) // invalid argument _, err = testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: ""}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: ""})) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) _, err = testClient.DeactivateClient( context.Background(), - &api.DeactivateClientRequest{ClientId: emptyClientID}, - ) + connect.NewRequest(&api.DeactivateClientRequest{ClientId: emptyClientID})) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) // client not found _, err = testClient.DeactivateClient( context.Background(), - &api.DeactivateClientRequest{ClientId: nilClientID}, - ) + connect.NewRequest(&api.DeactivateClientRequest{ClientId: nilClientID})) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) }) t.Run("attach/detach document test", func(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -198,118 +193,116 @@ func TestSDKRPCServerBackend(t *testing.T) { resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) // try to attach with invalid client ID _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ + connect.NewRequest(&api.AttachDocumentRequest{ ClientId: invalidClientID, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) // try to attach with invalid client _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ + connect.NewRequest(&api.AttachDocumentRequest{ ClientId: nilClientID, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) // try to attach already attached document _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) // try to attach invalid change pack _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: invalidChangePack, }, - ) + )) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) // try to detach already detached document _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: invalidChangePack, }, - ) + )) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) // document not found _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, DocumentId: "000000000000000000000000", ChangePack: &api.ChangePack{ Checkpoint: &api.Checkpoint{ServerSeq: 0, ClientSeq: 0}, }, }, - ) + )) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) _, err = testClient.DeactivateClient( context.Background(), - &api.DeactivateClientRequest{ClientId: activateResp.ClientId}, - ) + connect.NewRequest(&api.DeactivateClientRequest{ClientId: activateResp.Msg.ClientId})) assert.NoError(t, err) // try to attach the document with a deactivated client _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) }) t.Run("attach/detach on removed document test", func(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -325,53 +318,53 @@ func TestSDKRPCServerBackend(t *testing.T) { resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.NoError(t, err) // try to detach document with same ID as removed document // FailedPrecondition because document is not attached. _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) // try to create new document with same key as removed document resPack, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.NoError(t, err) }) @@ -383,15 +376,14 @@ func TestSDKRPCServerBackend(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: helper.TestDocKey(t).String()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: helper.TestDocKey(t).String()})) assert.NoError(t, err) - actorID, _ := hex.DecodeString(activateResp.ClientId) + actorID, _ := hex.DecodeString(activateResp.Msg.ClientId) resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: &api.ChangePack{ DocumentKey: helper.TestDocKey(t).String(), Checkpoint: &api.Checkpoint{ServerSeq: 0, ClientSeq: 1}, @@ -404,14 +396,14 @@ func TestSDKRPCServerBackend(t *testing.T) { }}, }, }, - ) + )) assert.NoError(t, err) _, err = testClient.PushPullChanges( context.Background(), - &api.PushPullChangesRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.PushPullChangesRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: &api.ChangePack{ DocumentKey: helper.TestDocKey(t).String(), Checkpoint: &api.Checkpoint{ServerSeq: 0, ClientSeq: 2}, @@ -424,14 +416,14 @@ func TestSDKRPCServerBackend(t *testing.T) { }}, }, }, - ) + )) assert.NoError(t, err) _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: &api.ChangePack{ DocumentKey: helper.TestDocKey(t).String(), Checkpoint: &api.Checkpoint{ServerSeq: 0, ClientSeq: 3}, @@ -444,46 +436,45 @@ func TestSDKRPCServerBackend(t *testing.T) { }}, }, }, - ) + )) assert.NoError(t, err) // try to push/pull with detached document _, err = testClient.PushPullChanges( context.Background(), - &api.PushPullChangesRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.PushPullChangesRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) // try to push/pull with invalid pack _, err = testClient.PushPullChanges( context.Background(), - &api.PushPullChangesRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.PushPullChangesRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: invalidChangePack, }, - ) + )) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) _, err = testClient.DeactivateClient( context.Background(), - &api.DeactivateClientRequest{ClientId: activateResp.ClientId}, - ) + connect.NewRequest(&api.DeactivateClientRequest{ClientId: activateResp.Msg.ClientId})) assert.NoError(t, err) // try to push/pull with deactivated client _, err = testClient.PushPullChanges( context.Background(), - &api.PushPullChangesRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.PushPullChangesRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) }) @@ -501,46 +492,44 @@ func TestSDKRPCServerBackend(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: helper.TestDocKey(t).String()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: helper.TestDocKey(t).String()})) assert.NoError(t, err) resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.NoError(t, err) // try to push/pull on removed document _, err = testClient.PushPullChanges( context.Background(), - &api.PushPullChangesRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.PushPullChangesRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) }) t.Run("remove document test", func(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -556,40 +545,39 @@ func TestSDKRPCServerBackend(t *testing.T) { resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.NoError(t, err) // try to remove removed document _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) }) t.Run("remove document with invalid client state test", func(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -605,57 +593,55 @@ func TestSDKRPCServerBackend(t *testing.T) { resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testClient.DetachDocument( context.Background(), - &api.DetachDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.DetachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) // try to remove detached document _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) _, err = testClient.DeactivateClient( context.Background(), - &api.DeactivateClientRequest{ClientId: activateResp.ClientId}, - ) + connect.NewRequest(&api.DeactivateClientRequest{ClientId: activateResp.Msg.ClientId})) assert.NoError(t, err) // try to remove document with a deactivated client _, err = testClient.RemoveDocument( context.Background(), - &api.RemoveDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.RemoveDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, ChangePack: packWithRemoveRequest, }, - ) + )) assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) }) t.Run("watch document test", func(t *testing.T) { activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -665,32 +651,32 @@ func TestSDKRPCServerBackend(t *testing.T) { resPack, err := testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) // watch document watchResp, err := testClient.WatchDocument( context.Background(), - &api.WatchDocumentRequest{ - ClientId: activateResp.ClientId, - DocumentId: resPack.DocumentId, + connect.NewRequest(&api.WatchDocumentRequest{ + ClientId: activateResp.Msg.ClientId, + DocumentId: resPack.Msg.DocumentId, }, - ) + )) assert.NoError(t, err) // check if stream is open - _, err = watchResp.Recv() + _ = watchResp.Msg() assert.NoError(t, err) // wait for MaxConnectionAge + MaxConnectionAgeGrace time.Sleep(helper.RPCMaxConnectionAge + helper.RPCMaxConnectionAgeGrace) // check if stream has closed by server (EOF) - _, err = watchResp.Recv() + _ = watchResp.Msg() assert.Equal(t, codes.Unavailable, status.Code(err)) assert.Contains(t, err.Error(), "EOF") }) @@ -703,42 +689,42 @@ func TestAdminRPCServerBackend(t *testing.T) { _, err := testAdminClient.SignUp( context.Background(), - &api.SignUpRequest{ + connect.NewRequest(&api.SignUpRequest{ Username: adminUser, Password: adminPassword, }, - ) + )) assert.NoError(t, err) // try to sign up with existing username _, err = testAdminClient.SignUp( context.Background(), - &api.SignUpRequest{ + connect.NewRequest(&api.SignUpRequest{ Username: adminUser, Password: adminPassword, }, - ) + )) assert.Equal(t, codes.AlreadyExists, status.Convert(err).Code()) }) t.Run("admin login test", func(t *testing.T) { _, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) // try to log in with invalid password _, err = testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: invalidSlugName, }, - ) + )) assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) }) @@ -747,57 +733,56 @@ func TestAdminRPCServerBackend(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) _, err = testAdminClient.CreateProject( context.Background(), - &api.CreateProjectRequest{ + connect.NewRequest(&api.CreateProjectRequest{ Name: projectName, }, - ) + )) assert.NoError(t, err) // try to create project with existing name _, err = testAdminClient.CreateProject( context.Background(), - &api.CreateProjectRequest{ + connect.NewRequest(&api.CreateProjectRequest{ Name: projectName, }, - ) + )) assert.Equal(t, codes.AlreadyExists, status.Convert(err).Code()) }) t.Run("admin list projects test", func(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) _, err = testAdminClient.CreateProject( context.Background(), - &api.CreateProjectRequest{ + connect.NewRequest(&api.CreateProjectRequest{ Name: helper.TestSlugName(t), }, - ) + )) assert.NoError(t, err) _, err = testAdminClient.ListProjects( context.Background(), - &api.ListProjectsRequest{}, - ) + connect.NewRequest(&api.ListProjectsRequest{})) assert.NoError(t, err) }) @@ -806,38 +791,38 @@ func TestAdminRPCServerBackend(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) _, err = testAdminClient.CreateProject( context.Background(), - &api.CreateProjectRequest{ + connect.NewRequest(&api.CreateProjectRequest{ Name: projectName, }, - ) + )) assert.NoError(t, err) _, err = testAdminClient.GetProject( context.Background(), - &api.GetProjectRequest{ + connect.NewRequest(&api.GetProjectRequest{ Name: projectName, }, - ) + )) assert.NoError(t, err) // try to get project with non-existing name _, err = testAdminClient.GetProject( context.Background(), - &api.GetProjectRequest{ + connect.NewRequest(&api.GetProjectRequest{ Name: invalidSlugName, }, - ) + )) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) }) @@ -846,74 +831,74 @@ func TestAdminRPCServerBackend(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) createResp, err := testAdminClient.CreateProject( context.Background(), - &api.CreateProjectRequest{ + connect.NewRequest(&api.CreateProjectRequest{ Name: projectName, }, - ) + )) assert.NoError(t, err) _, err = testAdminClient.UpdateProject( context.Background(), - &api.UpdateProjectRequest{ - Id: createResp.Project.Id, + connect.NewRequest(&api.UpdateProjectRequest{ + Id: createResp.Msg.Project.Id, Fields: &api.UpdatableProjectFields{ - Name: &types.StringValue{Value: "updated"}, + Name: &wrapperspb.StringValue{Value: "updated"}, }, }, - ) + )) assert.NoError(t, err) // try to update project with invalid field _, err = testAdminClient.UpdateProject( context.Background(), - &api.UpdateProjectRequest{ + connect.NewRequest(&api.UpdateProjectRequest{ Id: projectName, Fields: &api.UpdatableProjectFields{ - Name: &types.StringValue{Value: invalidSlugName}, + Name: &wrapperspb.StringValue{Value: invalidSlugName}, }, }, - ) + )) assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) }) t.Run("admin list documents test", func(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) _, err = testAdminClient.ListDocuments( context.Background(), - &api.ListDocumentsRequest{ + connect.NewRequest(&api.ListDocumentsRequest{ ProjectName: defaultProjectName, }, - ) + )) assert.NoError(t, err) // try to list documents with non-existing project name _, err = testAdminClient.ListDocuments( context.Background(), - &api.ListDocumentsRequest{ + connect.NewRequest(&api.ListDocumentsRequest{ ProjectName: invalidSlugName, }, - ) + )) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) }) @@ -922,19 +907,18 @@ func TestAdminRPCServerBackend(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -944,30 +928,30 @@ func TestAdminRPCServerBackend(t *testing.T) { _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testAdminClient.GetDocument( context.Background(), - &api.GetDocumentRequest{ + connect.NewRequest(&api.GetDocumentRequest{ ProjectName: defaultProjectName, DocumentKey: testDocumentKey, }, - ) + )) assert.NoError(t, err) // try to get document with non-existing document name _, err = testAdminClient.GetDocument( context.Background(), - &api.GetDocumentRequest{ + connect.NewRequest(&api.GetDocumentRequest{ ProjectName: defaultProjectName, DocumentKey: invalidChangePack.DocumentKey, }, - ) + )) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) }) @@ -976,19 +960,18 @@ func TestAdminRPCServerBackend(t *testing.T) { resp, err := testAdminClient.LogIn( context.Background(), - &api.LogInRequest{ + connect.NewRequest(&api.LogInRequest{ Username: helper.AdminUser, Password: helper.AdminPassword, }, - ) + )) assert.NoError(t, err) - testAdminAuthInterceptor.SetToken(resp.Token) + testAdminAuthInterceptor.SetToken(resp.Msg.Token) activateResp, err := testClient.ActivateClient( context.Background(), - &api.ActivateClientRequest{ClientKey: t.Name()}, - ) + connect.NewRequest(&api.ActivateClientRequest{ClientKey: t.Name()})) assert.NoError(t, err) packWithNoChanges := &api.ChangePack{ @@ -998,30 +981,30 @@ func TestAdminRPCServerBackend(t *testing.T) { _, err = testClient.AttachDocument( context.Background(), - &api.AttachDocumentRequest{ - ClientId: activateResp.ClientId, + connect.NewRequest(&api.AttachDocumentRequest{ + ClientId: activateResp.Msg.ClientId, ChangePack: packWithNoChanges, }, - ) + )) assert.NoError(t, err) _, err = testAdminClient.ListChanges( context.Background(), - &api.ListChangesRequest{ + connect.NewRequest(&api.ListChangesRequest{ ProjectName: defaultProjectName, DocumentKey: testDocumentKey, }, - ) + )) assert.NoError(t, err) // try to list changes with non-existing document name _, err = testAdminClient.ListChanges( context.Background(), - &api.ListChangesRequest{ + connect.NewRequest(&api.ListChangesRequest{ ProjectName: defaultProjectName, DocumentKey: invalidChangePack.DocumentKey, }, - ) + )) assert.Equal(t, codes.NotFound, status.Convert(err).Code()) }) } From 83cf1eae540965098c843d43e96800250964fa75 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sat, 4 Nov 2023 17:26:09 +0900 Subject: [PATCH 06/33] Update server test --- server/rpc/server_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index 7b215b2c4..30f7772f8 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -127,8 +127,7 @@ func TestMain(m *testing.M) { dialOptions = append(dialOptions, grpc.WithTransportCredentials(insecure.NewCredentials())) conn := http.DefaultClient - contextInterceptor := interceptors.NewContextInterceptor(be) - interceptor := connect.WithInterceptors(connect.UnaryInterceptorFunc(contextInterceptor.Unary)) + interceptor := connect.WithInterceptors(interceptors.NewContextInterceptor(be)) testClient = v1connect.NewYorkieServiceClient(conn, "http://"+testRPCAddr, interceptor) credentials := grpc.WithTransportCredentials(insecure.NewCredentials()) From e177697a4239cf33bb5d620260ed29673b670534 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Wed, 29 Nov 2023 01:56:34 +0900 Subject: [PATCH 07/33] Update admin server codes --- server/rpc/admin_server.go | 157 +++++++++++++------------- server/rpc/interceptors/admin_auth.go | 105 +++++++---------- server/rpc/interceptors/context.go | 12 +- server/rpc/server.go | 15 ++- 4 files changed, 133 insertions(+), 156 deletions(-) diff --git a/server/rpc/admin_server.go b/server/rpc/admin_server.go index 2e754ff25..738aa8372 100644 --- a/server/rpc/admin_server.go +++ b/server/rpc/admin_server.go @@ -17,6 +17,7 @@ package rpc import ( + "connectrpc.com/connect" "context" "fmt" @@ -51,14 +52,14 @@ func newAdminServer(be *backend.Backend, tokenManager *auth.TokenManager) *admin // SignUp signs up a user. func (s *adminServer) SignUp( ctx context.Context, - req *api.SignUpRequest, -) (*api.SignUpResponse, error) { - fields := &types.SignupFields{Username: &req.Username, Password: &req.Password} + req *connect.Request[api.SignUpRequest], +) (*connect.Response[api.SignUpResponse], error) { + fields := &types.SignupFields{Username: &req.Msg.Username, Password: &req.Msg.Password} if err := fields.Validate(); err != nil { return nil, err } - user, err := users.SignUp(ctx, s.backend, req.Username, req.Password) + user, err := users.SignUp(ctx, s.backend, req.Msg.Username, req.Msg.Password) if err != nil { return nil, err } @@ -68,21 +69,21 @@ func (s *adminServer) SignUp( return nil, err } - return &api.SignUpResponse{ + return connect.NewResponse(&api.SignUpResponse{ User: pbUser, - }, nil + }), nil } // LogIn logs in a user. func (s *adminServer) LogIn( ctx context.Context, - req *api.LogInRequest, -) (*api.LogInResponse, error) { + req *connect.Request[api.LogInRequest], +) (*connect.Response[api.LogInResponse], error) { user, err := users.IsCorrectPassword( ctx, s.backend, - req.Username, - req.Password, + req.Msg.Username, + req.Msg.Password, ) if err != nil { return nil, err @@ -93,23 +94,23 @@ func (s *adminServer) LogIn( return nil, err } - return &api.LogInResponse{ + return connect.NewResponse(&api.LogInResponse{ Token: token, - }, nil + }), nil } // CreateProject creates a new project. func (s *adminServer) CreateProject( ctx context.Context, - req *api.CreateProjectRequest, -) (*api.CreateProjectResponse, error) { - fields := &types.CreateProjectFields{Name: &req.Name} + req *connect.Request[api.CreateProjectRequest], +) (*connect.Response[api.CreateProjectResponse], error) { + fields := &types.CreateProjectFields{Name: &req.Msg.Name} if err := fields.Validate(); err != nil { return nil, err } user := users.From(ctx) - project, err := projects.CreateProject(ctx, s.backend, user.ID, req.Name) + project, err := projects.CreateProject(ctx, s.backend, user.ID, req.Msg.Name) if err != nil { return nil, err } @@ -119,16 +120,16 @@ func (s *adminServer) CreateProject( return nil, err } - return &api.CreateProjectResponse{ + return connect.NewResponse(&api.CreateProjectResponse{ Project: pbProject, - }, nil + }), nil } // ListProjects lists all projects. func (s *adminServer) ListProjects( ctx context.Context, - _ *api.ListProjectsRequest, -) (*api.ListProjectsResponse, error) { + _ *connect.Request[api.ListProjectsRequest], +) (*connect.Response[api.ListProjectsResponse], error) { user := users.From(ctx) projectList, err := projects.ListProjects(ctx, s.backend, user.ID) if err != nil { @@ -140,18 +141,18 @@ func (s *adminServer) ListProjects( return nil, err } - return &api.ListProjectsResponse{ + return connect.NewResponse(&api.ListProjectsResponse{ Projects: pbProjects, - }, nil + }), nil } // GetProject gets a project. func (s *adminServer) GetProject( ctx context.Context, - req *api.GetProjectRequest, -) (*api.GetProjectResponse, error) { + req *connect.Request[api.GetProjectRequest], +) (*connect.Response[api.GetProjectResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.Name) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.Name) if err != nil { return nil, err } @@ -161,17 +162,17 @@ func (s *adminServer) GetProject( return nil, err } - return &api.GetProjectResponse{ + return connect.NewResponse(&api.GetProjectResponse{ Project: pbProject, - }, nil + }), nil } // UpdateProject updates the project. func (s *adminServer) UpdateProject( ctx context.Context, - req *api.UpdateProjectRequest, -) (*api.UpdateProjectResponse, error) { - fields, err := converter.FromUpdatableProjectFields(req.Fields) + req *connect.Request[api.UpdateProjectRequest], +) (*connect.Response[api.UpdateProjectResponse], error) { + fields, err := converter.FromUpdatableProjectFields(req.Msg.Fields) if err != nil { return nil, err } @@ -184,7 +185,7 @@ func (s *adminServer) UpdateProject( ctx, s.backend, user.ID, - types.ID(req.Id), + types.ID(req.Msg.Id), fields, ) if err != nil { @@ -196,18 +197,18 @@ func (s *adminServer) UpdateProject( return nil, err } - return &api.UpdateProjectResponse{ + return connect.NewResponse(&api.UpdateProjectResponse{ Project: pbProject, - }, nil + }), nil } // GetDocument gets the document. func (s *adminServer) GetDocument( ctx context.Context, - req *api.GetDocumentRequest, -) (*api.GetDocumentResponse, error) { + req *connect.Request[api.GetDocumentRequest], +) (*connect.Response[api.GetDocumentResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.ProjectName) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.ProjectName) if err != nil { return nil, err } @@ -216,7 +217,7 @@ func (s *adminServer) GetDocument( ctx, s.backend, project, - key.Key(req.DocumentKey), + key.Key(req.Msg.DocumentKey), ) if err != nil { return nil, err @@ -227,18 +228,18 @@ func (s *adminServer) GetDocument( return nil, err } - return &api.GetDocumentResponse{ + return connect.NewResponse(&api.GetDocumentResponse{ Document: pbDocument, - }, nil + }), nil } // GetSnapshotMeta gets the snapshot metadata that corresponds to the server sequence. func (s *adminServer) GetSnapshotMeta( ctx context.Context, - req *api.GetSnapshotMetaRequest, -) (*api.GetSnapshotMetaResponse, error) { + req *connect.Request[api.GetSnapshotMetaRequest], +) (*connect.Response[api.GetSnapshotMetaResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.ProjectName) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.ProjectName) if err != nil { return nil, err } @@ -247,8 +248,8 @@ func (s *adminServer) GetSnapshotMeta( ctx, s.backend, project, - key.Key(req.DocumentKey), - req.ServerSeq, + key.Key(req.Msg.DocumentKey), + req.Msg.ServerSeq, ) if err != nil { return nil, err @@ -259,19 +260,19 @@ func (s *adminServer) GetSnapshotMeta( return nil, err } - return &api.GetSnapshotMetaResponse{ + return connect.NewResponse(&api.GetSnapshotMetaResponse{ Lamport: doc.Lamport(), Snapshot: snapshot, - }, nil + }), nil } // ListDocuments lists documents. func (s *adminServer) ListDocuments( ctx context.Context, - req *api.ListDocumentsRequest, -) (*api.ListDocumentsResponse, error) { + req *connect.Request[api.ListDocumentsRequest], +) (*connect.Response[api.ListDocumentsResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.ProjectName) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.ProjectName) if err != nil { return nil, err } @@ -281,11 +282,11 @@ func (s *adminServer) ListDocuments( s.backend, project, types.Paging[types.ID]{ - Offset: types.ID(req.PreviousId), - PageSize: int(req.PageSize), - IsForward: req.IsForward, + Offset: types.ID(req.Msg.PreviousId), + PageSize: int(req.Msg.PageSize), + IsForward: req.Msg.IsForward, }, - req.IncludeSnapshot, + req.Msg.IncludeSnapshot, ) if err != nil { return nil, err @@ -296,18 +297,18 @@ func (s *adminServer) ListDocuments( return nil, err } - return &api.ListDocumentsResponse{ + return connect.NewResponse(&api.ListDocumentsResponse{ Documents: pbDocuments, - }, nil + }), nil } // SearchDocuments searches documents for a specified string. func (s *adminServer) SearchDocuments( ctx context.Context, - req *api.SearchDocumentsRequest, -) (*api.SearchDocumentsResponse, error) { + req *connect.Request[api.SearchDocumentsRequest], +) (*connect.Response[api.SearchDocumentsResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.ProjectName) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.ProjectName) if err != nil { return nil, err } @@ -316,8 +317,8 @@ func (s *adminServer) SearchDocuments( ctx, s.backend, project, - req.Query, - int(req.PageSize), + req.Msg.Query, + int(req.Msg.PageSize), ) if err != nil { return nil, err @@ -328,24 +329,24 @@ func (s *adminServer) SearchDocuments( return nil, err } - return &api.SearchDocumentsResponse{ + return connect.NewResponse(&api.SearchDocumentsResponse{ TotalCount: int32(result.TotalCount), Documents: pbDocuments, - }, nil + }), nil } // RemoveDocumentByAdmin removes the document of the given key. func (s *adminServer) RemoveDocumentByAdmin( ctx context.Context, - req *api.RemoveDocumentByAdminRequest, -) (*api.RemoveDocumentByAdminResponse, error) { + req *connect.Request[api.RemoveDocumentByAdminRequest], +) (*connect.Response[api.RemoveDocumentByAdminResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.ProjectName) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.ProjectName) if err != nil { return nil, err } - docInfo, err := documents.FindDocInfoByKey(ctx, s.backend, project, key.Key(req.DocumentKey)) + docInfo, err := documents.FindDocInfoByKey(ctx, s.backend, project, key.Key(req.Msg.DocumentKey)) if err != nil { return nil, err } @@ -365,7 +366,7 @@ func (s *adminServer) RemoveDocumentByAdmin( } }() - if err := documents.RemoveDocument(ctx, s.backend, project, docInfo.ID, req.Force); err != nil { + if err := documents.RemoveDocument(ctx, s.backend, project, docInfo.ID, req.Msg.Force); err != nil { return nil, err } @@ -382,19 +383,19 @@ func (s *adminServer) RemoveDocumentByAdmin( ) logging.DefaultLogger().Info( - fmt.Sprintf("document remove success(projectID: %s, docKey: %s)", project.ID, req.DocumentKey), + fmt.Sprintf("document remove success(projectID: %s, docKey: %s)", project.ID, req.Msg.DocumentKey), ) - return &api.RemoveDocumentByAdminResponse{}, nil + return connect.NewResponse(&api.RemoveDocumentByAdminResponse{}), nil } // ListChanges lists of changes for the given document. func (s *adminServer) ListChanges( ctx context.Context, - req *api.ListChangesRequest, -) (*api.ListChangesResponse, error) { + req *connect.Request[api.ListChangesRequest], +) (*connect.Response[api.ListChangesResponse], error) { user := users.From(ctx) - project, err := projects.GetProject(ctx, s.backend, user.ID, req.ProjectName) + project, err := projects.GetProject(ctx, s.backend, user.ID, req.Msg.ProjectName) if err != nil { return nil, err } @@ -403,7 +404,7 @@ func (s *adminServer) ListChanges( ctx, s.backend, project, - key.Key(req.DocumentKey), + key.Key(req.Msg.DocumentKey), ) if err != nil { return nil, err @@ -411,9 +412,9 @@ func (s *adminServer) ListChanges( lastSeq := docInfo.ServerSeq from, to := types.GetChangesRange(types.Paging[int64]{ - Offset: req.PreviousSeq, - PageSize: int(req.PageSize), - IsForward: req.IsForward, + Offset: req.Msg.PreviousSeq, + PageSize: int(req.Msg.PageSize), + IsForward: req.Msg.IsForward, }, lastSeq) changes, err := packs.FindChanges( @@ -432,7 +433,7 @@ func (s *adminServer) ListChanges( return nil, err } - return &api.ListChangesResponse{ + return connect.NewResponse(&api.ListChangesResponse{ Changes: pbChanges, - }, nil + }), nil } diff --git a/server/rpc/interceptors/admin_auth.go b/server/rpc/interceptors/admin_auth.go index 10e9993e7..df05abdb4 100644 --- a/server/rpc/interceptors/admin_auth.go +++ b/server/rpc/interceptors/admin_auth.go @@ -17,19 +17,17 @@ package interceptors import ( + "connectrpc.com/connect" "context" + "net/http" "strings" - grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware" - "google.golang.org/grpc" "google.golang.org/grpc/codes" - grpcmetadata "google.golang.org/grpc/metadata" grpcstatus "google.golang.org/grpc/status" "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/rpc/auth" - "github.com/yorkie-team/yorkie/server/rpc/grpchelper" "github.com/yorkie-team/yorkie/server/users" ) @@ -47,83 +45,58 @@ func NewAdminAuthInterceptor(be *backend.Backend, tokenManager *auth.TokenManage } } -// Unary creates a unary server interceptor for authentication. -func (i *AdminAuthInterceptor) Unary() grpc.UnaryServerInterceptor { +// WrapUnary creates a unary server interceptor for authentication. +func (i *AdminAuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, - ) (resp interface{}, err error) { - if !isAdminService(info.FullMethod) { - return handler(ctx, req) + req connect.AnyRequest, + ) (connect.AnyResponse, error) { + if !isAdminService(req.Spec().Procedure) { + return next(ctx, req) } - if isRequiredAuth(info.FullMethod) { - user, err := i.authenticate(ctx, info.FullMethod) + if isRequiredAuth(req.Spec().Procedure) { + user, err := i.authenticate(ctx, req.Header()) if err != nil { return nil, err } ctx = users.With(ctx, user) } - resp, err = handler(ctx, req) - - // TODO(hackerwins, emplam27): Consider splitting between admin and sdk metrics. - data, ok := grpcmetadata.FromIncomingContext(ctx) - if ok { - sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) - i.backend.Metrics.AddUserAgentWithEmptyProject( - i.backend.Config.Hostname, - sdkType, - sdkVersion, - info.FullMethod, - ) - } + return next(ctx, req) + } +} - return resp, err +// WrapStreamingClient creates a stream client interceptor for building additional context. +func (i *AdminAuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { + return func( + ctx context.Context, + spec connect.Spec, + ) connect.StreamingClientConn { + conn := next(ctx, spec) + return conn } } -// Stream creates a stream server interceptor for authentication. -func (i *AdminAuthInterceptor) Stream() grpc.StreamServerInterceptor { +// WrapStreamingHandler creates a stream server interceptor for building additional context. +func (i *AdminAuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( - srv interface{}, - stream grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, - ) (err error) { - if !isAdminService(info.FullMethod) { - return handler(srv, stream) + ctx context.Context, + conn connect.StreamingHandlerConn, + ) error { + if !isAdminService(conn.Spec().Procedure) { + return next(ctx, conn) } - ctx := stream.Context() - if isRequiredAuth(info.FullMethod) { - user, err := i.authenticate(ctx, info.FullMethod) + if isRequiredAuth(conn.Spec().Procedure) { + user, err := i.authenticate(ctx, conn.RequestHeader()) if err != nil { return err } - - wrapped := grpcmiddleware.WrapServerStream(stream) - wrapped.WrappedContext = users.With(ctx, user) - stream = wrapped - } - - err = handler(srv, stream) - - // TODO(hackerwins, emplam27): Consider splitting between admin and sdk metrics. - data, ok := grpcmetadata.FromIncomingContext(ctx) - if ok { - sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) - i.backend.Metrics.AddUserAgentWithEmptyProject( - i.backend.Config.Hostname, - sdkType, - sdkVersion, - info.FullMethod, - ) + ctx = users.With(ctx, user) } - return err + return next(ctx, conn) } } @@ -137,18 +110,16 @@ func isRequiredAuth(method string) bool { } // authenticate does authenticate the request. -func (i *AdminAuthInterceptor) authenticate(ctx context.Context, _ string) (*types.User, error) { - data, ok := grpcmetadata.FromIncomingContext(ctx) - if !ok { - return nil, grpcstatus.Errorf(codes.Unauthenticated, "metadata is not provided") - } - - authorization := data[types.AuthorizationKey] +func (i *AdminAuthInterceptor) authenticate( + ctx context.Context, + header http.Header, +) (*types.User, error) { + authorization := header.Get(types.AuthorizationKey) if len(authorization) == 0 { return nil, grpcstatus.Errorf(codes.Unauthenticated, "authorization is not provided") } - claims, err := i.tokenManager.Verify(authorization[0]) + claims, err := i.tokenManager.Verify(authorization) if err != nil { return nil, grpcstatus.Errorf(codes.Unauthenticated, "authorization is invalid") } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 578033590..4e4fd2c69 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -57,9 +57,9 @@ func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc ctx context.Context, req connect.AnyRequest, ) (connect.AnyResponse, error) { - //if !isYorkieService(info.FullMethod) { - // return handler(ctx, req) - //} + if !isYorkieService(req.Spec().Procedure) { + return next(ctx, req) + } ctx, err := i.buildContext(ctx, req.Header()) if err != nil { @@ -99,9 +99,9 @@ func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerF ctx context.Context, conn connect.StreamingHandlerConn, ) error { - //if !isYorkieService(info.FullMethod) { - // return handler(srv, ss) - //} + if !isYorkieService(conn.Spec().Procedure) { + return next(ctx, conn) + } ctx, err := i.buildContext(ctx, conn.RequestHeader()) if err != nil { diff --git a/server/rpc/server.go b/server/rpc/server.go index cf1d28061..d1394f3ae 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -44,11 +44,11 @@ type Server struct { // NewServer creates a new instance of Server. func NewServer(conf *Config, be *backend.Backend) (*Server, error) { - //tokenManager := auth.NewTokenManager( - // be.Config.SecretKey, - // be.Config.ParseAdminTokenDuration(), - //) - // + tokenManager := auth.NewTokenManager( + be.Config.SecretKey, + be.Config.ParseAdminTokenDuration(), + ) + //loggingInterceptor := grpchelper.NewLoggingInterceptor() //adminAuthInterceptor := interceptors.NewAdminAuthInterceptor(be, tokenManager) //defaultInterceptor := interceptors.NewDefaultInterceptor() @@ -71,6 +71,7 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { //} interceptor := connect.WithInterceptors(interceptors.NewContextInterceptor(be)) + adminAuthInterceptor := connect.WithInterceptors(interceptors.NewAdminAuthInterceptor(be, tokenManager)) //if conf.CertFile != "" && conf.KeyFile != "" { // creds, err := credentials.NewServerTLSFromFile(conf.CertFile, conf.KeyFile) @@ -105,6 +106,10 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { newYorkieServer(yorkieServiceCtx, be), interceptor, )) + mux.Handle(v1connect.NewAdminServiceHandler( + newAdminServer(be, tokenManager), + adminAuthInterceptor, + )) httpServer := &http.Server{ Addr: fmt.Sprintf(":%d", conf.Port), From afd02b62d8b7fab95f261738375503e8c5e522d0 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Wed, 29 Nov 2023 02:10:24 +0900 Subject: [PATCH 08/33] Update go.mod for upstream sync --- go.mod | 3 ++- go.sum | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 8b98e627c..ae48d5a15 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( github.com/hashicorp/go-memdb v1.3.3 github.com/jedib0t/go-pretty/v6 v6.4.9 github.com/prometheus/client_golang v1.13.0 - github.com/rs/xid v1.5.0 github.com/rs/cors v1.10.1 + github.com/rs/xid v1.5.0 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.4 @@ -35,6 +35,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect diff --git a/go.sum b/go.sum index 20c661d33..d10bfaccb 100644 --- a/go.sum +++ b/go.sum @@ -45,6 +45,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -52,6 +54,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -64,6 +67,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -71,6 +75,9 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -83,13 +90,19 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -118,7 +131,10 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -132,6 +148,8 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -151,20 +169,29 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/hackerwins/go-memdb v1.3.3-0.20211225080334-513a74641622 h1:7UYuTq6zV83XV4zqn14gUuTtcywzbxGhUnj+hr/MUrE= github.com/hackerwins/go-memdb v1.3.3-0.20211225080334-513a74641622/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jedib0t/go-pretty/v6 v6.4.9 h1:vZ6bjGg2eBSrJn365qlxGcaWu09Id+LHtrfDWlB2Usc= github.com/jedib0t/go-pretty/v6 v6.4.9/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -178,6 +205,7 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -186,15 +214,23 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -202,58 +238,79 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -268,19 +325,28 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/undefinedlabs/go-mpatch v1.0.6 h1:h8q5ORH/GaOE1Se1DMhrOyljXZEhRcROO7agMqWXCOY= github.com/undefinedlabs/go-mpatch v1.0.6/go.mod h1:TyJZDQ/5AgyN7FSLiBJ8RO9u2c6wbtRvK827b6AVqY4= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.mongodb.org/mongo-driver v1.11.7 h1:LIwYxASDLGUg/8wOhgOOZhX8tQa/9tgZPgzZoVqJvcs= go.mongodb.org/mongo-driver v1.11.7/go.mod h1:G9TgswdsWjX4tmDA5zfs2+6AEPpYJwqblyjsfuh8oXY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -289,10 +355,15 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -305,6 +376,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -316,6 +388,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -377,6 +450,7 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -400,6 +474,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -449,6 +524,7 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -460,6 +536,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -580,6 +657,7 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -597,6 +675,7 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -610,22 +689,27 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +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/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 8f35b11408ede85a71a0c6e4da808bbc3396fa76 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Wed, 29 Nov 2023 12:35:43 +0900 Subject: [PATCH 09/33] Update rpc ports to http ports --- Dockerfile | 4 ++-- build/charts/yorkie-cluster/values.yaml | 4 ++-- build/docker/prometheus.yml | 2 +- cmd/yorkie/commands.go | 2 +- cmd/yorkie/login.go | 2 +- design/sharded-cluster-mode.md | 2 +- server/config.go | 4 ++-- server/config.sample.yml | 8 ++++---- server/profiling/config_test.go | 2 +- server/rpc/server_test.go | 17 +++++++++-------- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 872b90cf2..01a88e5b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,8 +35,8 @@ COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifica # Get and place binary to /bin COPY --from=builder /app/bin/yorkie /bin/ -# Expose port 11101, 11102 to the outside world -EXPOSE 11101 11102 +# Expose port 8080, 8081 to the outside world +EXPOSE 8080 8081 # Define default entrypoint. ENTRYPOINT ["yorkie"] diff --git a/build/charts/yorkie-cluster/values.yaml b/build/charts/yorkie-cluster/values.yaml index d0e937921..92f699b2e 100644 --- a/build/charts/yorkie-cluster/values.yaml +++ b/build/charts/yorkie-cluster/values.yaml @@ -17,8 +17,8 @@ yorkie: dbPort: &mongoPort 27017 ports: - rpcPort: 11101 - profilingPort: 11102 + rpcPort: 8080 + profilingPort: 8081 resources: {} diff --git a/build/docker/prometheus.yml b/build/docker/prometheus.yml index 044ef60ec..8f9792960 100644 --- a/build/docker/prometheus.yml +++ b/build/docker/prometheus.yml @@ -5,4 +5,4 @@ scrape_configs: static_configs: - targets: # win/mac hosts: Use address: host.docker.internal instead of address: localhost in the line below - - host.docker.internal:11102 + - host.docker.internal:8081 diff --git a/cmd/yorkie/commands.go b/cmd/yorkie/commands.go index 3a4f8bb87..7e5418daa 100644 --- a/cmd/yorkie/commands.go +++ b/cmd/yorkie/commands.go @@ -53,6 +53,6 @@ func init() { viper.SetConfigType("json") viper.AddConfigPath(path.Join(os.Getenv("HOME"), ".yorkie")) - rootCmd.PersistentFlags().String("rpc-addr", "localhost:11101", "Address of the rpc server") + rootCmd.PersistentFlags().String("rpc-addr", "localhost:8080", "Address of the rpc server") _ = viper.BindPFlag("rpcAddr", rootCmd.PersistentFlags().Lookup("rpc-addr")) } diff --git a/cmd/yorkie/login.go b/cmd/yorkie/login.go index 3a566b834..034577906 100644 --- a/cmd/yorkie/login.go +++ b/cmd/yorkie/login.go @@ -93,7 +93,7 @@ func init() { cmd.Flags().StringVar( &rpcAddr, "rpc-addr", - "localhost:11101", + "localhost:8080", "Address of the rpc server", ) cmd.Flags().BoolVar( diff --git a/design/sharded-cluster-mode.md b/design/sharded-cluster-mode.md index dc79594d8..58e72713b 100644 --- a/design/sharded-cluster-mode.md +++ b/design/sharded-cluster-mode.md @@ -109,7 +109,7 @@ spec: trafficPolicy: portLevelSettings: - port: - number: 11101 + number: 8080 loadBalancer: consistentHash: ringHash: diff --git a/server/config.go b/server/config.go index 63d51af41..cdc165dcb 100644 --- a/server/config.go +++ b/server/config.go @@ -33,12 +33,12 @@ import ( // Below are the values of the default values of Yorkie config. const ( - DefaultRPCPort = 11101 + DefaultRPCPort = 8080 DefaultRPCMaxRequestsBytes = 4 * 1024 * 1024 // 4MiB DefaultRPCMaxConnectionAge = 0 * time.Second DefaultRPCMaxConnectionAgeGrace = 0 * time.Second - DefaultProfilingPort = 11102 + DefaultProfilingPort = 8081 DefaultHousekeepingInterval = 30 * time.Second DefaultHousekeepingCandidatesLimitPerProject = 500 diff --git a/server/config.sample.yml b/server/config.sample.yml index e682b3fc3..d5c72edbb 100644 --- a/server/config.sample.yml +++ b/server/config.sample.yml @@ -1,7 +1,7 @@ # RPC is the configuration for the RPC server. RPC: - # Port to listen on for RPC connections (default: 11101). - Port: 11101 + # Port to listen on for RPC connections (default: 8080). + Port: 8080 # MaxRequestBytes is the maximum client request size in bytes the server will accept (default: 4194304, 4MiB). MaxRequestBytes: 4194304 @@ -22,8 +22,8 @@ RPC: # Profiling is the configuration for the profiling server. Profiling: - # Port is the port to listen on for serving metrics `/metrics` and pprof (default: 11102). - Port: 11102 + # Port is the port to listen on for serving metrics `/metrics` and pprof (default: 8081). + Port: 8081 # EnablePprof is whether to enable the pprof `/debug/pprof` endpoint. EnablePprof: false diff --git a/server/profiling/config_test.go b/server/profiling/config_test.go index 89936ebe8..70f919e82 100644 --- a/server/profiling/config_test.go +++ b/server/profiling/config_test.go @@ -31,7 +31,7 @@ func TestConfig(t *testing.T) { }{ {config: &profiling.Config{Port: -1}, expected: profiling.ErrInvalidProfilingPort}, {config: &profiling.Config{Port: 0}, expected: profiling.ErrInvalidProfilingPort}, - {config: &profiling.Config{Port: 11102}, expected: nil}, + {config: &profiling.Config{Port: 8081}, expected: nil}, } for _, scenario := range scenarios { assert.ErrorIs(t, scenario.config.Validate(), scenario.expected, "provided config: %#v", scenario.config) diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index 30f7772f8..297b452e8 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -17,19 +17,20 @@ package rpc_test import ( - "connectrpc.com/connect" "context" "encoding/hex" "fmt" - "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" - "github.com/yorkie-team/yorkie/server/rpc/interceptors" - "google.golang.org/protobuf/types/known/wrapperspb" "log" "net/http" "os" "testing" "time" + "connectrpc.com/connect" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "github.com/yorkie-team/yorkie/server/rpc/interceptors" + "google.golang.org/protobuf/types/known/wrapperspb" + "github.com/stretchr/testify/assert" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -1014,11 +1015,11 @@ func TestConfig_Validate(t *testing.T) { expected error }{ {config: &rpc.Config{Port: -1}, expected: rpc.ErrInvalidRPCPort}, - {config: &rpc.Config{Port: 11101, CertFile: "noSuchCertFile"}, expected: rpc.ErrInvalidCertFile}, - {config: &rpc.Config{Port: 11101, KeyFile: "noSuchKeyFile"}, expected: rpc.ErrInvalidKeyFile}, + {config: &rpc.Config{Port: 8080, CertFile: "noSuchCertFile"}, expected: rpc.ErrInvalidCertFile}, + {config: &rpc.Config{Port: 8080, KeyFile: "noSuchKeyFile"}, expected: rpc.ErrInvalidKeyFile}, // not to use tls {config: &rpc.Config{ - Port: 11101, + Port: 8080, CertFile: "", KeyFile: "", MaxConnectionAge: "50s", @@ -1027,7 +1028,7 @@ func TestConfig_Validate(t *testing.T) { expected: nil}, // pass any file existing {config: &rpc.Config{ - Port: 11101, + Port: 8080, CertFile: "server_test.go", KeyFile: "server_test.go", MaxConnectionAge: "50s", From e30cf9578c44271e14a5b1341897e015c8afe514 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sat, 2 Dec 2023 15:22:29 +0900 Subject: [PATCH 10/33] Update client & admin codes for bench test --- admin/auth.go | 54 +++++------- admin/client.go | 38 ++++---- api/converter/from_bytes.go | 3 +- api/converter/to_bytes.go | 3 +- client/auth.go | 58 ++++++------- client/client.go | 135 +++++++++++++++-------------- server/rpc/interceptors/context.go | 3 +- 7 files changed, 142 insertions(+), 152 deletions(-) diff --git a/admin/auth.go b/admin/auth.go index 757a0f860..9d7a49b46 100644 --- a/admin/auth.go +++ b/admin/auth.go @@ -17,11 +17,9 @@ package admin import ( + "connectrpc.com/connect" "context" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/internal/version" ) @@ -43,39 +41,35 @@ func (i *AuthInterceptor) SetToken(token string) { i.token = token } -// Unary creates a unary server interceptor for authorization. -func (i *AuthInterceptor) Unary() grpc.UnaryClientInterceptor { +// WrapUnary creates a unary server interceptor for building additional context. +func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, - method string, - req, - reply interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption, - ) error { - ctx = metadata.AppendToOutgoingContext(ctx, - types.AuthorizationKey, i.token, - types.UserAgentKey, types.GoSDKType+"/"+version.Version, - ) - return invoker(ctx, method, req, reply, cc, opts...) + req connect.AnyRequest, + ) (connect.AnyResponse, error) { + req.Header().Add(types.AuthorizationKey, i.token) + req.Header().Add(types.UserAgentKey, types.GoSDKType+"/"+version.Version) + + return next(ctx, req) } } -// Stream creates a stream server interceptor for authorization. -func (i *AuthInterceptor) Stream() grpc.StreamClientInterceptor { +// WrapStreamingClient creates a stream client interceptor for building additional context. +func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, - desc *grpc.StreamDesc, - cc *grpc.ClientConn, - method string, - streamer grpc.Streamer, - opts ...grpc.CallOption, - ) (grpc.ClientStream, error) { - ctx = metadata.AppendToOutgoingContext(ctx, - types.AuthorizationKey, i.token, - types.UserAgentKey, types.GoSDKType+"/"+version.Version, - ) - return streamer(ctx, desc, cc, method, opts...) + spec connect.Spec, + ) connect.StreamingClientConn { + return next(ctx, spec) + } +} + +// WrapStreamingHandler creates a stream server interceptor for building additional context. +func (i *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { + return func( + ctx context.Context, + conn connect.StreamingHandlerConn, + ) error { + return next(ctx, conn) } } diff --git a/admin/client.go b/admin/client.go index 8f7e543fb..0d422f80d 100644 --- a/admin/client.go +++ b/admin/client.go @@ -20,7 +20,6 @@ package admin import ( "connectrpc.com/connect" "context" - "crypto/tls" "fmt" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" @@ -28,9 +27,6 @@ import ( "strings" "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/metadata" "github.com/yorkie-team/yorkie/api/converter" @@ -71,9 +67,9 @@ type Options struct { // Client is a client for admin service. type Client struct { - conn *http.Client - client v1connect.AdminServiceClient - dialOptions []grpc.DialOption + conn *http.Client + client v1connect.AdminServiceClient + //dialOptions []grpc.DialOption authInterceptor *AuthInterceptor logger *zap.Logger } @@ -85,16 +81,16 @@ func New(opts ...Option) (*Client, error) { opt(&options) } - tlsConfig := credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12}) - credentialOptions := grpc.WithTransportCredentials(tlsConfig) - if options.IsInsecure { - credentialOptions = grpc.WithTransportCredentials(insecure.NewCredentials()) - } - dialOptions := []grpc.DialOption{credentialOptions} - - authInterceptor := NewAuthInterceptor(options.Token) - dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) - dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) + //tlsConfig := credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12}) + //credentialOptions := grpc.WithTransportCredentials(tlsConfig) + //if options.IsInsecure { + // credentialOptions = grpc.WithTransportCredentials(insecure.NewCredentials()) + //} + //dialOptions := []grpc.DialOption{credentialOptions} + // + //authInterceptor := NewAuthInterceptor(options.Token) + //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) + //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) logger := options.Logger if logger == nil { @@ -106,9 +102,9 @@ func New(opts ...Option) (*Client, error) { } return &Client{ - logger: logger, - dialOptions: dialOptions, - authInterceptor: authInterceptor, + logger: logger, + //dialOptions: dialOptions, + authInterceptor: NewAuthInterceptor(options.Token), }, nil } @@ -129,7 +125,7 @@ func Dial(rpcAddr string, opts ...Option) (*Client, error) { // Dial dials to the admin service. func (c *Client) Dial(rpcAddr string) error { c.conn = http.DefaultClient - c.client = v1connect.NewAdminServiceClient(c.conn, "http://"+rpcAddr) + c.client = v1connect.NewAdminServiceClient(c.conn, "http://"+rpcAddr, connect.WithInterceptors(c.authInterceptor)) return nil } diff --git a/api/converter/from_bytes.go b/api/converter/from_bytes.go index fdbd0083b..9b505d6fd 100644 --- a/api/converter/from_bytes.go +++ b/api/converter/from_bytes.go @@ -19,8 +19,7 @@ package converter import ( "errors" "fmt" - - "github.com/gogo/protobuf/proto" + "google.golang.org/protobuf/proto" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/crdt" diff --git a/api/converter/to_bytes.go b/api/converter/to_bytes.go index 5cf569da1..cbdabb053 100644 --- a/api/converter/to_bytes.go +++ b/api/converter/to_bytes.go @@ -18,10 +18,9 @@ package converter import ( "fmt" + "google.golang.org/protobuf/proto" "reflect" - "github.com/gogo/protobuf/proto" - api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/crdt" "github.com/yorkie-team/yorkie/pkg/document/innerpresence" diff --git a/client/auth.go b/client/auth.go index 55d41392b..7712c4e0f 100644 --- a/client/auth.go +++ b/client/auth.go @@ -17,11 +17,9 @@ package client import ( + "connectrpc.com/connect" "context" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/internal/version" ) @@ -40,41 +38,37 @@ func NewAuthInterceptor(apiKey, token string) *AuthInterceptor { } } -// Unary creates a unary server interceptor for authorization. -func (i *AuthInterceptor) Unary() grpc.UnaryClientInterceptor { +// WrapUnary creates a unary server interceptor for building additional context. +func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, - method string, - req, - reply interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption, - ) error { - ctx = metadata.AppendToOutgoingContext(ctx, - types.APIKeyKey, i.apiKey, - types.AuthorizationKey, i.token, - types.UserAgentKey, types.GoSDKType+"/"+version.Version, - ) - return invoker(ctx, method, req, reply, cc, opts...) + req connect.AnyRequest, + ) (connect.AnyResponse, error) { + req.Header().Add(types.APIKeyKey, i.apiKey) + req.Header().Add(types.AuthorizationKey, i.token) + req.Header().Add(types.UserAgentKey, types.GoSDKType+"/"+version.Version) + + return next(ctx, req) } } -// Stream creates a stream server interceptor for authorization. -func (i *AuthInterceptor) Stream() grpc.StreamClientInterceptor { +// WrapStreamingClient creates a stream client interceptor for building additional context. +func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, - desc *grpc.StreamDesc, - cc *grpc.ClientConn, - method string, - streamer grpc.Streamer, - opts ...grpc.CallOption, - ) (grpc.ClientStream, error) { - ctx = metadata.AppendToOutgoingContext(ctx, - types.APIKeyKey, i.apiKey, - types.AuthorizationKey, i.token, - types.UserAgentKey, types.GoSDKType+"/"+version.Version, - ) - return streamer(ctx, desc, cc, method, opts...) + spec connect.Spec, + ) connect.StreamingClientConn { + ctx.Value(types.APIKeyKey) + return next(ctx, spec) + } +} + +// WrapStreamingHandler creates a stream server interceptor for building additional context. +func (i *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { + return func( + ctx context.Context, + conn connect.StreamingHandlerConn, + ) error { + return next(ctx, conn) } } diff --git a/client/client.go b/client/client.go index 63ed0022a..fc22d269f 100644 --- a/client/client.go +++ b/client/client.go @@ -23,16 +23,16 @@ import ( "context" "errors" "fmt" + "github.com/rs/xid" "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "go.uber.org/zap" "net/http" "strings" - "github.com/rs/xid" - "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/metadata" + //"google.golang.org/grpc" + //"google.golang.org/grpc/credentials" + //"google.golang.org/grpc/credentials/insecure" + //"google.golang.org/grpc/metadata" "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" @@ -80,11 +80,12 @@ type Attachment struct { // It has documents and sends changes of the document in local // to the server to synchronize with other replicas in remote. type Client struct { - conn *http.Client - client v1connect.YorkieServiceClient - options Options - dialOptions []grpc.DialOption - logger *zap.Logger + conn *http.Client + client v1connect.YorkieServiceClient + options Options + clientOptions []connect.ClientOption + // dialOptions []grpc.DialOption + logger *zap.Logger id *time.ActorID key string @@ -123,25 +124,29 @@ func New(opts ...Option) (*Client, error) { k = xid.New().String() } - var dialOptions []grpc.DialOption - - transportCreds := grpc.WithTransportCredentials(insecure.NewCredentials()) - if options.CertFile != "" { - creds, err := credentials.NewClientTLSFromFile(options.CertFile, options.ServerNameOverride) - if err != nil { - return nil, fmt.Errorf("create client tls from file: %w", err) - } - transportCreds = grpc.WithTransportCredentials(creds) - } - dialOptions = append(dialOptions, transportCreds) + var clientOptions []connect.ClientOption - authInterceptor := NewAuthInterceptor(options.APIKey, options.Token) - dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) - dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) + clientOptions = append(clientOptions, connect.WithInterceptors(NewAuthInterceptor(options.APIKey, options.Token))) - if options.MaxCallRecvMsgSize != 0 { - dialOptions = append(dialOptions, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(options.MaxCallRecvMsgSize))) - } + //var dialOptions []grpc.DialOption + // + //transportCreds := grpc.WithTransportCredentials(insecure.NewCredentials()) + //if options.CertFile != "" { + // creds, err := credentials.NewClientTLSFromFile(options.CertFile, options.ServerNameOverride) + // if err != nil { + // return nil, fmt.Errorf("create client tls from file: %w", err) + // } + // transportCreds = grpc.WithTransportCredentials(creds) + //} + //dialOptions = append(dialOptions, transportCreds) + // + //authInterceptor := NewAuthInterceptor(options.APIKey, options.Token) + //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) + //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) + // + //if options.MaxCallRecvMsgSize != 0 { + // dialOptions = append(dialOptions, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(options.MaxCallRecvMsgSize))) + //} logger := options.Logger if logger == nil { @@ -153,9 +158,10 @@ func New(opts ...Option) (*Client, error) { } return &Client{ - dialOptions: dialOptions, - options: options, - logger: logger, + clientOptions: clientOptions, + //dialOptions: dialOptions, + options: options, + logger: logger, key: k, status: deactivated, @@ -180,7 +186,7 @@ func Dial(rpcAddr string, opts ...Option) (*Client, error) { // Dial dials the given rpcAddr. func (c *Client) Dial(rpcAddr string) error { c.conn = http.DefaultClient - c.client = v1connect.NewYorkieServiceClient(c.conn, "http://"+rpcAddr) + c.client = v1connect.NewYorkieServiceClient(c.conn, "http://"+rpcAddr, c.clientOptions...) return nil } @@ -206,9 +212,12 @@ func (c *Client) Activate(ctx context.Context) error { return nil } - response, err := c.client.ActivateClient(withShardKey(ctx, c.options.APIKey), connect.NewRequest(&api.ActivateClientRequest{ - ClientKey: c.key, - })) + response, err := c.client.ActivateClient( + ctx, + withShardKey(connect.NewRequest(&api.ActivateClientRequest{ + ClientKey: c.key, + }, + ), c.options.APIKey)) if err != nil { return err } @@ -230,9 +239,12 @@ func (c *Client) Deactivate(ctx context.Context) error { return nil } - _, err := c.client.DeactivateClient(withShardKey(ctx, c.options.APIKey), connect.NewRequest(&api.DeactivateClientRequest{ - ClientId: c.id.String(), - })) + _, err := c.client.DeactivateClient( + ctx, + withShardKey(connect.NewRequest(&api.DeactivateClientRequest{ + ClientId: c.id.String(), + }, + ), c.options.APIKey)) if err != nil { return err } @@ -273,12 +285,12 @@ func (c *Client) Attach(ctx context.Context, doc *document.Document, options ... } res, err := c.client.AttachDocument( - withShardKey(ctx, c.options.APIKey, doc.Key().String()), - connect.NewRequest(&api.AttachDocumentRequest{ + ctx, + withShardKey(connect.NewRequest(&api.AttachDocumentRequest{ ClientId: c.id.String(), ChangePack: pbChangePack, }, - )) + ), c.options.APIKey, doc.Key().String())) if err != nil { return err } @@ -346,14 +358,14 @@ func (c *Client) Detach(ctx context.Context, doc *document.Document, options ... } res, err := c.client.DetachDocument( - withShardKey(ctx, c.options.APIKey, doc.Key().String()), - connect.NewRequest(&api.DetachDocumentRequest{ + ctx, + withShardKey(connect.NewRequest(&api.DetachDocumentRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), ChangePack: pbChangePack, RemoveIfNotAttached: opts.removeIfNotAttached, }, - )) + ), c.options.APIKey, doc.Key().String())) if err != nil { return err } @@ -409,12 +421,12 @@ func (c *Client) Watch( rch := make(chan WatchResponse) stream, err := c.client.WatchDocument( - withShardKey(ctx, c.options.APIKey, doc.Key().String()), - connect.NewRequest(&api.WatchDocumentRequest{ + ctx, + withShardKey(connect.NewRequest(&api.WatchDocumentRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), }, - )) + ), c.options.APIKey, doc.Key().String())) if err != nil { return nil, err } @@ -606,14 +618,14 @@ func (c *Client) pushPullChanges(ctx context.Context, opt SyncOptions) error { } res, err := c.client.PushPullChanges( - withShardKey(ctx, c.options.APIKey, opt.key.String()), - connect.NewRequest(&api.PushPullChangesRequest{ + ctx, + withShardKey(connect.NewRequest(&api.PushPullChangesRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), ChangePack: pbChangePack, PushOnly: opt.mode == types.SyncModePushOnly, }, - )) + ), c.options.APIKey, opt.key.String())) if err != nil { return err } @@ -651,13 +663,13 @@ func (c *Client) Remove(ctx context.Context, doc *document.Document) error { pbChangePack.IsRemoved = true res, err := c.client.RemoveDocument( - withShardKey(ctx, c.options.APIKey, doc.Key().String()), - connect.NewRequest(&api.RemoveDocumentRequest{ + ctx, + withShardKey(connect.NewRequest(&api.RemoveDocumentRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), ChangePack: pbChangePack, }, - )) + ), c.options.APIKey, doc.Key().String())) if err != nil { return err } @@ -688,14 +700,14 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st } _, err := c.client.Broadcast( - withShardKey(ctx, c.options.APIKey, doc.Key().String()), - connect.NewRequest(&api.BroadcastRequest{ + ctx, + withShardKey(connect.NewRequest(&api.BroadcastRequest{ ClientId: c.id.String(), DocumentId: attachment.docID.String(), Topic: topic, Payload: payload, }, - )) + ), c.options.APIKey, doc.Key().String())) if err != nil { return err } @@ -704,12 +716,9 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st } /** - * withShardKey returns a context with the given shard key in metadata. +* withShardKey returns a context with the given shard key in metadata. */ -func withShardKey(ctx context.Context, keys ...string) context.Context { - return metadata.AppendToOutgoingContext( - ctx, - types.ShardKey, - strings.Join(keys, "/"), - ) +func withShardKey[T any](conn *connect.Request[T], keys ...string) *connect.Request[T] { + conn.Header().Add(types.ShardKey, strings.Join(keys, "/")) + return conn } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 4e4fd2c69..cea48b671 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -88,8 +88,7 @@ func (i *ContextInterceptor) WrapStreamingClient(next connect.StreamingClientFun ctx context.Context, spec connect.Spec, ) connect.StreamingClientConn { - conn := next(ctx, spec) - return conn + return next(ctx, spec) } } From 1eee9933163757bfece46494efe01fdf742bae7c Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sat, 2 Dec 2023 16:02:30 +0900 Subject: [PATCH 11/33] Update secondary helper and interceptor --- server/profiling/prometheus/metrics.go | 2 +- .../{grpchelper => connecthelper}/logging.go | 45 +++---- .../{grpchelper => connecthelper}/status.go | 2 +- .../useragent.go | 12 +- server/rpc/interceptors/context.go | 42 +++---- server/rpc/interceptors/default.go | 57 +++++---- server/rpc/server.go | 12 +- server/rpc/server_test.go | 113 ++++++++---------- 8 files changed, 140 insertions(+), 145 deletions(-) rename server/rpc/{grpchelper => connecthelper}/logging.go (58%) rename server/rpc/{grpchelper => connecthelper}/status.go (99%) rename server/rpc/{grpchelper => connecthelper}/useragent.go (76%) diff --git a/server/profiling/prometheus/metrics.go b/server/profiling/prometheus/metrics.go index dafdea31d..798ca4351 100644 --- a/server/profiling/prometheus/metrics.go +++ b/server/profiling/prometheus/metrics.go @@ -52,7 +52,7 @@ var ( type Metrics struct { registry *prometheus.Registry serverMetrics *grpcprometheus.ServerMetrics - + serverVersion *prometheus.GaugeVec pushPullResponseSeconds prometheus.Histogram diff --git a/server/rpc/grpchelper/logging.go b/server/rpc/connecthelper/logging.go similarity index 58% rename from server/rpc/grpchelper/logging.go rename to server/rpc/connecthelper/logging.go index 0c68ed085..405bce84e 100644 --- a/server/rpc/grpchelper/logging.go +++ b/server/rpc/connecthelper/logging.go @@ -15,17 +15,14 @@ */ // Package grpchelper provides helper functions for gRPC. -package grpchelper +package connecthelper import ( + "connectrpc.com/connect" "context" + "github.com/yorkie-team/yorkie/server/logging" "strconv" "sync/atomic" - - grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware" - "google.golang.org/grpc" - - "github.com/yorkie-team/yorkie/server/logging" ) type reqID int32 @@ -45,30 +42,34 @@ func NewLoggingInterceptor() *LoggingInterceptor { return &LoggingInterceptor{} } -// Unary creates a unary server interceptor for request logging. -func (i *LoggingInterceptor) Unary() grpc.UnaryServerInterceptor { +// WrapUnary creates a unary server interceptor for building additional context. +func (i *LoggingInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, - ) (resp interface{}, err error) { + req connect.AnyRequest, + ) (connect.AnyResponse, error) { reqLogger := logging.New(i.reqID.next()) - return handler(logging.With(ctx, reqLogger), req) + return next(logging.With(ctx, reqLogger), req) + } +} + +// WrapStreamingClient creates a stream client interceptor for building additional context. +func (i *LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { + return func( + ctx context.Context, + spec connect.Spec, + ) connect.StreamingClientConn { + return next(ctx, spec) } } -// Stream creates a stream server interceptor for request logging. -func (i *LoggingInterceptor) Stream() grpc.StreamServerInterceptor { +// WrapStreamingHandler creates a stream server interceptor for building additional context. +func (i *LoggingInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( - srv interface{}, - ss grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, + ctx context.Context, + conn connect.StreamingHandlerConn, ) error { reqLogger := logging.New(i.reqID.next()) - wrapped := grpcmiddleware.WrapServerStream(ss) - wrapped.WrappedContext = logging.With(ss.Context(), reqLogger) - return handler(srv, wrapped) + return next(logging.With(ctx, reqLogger), conn) } } diff --git a/server/rpc/grpchelper/status.go b/server/rpc/connecthelper/status.go similarity index 99% rename from server/rpc/grpchelper/status.go rename to server/rpc/connecthelper/status.go index 642e08db6..0b2fd2410 100644 --- a/server/rpc/grpchelper/status.go +++ b/server/rpc/connecthelper/status.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package grpchelper +package connecthelper import ( "connectrpc.com/connect" diff --git a/server/rpc/grpchelper/useragent.go b/server/rpc/connecthelper/useragent.go similarity index 76% rename from server/rpc/grpchelper/useragent.go rename to server/rpc/connecthelper/useragent.go index eeb34fe93..02b5e41ee 100644 --- a/server/rpc/grpchelper/useragent.go +++ b/server/rpc/connecthelper/useragent.go @@ -14,25 +14,23 @@ * limitations under the License. */ -package grpchelper +package connecthelper import ( + "net/http" "strings" - grpcmetadata "google.golang.org/grpc/metadata" - "github.com/yorkie-team/yorkie/api/types" ) // SDKTypeAndVersion returns the type and version of the SDK from the given // metadata. -func SDKTypeAndVersion(data grpcmetadata.MD) (string, string) { - yorkieUserAgentSlice := data[types.UserAgentKey] - if len(yorkieUserAgentSlice) == 0 { +func SDKTypeAndVersion(header http.Header) (string, string) { + yorkieUserAgent := header.Get(types.UserAgentKey) + if len(yorkieUserAgent) == 0 { return "", "" } - yorkieUserAgent := yorkieUserAgentSlice[0] agent := strings.Split(yorkieUserAgent, "/") return agent[0], agent[1] } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index cea48b671..4aa74a029 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -21,6 +21,7 @@ import ( "connectrpc.com/connect" "context" "errors" + "github.com/yorkie-team/yorkie/server/rpc/connecthelper" "net/http" "strings" @@ -29,7 +30,6 @@ import ( "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/logging" "github.com/yorkie-team/yorkie/server/projects" - "github.com/yorkie-team/yorkie/server/rpc/grpchelper" "github.com/yorkie-team/yorkie/server/rpc/metadata" ) @@ -66,17 +66,14 @@ func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc return nil, err } - //data, ok := grpcmetadata.FromIncomingContext(ctx) - //if ok { - // sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) - // i.backend.Metrics.AddUserAgent( - // i.backend.Config.Hostname, - // projects.From(ctx), - // sdkType, - // sdkVersion, - // info.FullMethod, - // ) - //} + sdkType, sdkVersion := connecthelper.SDKTypeAndVersion(req.Header()) + i.backend.Metrics.AddUserAgent( + i.backend.Config.Hostname, + projects.From(ctx), + sdkType, + sdkVersion, + req.Spec().Procedure, + ) return next(ctx, req) } @@ -107,17 +104,14 @@ func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerF return err } - //data, ok := grpcmetadata.FromIncomingContext(ctx) - //if ok { - // sdkType, sdkVersion := grpchelper.SDKTypeAndVersion(data) - // i.backend.Metrics.AddUserAgent( - // i.backend.Config.Hostname, - // projects.From(ctx), - // sdkType, - // sdkVersion, - // info.FullMethod, - // ) - //} + sdkType, sdkVersion := connecthelper.SDKTypeAndVersion(conn.RequestHeader()) + i.backend.Metrics.AddUserAgent( + i.backend.Config.Hostname, + projects.From(ctx), + sdkType, + sdkVersion, + conn.Spec().Procedure, + ) return next(ctx, conn) } @@ -154,7 +148,7 @@ func (i *ContextInterceptor) buildContext(ctx context.Context, header http.Heade } else { project, err := projects.GetProjectFromAPIKey(ctx, i.backend, md.APIKey) if err != nil { - return nil, grpchelper.ToStatusError(err) + return nil, connecthelper.ToStatusError(err) } i.projectInfoCache.Add(cacheKey, project, i.backend.Config.ParseProjectInfoCacheTTL()) ctx = projects.With(ctx, project) diff --git a/server/rpc/interceptors/default.go b/server/rpc/interceptors/default.go index 10244923b..5333b05dd 100644 --- a/server/rpc/interceptors/default.go +++ b/server/rpc/interceptors/default.go @@ -17,14 +17,13 @@ package interceptors import ( + "connectrpc.com/connect" "context" "errors" + "github.com/yorkie-team/yorkie/server/rpc/connecthelper" gotime "time" - "google.golang.org/grpc" - "github.com/yorkie-team/yorkie/server/logging" - "github.com/yorkie-team/yorkie/server/rpc/grpchelper" ) // DefaultInterceptor is a interceptor for default. @@ -40,52 +39,58 @@ const ( SlowThreshold = 100 * gotime.Millisecond ) -// Unary creates a unary server interceptor for default. -func (i *DefaultInterceptor) Unary() grpc.UnaryServerInterceptor { +// WrapUnary creates a unary server interceptor for building additional context. +func (i *DefaultInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, - ) (interface{}, error) { + req connect.AnyRequest, + ) (connect.AnyResponse, error) { start := gotime.Now() - resp, err := handler(ctx, req) + resp, err := next(ctx, req) reqLogger := logging.From(ctx) if err != nil { - reqLogger.Warnf("RPC : %q %s: %q => %q", info.FullMethod, gotime.Since(start), req, err) - return nil, grpchelper.ToStatusError(err) + reqLogger.Warnf("RPC : %q %s: %q => %q", req.Spec().Procedure, gotime.Since(start), req, err) + return nil, connecthelper.ToStatusError(err) } if gotime.Since(start) > SlowThreshold { - reqLogger.Infof("RPC : %q %s", info.FullMethod, gotime.Since(start)) + reqLogger.Infof("RPC : %q %s", req.Spec().Procedure, gotime.Since(start)) } return resp, nil } } -// Stream creates a stream server interceptor for default. -func (i *DefaultInterceptor) Stream() grpc.StreamServerInterceptor { +// WrapStreamingClient creates a stream client interceptor for building additional context. +func (i *DefaultInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { + return func( + ctx context.Context, + spec connect.Spec, + ) connect.StreamingClientConn { + return next(ctx, spec) + } +} + +// WrapStreamingHandler creates a stream server interceptor for building additional context. +func (i *DefaultInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( - srv interface{}, - ss grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, + ctx context.Context, + conn connect.StreamingHandlerConn, ) error { - reqLogger := logging.From(ss.Context()) + reqLogger := logging.From(ctx) start := gotime.Now() - err := handler(srv, ss) + err := next(ctx, conn) if err != nil { if errors.Is(err, context.Canceled) { - reqLogger.Debugf("RPC : stream %q %s => %q", info.FullMethod, gotime.Since(start), err.Error()) - return grpchelper.ToStatusError(err) + reqLogger.Debugf("RPC : stream %q %s => %q", conn.Spec().Procedure, gotime.Since(start), err.Error()) + return connecthelper.ToStatusError(err) } - reqLogger.Warnf("RPC : stream %q %s => %q", info.FullMethod, gotime.Since(start), err.Error()) - return grpchelper.ToStatusError(err) + reqLogger.Warnf("RPC : stream %q %s => %q", conn.Spec().Procedure, gotime.Since(start), err.Error()) + return connecthelper.ToStatusError(err) } - reqLogger.Debugf("RPC : stream %q %s", info.FullMethod, gotime.Since(start)) + reqLogger.Debugf("RPC : stream %q %s", conn.Spec().Procedure, gotime.Since(start)) return nil } } diff --git a/server/rpc/server.go b/server/rpc/server.go index d1394f3ae..50d072980 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -27,6 +27,7 @@ import ( "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/logging" "github.com/yorkie-team/yorkie/server/rpc/auth" + "github.com/yorkie-team/yorkie/server/rpc/connecthelper" "github.com/yorkie-team/yorkie/server/rpc/interceptors" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" @@ -70,8 +71,13 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { // )), //} - interceptor := connect.WithInterceptors(interceptors.NewContextInterceptor(be)) - adminAuthInterceptor := connect.WithInterceptors(interceptors.NewAdminAuthInterceptor(be, tokenManager)) + interceptor := connect.WithInterceptors( + connecthelper.NewLoggingInterceptor(), + // be.Metrics.ServerMetrics() + interceptors.NewAdminAuthInterceptor(be, tokenManager), + interceptors.NewContextInterceptor(be), + interceptors.NewDefaultInterceptor(), + ) //if conf.CertFile != "" && conf.KeyFile != "" { // creds, err := credentials.NewServerTLSFromFile(conf.CertFile, conf.KeyFile) @@ -108,7 +114,7 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { )) mux.Handle(v1connect.NewAdminServiceHandler( newAdminServer(be, tokenManager), - adminAuthInterceptor, + interceptor, )) httpServer := &http.Server{ diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index 297b452e8..f6f3eb506 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -17,25 +17,17 @@ package rpc_test import ( + "connectrpc.com/connect" "context" "encoding/hex" "fmt" + "github.com/stretchr/testify/assert" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "google.golang.org/protobuf/types/known/wrapperspb" "log" "net/http" "os" "testing" - "time" - - "connectrpc.com/connect" - "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" - "github.com/yorkie-team/yorkie/server/rpc/interceptors" - "google.golang.org/protobuf/types/known/wrapperspb" - - "github.com/stretchr/testify/assert" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/status" "github.com/yorkie-team/yorkie/admin" api "github.com/yorkie-team/yorkie/api/yorkie/v1" @@ -108,10 +100,10 @@ func TestMain(m *testing.M) { } testRPCServer, err = rpc.NewServer(&rpc.Config{ - Port: helper.RPCPort, - MaxRequestBytes: helper.RPCMaxRequestBytes, - MaxConnectionAge: helper.RPCMaxConnectionAge.String(), - MaxConnectionAgeGrace: helper.RPCMaxConnectionAgeGrace.String(), + Port: helper.RPCPort, + //MaxRequestBytes: helper.RPCMaxRequestBytes, + //MaxConnectionAge: helper.RPCMaxConnectionAge.String(), + //MaxConnectionAgeGrace: helper.RPCMaxConnectionAgeGrace.String(), }, be) if err != nil { log.Fatal(err) @@ -121,25 +113,24 @@ func TestMain(m *testing.M) { log.Fatalf("failed rpc listen: %s\n", err) } - var dialOptions []grpc.DialOption + //var dialOptions []grpc.DialOption authInterceptor := client.NewAuthInterceptor(project.PublicKey, "") - dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) - dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) - dialOptions = append(dialOptions, grpc.WithTransportCredentials(insecure.NewCredentials())) + //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) + //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) + //dialOptions = append(dialOptions, grpc.WithTransportCredentials(insecure.NewCredentials())) conn := http.DefaultClient - interceptor := connect.WithInterceptors(interceptors.NewContextInterceptor(be)) - testClient = v1connect.NewYorkieServiceClient(conn, "http://"+testRPCAddr, interceptor) + testClient = v1connect.NewYorkieServiceClient(conn, "http://"+testRPCAddr, connect.WithInterceptors(authInterceptor)) - credentials := grpc.WithTransportCredentials(insecure.NewCredentials()) - dialOptions = []grpc.DialOption{credentials} + //credentials := grpc.WithTransportCredentials(insecure.NewCredentials()) + //dialOptions = []grpc.DialOption{credentials} testAdminAuthInterceptor = admin.NewAuthInterceptor("") - dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(testAdminAuthInterceptor.Unary())) - dialOptions = append(dialOptions, grpc.WithStreamInterceptor(testAdminAuthInterceptor.Stream())) + //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(testAdminAuthInterceptor.Unary())) + //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(testAdminAuthInterceptor.Stream())) adminConn := http.DefaultClient - testAdminClient = v1connect.NewAdminServiceClient(adminConn, "http://"+testRPCAddr) + testAdminClient = v1connect.NewAdminServiceClient(adminConn, "http://"+testRPCAddr, connect.WithInterceptors(testAdminAuthInterceptor)) code := m.Run() @@ -166,18 +157,18 @@ func TestSDKRPCServerBackend(t *testing.T) { _, err = testClient.ActivateClient( context.Background(), connect.NewRequest(&api.ActivateClientRequest{ClientKey: ""})) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) _, err = testClient.DeactivateClient( context.Background(), connect.NewRequest(&api.DeactivateClientRequest{ClientId: emptyClientID})) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) // client not found _, err = testClient.DeactivateClient( context.Background(), connect.NewRequest(&api.DeactivateClientRequest{ClientId: nilClientID})) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) }) t.Run("attach/detach document test", func(t *testing.T) { @@ -208,7 +199,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) // try to attach with invalid client _, err = testClient.AttachDocument( @@ -218,7 +209,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) // try to attach already attached document _, err = testClient.AttachDocument( @@ -228,7 +219,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) // try to attach invalid change pack _, err = testClient.AttachDocument( @@ -238,7 +229,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: invalidChangePack, }, )) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) _, err = testClient.DetachDocument( context.Background(), @@ -259,7 +250,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) _, err = testClient.DetachDocument( context.Background(), @@ -268,7 +259,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: invalidChangePack, }, )) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) // document not found _, err = testClient.DetachDocument( @@ -281,7 +272,7 @@ func TestSDKRPCServerBackend(t *testing.T) { }, }, )) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) _, err = testClient.DeactivateClient( context.Background(), @@ -296,7 +287,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) }) t.Run("attach/detach on removed document test", func(t *testing.T) { @@ -345,7 +336,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) // try to create new document with same key as removed document resPack, err = testClient.AttachDocument( @@ -448,7 +439,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) // try to push/pull with invalid pack _, err = testClient.PushPullChanges( @@ -459,7 +450,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: invalidChangePack, }, )) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) _, err = testClient.DeactivateClient( context.Background(), @@ -475,7 +466,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) }) t.Run("push/pull on removed document test", func(t *testing.T) { @@ -523,7 +514,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithNoChanges, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) }) t.Run("remove document test", func(t *testing.T) { @@ -571,7 +562,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithRemoveRequest, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) }) t.Run("remove document with invalid client state test", func(t *testing.T) { @@ -619,7 +610,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithRemoveRequest, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) _, err = testClient.DeactivateClient( context.Background(), @@ -635,7 +626,7 @@ func TestSDKRPCServerBackend(t *testing.T) { ChangePack: packWithRemoveRequest, }, )) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) }) t.Run("watch document test", func(t *testing.T) { @@ -672,13 +663,13 @@ func TestSDKRPCServerBackend(t *testing.T) { _ = watchResp.Msg() assert.NoError(t, err) - // wait for MaxConnectionAge + MaxConnectionAgeGrace - time.Sleep(helper.RPCMaxConnectionAge + helper.RPCMaxConnectionAgeGrace) - - // check if stream has closed by server (EOF) - _ = watchResp.Msg() - assert.Equal(t, codes.Unavailable, status.Code(err)) - assert.Contains(t, err.Error(), "EOF") + //// wait for MaxConnectionAge + MaxConnectionAgeGrace + //time.Sleep(helper.RPCMaxConnectionAge + helper.RPCMaxConnectionAgeGrace) + // + //// check if stream has closed by server (EOF) + //_ = watchResp.Msg() + //assert.Equal(t, connect.CodeUnavailable, connect.CodeOf(err)) + //assert.Contains(t, err.Error(), "EOF") }) } @@ -704,7 +695,7 @@ func TestAdminRPCServerBackend(t *testing.T) { Password: adminPassword, }, )) - assert.Equal(t, codes.AlreadyExists, status.Convert(err).Code()) + assert.Equal(t, connect.CodeAlreadyExists, connect.CodeOf(err)) }) t.Run("admin login test", func(t *testing.T) { @@ -725,7 +716,7 @@ func TestAdminRPCServerBackend(t *testing.T) { Password: invalidSlugName, }, )) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) }) t.Run("admin create project test", func(t *testing.T) { @@ -757,7 +748,7 @@ func TestAdminRPCServerBackend(t *testing.T) { Name: projectName, }, )) - assert.Equal(t, codes.AlreadyExists, status.Convert(err).Code()) + assert.Equal(t, connect.CodeAlreadyExists, connect.CodeOf(err)) }) t.Run("admin list projects test", func(t *testing.T) { @@ -823,7 +814,7 @@ func TestAdminRPCServerBackend(t *testing.T) { Name: invalidSlugName, }, )) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) }) t.Run("admin update project test", func(t *testing.T) { @@ -869,7 +860,7 @@ func TestAdminRPCServerBackend(t *testing.T) { }, }, )) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) }) t.Run("admin list documents test", func(t *testing.T) { @@ -899,7 +890,7 @@ func TestAdminRPCServerBackend(t *testing.T) { ProjectName: invalidSlugName, }, )) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) }) t.Run("admin get document test", func(t *testing.T) { @@ -952,7 +943,7 @@ func TestAdminRPCServerBackend(t *testing.T) { DocumentKey: invalidChangePack.DocumentKey, }, )) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) }) t.Run("admin list changes test", func(t *testing.T) { @@ -1005,7 +996,7 @@ func TestAdminRPCServerBackend(t *testing.T) { DocumentKey: invalidChangePack.DocumentKey, }, )) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) }) } From 31775d664d7b3d73f7d5883e81a3320388ad888e Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sat, 2 Dec 2023 16:16:17 +0900 Subject: [PATCH 12/33] Update watch stream client codes --- client/client.go | 23 +++++++++++++++++------ server/rpc/server_test.go | 7 +++++-- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/client/client.go b/client/client.go index fc22d269f..2a911be0f 100644 --- a/client/client.go +++ b/client/client.go @@ -431,16 +431,22 @@ func (c *Client) Watch( return nil, err } - pbResp := stream.Msg() - if err != nil { - return nil, err + for stream.Receive() { + pbResp := stream.Msg() + if err != nil { + return nil, err + } + if _, err := handleResponse(pbResp, doc); err != nil { + return nil, err + } + break } - if _, err := handleResponse(pbResp, doc); err != nil { - return nil, err + if err = stream.Err(); err != nil { + return nil, connect.NewError(connect.CodeUnknown, err) } go func() { - for { + for stream.Receive() { pbResp := stream.Msg() if err != nil { rch <- WatchResponse{Err: err} @@ -459,6 +465,11 @@ func (c *Client) Watch( rch <- *resp } + if err = stream.Err(); err != nil { + rch <- WatchResponse{Err: err} + close(rch) + return + } }() // TODO(hackerwins): We need to revise the implementation of the watch diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index f6f3eb506..16ad312a4 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -660,8 +660,11 @@ func TestSDKRPCServerBackend(t *testing.T) { assert.NoError(t, err) // check if stream is open - _ = watchResp.Msg() - assert.NoError(t, err) + for watchResp.Receive() { + resp := watchResp.Msg() + assert.NotNil(t, resp) + break + } //// wait for MaxConnectionAge + MaxConnectionAgeGrace //time.Sleep(helper.RPCMaxConnectionAge + helper.RPCMaxConnectionAgeGrace) From 2833375c31e4f594831f93d087c537847d4b8c04 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sat, 2 Dec 2023 17:46:56 +0900 Subject: [PATCH 13/33] Update client test --- client/client_test.go | 61 +++++++++++--------------- server/backend/database/change_info.go | 5 ++- server/packs/serverpacks.go | 2 +- server/rpc/connecthelper/logging.go | 2 +- server/rpc/server.go | 12 ++++- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index cc780cc1f..f26071aac 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1,4 +1,4 @@ -//go:build amd64 +//TODO(Krapie) go:build amd64 /* * Copyright 2021 The Yorkie Authors. All rights reserved. @@ -19,61 +19,51 @@ package client_test import ( + "connectrpc.com/connect" "context" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "net/http" + "net/http/httptest" "reflect" "testing" "github.com/rs/xid" "github.com/stretchr/testify/assert" monkey "github.com/undefinedlabs/go-mpatch" - "golang.org/x/net/nettest" - "google.golang.org/grpc" - grpcmetadata "google.golang.org/grpc/metadata" - "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/client" ) type testYorkieServer struct { - grpcServer *grpc.Server - yorkieServer *api.UnimplementedYorkieServiceServer + httpServer *httptest.Server + yorkieServer *v1connect.UnimplementedYorkieServiceHandler } // dialTestYorkieServer creates a new instance of testYorkieServer and // dials it with LocalListener. -func dialTestYorkieServer(t *testing.T) (*testYorkieServer, string) { - yorkieServer := &api.UnimplementedYorkieServiceServer{} - grpcServer := grpc.NewServer() - api.RegisterYorkieServiceServer(grpcServer, yorkieServer) +func dialTestYorkieServer() (*testYorkieServer, string) { + yorkieServer := &v1connect.UnimplementedYorkieServiceHandler{} + mux := http.NewServeMux() + mux.Handle(v1connect.NewYorkieServiceHandler(yorkieServer, nil)) + httpServer := httptest.NewUnstartedServer(mux) testYorkieServer := &testYorkieServer{ - grpcServer: grpcServer, + httpServer: httpServer, yorkieServer: yorkieServer, } - return testYorkieServer, testYorkieServer.listenAndServe(t) + return testYorkieServer, testYorkieServer.listenAndServe() } -func (s *testYorkieServer) listenAndServe(t *testing.T) string { - lis, err := nettest.NewLocalListener("tcp") - if err != nil { - t.Fatalf("failed to listen: %v", err) - } - - go func() { - if err := s.grpcServer.Serve(lis); err != nil { - if err != grpc.ErrServerStopped { - t.Error(err) - } - } - }() +func (s *testYorkieServer) listenAndServe() string { + s.httpServer.Start() - return lis.Addr().String() + return s.httpServer.URL } func (s *testYorkieServer) Stop() { - s.grpcServer.Stop() + s.httpServer.Close() } func TestClient(t *testing.T) { @@ -87,7 +77,7 @@ func TestClient(t *testing.T) { t.Run("x-shard-key test", func(t *testing.T) { dummyID := types.ID("000000000000000000000000") - testServer, addr := dialTestYorkieServer(t) + testServer, addr := dialTestYorkieServer() defer testServer.Stop() cli, err := client.Dial(addr, client.WithAPIKey("dummy-api-key")) @@ -98,21 +88,20 @@ func TestClient(t *testing.T) { reflect.TypeOf(testServer.yorkieServer), "ActivateClient", func( - m *api.UnimplementedYorkieServiceServer, + m *v1connect.UnimplementedYorkieServiceHandler, ctx context.Context, - req *api.ActivateClientRequest, - ) (*api.ActivateClientResponse, error) { + req *connect.Request[api.ActivateClientRequest], + ) (*connect.Response[api.ActivateClientResponse], error) { assert.NoError(t, patch.Unpatch()) defer func() { assert.NoError(t, patch.Patch()) }() - data, _ := grpcmetadata.FromIncomingContext(ctx) - assert.Equal(t, "dummy-api-key", data[types.ShardKey][0]) + assert.Equal(t, "dummy-api-key", req.Header().Get(types.ShardKey)) - return &api.ActivateClientResponse{ + return connect.NewResponse(&api.ActivateClientResponse{ ClientId: dummyID.String(), - }, nil + }), nil }, ) assert.NoError(t, err) diff --git a/server/backend/database/change_info.go b/server/backend/database/change_info.go index f17793cc4..238243cae 100644 --- a/server/backend/database/change_info.go +++ b/server/backend/database/change_info.go @@ -34,6 +34,9 @@ import ( // ErrEncodeOperationFailed is returned when encoding operations failed. var ErrEncodeOperationFailed = errors.New("encode operations failed") +// ErrDecodeOperationFailed is returned when decoding operations failed. +var ErrDecodeOperationFailed = errors.New("decode operations failed") + // ChangeInfo is a structure representing information of a change. type ChangeInfo struct { ID types.ID `bson:"_id"` @@ -94,7 +97,7 @@ func (i *ChangeInfo) ToChange() (*change.Change, error) { for _, bytesOp := range i.Operations { pbOp := api.Operation{} if err := proto.Unmarshal(bytesOp, &pbOp); err != nil { - return nil, err + return nil, ErrDecodeOperationFailed } pbOps = append(pbOps, &pbOp) } diff --git a/server/packs/serverpacks.go b/server/packs/serverpacks.go index 46e5824e0..cdf4bba37 100644 --- a/server/packs/serverpacks.go +++ b/server/packs/serverpacks.go @@ -98,7 +98,7 @@ func (p *ServerPack) ToPBChangePack() (*api.ChangePack, error) { for _, bytesOp := range info.Operations { pbOp := api.Operation{} if err := proto.Unmarshal(bytesOp, &pbOp); err != nil { - return nil, err + return nil, database.ErrDecodeOperationFailed } pbOps = append(pbOps, &pbOp) } diff --git a/server/rpc/connecthelper/logging.go b/server/rpc/connecthelper/logging.go index 405bce84e..ccf87faf9 100644 --- a/server/rpc/connecthelper/logging.go +++ b/server/rpc/connecthelper/logging.go @@ -14,7 +14,7 @@ * limitations under the License. */ -// Package grpchelper provides helper functions for gRPC. +// Package connecthelper provides helper functions for gRPC. package connecthelper import ( diff --git a/server/rpc/server.go b/server/rpc/server.go index 50d072980..7acbd2dc0 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -73,6 +73,7 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { interceptor := connect.WithInterceptors( connecthelper.NewLoggingInterceptor(), + // TODO(krapie): update prometehus metrics server to http server // be.Metrics.ServerMetrics() interceptors.NewAdminAuthInterceptor(be, tokenManager), interceptors.NewContextInterceptor(be), @@ -157,10 +158,17 @@ func (s *Server) listenAndServe() error { func (s *Server) Shutdown(graceful bool) { s.yorkieServiceCancel() + // TODO(krapie): find graceful way to shutdown http server if graceful { - s.httpServer.Shutdown(context.Background()) + err := s.httpServer.Shutdown(context.Background()) + if err != nil { + return + } } else { - s.httpServer.Shutdown(context.Background()) + err := s.httpServer.Shutdown(context.Background()) + if err != nil { + return + } } } From 75d29cc8785e121122dfe8ec4d0b992ce0fcb628 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sat, 2 Dec 2023 18:03:41 +0900 Subject: [PATCH 14/33] Lint codes --- admin/auth.go | 3 ++- admin/client.go | 24 +++++++++++------------ api/converter/from_bytes.go | 1 + api/converter/from_pb.go | 1 + api/converter/to_bytes.go | 3 ++- api/converter/to_pb.go | 3 ++- api/yorkie/v1/admin.pb.go | 5 +++-- api/yorkie/v1/resources.pb.go | 5 +++-- api/yorkie/v1/v1connect/admin.connect.go | 6 ++++-- api/yorkie/v1/v1connect/yorkie.connect.go | 6 ++++-- api/yorkie/v1/yorkie.pb.go | 5 +++-- client/auth.go | 3 ++- client/client.go | 13 +++++------- client/client_test.go | 8 +++++--- server/backend/database/change_info.go | 1 + server/packs/serverpacks.go | 3 ++- server/profiling/prometheus/metrics.go | 2 +- server/rpc/admin_server.go | 3 ++- server/rpc/connecthelper/logging.go | 6 ++++-- server/rpc/connecthelper/status.go | 3 ++- server/rpc/interceptors/admin_auth.go | 3 ++- server/rpc/interceptors/context.go | 6 ++++-- server/rpc/interceptors/default.go | 6 ++++-- server/rpc/server.go | 12 +++++++----- server/rpc/server_test.go | 21 ++++++++++++++------ server/rpc/yorkie_server.go | 4 +++- test/bench/push_pull_bench_test.go | 1 + 27 files changed, 96 insertions(+), 61 deletions(-) diff --git a/admin/auth.go b/admin/auth.go index 9d7a49b46..9d4de4407 100644 --- a/admin/auth.go +++ b/admin/auth.go @@ -17,9 +17,10 @@ package admin import ( - "connectrpc.com/connect" "context" + "connectrpc.com/connect" + "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/internal/version" ) diff --git a/admin/client.go b/admin/client.go index 0d422f80d..9225170fa 100644 --- a/admin/client.go +++ b/admin/client.go @@ -18,19 +18,18 @@ package admin import ( - "connectrpc.com/connect" "context" "fmt" - api "github.com/yorkie-team/yorkie/api/yorkie/v1" - "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "net/http" "strings" + "connectrpc.com/connect" "go.uber.org/zap" - "google.golang.org/grpc/metadata" "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" + api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "github.com/yorkie-team/yorkie/pkg/document" "github.com/yorkie-team/yorkie/pkg/document/key" ) @@ -276,13 +275,13 @@ func (c *Client) RemoveDocument( apiKey := project.PublicKey _, err = c.client.RemoveDocumentByAdmin( - withShardKey(ctx, apiKey, documentKey), - connect.NewRequest(&api.RemoveDocumentByAdminRequest{ + ctx, + withShardKey(connect.NewRequest(&api.RemoveDocumentByAdminRequest{ ProjectName: projectName, DocumentKey: documentKey, Force: force, }, - )) + ), apiKey, documentKey)) return err } @@ -358,10 +357,9 @@ func (c *Client) ListChangeSummaries( /** * withShardKey returns a context with the given shard key in metadata. */ -func withShardKey(ctx context.Context, keys ...string) context.Context { - return metadata.AppendToOutgoingContext( - ctx, - types.APIKeyKey, keys[0], - types.ShardKey, strings.Join(keys, "/"), - ) +func withShardKey[T any](conn *connect.Request[T], keys ...string) *connect.Request[T] { + conn.Header().Add(types.APIKeyKey, keys[0]) + conn.Header().Add(types.ShardKey, strings.Join(keys, "/")) + + return conn } diff --git a/api/converter/from_bytes.go b/api/converter/from_bytes.go index 9b505d6fd..8e3e41abd 100644 --- a/api/converter/from_bytes.go +++ b/api/converter/from_bytes.go @@ -19,6 +19,7 @@ package converter import ( "errors" "fmt" + "google.golang.org/protobuf/proto" api "github.com/yorkie-team/yorkie/api/yorkie/v1" diff --git a/api/converter/from_pb.go b/api/converter/from_pb.go index 603b753d8..515fa1df3 100644 --- a/api/converter/from_pb.go +++ b/api/converter/from_pb.go @@ -18,6 +18,7 @@ package converter import ( "fmt" + "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/change" diff --git a/api/converter/to_bytes.go b/api/converter/to_bytes.go index cbdabb053..c8782afa0 100644 --- a/api/converter/to_bytes.go +++ b/api/converter/to_bytes.go @@ -18,9 +18,10 @@ package converter import ( "fmt" - "google.golang.org/protobuf/proto" "reflect" + "google.golang.org/protobuf/proto" + api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/crdt" "github.com/yorkie-team/yorkie/pkg/document/innerpresence" diff --git a/api/converter/to_pb.go b/api/converter/to_pb.go index de78afbe3..43cd21268 100644 --- a/api/converter/to_pb.go +++ b/api/converter/to_pb.go @@ -18,9 +18,10 @@ package converter import ( "fmt" + "reflect" + "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/wrapperspb" - "reflect" "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" diff --git a/api/yorkie/v1/admin.pb.go b/api/yorkie/v1/admin.pb.go index 7ff402031..1c0f261ef 100644 --- a/api/yorkie/v1/admin.pb.go +++ b/api/yorkie/v1/admin.pb.go @@ -22,10 +22,11 @@ package v1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/api/yorkie/v1/resources.pb.go b/api/yorkie/v1/resources.pb.go index cbd9529d8..a24abecd9 100644 --- a/api/yorkie/v1/resources.pb.go +++ b/api/yorkie/v1/resources.pb.go @@ -22,12 +22,13 @@ package v1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( diff --git a/api/yorkie/v1/v1connect/admin.connect.go b/api/yorkie/v1/v1connect/admin.connect.go index d78294f72..b2e0036b2 100644 --- a/api/yorkie/v1/v1connect/admin.connect.go +++ b/api/yorkie/v1/v1connect/admin.connect.go @@ -20,12 +20,14 @@ package v1connect import ( - connect "connectrpc.com/connect" context "context" errors "errors" - v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" http "net/http" strings "strings" + + connect "connectrpc.com/connect" + + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" ) // This is a compile-time assertion to ensure that this generated file and the connect package are diff --git a/api/yorkie/v1/v1connect/yorkie.connect.go b/api/yorkie/v1/v1connect/yorkie.connect.go index 79f4d2636..b399cbe3a 100644 --- a/api/yorkie/v1/v1connect/yorkie.connect.go +++ b/api/yorkie/v1/v1connect/yorkie.connect.go @@ -20,12 +20,14 @@ package v1connect import ( - connect "connectrpc.com/connect" context "context" errors "errors" - v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" http "net/http" strings "strings" + + connect "connectrpc.com/connect" + + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" ) // This is a compile-time assertion to ensure that this generated file and the connect package are diff --git a/api/yorkie/v1/yorkie.pb.go b/api/yorkie/v1/yorkie.pb.go index 0a49dba9f..4614d6595 100644 --- a/api/yorkie/v1/yorkie.pb.go +++ b/api/yorkie/v1/yorkie.pb.go @@ -22,10 +22,11 @@ package v1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/client/auth.go b/client/auth.go index 7712c4e0f..0d62ad240 100644 --- a/client/auth.go +++ b/client/auth.go @@ -17,9 +17,10 @@ package client import ( - "connectrpc.com/connect" "context" + "connectrpc.com/connect" + "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/internal/version" ) diff --git a/client/client.go b/client/client.go index 2a911be0f..0f1ed612b 100644 --- a/client/client.go +++ b/client/client.go @@ -19,24 +19,20 @@ package client import ( - "connectrpc.com/connect" "context" "errors" "fmt" - "github.com/rs/xid" - "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" - "go.uber.org/zap" "net/http" "strings" - //"google.golang.org/grpc" - //"google.golang.org/grpc/credentials" - //"google.golang.org/grpc/credentials/insecure" - //"google.golang.org/grpc/metadata" + "connectrpc.com/connect" + "github.com/rs/xid" + "go.uber.org/zap" "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "github.com/yorkie-team/yorkie/pkg/document" "github.com/yorkie-team/yorkie/pkg/document/innerpresence" "github.com/yorkie-team/yorkie/pkg/document/json" @@ -731,5 +727,6 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st */ func withShardKey[T any](conn *connect.Request[T], keys ...string) *connect.Request[T] { conn.Header().Add(types.ShardKey, strings.Join(keys, "/")) + return conn } diff --git a/client/client_test.go b/client/client_test.go index f26071aac..7d689a160 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1,4 +1,4 @@ -//TODO(Krapie) go:build amd64 +//go:build amd64 /* * Copyright 2021 The Yorkie Authors. All rights reserved. @@ -19,19 +19,21 @@ package client_test import ( - "connectrpc.com/connect" "context" - "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "net/http" "net/http/httptest" "reflect" "testing" + "connectrpc.com/connect" + "github.com/rs/xid" "github.com/stretchr/testify/assert" monkey "github.com/undefinedlabs/go-mpatch" + "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "github.com/yorkie-team/yorkie/client" ) diff --git a/server/backend/database/change_info.go b/server/backend/database/change_info.go index 238243cae..52526cd1c 100644 --- a/server/backend/database/change_info.go +++ b/server/backend/database/change_info.go @@ -20,6 +20,7 @@ import ( "encoding/json" "errors" "fmt" + "google.golang.org/protobuf/proto" "github.com/yorkie-team/yorkie/api/converter" diff --git a/server/packs/serverpacks.go b/server/packs/serverpacks.go index cdf4bba37..e77152bb6 100644 --- a/server/packs/serverpacks.go +++ b/server/packs/serverpacks.go @@ -17,6 +17,8 @@ package packs import ( + "google.golang.org/protobuf/proto" + "github.com/yorkie-team/yorkie/api/converter" api "github.com/yorkie-team/yorkie/api/yorkie/v1" "github.com/yorkie-team/yorkie/pkg/document/change" @@ -24,7 +26,6 @@ import ( "github.com/yorkie-team/yorkie/pkg/document/key" "github.com/yorkie-team/yorkie/pkg/document/time" "github.com/yorkie-team/yorkie/server/backend/database" - "google.golang.org/protobuf/proto" ) // ServerPack is similar to change.Pack, but has ChangeInfos instead of Changes diff --git a/server/profiling/prometheus/metrics.go b/server/profiling/prometheus/metrics.go index 798ca4351..dafdea31d 100644 --- a/server/profiling/prometheus/metrics.go +++ b/server/profiling/prometheus/metrics.go @@ -52,7 +52,7 @@ var ( type Metrics struct { registry *prometheus.Registry serverMetrics *grpcprometheus.ServerMetrics - + serverVersion *prometheus.GaugeVec pushPullResponseSeconds prometheus.Histogram diff --git a/server/rpc/admin_server.go b/server/rpc/admin_server.go index 738aa8372..98f9a7bd7 100644 --- a/server/rpc/admin_server.go +++ b/server/rpc/admin_server.go @@ -17,10 +17,11 @@ package rpc import ( - "connectrpc.com/connect" "context" "fmt" + "connectrpc.com/connect" + "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" diff --git a/server/rpc/connecthelper/logging.go b/server/rpc/connecthelper/logging.go index ccf87faf9..a66a4d538 100644 --- a/server/rpc/connecthelper/logging.go +++ b/server/rpc/connecthelper/logging.go @@ -18,11 +18,13 @@ package connecthelper import ( - "connectrpc.com/connect" "context" - "github.com/yorkie-team/yorkie/server/logging" "strconv" "sync/atomic" + + "connectrpc.com/connect" + + "github.com/yorkie-team/yorkie/server/logging" ) type reqID int32 diff --git a/server/rpc/connecthelper/status.go b/server/rpc/connecthelper/status.go index 0b2fd2410..d9fcec650 100644 --- a/server/rpc/connecthelper/status.go +++ b/server/rpc/connecthelper/status.go @@ -17,9 +17,10 @@ package connecthelper import ( - "connectrpc.com/connect" "errors" "fmt" + + "connectrpc.com/connect" "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/protobuf/runtime/protoiface" diff --git a/server/rpc/interceptors/admin_auth.go b/server/rpc/interceptors/admin_auth.go index df05abdb4..4c1dcb6a6 100644 --- a/server/rpc/interceptors/admin_auth.go +++ b/server/rpc/interceptors/admin_auth.go @@ -17,11 +17,12 @@ package interceptors import ( - "connectrpc.com/connect" "context" "net/http" "strings" + "connectrpc.com/connect" + "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 4aa74a029..4d40476da 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -18,13 +18,15 @@ package interceptors import ( - "connectrpc.com/connect" "context" "errors" - "github.com/yorkie-team/yorkie/server/rpc/connecthelper" "net/http" "strings" + "connectrpc.com/connect" + + "github.com/yorkie-team/yorkie/server/rpc/connecthelper" + "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/pkg/cache" "github.com/yorkie-team/yorkie/server/backend" diff --git a/server/rpc/interceptors/default.go b/server/rpc/interceptors/default.go index 5333b05dd..2d521e2cb 100644 --- a/server/rpc/interceptors/default.go +++ b/server/rpc/interceptors/default.go @@ -17,12 +17,14 @@ package interceptors import ( - "connectrpc.com/connect" "context" "errors" - "github.com/yorkie-team/yorkie/server/rpc/connecthelper" gotime "time" + "connectrpc.com/connect" + + "github.com/yorkie-team/yorkie/server/rpc/connecthelper" + "github.com/yorkie-team/yorkie/server/logging" ) diff --git a/server/rpc/server.go b/server/rpc/server.go index 7acbd2dc0..3f4aaeae0 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -19,20 +19,22 @@ package rpc import ( - "connectrpc.com/connect" "context" "fmt" + "net/http" + "time" + + "connectrpc.com/connect" "github.com/rs/cors" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/logging" "github.com/yorkie-team/yorkie/server/rpc/auth" "github.com/yorkie-team/yorkie/server/rpc/connecthelper" "github.com/yorkie-team/yorkie/server/rpc/interceptors" - "golang.org/x/net/http2" - "golang.org/x/net/http2/h2c" - "net/http" - "time" ) // Server is a normal server that processes the logic requested by the client. diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index 16ad312a4..d5cb04eeb 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -17,20 +17,21 @@ package rpc_test import ( - "connectrpc.com/connect" "context" "encoding/hex" "fmt" - "github.com/stretchr/testify/assert" - "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" - "google.golang.org/protobuf/types/known/wrapperspb" "log" "net/http" "os" "testing" + "connectrpc.com/connect" + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/types/known/wrapperspb" + "github.com/yorkie-team/yorkie/admin" api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" "github.com/yorkie-team/yorkie/client" "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/backend/database" @@ -120,7 +121,11 @@ func TestMain(m *testing.M) { //dialOptions = append(dialOptions, grpc.WithTransportCredentials(insecure.NewCredentials())) conn := http.DefaultClient - testClient = v1connect.NewYorkieServiceClient(conn, "http://"+testRPCAddr, connect.WithInterceptors(authInterceptor)) + testClient = v1connect.NewYorkieServiceClient( + conn, + "http://"+testRPCAddr, + connect.WithInterceptors(authInterceptor), + ) //credentials := grpc.WithTransportCredentials(insecure.NewCredentials()) //dialOptions = []grpc.DialOption{credentials} @@ -130,7 +135,11 @@ func TestMain(m *testing.M) { //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(testAdminAuthInterceptor.Stream())) adminConn := http.DefaultClient - testAdminClient = v1connect.NewAdminServiceClient(adminConn, "http://"+testRPCAddr, connect.WithInterceptors(testAdminAuthInterceptor)) + testAdminClient = v1connect.NewAdminServiceClient( + adminConn, + "http://"+testRPCAddr, + connect.WithInterceptors(testAdminAuthInterceptor), + ) code := m.Run() diff --git a/server/rpc/yorkie_server.go b/server/rpc/yorkie_server.go index b0aecfc42..7f925f891 100644 --- a/server/rpc/yorkie_server.go +++ b/server/rpc/yorkie_server.go @@ -17,9 +17,11 @@ package rpc import ( - "connectrpc.com/connect" "context" "fmt" + + "connectrpc.com/connect" + "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" api "github.com/yorkie-team/yorkie/api/yorkie/v1" diff --git a/test/bench/push_pull_bench_test.go b/test/bench/push_pull_bench_test.go index cab46ea8d..1dd6cc927 100644 --- a/test/bench/push_pull_bench_test.go +++ b/test/bench/push_pull_bench_test.go @@ -25,6 +25,7 @@ import ( gotime "time" "github.com/stretchr/testify/assert" + "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/pkg/document" From 332987185e929a809a5bd47aba0e2f83f0355a33 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 4 Dec 2023 13:55:59 +0900 Subject: [PATCH 15/33] Update tests --- client/client.go | 2 +- server/rpc/connecthelper/status.go | 4 ++++ server/rpc/server.go | 11 +++++------ server/rpc/yorkie_server.go | 4 ++-- test/integration/admin_test.go | 9 ++++----- test/integration/agent_test.go | 5 ++--- test/integration/auth_webhook_test.go | 15 +++++++-------- test/integration/health_test.go | 1 - test/integration/main_test.go | 17 +---------------- test/integration/user_test.go | 11 +++++------ 10 files changed, 31 insertions(+), 48 deletions(-) diff --git a/client/client.go b/client/client.go index 0f1ed612b..09f8e520c 100644 --- a/client/client.go +++ b/client/client.go @@ -438,7 +438,7 @@ func (c *Client) Watch( break } if err = stream.Err(); err != nil { - return nil, connect.NewError(connect.CodeUnknown, err) + return nil, connect.NewError(connect.CodeUnavailable, err) } go func() { diff --git a/server/rpc/connecthelper/status.go b/server/rpc/connecthelper/status.go index d9fcec650..c76b787f5 100644 --- a/server/rpc/connecthelper/status.go +++ b/server/rpc/connecthelper/status.go @@ -17,6 +17,7 @@ package connecthelper import ( + "context" "errors" "fmt" @@ -81,6 +82,9 @@ var errorToCode = map[error]connect.Code{ auth.ErrUnexpectedStatusCode: connect.CodeUnauthenticated, auth.ErrWebhookTimeout: connect.CodeUnauthenticated, database.ErrMismatchedPassword: connect.CodeUnauthenticated, + + // Canceled means the operation was canceled (typically by the caller). + context.Canceled: connect.CodeCanceled, } func detailsFromError(err error) (protoiface.MessageV1, bool) { diff --git a/server/rpc/server.go b/server/rpc/server.go index 3f4aaeae0..374a09100 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -160,17 +160,16 @@ func (s *Server) listenAndServe() error { func (s *Server) Shutdown(graceful bool) { s.yorkieServiceCancel() - // TODO(krapie): find graceful way to shutdown http server if graceful { - err := s.httpServer.Shutdown(context.Background()) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + err := s.httpServer.Shutdown(ctx) if err != nil { return } } else { - err := s.httpServer.Shutdown(context.Background()) - if err != nil { - return - } + // TODO(krapie): find a way to shutdown http server immediately } } diff --git a/server/rpc/yorkie_server.go b/server/rpc/yorkie_server.go index 7f925f891..c5536efb8 100644 --- a/server/rpc/yorkie_server.go +++ b/server/rpc/yorkie_server.go @@ -411,9 +411,9 @@ func (s *yorkieServer) WatchDocument( for { select { case <-s.serviceCtx.Done(): - return nil + return context.Canceled case <-ctx.Done(): - return nil + return context.Canceled case event := <-subscription.Events(): eventType, err := converter.ToDocEventType(event.Type) if err != nil { diff --git a/test/integration/admin_test.go b/test/integration/admin_test.go index cc3873baa..dfb535d5a 100644 --- a/test/integration/admin_test.go +++ b/test/integration/admin_test.go @@ -24,9 +24,8 @@ import ( "sync" "testing" + "connectrpc.com/connect" "github.com/stretchr/testify/assert" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "github.com/yorkie-team/yorkie/admin" "github.com/yorkie-team/yorkie/client" @@ -65,7 +64,7 @@ func TestAdmin(t *testing.T) { // 01. admin tries to remove document that does not exist. err = adminCli.RemoveDocument(ctx, "default", d1.Key().String(), true) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) // 02. client creates a document then admin removes the document. assert.NoError(t, cli.Attach(ctx, d1)) @@ -135,12 +134,12 @@ func TestAdmin(t *testing.T) { // 01. try to remove document that does not exist. err = adminCli.RemoveDocument(ctx, "default", doc.Key().String(), false) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) // 02. try to remove document that is attached by the client. assert.NoError(t, cli.Attach(ctx, doc)) err = adminCli.RemoveDocument(ctx, "default", doc.Key().String(), false) - assert.Equal(t, codes.FailedPrecondition, status.Convert(err).Code()) + assert.Equal(t, connect.CodeFailedPrecondition, connect.CodeOf(err)) assert.Equal(t, document.StatusAttached, doc.Status()) // 03. remove document that is detached by the client. diff --git a/test/integration/agent_test.go b/test/integration/agent_test.go index ebe9bfedc..2f21c8df2 100644 --- a/test/integration/agent_test.go +++ b/test/integration/agent_test.go @@ -24,9 +24,8 @@ import ( "sync" "testing" + "connectrpc.com/connect" "github.com/stretchr/testify/assert" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "github.com/yorkie-team/yorkie/client" "github.com/yorkie-team/yorkie/pkg/document" @@ -57,7 +56,7 @@ func TestServer(t *testing.T) { assert.Fail(t, "unexpected ctx done") return case wr := <-wrch: - if wr.Err == io.EOF || status.Code(wr.Err) == codes.Canceled { + if wr.Err == io.EOF || connect.CodeOf(wr.Err) == connect.CodeCanceled { assert.Len(t, wr.Presences, 0) wg.Done() return diff --git a/test/integration/auth_webhook_test.go b/test/integration/auth_webhook_test.go index 73b05ec38..de57180e7 100644 --- a/test/integration/auth_webhook_test.go +++ b/test/integration/auth_webhook_test.go @@ -25,10 +25,9 @@ import ( "testing" "time" + "connectrpc.com/connect" "github.com/rs/xid" "github.com/stretchr/testify/assert" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/client" @@ -127,7 +126,7 @@ func TestProjectAuthWebhook(t *testing.T) { assert.NoError(t, err) defer func() { assert.NoError(t, cliWithoutToken.Close()) }() err = cliWithoutToken.Activate(ctx) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) // client with invalid token cliWithInvalidToken, err := client.Dial( @@ -138,7 +137,7 @@ func TestProjectAuthWebhook(t *testing.T) { assert.NoError(t, err) defer func() { assert.NoError(t, cliWithInvalidToken.Close()) }() err = cliWithInvalidToken.Activate(ctx) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) }) t.Run("Selected method authorization webhook test", func(t *testing.T) { @@ -176,7 +175,7 @@ func TestProjectAuthWebhook(t *testing.T) { doc := document.New(helper.TestDocKey(t)) err = cli.Attach(ctx, doc) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) _, err = cli.Watch(ctx, doc) assert.Equal(t, client.ErrDocumentNotAttached, err) @@ -264,7 +263,7 @@ func TestAuthWebhook(t *testing.T) { defer func() { assert.NoError(t, cli.Close()) }() err = cli.Activate(ctx) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) }) t.Run("authorized request cache test", func(t *testing.T) { @@ -395,14 +394,14 @@ func TestAuthWebhook(t *testing.T) { // 01. multiple requests. for i := 0; i < 3; i++ { err = cli.Activate(ctx) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) } // 02. multiple requests after eviction by ttl. time.Sleep(unauthorizedTTL) for i := 0; i < 3; i++ { err = cli.Activate(ctx) - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) } assert.Equal(t, 2, reqCnt) }) diff --git a/test/integration/health_test.go b/test/integration/health_test.go index 496428ed8..5d714b6d0 100644 --- a/test/integration/health_test.go +++ b/test/integration/health_test.go @@ -23,7 +23,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - healthpb "google.golang.org/grpc/health/grpc_health_v1" ) func TestHealthCheck(t *testing.T) { diff --git a/test/integration/main_test.go b/test/integration/main_test.go index fc49bb486..e9a77e80e 100644 --- a/test/integration/main_test.go +++ b/test/integration/main_test.go @@ -1,4 +1,4 @@ -//go:build integration +//gdo:build integration /* * Copyright 2020 The Yorkie Authors. All rights reserved. @@ -25,8 +25,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" "github.com/yorkie-team/yorkie/client" "github.com/yorkie-team/yorkie/pkg/document" @@ -90,19 +88,6 @@ func syncClientsThenAssertEqual(t *testing.T, pairs []clientAndDocPair) { } } -// clientConn is a helper function to create a client connection. -func clientConn() (*grpc.ClientConn, error) { - conn, err := grpc.Dial( - defaultServer.RPCAddr(), - grpc.WithTransportCredentials(insecure.NewCredentials()), - ) - if err != nil { - return nil, err - } - - return conn, nil -} - // activeClients creates and activates the given number of clients. func activeClients(t *testing.T, n int) (clients []*client.Client) { for i := 0; i < n; i++ { diff --git a/test/integration/user_test.go b/test/integration/user_test.go index f1b5d85db..3f95f0141 100644 --- a/test/integration/user_test.go +++ b/test/integration/user_test.go @@ -22,9 +22,8 @@ import ( "context" "testing" + "connectrpc.com/connect" "github.com/stretchr/testify/assert" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "github.com/yorkie-team/yorkie/test/helper" ) @@ -39,18 +38,18 @@ func TestUser(t *testing.T) { password := "password123!" _, err := adminCli.LogIn(ctx, username, password) - assert.Equal(t, codes.NotFound, status.Convert(err).Code()) + assert.Equal(t, connect.CodeNotFound, connect.CodeOf(err)) _, err = adminCli.SignUp(ctx, "name !@#", password) - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) _, err = adminCli.SignUp(ctx, username, "pass") - assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + assert.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err)) _, err = adminCli.SignUp(ctx, username, password) assert.NoError(t, err) _, err = adminCli.LogIn(ctx, username, "asdf") - assert.Equal(t, codes.Unauthenticated, status.Convert(err).Code()) + assert.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err)) }) } From b2a6ff8fbb005eea60b2ffbf5defb7ff7d2fabc7 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Thu, 7 Dec 2023 12:21:39 +0900 Subject: [PATCH 16/33] Update rpc server related tests --- go.mod | 3 +-- go.sum | 14 ++------------ server/rpc/server.go | 15 +++++++++++++++ test/integration/health_test.go | 9 ++++++++- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index ae48d5a15..a33b1db5e 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,11 @@ go 1.21 require ( connectrpc.com/connect v1.12.0 + connectrpc.com/grpchealth v1.3.0 github.com/go-playground/locales v0.14.0 github.com/go-playground/universal-translator v0.18.0 github.com/go-playground/validator/v10 v10.11.1 - github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt v3.2.2+incompatible - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/go-memdb v1.3.3 github.com/jedib0t/go-pretty/v6 v6.4.9 diff --git a/go.sum b/go.sum index d10bfaccb..b8ca1bca3 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= connectrpc.com/connect v1.12.0 h1:HwKdOY0lGhhoHdsza+hW55aqHEC64pYpObRNoAgn70g= connectrpc.com/connect v1.12.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +connectrpc.com/grpchealth v1.3.0 h1:FA3OIwAvuMokQIXQrY5LbIy8IenftksTP/lG4PbYN+E= +connectrpc.com/grpchealth v1.3.0/go.mod h1:3vpqmX25/ir0gVgW6RdnCPPZRcR6HvqtXX5RNPmDXHM= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -100,8 +102,6 @@ github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -169,8 +169,6 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/hackerwins/go-memdb v1.3.3-0.20211225080334-513a74641622 h1:7UYuTq6zV83XV4zqn14gUuTtcywzbxGhUnj+hr/MUrE= @@ -202,7 +200,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= @@ -242,7 +239,6 @@ github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v6 github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -354,15 +350,12 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -578,7 +571,6 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -587,7 +579,6 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -641,7 +632,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= diff --git a/server/rpc/server.go b/server/rpc/server.go index 374a09100..9b2a96bd6 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -25,6 +25,7 @@ import ( "time" "connectrpc.com/connect" + "connectrpc.com/grpchealth" "github.com/rs/cors" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" @@ -120,6 +121,13 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { interceptor, )) + checker := grpchealth.NewStaticChecker( + grpchealth.HealthV1ServiceName, + v1connect.YorkieServiceName, + v1connect.AdminServiceName, + ) + mux.Handle(grpchealth.NewHandler(checker)) + httpServer := &http.Server{ Addr: fmt.Sprintf(":%d", conf.Port), Handler: h2c.NewHandler( @@ -170,6 +178,13 @@ func (s *Server) Shutdown(graceful bool) { } } else { // TODO(krapie): find a way to shutdown http server immediately + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + + err := s.httpServer.Shutdown(ctx) + if err != nil { + return + } } } diff --git a/test/integration/health_test.go b/test/integration/health_test.go index 5d714b6d0..6ee176de5 100644 --- a/test/integration/health_test.go +++ b/test/integration/health_test.go @@ -23,10 +23,17 @@ import ( "testing" "github.com/stretchr/testify/assert" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + healthpb "google.golang.org/grpc/health/grpc_health_v1" ) func TestHealthCheck(t *testing.T) { - conn, err := clientConn() + // use gRPC health check + conn, err := grpc.Dial( + defaultServer.RPCAddr(), + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) assert.NoError(t, err) defer func() { assert.NoError(t, conn.Close()) From 1f22ad8a6d9556783fcffa1111ac65ba1d6dd661 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Thu, 7 Dec 2023 13:49:14 +0900 Subject: [PATCH 17/33] Revise client interceptor for streaming --- client/auth.go | 6 ++++-- test/integration/main_test.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/auth.go b/client/auth.go index 0d62ad240..843ca077a 100644 --- a/client/auth.go +++ b/client/auth.go @@ -59,8 +59,10 @@ func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) ctx context.Context, spec connect.Spec, ) connect.StreamingClientConn { - ctx.Value(types.APIKeyKey) - return next(ctx, spec) + conn := next(ctx, spec) + conn.RequestHeader().Set(types.APIKeyKey, i.apiKey) + + return conn } } diff --git a/test/integration/main_test.go b/test/integration/main_test.go index e9a77e80e..867634420 100644 --- a/test/integration/main_test.go +++ b/test/integration/main_test.go @@ -1,4 +1,4 @@ -//gdo:build integration +//go:build integration /* * Copyright 2020 The Yorkie Authors. All rights reserved. From 464e53f86cdf2dea4afe3d2778f281ca6b17c05b Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Thu, 7 Dec 2023 14:49:45 +0900 Subject: [PATCH 18/33] Revise client mock test --- admin/client.go | 6 +++++- client/client.go | 6 +++++- client/client_test.go | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/admin/client.go b/admin/client.go index 9225170fa..e9b2ea48f 100644 --- a/admin/client.go +++ b/admin/client.go @@ -123,8 +123,12 @@ func Dial(rpcAddr string, opts ...Option) (*Client, error) { // Dial dials to the admin service. func (c *Client) Dial(rpcAddr string) error { + if !strings.HasPrefix(rpcAddr, "http") { + rpcAddr = "http://" + rpcAddr + } + c.conn = http.DefaultClient - c.client = v1connect.NewAdminServiceClient(c.conn, "http://"+rpcAddr, connect.WithInterceptors(c.authInterceptor)) + c.client = v1connect.NewAdminServiceClient(c.conn, rpcAddr, connect.WithInterceptors(c.authInterceptor)) return nil } diff --git a/client/client.go b/client/client.go index 09f8e520c..f6e5846db 100644 --- a/client/client.go +++ b/client/client.go @@ -181,8 +181,12 @@ func Dial(rpcAddr string, opts ...Option) (*Client, error) { // Dial dials the given rpcAddr. func (c *Client) Dial(rpcAddr string) error { + if !strings.HasPrefix(rpcAddr, "http") { + rpcAddr = "http://" + rpcAddr + } + c.conn = http.DefaultClient - c.client = v1connect.NewYorkieServiceClient(c.conn, "http://"+rpcAddr, c.clientOptions...) + c.client = v1connect.NewYorkieServiceClient(c.conn, rpcAddr, c.clientOptions...) return nil } diff --git a/client/client_test.go b/client/client_test.go index 7d689a160..1261474cd 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -26,7 +26,6 @@ import ( "testing" "connectrpc.com/connect" - "github.com/rs/xid" "github.com/stretchr/testify/assert" monkey "github.com/undefinedlabs/go-mpatch" @@ -47,7 +46,7 @@ type testYorkieServer struct { func dialTestYorkieServer() (*testYorkieServer, string) { yorkieServer := &v1connect.UnimplementedYorkieServiceHandler{} mux := http.NewServeMux() - mux.Handle(v1connect.NewYorkieServiceHandler(yorkieServer, nil)) + mux.Handle(v1connect.NewYorkieServiceHandler(yorkieServer)) httpServer := httptest.NewUnstartedServer(mux) testYorkieServer := &testYorkieServer{ From af641130d783cc0c9d829a828a350c8942e3468f Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sun, 10 Dec 2023 18:26:51 +0900 Subject: [PATCH 19/33] Refactor server init code --- server/rpc/server.go | 83 ++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 56 deletions(-) diff --git a/server/rpc/server.go b/server/rpc/server.go index 9b2a96bd6..3650c3636 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -41,6 +41,7 @@ import ( // Server is a normal server that processes the logic requested by the client. type Server struct { conf *Config + serverMux *http.ServeMux httpServer *http.Server yorkieServiceCancel context.CancelFunc tokenManager *auth.TokenManager @@ -111,12 +112,12 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { yorkieServiceCtx, yorkieServiceCancel := context.WithCancel(context.Background()) - mux := http.NewServeMux() - mux.Handle(v1connect.NewYorkieServiceHandler( + serverMux := http.NewServeMux() + serverMux.Handle(v1connect.NewYorkieServiceHandler( newYorkieServer(yorkieServiceCtx, be), interceptor, )) - mux.Handle(v1connect.NewAdminServiceHandler( + serverMux.Handle(v1connect.NewAdminServiceHandler( newAdminServer(be, tokenManager), interceptor, )) @@ -126,15 +127,7 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { v1connect.YorkieServiceName, v1connect.AdminServiceName, ) - mux.Handle(grpchealth.NewHandler(checker)) - - httpServer := &http.Server{ - Addr: fmt.Sprintf(":%d", conf.Port), - Handler: h2c.NewHandler( - newCORS().Handler(mux), - &http2.Server{}, - ), - } + serverMux.Handle(grpchealth.NewHandler(checker)) //grpcServer := grpc.NewServer(opts...) //healthpb.RegisterHealthServer(grpcServer, health.NewServer()) @@ -144,7 +137,8 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { return &Server{ conf: conf, - httpServer: httpServer, + serverMux: serverMux, + httpServer: &http.Server{Addr: fmt.Sprintf(":%d", conf.Port)}, yorkieServiceCancel: yorkieServiceCancel, }, nil } @@ -154,58 +148,35 @@ func (s *Server) Start() error { return s.listenAndServe() } -func (s *Server) listenAndServe() error { - go func() { - logging.DefaultLogger().Infof(fmt.Sprintf("serving rpc on %d", s.conf.Port)) - if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { - logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) - } - }() - return nil -} - // Shutdown shuts down this server. func (s *Server) Shutdown(graceful bool) { s.yorkieServiceCancel() if graceful { - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) - defer cancel() - - err := s.httpServer.Shutdown(ctx) - if err != nil { - return - } - } else { - // TODO(krapie): find a way to shutdown http server immediately - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) - defer cancel() - - err := s.httpServer.Shutdown(ctx) - if err != nil { - return + if err := s.httpServer.Shutdown(context.Background()); err != nil { + logging.DefaultLogger().Error("HTTP server Shutdown: %v", err) } + return + } + + if err := s.httpServer.Close(); err != nil { + logging.DefaultLogger().Error("HTTP server close: %v", err) } } -//func (s *Server) listenAndServeGRPC() error { -// lis, err := net.Listen("tcp", fmt.Sprintf(":%d", s.conf.Port)) -// if err != nil { -// return fmt.Errorf("listen port %d: %w", s.conf.Port, err) -// } -// -// go func() { -// logging.DefaultLogger().Infof("serving RPC on %d", s.conf.Port) -// -// if err := s.grpcServer.Serve(lis); err != nil { -// if err != grpc.ErrServerStopped { -// logging.DefaultLogger().Error(err) -// } -// } -// }() -// -// return nil -//} +func (s *Server) listenAndServe() error { + go func() { + logging.DefaultLogger().Infof(fmt.Sprintf("serving rpc on %d", s.conf.Port)) + s.httpServer.Handler = h2c.NewHandler( + newCORS().Handler(s.serverMux), + &http2.Server{}, + ) + if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { + logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) + } + }() + return nil +} func newCORS() *cors.Cors { // To let web developers play with the demo service from browsers, we need a From 3b4e3ebe18f151274aafd0ec750732984400cd2e Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Sun, 10 Dec 2023 19:08:50 +0900 Subject: [PATCH 20/33] Remove grpc-prometheus metrics & cleanup rpc server codes --- server/profiling/prometheus/metrics.go | 22 +--------- server/rpc/server.go | 56 +------------------------- 2 files changed, 4 insertions(+), 74 deletions(-) diff --git a/server/profiling/prometheus/metrics.go b/server/profiling/prometheus/metrics.go index dafdea31d..271db623b 100644 --- a/server/profiling/prometheus/metrics.go +++ b/server/profiling/prometheus/metrics.go @@ -20,11 +20,9 @@ package prometheus import ( "fmt" - grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promauto" - "google.golang.org/grpc" "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/internal/version" @@ -50,8 +48,7 @@ var ( // Metrics manages the metric information that Yorkie is trying to measure. type Metrics struct { - registry *prometheus.Registry - serverMetrics *grpcprometheus.ServerMetrics + registry *prometheus.Registry serverVersion *prometheus.GaugeVec @@ -69,11 +66,7 @@ type Metrics struct { // NewMetrics creates a new instance of Metrics. func NewMetrics() (*Metrics, error) { reg := prometheus.NewRegistry() - serverMetrics := grpcprometheus.NewServerMetrics() - if err := reg.Register(serverMetrics); err != nil { - return nil, fmt.Errorf("register server metrics: %w", err) - } if err := reg.Register(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{})); err != nil { return nil, fmt.Errorf("register process collector: %w", err) } @@ -82,8 +75,7 @@ func NewMetrics() (*Metrics, error) { } metrics := &Metrics{ - registry: reg, - serverMetrics: serverMetrics, + registry: reg, serverVersion: promauto.With(reg).NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: "server", @@ -220,16 +212,6 @@ func (m *Metrics) AddUserAgentWithEmptyProject(hostname string, sdkType, sdkVers m.AddUserAgent(hostname, emptyProject, sdkType, sdkVersion, methodName) } -// RegisterGRPCServer registers the given gRPC server. -func (m *Metrics) RegisterGRPCServer(server *grpc.Server) { - m.serverMetrics.InitializeMetrics(server) -} - -// ServerMetrics returns the serverMetrics. -func (m *Metrics) ServerMetrics() *grpcprometheus.ServerMetrics { - return m.serverMetrics -} - // Registry returns the registry of this metrics. func (m *Metrics) Registry() *prometheus.Registry { return m.registry diff --git a/server/rpc/server.go b/server/rpc/server.go index 3650c3636..714742539 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -54,61 +54,15 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { be.Config.ParseAdminTokenDuration(), ) - //loggingInterceptor := grpchelper.NewLoggingInterceptor() - //adminAuthInterceptor := interceptors.NewAdminAuthInterceptor(be, tokenManager) - //defaultInterceptor := interceptors.NewDefaultInterceptor() - - //opts := []grpc.ServerOption{ - // grpc.UnaryInterceptor(grpcmiddleware.ChainUnaryServer( - // loggingInterceptor.Unary(), - // be.Metrics.ServerMetrics().UnaryServerInterceptor(), - // adminAuthInterceptor.Unary(), - // contextInterceptor.Unary(), - // defaultInterceptor.Unary(), - // )), - // grpc.StreamInterceptor(grpcmiddleware.ChainStreamServer( - // loggingInterceptor.Stream(), - // be.Metrics.ServerMetrics().StreamServerInterceptor(), - // adminAuthInterceptor.Stream(), - // contextInterceptor.Stream(), - // defaultInterceptor.Stream(), - // )), - //} - interceptor := connect.WithInterceptors( connecthelper.NewLoggingInterceptor(), - // TODO(krapie): update prometehus metrics server to http server - // be.Metrics.ServerMetrics() + // TODO(krapie): consider OpenTelemetry for Connect rpc server metrics instead of prometheus interceptors.NewAdminAuthInterceptor(be, tokenManager), interceptors.NewContextInterceptor(be), interceptors.NewDefaultInterceptor(), ) - //if conf.CertFile != "" && conf.KeyFile != "" { - // creds, err := credentials.NewServerTLSFromFile(conf.CertFile, conf.KeyFile) - // if err != nil { - // return nil, fmt.Errorf("load TLS cert: %w", err) - // } - // opts = append(opts, grpc.Creds(creds)) - //} - // - //maxConnectionAge, err := time.ParseDuration(conf.MaxConnectionAge) - //if err != nil { - // return nil, fmt.Errorf("parse max connection age: %w", err) - //} - // - //maxConnectionAgeGrace, err := time.ParseDuration(conf.MaxConnectionAgeGrace) - //if err != nil { - // return nil, fmt.Errorf("parse max connection age grace: %w", err) - //} - // - //opts = append(opts, grpc.MaxRecvMsgSize(int(conf.MaxRequestBytes))) - //opts = append(opts, grpc.MaxSendMsgSize(math.MaxInt32)) - //opts = append(opts, grpc.MaxConcurrentStreams(math.MaxUint32)) - //opts = append(opts, grpc.KeepaliveParams(keepalive.ServerParameters{ - // MaxConnectionAge: maxConnectionAge, - // MaxConnectionAgeGrace: maxConnectionAgeGrace, - //})) + // TODO(krapie): find corresponding http/net server configurations that matches with gRPC server options yorkieServiceCtx, yorkieServiceCancel := context.WithCancel(context.Background()) @@ -129,12 +83,6 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { ) serverMux.Handle(grpchealth.NewHandler(checker)) - //grpcServer := grpc.NewServer(opts...) - //healthpb.RegisterHealthServer(grpcServer, health.NewServer()) - //api.RegisterYorkieServiceServer(grpcServer, newYorkieServer(yorkieServiceCtx, be)) - //api.RegisterAdminServiceServer(grpcServer, newAdminServer(be, tokenManager)) - //be.Metrics.RegisterGRPCServer(grpcServer) - return &Server{ conf: conf, serverMux: serverMux, From 038104154f3ef7bf97f796804f7f1e7732e13864 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 11 Dec 2023 14:26:20 +0900 Subject: [PATCH 21/33] Add rpc server handled counter metrics --- server/profiling/prometheus/metrics.go | 24 ++++++++++++++++++- server/rpc/connecthelper/status.go | 17 +++++++++++++ .../interceptors/{admin_auth.go => admin.go} | 23 ++++++++++++++++-- server/rpc/interceptors/context.go | 22 +++++++++++++++-- server/rpc/server.go | 1 - 5 files changed, 81 insertions(+), 6 deletions(-) rename server/rpc/interceptors/{admin_auth.go => admin.go} (87%) diff --git a/server/profiling/prometheus/metrics.go b/server/profiling/prometheus/metrics.go index 271db623b..5f3383af2 100644 --- a/server/profiling/prometheus/metrics.go +++ b/server/profiling/prometheus/metrics.go @@ -50,7 +50,8 @@ var ( type Metrics struct { registry *prometheus.Registry - serverVersion *prometheus.GaugeVec + serverVersion *prometheus.GaugeVec + serverHandledCounter *prometheus.CounterVec pushPullResponseSeconds prometheus.Histogram pushPullReceivedChangesTotal prometheus.Counter @@ -82,6 +83,12 @@ func NewMetrics() (*Metrics, error) { Name: "version", Help: "Which version is running. 1 for 'server_version' label with current version.", }, []string{"server_version"}), + serverHandledCounter: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ + Namespace: namespace, + Subsystem: "rpc", + Name: "server_handled_total", + Help: "Total number of RPCs completed on the server, regardless of success or failure.", + }, []string{"rpc_type", "rpc_service", "rpc_method", "rpc_code"}), pushPullResponseSeconds: promauto.With(reg).NewHistogram(prometheus.HistogramOpts{ Namespace: namespace, Subsystem: "pushpull", @@ -212,6 +219,21 @@ func (m *Metrics) AddUserAgentWithEmptyProject(hostname string, sdkType, sdkVers m.AddUserAgent(hostname, emptyProject, sdkType, sdkVersion, methodName) } +// AddServerHandledCounter adds the number of RPCs completed on the server. +func (m *Metrics) AddServerHandledCounter( + rpcType, + rpcService, + rpcMethod, + rpcCode string, +) { + m.serverHandledCounter.With(prometheus.Labels{ + "rpc_type": rpcType, + "rpc_service": rpcService, + "rpc_method": rpcMethod, + "rpc_code": rpcCode, + }).Inc() +} + // Registry returns the registry of this metrics. func (m *Metrics) Registry() *prometheus.Registry { return m.registry diff --git a/server/rpc/connecthelper/status.go b/server/rpc/connecthelper/status.go index c76b787f5..1f409d5b9 100644 --- a/server/rpc/connecthelper/status.go +++ b/server/rpc/connecthelper/status.go @@ -134,3 +134,20 @@ func ToStatusError(err error) error { return nil } + +// ToRPCCodeString returns a string representation of the given error. +func ToRPCCodeString(err error) string { + if err == nil { + return "ok" + } + + cause := err + for errors.Unwrap(cause) != nil { + cause = errors.Unwrap(cause) + } + if code, ok := errorToCode[cause]; ok { + return code.String() + } + + return connect.CodeInternal.String() +} diff --git a/server/rpc/interceptors/admin_auth.go b/server/rpc/interceptors/admin.go similarity index 87% rename from server/rpc/interceptors/admin_auth.go rename to server/rpc/interceptors/admin.go index 4c1dcb6a6..39210a926 100644 --- a/server/rpc/interceptors/admin_auth.go +++ b/server/rpc/interceptors/admin.go @@ -29,6 +29,7 @@ import ( "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/server/backend" "github.com/yorkie-team/yorkie/server/rpc/auth" + "github.com/yorkie-team/yorkie/server/rpc/connecthelper" "github.com/yorkie-team/yorkie/server/users" ) @@ -64,7 +65,16 @@ func (i *AdminAuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFu ctx = users.With(ctx, user) } - return next(ctx, req) + res, err := next(ctx, req) + + i.backend.Metrics.AddServerHandledCounter( + "unary", + strings.Split(req.Spec().Procedure, "/")[1], + strings.Split(req.Spec().Procedure, "/")[2], + connecthelper.ToRPCCodeString(err), + ) + + return res, err } } @@ -97,7 +107,16 @@ func (i *AdminAuthInterceptor) WrapStreamingHandler(next connect.StreamingHandle ctx = users.With(ctx, user) } - return next(ctx, conn) + err := next(ctx, conn) + + i.backend.Metrics.AddServerHandledCounter( + "server_stream", + strings.Split(conn.Spec().Procedure, "/")[1], + strings.Split(conn.Spec().Procedure, "/")[2], + connecthelper.ToRPCCodeString(err), + ) + + return err } } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 4d40476da..cda06cb5b 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -77,7 +77,16 @@ func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc req.Spec().Procedure, ) - return next(ctx, req) + res, err := next(ctx, req) + + i.backend.Metrics.AddServerHandledCounter( + "unary", + strings.Split(req.Spec().Procedure, "/")[1], + strings.Split(req.Spec().Procedure, "/")[2], + connecthelper.ToRPCCodeString(err), + ) + + return res, err } } @@ -115,7 +124,16 @@ func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerF conn.Spec().Procedure, ) - return next(ctx, conn) + err = next(ctx, conn) + + i.backend.Metrics.AddServerHandledCounter( + "server_stream", + strings.Split(conn.Spec().Procedure, "/")[1], + strings.Split(conn.Spec().Procedure, "/")[2], + connecthelper.ToRPCCodeString(err), + ) + + return err } } diff --git a/server/rpc/server.go b/server/rpc/server.go index 714742539..a595a28bb 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -56,7 +56,6 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { interceptor := connect.WithInterceptors( connecthelper.NewLoggingInterceptor(), - // TODO(krapie): consider OpenTelemetry for Connect rpc server metrics instead of prometheus interceptors.NewAdminAuthInterceptor(be, tokenManager), interceptors.NewContextInterceptor(be), interceptors.NewDefaultInterceptor(), From c97c1bf7ee0c0c87a999d006ce2bcaa8de1edd4a Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 11 Dec 2023 14:52:49 +0900 Subject: [PATCH 22/33] Update error detail logic --- server/rpc/connecthelper/status.go | 14 +++++++++----- server/rpc/server.go | 2 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/server/rpc/connecthelper/status.go b/server/rpc/connecthelper/status.go index 1f409d5b9..ec176a5e0 100644 --- a/server/rpc/connecthelper/status.go +++ b/server/rpc/connecthelper/status.go @@ -23,7 +23,6 @@ import ( "connectrpc.com/connect" "google.golang.org/genproto/googleapis/rpc/errdetails" - "google.golang.org/protobuf/runtime/protoiface" "github.com/yorkie-team/yorkie/api/converter" "github.com/yorkie-team/yorkie/api/types" @@ -87,7 +86,7 @@ var errorToCode = map[error]connect.Code{ context.Canceled: connect.CodeCanceled, } -func detailsFromError(err error) (protoiface.MessageV1, bool) { +func detailsFromError(err error) (*errdetails.BadRequest, bool) { invalidFieldsError, ok := err.(*validation.StructError) if !ok { return nil, false @@ -102,6 +101,7 @@ func detailsFromError(err error) (protoiface.MessageV1, bool) { } br.FieldViolations = append(br.FieldViolations, v) } + return br, true } @@ -122,9 +122,13 @@ func ToStatusError(err error) error { var invalidFieldsError *validation.StructError if errors.As(err, &invalidFieldsError) { st := connect.NewError(connect.CodeInvalidArgument, err) - //if details, ok := detailsFromError(err); ok { - // st, _ = st.AddDetail(details) - //} + details, ok := detailsFromError(err) + if !ok { + return st + } + if detail, err := connect.NewErrorDetail(details); err == nil { + st.AddDetail(detail) + } return st } diff --git a/server/rpc/server.go b/server/rpc/server.go index a595a28bb..62c77883f 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -126,8 +126,6 @@ func (s *Server) listenAndServe() error { } func newCORS() *cors.Cors { - // To let web developers play with the demo service from browsers, we need a - // very permissive CORS setup. return cors.New(cors.Options{ AllowedMethods: []string{ http.MethodHead, From f0a801161bf883c10e9cbbb5437c1cfe7964da68 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 11 Dec 2023 15:56:45 +0900 Subject: [PATCH 23/33] Update client & server configuration --- admin/client.go | 30 ++++++++------------- client/client.go | 64 ++++++++++++++++++++++++-------------------- server/rpc/server.go | 44 +++++++++++++++++++++--------- 3 files changed, 78 insertions(+), 60 deletions(-) diff --git a/admin/client.go b/admin/client.go index e9b2ea48f..e107e5dcc 100644 --- a/admin/client.go +++ b/admin/client.go @@ -19,6 +19,7 @@ package admin import ( "context" + "crypto/tls" "fmt" "net/http" "strings" @@ -66,9 +67,8 @@ type Options struct { // Client is a client for admin service. type Client struct { - conn *http.Client - client v1connect.AdminServiceClient - //dialOptions []grpc.DialOption + conn *http.Client + client v1connect.AdminServiceClient authInterceptor *AuthInterceptor logger *zap.Logger } @@ -80,16 +80,11 @@ func New(opts ...Option) (*Client, error) { opt(&options) } - //tlsConfig := credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12}) - //credentialOptions := grpc.WithTransportCredentials(tlsConfig) - //if options.IsInsecure { - // credentialOptions = grpc.WithTransportCredentials(insecure.NewCredentials()) - //} - //dialOptions := []grpc.DialOption{credentialOptions} - // - //authInterceptor := NewAuthInterceptor(options.Token) - //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) - //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) + conn := &http.Client{} + if !options.IsInsecure { + tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12} + conn.Transport = &http.Transport{TLSClientConfig: tlsConfig} + } logger := options.Logger if logger == nil { @@ -101,8 +96,8 @@ func New(opts ...Option) (*Client, error) { } return &Client{ - logger: logger, - //dialOptions: dialOptions, + conn: conn, + logger: logger, authInterceptor: NewAuthInterceptor(options.Token), }, nil } @@ -127,7 +122,6 @@ func (c *Client) Dial(rpcAddr string) error { rpcAddr = "http://" + rpcAddr } - c.conn = http.DefaultClient c.client = v1connect.NewAdminServiceClient(c.conn, rpcAddr, connect.WithInterceptors(c.authInterceptor)) return nil @@ -135,9 +129,7 @@ func (c *Client) Dial(rpcAddr string) error { // Close closes the connection to the admin service. func (c *Client) Close() error { - //if err := c.conn.Close(); err != nil { - // return fmt.Errorf("close connection: %w", err) - //} + c.conn.CloseIdleConnections() return nil } diff --git a/client/client.go b/client/client.go index f6e5846db..3217be68e 100644 --- a/client/client.go +++ b/client/client.go @@ -20,9 +20,12 @@ package client import ( "context" + "crypto/tls" + "crypto/x509" "errors" "fmt" "net/http" + "os" "strings" "connectrpc.com/connect" @@ -80,8 +83,7 @@ type Client struct { client v1connect.YorkieServiceClient options Options clientOptions []connect.ClientOption - // dialOptions []grpc.DialOption - logger *zap.Logger + logger *zap.Logger id *time.ActorID key string @@ -120,29 +122,22 @@ func New(opts ...Option) (*Client, error) { k = xid.New().String() } + conn := &http.Client{} + if options.CertFile != "" { + tlsConfig, err := newTLSConfigFromFile(options.CertFile, options.ServerNameOverride) + if err != nil { + return nil, fmt.Errorf("create client tls from file: %w", err) + } + + conn.Transport = &http.Transport{TLSClientConfig: tlsConfig} + } + var clientOptions []connect.ClientOption clientOptions = append(clientOptions, connect.WithInterceptors(NewAuthInterceptor(options.APIKey, options.Token))) - - //var dialOptions []grpc.DialOption - // - //transportCreds := grpc.WithTransportCredentials(insecure.NewCredentials()) - //if options.CertFile != "" { - // creds, err := credentials.NewClientTLSFromFile(options.CertFile, options.ServerNameOverride) - // if err != nil { - // return nil, fmt.Errorf("create client tls from file: %w", err) - // } - // transportCreds = grpc.WithTransportCredentials(creds) - //} - //dialOptions = append(dialOptions, transportCreds) - // - //authInterceptor := NewAuthInterceptor(options.APIKey, options.Token) - //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) - //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) - // - //if options.MaxCallRecvMsgSize != 0 { - // dialOptions = append(dialOptions, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(options.MaxCallRecvMsgSize))) - //} + if options.MaxCallRecvMsgSize != 0 { + clientOptions = append(clientOptions, connect.WithReadMaxBytes(options.MaxCallRecvMsgSize)) + } logger := options.Logger if logger == nil { @@ -154,10 +149,10 @@ func New(opts ...Option) (*Client, error) { } return &Client{ + conn: conn, clientOptions: clientOptions, - //dialOptions: dialOptions, - options: options, - logger: logger, + options: options, + logger: logger, key: k, status: deactivated, @@ -185,7 +180,6 @@ func (c *Client) Dial(rpcAddr string) error { rpcAddr = "http://" + rpcAddr } - c.conn = http.DefaultClient c.client = v1connect.NewYorkieServiceClient(c.conn, rpcAddr, c.clientOptions...) return nil @@ -197,9 +191,7 @@ func (c *Client) Close() error { return err } - //if err := c.conn.Close(); err != nil { - // return fmt.Errorf("close connection: %w", err) - //} + c.conn.CloseIdleConnections() return nil } @@ -726,6 +718,20 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st return nil } +// NewClientTLSFromFile +func newTLSConfigFromFile(certFile, serverNameOverride string) (*tls.Config, error) { + b, err := os.ReadFile(certFile) + if err != nil { + return nil, err + } + cp := x509.NewCertPool() + if !cp.AppendCertsFromPEM(b) { + return nil, fmt.Errorf("credentials: failed to append certificates") + } + + return &tls.Config{ServerName: serverNameOverride, RootCAs: cp}, nil +} + /** * withShardKey returns a context with the given shard key in metadata. */ diff --git a/server/rpc/server.go b/server/rpc/server.go index 62c77883f..e9930ab95 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -118,8 +118,16 @@ func (s *Server) listenAndServe() error { newCORS().Handler(s.serverMux), &http2.Server{}, ) - if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { - logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) + if s.conf.CertFile != "" && s.conf.KeyFile != "" { + if err := s.httpServer.ListenAndServeTLS(s.conf.CertFile, s.conf.KeyFile); err != http.ErrServerClosed { + logging.DefaultLogger().Errorf("HTTP server ListenAndServeTLS: %v", err) + } + return + } else { + if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { + logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) + } + return } }() return nil @@ -128,20 +136,35 @@ func (s *Server) listenAndServe() error { func newCORS() *cors.Cors { return cors.New(cors.Options{ AllowedMethods: []string{ - http.MethodHead, + http.MethodOptions, http.MethodGet, http.MethodPost, http.MethodPut, - http.MethodPatch, http.MethodDelete, }, AllowOriginFunc: func(origin string) bool { - // Allow all origins, which effectively disables CORS. return true }, - AllowedHeaders: []string{"*"}, + AllowedHeaders: []string{ + "Grpc-Timeout", + "Content-Type", + "Keep-Alive", + "User-Agent", + "Cache-Control", + "Content-Type", + "Content-Transfer-Encoding", + "Custom-Header-1", + "X-Accept-Content-Transfer-Encoding", + "X-Accept-Response-Streaming", + "X-User-Agent", + "X-Yorkie-User-Agent", + "X-Grpc-Web", + "Authorization", + "X-API-Key", + "X-Shard-Key", + }, + MaxAge: int(1728 * time.Second), ExposedHeaders: []string{ - // Content-Type is in the default safelist. "Accept", "Accept-Encoding", "Accept-Post", @@ -155,11 +178,8 @@ func newCORS() *cors.Cors { "Grpc-Status-Details-Bin", "X-Custom-Header", "Connect-Protocol-Version", + "Custom-Header-1", }, - // Let browsers cache CORS information for longer, which reduces the number - // of preflight requests. Any changes to ExposedHeaders won't take effect - // until the cached data expires. FF caps this value at 24h, and modern - // Chrome caps it at 2h. - MaxAge: int(2 * time.Hour / time.Second), + AllowCredentials: true, }) } From 5e631a6c1f0e652161cf8043eb74032ad6a51025 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 11 Dec 2023 18:16:12 +0900 Subject: [PATCH 24/33] Lint codes --- client/client.go | 11 +++++++---- server/rpc/server.go | 9 ++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/client/client.go b/client/client.go index 3217be68e..bedfe4c1c 100644 --- a/client/client.go +++ b/client/client.go @@ -26,6 +26,7 @@ import ( "fmt" "net/http" "os" + "path/filepath" "strings" "connectrpc.com/connect" @@ -718,18 +719,20 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st return nil } -// NewClientTLSFromFile +/** +* newTLSConfigFromFile returns a new tls.Config from the given certFile. + */ func newTLSConfigFromFile(certFile, serverNameOverride string) (*tls.Config, error) { - b, err := os.ReadFile(certFile) + b, err := os.ReadFile(filepath.Clean(certFile)) if err != nil { - return nil, err + return nil, fmt.Errorf("credentials: failed to read TLS config file %q: %w", certFile, err) } cp := x509.NewCertPool() if !cp.AppendCertsFromPEM(b) { return nil, fmt.Errorf("credentials: failed to append certificates") } - return &tls.Config{ServerName: serverNameOverride, RootCAs: cp}, nil + return &tls.Config{ServerName: serverNameOverride, RootCAs: cp, MinVersion: tls.VersionTLS13}, nil } /** diff --git a/server/rpc/server.go b/server/rpc/server.go index e9930ab95..c762538c0 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -123,12 +123,11 @@ func (s *Server) listenAndServe() error { logging.DefaultLogger().Errorf("HTTP server ListenAndServeTLS: %v", err) } return - } else { - if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { - logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) - } - return } + if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { + logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) + } + return }() return nil } From 4f23378c33f3233ef42b943bc73eb00bc7056e59 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 11 Dec 2023 18:25:44 +0900 Subject: [PATCH 25/33] Update tools --- Makefile | 21 ++++----------------- api/yorkie/v1/admin.pb.go | 5 ++--- api/yorkie/v1/resources.pb.go | 5 ++--- api/yorkie/v1/v1connect/admin.connect.go | 6 ++---- api/yorkie/v1/v1connect/yorkie.connect.go | 6 ++---- api/yorkie/v1/yorkie.pb.go | 5 ++--- buf.gen.yaml | 3 --- test/integration/tree_test.go | 4 ++-- 8 files changed, 16 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index 91425b94a..aa4d7b31a 100644 --- a/Makefile +++ b/Makefile @@ -20,26 +20,13 @@ GO_LDFLAGS += -X ${GO_PROJECT}/internal/version.BuildDate=${BUILD_DATE} default: help tools: ## install tools for developing yorkie - go install github.com/gogo/protobuf/protoc-gen-gogo@v1.3.2 - go install github.com/gogo/protobuf/protoc-gen-gofast@v1.3.2 + go install github.com/bufbuild/buf/cmd/buf@v1.28.1 + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 + go install connectrpc.com/connect/cmd/protoc-gen-connect-go@v1.12.0 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.1 proto: ## generate proto files - protoc \ --I=./api \ --I=$(GOPATH)/src \ ---gofast_out=plugins=grpc,\ -Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ -Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ -Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1 \ -api/yorkie/v1/*.proto - -protoset: ## generate protoset file - protoc \ --I=./api \ ---descriptor_set_out=yorkie.protoset \ ---include_imports \ -api/yorkie/v1/*.proto + buf generate build: ## builds an executable that runs in the current environment CGO_ENABLED=0 go build -o $(EXECUTABLE) -ldflags "${GO_LDFLAGS}" ./cmd/yorkie diff --git a/api/yorkie/v1/admin.pb.go b/api/yorkie/v1/admin.pb.go index 1c0f261ef..7ff402031 100644 --- a/api/yorkie/v1/admin.pb.go +++ b/api/yorkie/v1/admin.pb.go @@ -22,11 +22,10 @@ package v1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/api/yorkie/v1/resources.pb.go b/api/yorkie/v1/resources.pb.go index a24abecd9..cbd9529d8 100644 --- a/api/yorkie/v1/resources.pb.go +++ b/api/yorkie/v1/resources.pb.go @@ -22,13 +22,12 @@ package v1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) const ( diff --git a/api/yorkie/v1/v1connect/admin.connect.go b/api/yorkie/v1/v1connect/admin.connect.go index b2e0036b2..d78294f72 100644 --- a/api/yorkie/v1/v1connect/admin.connect.go +++ b/api/yorkie/v1/v1connect/admin.connect.go @@ -20,14 +20,12 @@ package v1connect import ( + connect "connectrpc.com/connect" context "context" errors "errors" + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" http "net/http" strings "strings" - - connect "connectrpc.com/connect" - - v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" ) // This is a compile-time assertion to ensure that this generated file and the connect package are diff --git a/api/yorkie/v1/v1connect/yorkie.connect.go b/api/yorkie/v1/v1connect/yorkie.connect.go index b399cbe3a..79f4d2636 100644 --- a/api/yorkie/v1/v1connect/yorkie.connect.go +++ b/api/yorkie/v1/v1connect/yorkie.connect.go @@ -20,14 +20,12 @@ package v1connect import ( + connect "connectrpc.com/connect" context "context" errors "errors" + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" http "net/http" strings "strings" - - connect "connectrpc.com/connect" - - v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" ) // This is a compile-time assertion to ensure that this generated file and the connect package are diff --git a/api/yorkie/v1/yorkie.pb.go b/api/yorkie/v1/yorkie.pb.go index 4614d6595..0a49dba9f 100644 --- a/api/yorkie/v1/yorkie.pb.go +++ b/api/yorkie/v1/yorkie.pb.go @@ -22,11 +22,10 @@ package v1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/buf.gen.yaml b/buf.gen.yaml index 63e8ae622..8e4b54834 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -3,9 +3,6 @@ plugins: - plugin: go out: api opt: paths=source_relative -# - plugin: gofast -# out: api -# opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1,plugins=grpc,paths=source_relative - plugin: connect-go out: api opt: paths=source_relative diff --git a/test/integration/tree_test.go b/test/integration/tree_test.go index 9e4629cfe..ea10767a5 100644 --- a/test/integration/tree_test.go +++ b/test/integration/tree_test.go @@ -425,7 +425,7 @@ func TestTree(t *testing.T) { root.GetTree("t").EditBulk(3, 3, []*json.TreeNode{{ Type: "text", Value: "c", - }, &json.TreeNode{ + }, { Type: "text", Value: "d", }}, 0) @@ -451,7 +451,7 @@ func TestTree(t *testing.T) { root.GetTree("t").EditBulk(4, 4, []*json.TreeNode{{ Type: "p", Children: []json.TreeNode{{Type: "text", Value: "cd"}}, - }, &json.TreeNode{ + }, { Type: "i", Children: []json.TreeNode{{Type: "text", Value: "fg"}}, }}, 0) From 1a38601e3a41fb896190662fc8c1aaf2d1563bd4 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Mon, 11 Dec 2023 18:51:57 +0900 Subject: [PATCH 26/33] Revise CORS --- server/rpc/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/rpc/server.go b/server/rpc/server.go index c762538c0..098be5c03 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -153,6 +153,7 @@ func newCORS() *cors.Cors { "Content-Type", "Content-Transfer-Encoding", "Custom-Header-1", + "Connect-Protocol-Version", "X-Accept-Content-Transfer-Encoding", "X-Accept-Response-Streaming", "X-User-Agent", @@ -176,7 +177,6 @@ func newCORS() *cors.Cors { "Grpc-Status", "Grpc-Status-Details-Bin", "X-Custom-Header", - "Connect-Protocol-Version", "Custom-Header-1", }, AllowCredentials: true, From 56fb0eb8e49c66e6d4860a261d3ebb998fee0ce6 Mon Sep 17 00:00:00 2001 From: Kevin Park Date: Tue, 12 Dec 2023 12:29:28 +0900 Subject: [PATCH 27/33] Update overall codes --- admin/auth.go | 13 ++++++--- client/auth.go | 7 ++--- client/client.go | 12 ++------- go.mod | 1 - server/rpc/connecthelper/logging.go | 8 +++--- server/rpc/connecthelper/status.go | 6 ++--- .../interceptors/{admin.go => admin_auth.go} | 27 +++++++++++++++---- server/rpc/interceptors/context.go | 14 +++++----- server/rpc/interceptors/default.go | 6 ++--- server/rpc/server.go | 2 +- server/rpc/server_test.go | 19 ++++--------- test/integration/tree_test.go | 4 +-- 12 files changed, 62 insertions(+), 57 deletions(-) rename server/rpc/interceptors/{admin.go => admin_auth.go} (84%) diff --git a/admin/auth.go b/admin/auth.go index 9d4de4407..9465588a6 100644 --- a/admin/auth.go +++ b/admin/auth.go @@ -42,7 +42,7 @@ func (i *AuthInterceptor) SetToken(token string) { i.token = token } -// WrapUnary creates a unary server interceptor for building additional context. +// WrapUnary creates a unary server interceptor for authorization. func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, @@ -55,17 +55,22 @@ func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { } } -// WrapStreamingClient creates a stream client interceptor for building additional context. +// WrapStreamingClient creates a stream client interceptor for authorization. func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, spec connect.Spec, ) connect.StreamingClientConn { - return next(ctx, spec) + conn := next(ctx, spec) + + conn.RequestHeader().Add(types.AuthorizationKey, i.token) + conn.RequestHeader().Add(types.UserAgentKey, types.GoSDKType+"/"+version.Version) + + return conn } } -// WrapStreamingHandler creates a stream server interceptor for building additional context. +// WrapStreamingHandler creates a stream server interceptor for authorization. func (i *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( ctx context.Context, diff --git a/client/auth.go b/client/auth.go index 843ca077a..affe39b60 100644 --- a/client/auth.go +++ b/client/auth.go @@ -39,7 +39,7 @@ func NewAuthInterceptor(apiKey, token string) *AuthInterceptor { } } -// WrapUnary creates a unary server interceptor for building additional context. +// WrapUnary creates a unary server interceptor for authorization. func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, @@ -53,20 +53,21 @@ func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { } } -// WrapStreamingClient creates a stream client interceptor for building additional context. +// WrapStreamingClient creates a stream client interceptor for authorization. func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, spec connect.Spec, ) connect.StreamingClientConn { conn := next(ctx, spec) + conn.RequestHeader().Set(types.APIKeyKey, i.apiKey) return conn } } -// WrapStreamingHandler creates a stream server interceptor for building additional context. +// WrapStreamingHandler creates a stream server interceptor for authorization. func (i *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( ctx context.Context, diff --git a/client/client.go b/client/client.go index bedfe4c1c..81906d9a7 100644 --- a/client/client.go +++ b/client/client.go @@ -426,26 +426,18 @@ func (c *Client) Watch( for stream.Receive() { pbResp := stream.Msg() - if err != nil { - return nil, err - } if _, err := handleResponse(pbResp, doc); err != nil { return nil, err } break } if err = stream.Err(); err != nil { - return nil, connect.NewError(connect.CodeUnavailable, err) + return nil, err } go func() { for stream.Receive() { pbResp := stream.Msg() - if err != nil { - rch <- WatchResponse{Err: err} - close(rch) - return - } resp, err := handleResponse(pbResp, doc) if err != nil { rch <- WatchResponse{Err: err} @@ -732,7 +724,7 @@ func newTLSConfigFromFile(certFile, serverNameOverride string) (*tls.Config, err return nil, fmt.Errorf("credentials: failed to append certificates") } - return &tls.Config{ServerName: serverNameOverride, RootCAs: cp, MinVersion: tls.VersionTLS13}, nil + return &tls.Config{ServerName: serverNameOverride, RootCAs: cp, MinVersion: tls.VersionTLS12}, nil } /** diff --git a/go.mod b/go.mod index a33b1db5e..1b71cea9b 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,6 @@ require ( github.com/go-playground/universal-translator v0.18.0 github.com/go-playground/validator/v10 v10.11.1 github.com/golang-jwt/jwt v3.2.2+incompatible - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/go-memdb v1.3.3 github.com/jedib0t/go-pretty/v6 v6.4.9 github.com/prometheus/client_golang v1.13.0 diff --git a/server/rpc/connecthelper/logging.go b/server/rpc/connecthelper/logging.go index a66a4d538..01359b480 100644 --- a/server/rpc/connecthelper/logging.go +++ b/server/rpc/connecthelper/logging.go @@ -14,7 +14,7 @@ * limitations under the License. */ -// Package connecthelper provides helper functions for gRPC. +// Package connecthelper provides helper functions for connectRPC. package connecthelper import ( @@ -44,7 +44,7 @@ func NewLoggingInterceptor() *LoggingInterceptor { return &LoggingInterceptor{} } -// WrapUnary creates a unary server interceptor for building additional context. +// WrapUnary creates a unary server interceptor for request logging. func (i *LoggingInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, @@ -55,7 +55,7 @@ func (i *LoggingInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc } } -// WrapStreamingClient creates a stream client interceptor for building additional context. +// WrapStreamingClient creates a stream client interceptor for request logging. func (i *LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, @@ -65,7 +65,7 @@ func (i *LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFun } } -// WrapStreamingHandler creates a stream server interceptor for building additional context. +// WrapStreamingHandler creates a stream server interceptor for request logging. func (i *LoggingInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( ctx context.Context, diff --git a/server/rpc/connecthelper/status.go b/server/rpc/connecthelper/status.go index ec176a5e0..1cc22b89b 100644 --- a/server/rpc/connecthelper/status.go +++ b/server/rpc/connecthelper/status.go @@ -36,7 +36,7 @@ import ( "github.com/yorkie-team/yorkie/server/rpc/auth" ) -// errorToCode maps an error to gRPC status code. +// errorToCode maps an error to connectRPC status code. var errorToCode = map[error]connect.Code{ // InvalidArgument means the request is malformed. converter.ErrPackRequired: connect.CodeInvalidArgument, @@ -105,8 +105,8 @@ func detailsFromError(err error) (*errdetails.BadRequest, bool) { return br, true } -// ToStatusError returns a status.Error from the given logic error. If an error -// occurs while executing logic in API handler, gRPC status.error should be +// ToStatusError returns a connect.Error from the given logic error. If an error +// occurs while executing logic in API handler, connectRPC connect.error should be // returned so that the client can know more about the status of the request. func ToStatusError(err error) error { cause := err diff --git a/server/rpc/interceptors/admin.go b/server/rpc/interceptors/admin_auth.go similarity index 84% rename from server/rpc/interceptors/admin.go rename to server/rpc/interceptors/admin_auth.go index 39210a926..4940b19ac 100644 --- a/server/rpc/interceptors/admin.go +++ b/server/rpc/interceptors/admin_auth.go @@ -67,6 +67,15 @@ func (i *AdminAuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFu res, err := next(ctx, req) + // TODO(hackerwins, emplam27): Consider splitting between admin and sdk metrics. + sdkType, sdkVersion := connecthelper.SDKTypeAndVersion(req.Header()) + i.backend.Metrics.AddUserAgentWithEmptyProject( + i.backend.Config.Hostname, + sdkType, + sdkVersion, + req.Spec().Procedure, + ) + i.backend.Metrics.AddServerHandledCounter( "unary", strings.Split(req.Spec().Procedure, "/")[1], @@ -78,18 +87,17 @@ func (i *AdminAuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFu } } -// WrapStreamingClient creates a stream client interceptor for building additional context. +// WrapStreamingClient creates a stream client interceptor for authentication. func (i *AdminAuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, spec connect.Spec, ) connect.StreamingClientConn { - conn := next(ctx, spec) - return conn + return next(ctx, spec) } } -// WrapStreamingHandler creates a stream server interceptor for building additional context. +// WrapStreamingHandler creates a stream server interceptor for authentication. func (i *AdminAuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( ctx context.Context, @@ -109,6 +117,15 @@ func (i *AdminAuthInterceptor) WrapStreamingHandler(next connect.StreamingHandle err := next(ctx, conn) + // TODO(hackerwins, emplam27): Consider splitting between admin and sdk metrics. + sdkType, sdkVersion := connecthelper.SDKTypeAndVersion(conn.RequestHeader()) + i.backend.Metrics.AddUserAgentWithEmptyProject( + i.backend.Config.Hostname, + sdkType, + sdkVersion, + conn.Spec().Procedure, + ) + i.backend.Metrics.AddServerHandledCounter( "server_stream", strings.Split(conn.Spec().Procedure, "/")[1], @@ -135,7 +152,7 @@ func (i *AdminAuthInterceptor) authenticate( header http.Header, ) (*types.User, error) { authorization := header.Get(types.AuthorizationKey) - if len(authorization) == 0 { + if authorization == "" { return nil, grpcstatus.Errorf(codes.Unauthenticated, "authorization is not provided") } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index cda06cb5b..753112570 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -68,6 +68,8 @@ func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc return nil, err } + res, err := next(ctx, req) + sdkType, sdkVersion := connecthelper.SDKTypeAndVersion(req.Header()) i.backend.Metrics.AddUserAgent( i.backend.Config.Hostname, @@ -77,8 +79,6 @@ func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc req.Spec().Procedure, ) - res, err := next(ctx, req) - i.backend.Metrics.AddServerHandledCounter( "unary", strings.Split(req.Spec().Procedure, "/")[1], @@ -115,6 +115,8 @@ func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerF return err } + err = next(ctx, conn) + sdkType, sdkVersion := connecthelper.SDKTypeAndVersion(conn.RequestHeader()) i.backend.Metrics.AddUserAgent( i.backend.Config.Hostname, @@ -124,8 +126,6 @@ func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerF conn.Spec().Procedure, ) - err = next(ctx, conn) - i.backend.Metrics.AddServerHandledCounter( "server_stream", strings.Split(conn.Spec().Procedure, "/")[1], @@ -148,15 +148,15 @@ func (i *ContextInterceptor) buildContext(ctx context.Context, header http.Heade md := metadata.Metadata{} apiKey := header.Get(types.APIKeyKey) - if len(apiKey) == 0 && !i.backend.Config.UseDefaultProject { + if apiKey == "" && !i.backend.Config.UseDefaultProject { return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("api key is not provided")) } - if len(apiKey) > 0 { + if apiKey != "" { md.APIKey = apiKey } authorization := header.Get(types.AuthorizationKey) - if len(authorization) > 0 { + if authorization != "" { md.Authorization = authorization } ctx = metadata.With(ctx, md) diff --git a/server/rpc/interceptors/default.go b/server/rpc/interceptors/default.go index 2d521e2cb..acdfe8c4a 100644 --- a/server/rpc/interceptors/default.go +++ b/server/rpc/interceptors/default.go @@ -41,7 +41,7 @@ const ( SlowThreshold = 100 * gotime.Millisecond ) -// WrapUnary creates a unary server interceptor for building additional context. +// WrapUnary creates a unary server interceptor for default. func (i *DefaultInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { return func( ctx context.Context, @@ -62,7 +62,7 @@ func (i *DefaultInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc } } -// WrapStreamingClient creates a stream client interceptor for building additional context. +// WrapStreamingClient creates a stream client interceptor for default. func (i *DefaultInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return func( ctx context.Context, @@ -72,7 +72,7 @@ func (i *DefaultInterceptor) WrapStreamingClient(next connect.StreamingClientFun } } -// WrapStreamingHandler creates a stream server interceptor for building additional context. +// WrapStreamingHandler creates a stream server interceptor for default. func (i *DefaultInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return func( ctx context.Context, diff --git a/server/rpc/server.go b/server/rpc/server.go index 098be5c03..e18556032 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -113,7 +113,7 @@ func (s *Server) Shutdown(graceful bool) { func (s *Server) listenAndServe() error { go func() { - logging.DefaultLogger().Infof(fmt.Sprintf("serving rpc on %d", s.conf.Port)) + logging.DefaultLogger().Infof(fmt.Sprintf("serving RPC on %d", s.conf.Port)) s.httpServer.Handler = h2c.NewHandler( newCORS().Handler(s.serverMux), &http2.Server{}, diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index d5cb04eeb..cfb3286b6 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -77,7 +77,6 @@ func TestMain(m *testing.M) { ProjectInfoCacheSize: helper.ProjectInfoCacheSize, ProjectInfoCacheTTL: helper.ProjectInfoCacheTTL.String(), AdminTokenDuration: helper.AdminTokenDuration, - UseDefaultProject: true, }, &mongo.Config{ ConnectionURI: helper.MongoConnectionURI, YorkieDatabase: helper.TestDBName(), @@ -101,10 +100,10 @@ func TestMain(m *testing.M) { } testRPCServer, err = rpc.NewServer(&rpc.Config{ - Port: helper.RPCPort, - //MaxRequestBytes: helper.RPCMaxRequestBytes, - //MaxConnectionAge: helper.RPCMaxConnectionAge.String(), - //MaxConnectionAgeGrace: helper.RPCMaxConnectionAgeGrace.String(), + Port: helper.RPCPort, + MaxRequestBytes: helper.RPCMaxRequestBytes, + MaxConnectionAge: helper.RPCMaxConnectionAge.String(), + MaxConnectionAgeGrace: helper.RPCMaxConnectionAgeGrace.String(), }, be) if err != nil { log.Fatal(err) @@ -114,11 +113,7 @@ func TestMain(m *testing.M) { log.Fatalf("failed rpc listen: %s\n", err) } - //var dialOptions []grpc.DialOption authInterceptor := client.NewAuthInterceptor(project.PublicKey, "") - //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(authInterceptor.Unary())) - //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(authInterceptor.Stream())) - //dialOptions = append(dialOptions, grpc.WithTransportCredentials(insecure.NewCredentials())) conn := http.DefaultClient testClient = v1connect.NewYorkieServiceClient( @@ -127,12 +122,7 @@ func TestMain(m *testing.M) { connect.WithInterceptors(authInterceptor), ) - //credentials := grpc.WithTransportCredentials(insecure.NewCredentials()) - //dialOptions = []grpc.DialOption{credentials} - testAdminAuthInterceptor = admin.NewAuthInterceptor("") - //dialOptions = append(dialOptions, grpc.WithUnaryInterceptor(testAdminAuthInterceptor.Unary())) - //dialOptions = append(dialOptions, grpc.WithStreamInterceptor(testAdminAuthInterceptor.Stream())) adminConn := http.DefaultClient testAdminClient = v1connect.NewAdminServiceClient( @@ -675,6 +665,7 @@ func TestSDKRPCServerBackend(t *testing.T) { break } + // TODO(krapie): find a way to set timeout for stream //// wait for MaxConnectionAge + MaxConnectionAgeGrace //time.Sleep(helper.RPCMaxConnectionAge + helper.RPCMaxConnectionAgeGrace) // diff --git a/test/integration/tree_test.go b/test/integration/tree_test.go index ea10767a5..9e4629cfe 100644 --- a/test/integration/tree_test.go +++ b/test/integration/tree_test.go @@ -425,7 +425,7 @@ func TestTree(t *testing.T) { root.GetTree("t").EditBulk(3, 3, []*json.TreeNode{{ Type: "text", Value: "c", - }, { + }, &json.TreeNode{ Type: "text", Value: "d", }}, 0) @@ -451,7 +451,7 @@ func TestTree(t *testing.T) { root.GetTree("t").EditBulk(4, 4, []*json.TreeNode{{ Type: "p", Children: []json.TreeNode{{Type: "text", Value: "cd"}}, - }, { + }, &json.TreeNode{ Type: "i", Children: []json.TreeNode{{Type: "text", Value: "fg"}}, }}, 0) From c93f27f8afe646f16c5536adc6e59548357eefba Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Wed, 13 Dec 2023 16:43:39 +0900 Subject: [PATCH 28/33] Clean up converter --- admin/client.go | 25 ++++++++++++----------- api/converter/from_pb.go | 44 ++++++++++++++-------------------------- server/rpc/server.go | 6 ++---- 3 files changed, 30 insertions(+), 45 deletions(-) diff --git a/admin/client.go b/admin/client.go index e107e5dcc..96fcd6c24 100644 --- a/admin/client.go +++ b/admin/client.go @@ -174,39 +174,39 @@ func (c *Client) SignUp( func (c *Client) CreateProject(ctx context.Context, name string) (*types.Project, error) { response, err := c.client.CreateProject( ctx, - connect.NewRequest(&api.CreateProjectRequest{ - Name: name, - }, - )) + connect.NewRequest(&api.CreateProjectRequest{Name: name}), + ) if err != nil { return nil, err } - return converter.FromProject(response.Msg.Project) + return converter.FromProject(response.Msg.Project), nil } // GetProject gets the project by name. func (c *Client) GetProject(ctx context.Context, name string) (*types.Project, error) { response, err := c.client.GetProject( ctx, - connect.NewRequest(&api.GetProjectRequest{Name: name})) + connect.NewRequest(&api.GetProjectRequest{Name: name}), + ) if err != nil { return nil, err } - return converter.FromProject(response.Msg.Project) + return converter.FromProject(response.Msg.Project), nil } // ListProjects lists all projects. func (c *Client) ListProjects(ctx context.Context) ([]*types.Project, error) { response, err := c.client.ListProjects( ctx, - connect.NewRequest(&api.ListProjectsRequest{})) + connect.NewRequest(&api.ListProjectsRequest{}), + ) if err != nil { return nil, err } - return converter.FromProjects(response.Msg.Projects) + return converter.FromProjects(response.Msg.Projects), nil } // UpdateProject updates an existing project. @@ -228,7 +228,7 @@ func (c *Client) UpdateProject( return nil, err } - return converter.FromProject(response.Msg.Project) + return converter.FromProject(response.Msg.Project), nil } // ListDocuments lists documents. @@ -254,7 +254,7 @@ func (c *Client) ListDocuments( return nil, err } - return converter.FromDocumentSummaries(response.Msg.Documents) + return converter.FromDocumentSummaries(response.Msg.Documents), nil } // RemoveDocument removes a document of the given key. @@ -277,7 +277,8 @@ func (c *Client) RemoveDocument( DocumentKey: documentKey, Force: force, }, - ), apiKey, documentKey)) + ), apiKey, documentKey), + ) return err } diff --git a/api/converter/from_pb.go b/api/converter/from_pb.go index 515fa1df3..953e1528c 100644 --- a/api/converter/from_pb.go +++ b/api/converter/from_pb.go @@ -41,23 +41,16 @@ func FromUser(pbUser *api.User) (*types.User, error) { } // FromProjects converts the given Protobuf formats to model format. -func FromProjects(pbProjects []*api.Project) ([]*types.Project, error) { +func FromProjects(pbProjects []*api.Project) []*types.Project { var projects []*types.Project for _, pbProject := range pbProjects { - project, err := FromProject(pbProject) - if err != nil { - return nil, err - } - projects = append(projects, project) + projects = append(projects, FromProject(pbProject)) } - return projects, nil + return projects } // FromProject converts the given Protobuf formats to model format. -func FromProject(pbProject *api.Project) (*types.Project, error) { - createdAt := pbProject.CreatedAt.AsTime() - updatedAt := pbProject.UpdatedAt.AsTime() - +func FromProject(pbProject *api.Project) *types.Project { return &types.Project{ ID: types.ID(pbProject.Id), Name: pbProject.Name, @@ -66,37 +59,30 @@ func FromProject(pbProject *api.Project) (*types.Project, error) { ClientDeactivateThreshold: pbProject.ClientDeactivateThreshold, PublicKey: pbProject.PublicKey, SecretKey: pbProject.SecretKey, - CreatedAt: createdAt, - UpdatedAt: updatedAt, - }, nil + CreatedAt: pbProject.CreatedAt.AsTime(), + UpdatedAt: pbProject.UpdatedAt.AsTime(), + } } // FromDocumentSummaries converts the given Protobuf formats to model format. -func FromDocumentSummaries(pbSummaries []*api.DocumentSummary) ([]*types.DocumentSummary, error) { +func FromDocumentSummaries(pbSummaries []*api.DocumentSummary) []*types.DocumentSummary { var summaries []*types.DocumentSummary for _, pbSummary := range pbSummaries { - summary, err := FromDocumentSummary(pbSummary) - if err != nil { - return nil, err - } - summaries = append(summaries, summary) + summaries = append(summaries, FromDocumentSummary(pbSummary)) } - return summaries, nil + return summaries } // FromDocumentSummary converts the given Protobuf formats to model format. -func FromDocumentSummary(pbSummary *api.DocumentSummary) (*types.DocumentSummary, error) { - createdAt := pbSummary.CreatedAt.AsTime() - accessedAt := pbSummary.AccessedAt.AsTime() - updatedAt := pbSummary.UpdatedAt.AsTime() +func FromDocumentSummary(pbSummary *api.DocumentSummary) *types.DocumentSummary { return &types.DocumentSummary{ ID: types.ID(pbSummary.Id), Key: key.Key(pbSummary.Key), - CreatedAt: createdAt, - AccessedAt: accessedAt, - UpdatedAt: updatedAt, + CreatedAt: pbSummary.CreatedAt.AsTime(), + AccessedAt: pbSummary.AccessedAt.AsTime(), + UpdatedAt: pbSummary.UpdatedAt.AsTime(), Snapshot: pbSummary.Snapshot, - }, nil + } } // FromChangePack converts the given Protobuf formats to model format. diff --git a/server/rpc/server.go b/server/rpc/server.go index e18556032..af42bdbd7 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -74,13 +74,11 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { newAdminServer(be, tokenManager), interceptor, )) - - checker := grpchealth.NewStaticChecker( + serverMux.Handle(grpchealth.NewHandler(grpchealth.NewStaticChecker( grpchealth.HealthV1ServiceName, v1connect.YorkieServiceName, v1connect.AdminServiceName, - ) - serverMux.Handle(grpchealth.NewHandler(checker)) + ))) return &Server{ conf: conf, From b3bec3db83f4a3b0fa90c73fd2ca3e206ef1d1d7 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Thu, 14 Dec 2023 18:50:46 +0900 Subject: [PATCH 29/33] Revise server code and remove gRPC-related flags --- cmd/yorkie/server.go | 18 ------- server/config.go | 12 ----- server/rpc/config.go | 32 ------------ server/rpc/server.go | 98 ++++++++++++----------------------- server/rpc/server_test.go | 21 +++----- test/bench/grpc_bench_test.go | 1 - test/helper/helper.go | 10 +--- 7 files changed, 43 insertions(+), 149 deletions(-) diff --git a/cmd/yorkie/server.go b/cmd/yorkie/server.go index ecfb3d2f1..2336bab51 100644 --- a/cmd/yorkie/server.go +++ b/cmd/yorkie/server.go @@ -181,24 +181,6 @@ func init() { "", "RPC key file's path", ) - cmd.Flags().Uint64Var( - &conf.RPC.MaxRequestBytes, - "rpc-max-requests-bytes", - server.DefaultRPCMaxRequestsBytes, - "Maximum client request size in bytes the server will accept.", - ) - cmd.Flags().StringVar( - &conf.RPC.MaxConnectionAge, - "rpc-max-connection-age", - server.DefaultRPCMaxConnectionAge.String(), - "Maximum duration of connection may exist before it will be closed by sending a GoAway.", - ) - cmd.Flags().StringVar( - &conf.RPC.MaxConnectionAgeGrace, - "rpc-max-connection-age-grace", - server.DefaultRPCMaxConnectionAgeGrace.String(), - "Additional grace period after MaxConnectionAge after which connections will be forcibly closed.", - ) cmd.Flags().IntVar( &conf.Profiling.Port, "profiling-port", diff --git a/server/config.go b/server/config.go index cdc165dcb..2fcc9b3ca 100644 --- a/server/config.go +++ b/server/config.go @@ -140,18 +140,6 @@ func (c *Config) ensureDefaultValue() { c.RPC.Port = DefaultRPCPort } - if c.RPC.MaxRequestBytes == 0 { - c.RPC.MaxRequestBytes = DefaultRPCMaxRequestsBytes - } - - if c.RPC.MaxConnectionAge == "" { - c.RPC.MaxConnectionAge = DefaultRPCMaxConnectionAge.String() - } - - if c.RPC.MaxConnectionAgeGrace == "" { - c.RPC.MaxConnectionAgeGrace = DefaultRPCMaxConnectionAgeGrace.String() - } - if c.Profiling.Port == 0 { c.Profiling.Port = DefaultProfilingPort } diff --git a/server/rpc/config.go b/server/rpc/config.go index ac7b624ff..187caae96 100644 --- a/server/rpc/config.go +++ b/server/rpc/config.go @@ -20,7 +20,6 @@ import ( "errors" "fmt" "os" - "time" ) var ( @@ -30,10 +29,6 @@ var ( ErrInvalidCertFile = errors.New("invalid cert file for RPC server") // ErrInvalidKeyFile occurs when the key file is invalid. ErrInvalidKeyFile = errors.New("invalid key file for RPC server") - // ErrInvalidMaxConnectionAge occurs when the max connection age is invalid. - ErrInvalidMaxConnectionAge = errors.New("invalid max connection age for RPC server") - // ErrInvalidMaxConnectionAgeGrace occurs when the max connection age grace is invalid. - ErrInvalidMaxConnectionAgeGrace = errors.New("invalid max connection age grace for RPC server") ) // Config is the configuration for creating a Server instance. @@ -46,17 +41,6 @@ type Config struct { // KeyFile is the path to the key file. KeyFile string `yaml:"KeyFile"` - - // MaxRequestBytes is the maximum client request size in bytes the server will accept. - MaxRequestBytes uint64 `yaml:"MaxRequestBytes"` - - // MaxConnectionAge is a duration for the maximum amount of time a connection may exist - // before it will be closed by sending a GoAway. - MaxConnectionAge string `yaml:"MaxConnectionAge"` - - // MaxConnectionAgeGrace is a duration for the amount of time after receiving a GoAway - // for pending RPCs to complete before forcibly closing connections. - MaxConnectionAgeGrace string `yaml:"MaxConnectionAgeGrace"` } // Validate validates the port number and the files for certification. @@ -78,21 +62,5 @@ func (c *Config) Validate() error { } } - if _, err := time.ParseDuration(c.MaxConnectionAge); err != nil { - return fmt.Errorf( - "%s: %w", - c.MaxConnectionAge, - ErrInvalidMaxConnectionAge, - ) - } - - if _, err := time.ParseDuration(c.MaxConnectionAgeGrace); err != nil { - return fmt.Errorf( - "%s: %w", - c.MaxConnectionAgeGrace, - ErrInvalidMaxConnectionAgeGrace, - ) - } - return nil } diff --git a/server/rpc/server.go b/server/rpc/server.go index af42bdbd7..e3977853b 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -20,7 +20,9 @@ package rpc import ( "context" + "errors" "fmt" + "math" "net/http" "time" @@ -41,7 +43,6 @@ import ( // Server is a normal server that processes the logic requested by the client. type Server struct { conf *Config - serverMux *http.ServeMux httpServer *http.Server yorkieServiceCancel context.CancelFunc tokenManager *auth.TokenManager @@ -54,36 +55,36 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { be.Config.ParseAdminTokenDuration(), ) - interceptor := connect.WithInterceptors( - connecthelper.NewLoggingInterceptor(), - interceptors.NewAdminAuthInterceptor(be, tokenManager), - interceptors.NewContextInterceptor(be), - interceptors.NewDefaultInterceptor(), - ) - - // TODO(krapie): find corresponding http/net server configurations that matches with gRPC server options + opts := []connect.HandlerOption{ + connect.WithInterceptors( + connecthelper.NewLoggingInterceptor(), + interceptors.NewAdminAuthInterceptor(be, tokenManager), + interceptors.NewContextInterceptor(be), + interceptors.NewDefaultInterceptor(), + ), + } yorkieServiceCtx, yorkieServiceCancel := context.WithCancel(context.Background()) - - serverMux := http.NewServeMux() - serverMux.Handle(v1connect.NewYorkieServiceHandler( - newYorkieServer(yorkieServiceCtx, be), - interceptor, - )) - serverMux.Handle(v1connect.NewAdminServiceHandler( - newAdminServer(be, tokenManager), - interceptor, - )) - serverMux.Handle(grpchealth.NewHandler(grpchealth.NewStaticChecker( + mux := http.NewServeMux() + mux.Handle(v1connect.NewYorkieServiceHandler(newYorkieServer(yorkieServiceCtx, be), opts...)) + mux.Handle(v1connect.NewAdminServiceHandler(newAdminServer(be, tokenManager), opts...)) + mux.Handle(grpchealth.NewHandler(grpchealth.NewStaticChecker( grpchealth.HealthV1ServiceName, v1connect.YorkieServiceName, v1connect.AdminServiceName, ))) + // TODO(hackerwins): We need to provide proper http server configuration. return &Server{ - conf: conf, - serverMux: serverMux, - httpServer: &http.Server{Addr: fmt.Sprintf(":%d", conf.Port)}, + conf: conf, + httpServer: &http.Server{ + Addr: fmt.Sprintf(":%d", conf.Port), + Handler: h2c.NewHandler(newCORS().Handler(mux), + &http2.Server{ + MaxConcurrentStreams: math.MaxUint32, + }, + ), + }, yorkieServiceCancel: yorkieServiceCancel, }, nil } @@ -112,17 +113,15 @@ func (s *Server) Shutdown(graceful bool) { func (s *Server) listenAndServe() error { go func() { logging.DefaultLogger().Infof(fmt.Sprintf("serving RPC on %d", s.conf.Port)) - s.httpServer.Handler = h2c.NewHandler( - newCORS().Handler(s.serverMux), - &http2.Server{}, - ) + if s.conf.CertFile != "" && s.conf.KeyFile != "" { - if err := s.httpServer.ListenAndServeTLS(s.conf.CertFile, s.conf.KeyFile); err != http.ErrServerClosed { + if err := s.httpServer.ListenAndServeTLS(s.conf.CertFile, s.conf.KeyFile); !errors.Is(err, http.ErrServerClosed) { logging.DefaultLogger().Errorf("HTTP server ListenAndServeTLS: %v", err) } return } - if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed { + + if err := s.httpServer.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) { logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err) } return @@ -140,43 +139,14 @@ func newCORS() *cors.Cors { http.MethodDelete, }, AllowOriginFunc: func(origin string) bool { + // TODO(hackerwins): We need to provide a way to configure allow origins in the dashboard. return true }, - AllowedHeaders: []string{ - "Grpc-Timeout", - "Content-Type", - "Keep-Alive", - "User-Agent", - "Cache-Control", - "Content-Type", - "Content-Transfer-Encoding", - "Custom-Header-1", - "Connect-Protocol-Version", - "X-Accept-Content-Transfer-Encoding", - "X-Accept-Response-Streaming", - "X-User-Agent", - "X-Yorkie-User-Agent", - "X-Grpc-Web", - "Authorization", - "X-API-Key", - "X-Shard-Key", - }, - MaxAge: int(1728 * time.Second), - ExposedHeaders: []string{ - "Accept", - "Accept-Encoding", - "Accept-Post", - "Connect-Accept-Encoding", - "Connect-Content-Encoding", - "Content-Encoding", - "Grpc-Accept-Encoding", - "Grpc-Encoding", - "Grpc-Message", - "Grpc-Status", - "Grpc-Status-Details-Bin", - "X-Custom-Header", - "Custom-Header-1", - }, + AllowedHeaders: []string{"*"}, + ExposedHeaders: []string{"*"}, + // MaxAge indicates how long (in seconds) the results of a preflight request + // can be cached. FF caps this value at 24h, and modern Chrome caps it at 2h. + MaxAge: int(2 * time.Hour / time.Second), AllowCredentials: true, }) } diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index cfb3286b6..c5382845b 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -100,10 +100,7 @@ func TestMain(m *testing.M) { } testRPCServer, err = rpc.NewServer(&rpc.Config{ - Port: helper.RPCPort, - MaxRequestBytes: helper.RPCMaxRequestBytes, - MaxConnectionAge: helper.RPCMaxConnectionAge.String(), - MaxConnectionAgeGrace: helper.RPCMaxConnectionAgeGrace.String(), + Port: helper.RPCPort, }, be) if err != nil { log.Fatal(err) @@ -1013,20 +1010,16 @@ func TestConfig_Validate(t *testing.T) { {config: &rpc.Config{Port: 8080, KeyFile: "noSuchKeyFile"}, expected: rpc.ErrInvalidKeyFile}, // not to use tls {config: &rpc.Config{ - Port: 8080, - CertFile: "", - KeyFile: "", - MaxConnectionAge: "50s", - MaxConnectionAgeGrace: "10s", + Port: 8080, + CertFile: "", + KeyFile: "", }, expected: nil}, // pass any file existing {config: &rpc.Config{ - Port: 8080, - CertFile: "server_test.go", - KeyFile: "server_test.go", - MaxConnectionAge: "50s", - MaxConnectionAgeGrace: "10s", + Port: 8080, + CertFile: "server_test.go", + KeyFile: "server_test.go", }, expected: nil}, } diff --git a/test/bench/grpc_bench_test.go b/test/bench/grpc_bench_test.go index 254bed7f1..bc9099395 100644 --- a/test/bench/grpc_bench_test.go +++ b/test/bench/grpc_bench_test.go @@ -44,7 +44,6 @@ var defaultServer *server.Yorkie func startDefaultServer() { config := helper.TestConfig() - config.RPC.MaxRequestBytes = uint64(10 * 1024 * 1024) svr, err := server.New(config) if err != nil { logging.DefaultLogger().Fatal(err) diff --git a/test/helper/helper.go b/test/helper/helper.go index 4c6e92c3f..87a3c86b2 100644 --- a/test/helper/helper.go +++ b/test/helper/helper.go @@ -49,10 +49,7 @@ var testStartedAt int64 // Below are the values of the Yorkie config used in the test. var ( - RPCPort = 21101 - RPCMaxRequestBytes = uint64(4 * 1024 * 1024) - RPCMaxConnectionAge = 8 * gotime.Second - RPCMaxConnectionAgeGrace = 2 * gotime.Second + RPCPort = 21101 ProfilingPort = 21102 @@ -200,10 +197,7 @@ func TestConfig() *server.Config { portOffset += 100 return &server.Config{ RPC: &rpc.Config{ - Port: RPCPort + portOffset, - MaxRequestBytes: RPCMaxRequestBytes, - MaxConnectionAge: RPCMaxConnectionAge.String(), - MaxConnectionAgeGrace: RPCMaxConnectionAgeGrace.String(), + Port: RPCPort + portOffset, }, Profiling: &profiling.Config{ Port: ProfilingPort + portOffset, From 2f30459bac6f3c9be335fb2db305702c3745a94e Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Fri, 15 Dec 2023 10:45:48 +0900 Subject: [PATCH 30/33] Simplify converter interface --- admin/client.go | 6 +-- api/converter/from_pb.go | 8 ++-- api/converter/to_pb.go | 53 +++++++++---------------- cmd/yorkie/document/list.go | 2 +- cmd/yorkie/document/remove.go | 2 +- cmd/yorkie/history.go | 2 +- cmd/yorkie/login.go | 2 +- cmd/yorkie/project/create.go | 2 +- cmd/yorkie/project/list.go | 2 +- cmd/yorkie/project/update.go | 2 +- server/rpc/admin_server.go | 56 ++++----------------------- test/bench/grpc_bench_test.go | 2 +- test/helper/helper.go | 4 +- test/integration/admin_test.go | 2 +- test/integration/auth_webhook_test.go | 10 ++--- test/integration/document_test.go | 2 +- test/integration/history_test.go | 2 +- test/integration/retention_test.go | 2 +- test/integration/user_test.go | 2 +- 19 files changed, 51 insertions(+), 112 deletions(-) diff --git a/admin/client.go b/admin/client.go index 96fcd6c24..2a4c6b0d2 100644 --- a/admin/client.go +++ b/admin/client.go @@ -128,10 +128,8 @@ func (c *Client) Dial(rpcAddr string) error { } // Close closes the connection to the admin service. -func (c *Client) Close() error { +func (c *Client) Close() { c.conn.CloseIdleConnections() - - return nil } // LogIn logs in a user. @@ -167,7 +165,7 @@ func (c *Client) SignUp( return nil, err } - return converter.FromUser(response.Msg.User) + return converter.FromUser(response.Msg.User), nil } // CreateProject creates a new project. diff --git a/api/converter/from_pb.go b/api/converter/from_pb.go index 953e1528c..9119bbc1c 100644 --- a/api/converter/from_pb.go +++ b/api/converter/from_pb.go @@ -30,14 +30,12 @@ import ( ) // FromUser converts the given Protobuf formats to model format. -func FromUser(pbUser *api.User) (*types.User, error) { - createdAt := pbUser.CreatedAt.AsTime() - +func FromUser(pbUser *api.User) *types.User { return &types.User{ ID: types.ID(pbUser.Id), Username: pbUser.Username, - CreatedAt: createdAt, - }, nil + CreatedAt: pbUser.CreatedAt.AsTime(), + } } // FromProjects converts the given Protobuf formats to model format. diff --git a/api/converter/to_pb.go b/api/converter/to_pb.go index 43cd21268..b2d29778f 100644 --- a/api/converter/to_pb.go +++ b/api/converter/to_pb.go @@ -33,35 +33,26 @@ import ( ) // ToUser converts the given model format to Protobuf format. -func ToUser(user *types.User) (*api.User, error) { - pbCreatedAt := timestamppb.New(user.CreatedAt) - +func ToUser(user *types.User) *api.User { return &api.User{ Id: user.ID.String(), Username: user.Username, - CreatedAt: pbCreatedAt, - }, nil + CreatedAt: timestamppb.New(user.CreatedAt), + } } // ToProjects converts the given model to Protobuf. -func ToProjects(projects []*types.Project) ([]*api.Project, error) { +func ToProjects(projects []*types.Project) []*api.Project { var pbProjects []*api.Project for _, project := range projects { - pbProject, err := ToProject(project) - if err != nil { - return nil, err - } - pbProjects = append(pbProjects, pbProject) + pbProjects = append(pbProjects, ToProject(project)) } - return pbProjects, nil + return pbProjects } // ToProject converts the given model to Protobuf. -func ToProject(project *types.Project) (*api.Project, error) { - pbCreatedAt := timestamppb.New(project.CreatedAt) - pbUpdatedAt := timestamppb.New(project.UpdatedAt) - +func ToProject(project *types.Project) *api.Project { return &api.Project{ Id: project.ID.String(), Name: project.Name, @@ -70,38 +61,30 @@ func ToProject(project *types.Project) (*api.Project, error) { ClientDeactivateThreshold: project.ClientDeactivateThreshold, PublicKey: project.PublicKey, SecretKey: project.SecretKey, - CreatedAt: pbCreatedAt, - UpdatedAt: pbUpdatedAt, - }, nil + CreatedAt: timestamppb.New(project.CreatedAt), + UpdatedAt: timestamppb.New(project.UpdatedAt), + } } // ToDocumentSummaries converts the given model to Protobuf. -func ToDocumentSummaries(summaries []*types.DocumentSummary) ([]*api.DocumentSummary, error) { +func ToDocumentSummaries(summaries []*types.DocumentSummary) []*api.DocumentSummary { var pbSummaries []*api.DocumentSummary for _, summary := range summaries { - pbSummary, err := ToDocumentSummary(summary) - if err != nil { - return nil, err - } - pbSummaries = append(pbSummaries, pbSummary) + pbSummaries = append(pbSummaries, ToDocumentSummary(summary)) } - return pbSummaries, nil + return pbSummaries } // ToDocumentSummary converts the given model to Protobuf format. -func ToDocumentSummary(summary *types.DocumentSummary) (*api.DocumentSummary, error) { - pbCreatedAt := timestamppb.New(summary.CreatedAt) - pbAccessedAt := timestamppb.New(summary.AccessedAt) - pbUpdatedAt := timestamppb.New(summary.UpdatedAt) - +func ToDocumentSummary(summary *types.DocumentSummary) *api.DocumentSummary { return &api.DocumentSummary{ Id: summary.ID.String(), Key: summary.Key.String(), - CreatedAt: pbCreatedAt, - AccessedAt: pbAccessedAt, - UpdatedAt: pbUpdatedAt, + CreatedAt: timestamppb.New(summary.CreatedAt), + AccessedAt: timestamppb.New(summary.AccessedAt), + UpdatedAt: timestamppb.New(summary.UpdatedAt), Snapshot: summary.Snapshot, - }, nil + } } // ToPresences converts the given model to Protobuf format. diff --git a/cmd/yorkie/document/list.go b/cmd/yorkie/document/list.go index 4989c9d86..71d886e87 100644 --- a/cmd/yorkie/document/list.go +++ b/cmd/yorkie/document/list.go @@ -59,7 +59,7 @@ func newListCommand() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/cmd/yorkie/document/remove.go b/cmd/yorkie/document/remove.go index f79d8f2e2..a682eae48 100644 --- a/cmd/yorkie/document/remove.go +++ b/cmd/yorkie/document/remove.go @@ -54,7 +54,7 @@ func newRemoveCommand() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/cmd/yorkie/history.go b/cmd/yorkie/history.go index 8634ee266..73782bbe2 100644 --- a/cmd/yorkie/history.go +++ b/cmd/yorkie/history.go @@ -56,7 +56,7 @@ func newHistoryCmd() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/cmd/yorkie/login.go b/cmd/yorkie/login.go index 034577906..da636f0c8 100644 --- a/cmd/yorkie/login.go +++ b/cmd/yorkie/login.go @@ -43,7 +43,7 @@ func newLoginCmd() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/cmd/yorkie/project/create.go b/cmd/yorkie/project/create.go index 89ba8a024..5e1f0416b 100644 --- a/cmd/yorkie/project/create.go +++ b/cmd/yorkie/project/create.go @@ -53,7 +53,7 @@ func newCreateCommand() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/cmd/yorkie/project/list.go b/cmd/yorkie/project/list.go index b2721e75a..14a9ecbaf 100644 --- a/cmd/yorkie/project/list.go +++ b/cmd/yorkie/project/list.go @@ -46,7 +46,7 @@ func newListCommand() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/cmd/yorkie/project/update.go b/cmd/yorkie/project/update.go index c273f2e4e..c26eb94be 100644 --- a/cmd/yorkie/project/update.go +++ b/cmd/yorkie/project/update.go @@ -62,7 +62,7 @@ func newUpdateCommand() *cobra.Command { return err } defer func() { - _ = cli.Close() + cli.Close() }() ctx := context.Background() diff --git a/server/rpc/admin_server.go b/server/rpc/admin_server.go index 98f9a7bd7..63f7fbe2b 100644 --- a/server/rpc/admin_server.go +++ b/server/rpc/admin_server.go @@ -65,13 +65,8 @@ func (s *adminServer) SignUp( return nil, err } - pbUser, err := converter.ToUser(user) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.SignUpResponse{ - User: pbUser, + User: converter.ToUser(user), }), nil } @@ -116,13 +111,8 @@ func (s *adminServer) CreateProject( return nil, err } - pbProject, err := converter.ToProject(project) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.CreateProjectResponse{ - Project: pbProject, + Project: converter.ToProject(project), }), nil } @@ -137,13 +127,8 @@ func (s *adminServer) ListProjects( return nil, err } - pbProjects, err := converter.ToProjects(projectList) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.ListProjectsResponse{ - Projects: pbProjects, + Projects: converter.ToProjects(projectList), }), nil } @@ -158,13 +143,8 @@ func (s *adminServer) GetProject( return nil, err } - pbProject, err := converter.ToProject(project) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.GetProjectResponse{ - Project: pbProject, + Project: converter.ToProject(project), }), nil } @@ -193,13 +173,8 @@ func (s *adminServer) UpdateProject( return nil, err } - pbProject, err := converter.ToProject(project) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.UpdateProjectResponse{ - Project: pbProject, + Project: converter.ToProject(project), }), nil } @@ -224,13 +199,8 @@ func (s *adminServer) GetDocument( return nil, err } - pbDocument, err := converter.ToDocumentSummary(document) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.GetDocumentResponse{ - Document: pbDocument, + Document: converter.ToDocumentSummary(document), }), nil } @@ -293,13 +263,8 @@ func (s *adminServer) ListDocuments( return nil, err } - pbDocuments, err := converter.ToDocumentSummaries(docs) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.ListDocumentsResponse{ - Documents: pbDocuments, + Documents: converter.ToDocumentSummaries(docs), }), nil } @@ -325,14 +290,9 @@ func (s *adminServer) SearchDocuments( return nil, err } - pbDocuments, err := converter.ToDocumentSummaries(result.Elements) - if err != nil { - return nil, err - } - return connect.NewResponse(&api.SearchDocumentsResponse{ TotalCount: int32(result.TotalCount), - Documents: pbDocuments, + Documents: converter.ToDocumentSummaries(result.Elements), }), nil } diff --git a/test/bench/grpc_bench_test.go b/test/bench/grpc_bench_test.go index bc9099395..39bb924ca 100644 --- a/test/bench/grpc_bench_test.go +++ b/test/bench/grpc_bench_test.go @@ -301,7 +301,7 @@ func BenchmarkRPC(b *testing.B) { b.Run("adminCli to server", func(b *testing.B) { adminCli := helper.CreateAdminCli(b, defaultServer.RPCAddr()) - defer func() { assert.NoError(b, adminCli.Close()) }() + defer func() { adminCli.Close() }() ctx := context.Background() for i := 0; i < b.N; i++ { diff --git a/test/helper/helper.go b/test/helper/helper.go index 87a3c86b2..bd90c5d4b 100644 --- a/test/helper/helper.go +++ b/test/helper/helper.go @@ -49,9 +49,9 @@ var testStartedAt int64 // Below are the values of the Yorkie config used in the test. var ( - RPCPort = 21101 + RPCPort = 11101 - ProfilingPort = 21102 + ProfilingPort = 11102 AdminUser = server.DefaultAdminUser AdminPassword = server.DefaultAdminPassword diff --git a/test/integration/admin_test.go b/test/integration/admin_test.go index dfb535d5a..b11e18f25 100644 --- a/test/integration/admin_test.go +++ b/test/integration/admin_test.go @@ -43,7 +43,7 @@ func TestAdmin(t *testing.T) { _, err = adminCli.LogIn(ctx, "admin", "admin") assert.NoError(t, err) defer func() { - assert.NoError(t, adminCli.Close()) + adminCli.Close() }() clients := activeClients(t, 1) diff --git a/test/integration/auth_webhook_test.go b/test/integration/auth_webhook_test.go index de57180e7..8f196b8bf 100644 --- a/test/integration/auth_webhook_test.go +++ b/test/integration/auth_webhook_test.go @@ -84,7 +84,7 @@ func TestProjectAuthWebhook(t *testing.T) { defer func() { assert.NoError(t, svr.Shutdown(true)) }() adminCli := helper.CreateAdminCli(t, svr.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() project, err := adminCli.CreateProject(context.Background(), "auth-webhook-test") assert.NoError(t, err) @@ -199,7 +199,7 @@ func TestAuthWebhook(t *testing.T) { defer func() { assert.NoError(t, svr.Shutdown(true)) }() adminCli := helper.CreateAdminCli(t, svr.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() project, err := adminCli.CreateProject(context.Background(), "success-webhook-after-retries") assert.NoError(t, err) project.AuthWebhookURL = authServer.URL @@ -241,7 +241,7 @@ func TestAuthWebhook(t *testing.T) { defer func() { assert.NoError(t, svr.Shutdown(true)) }() adminCli := helper.CreateAdminCli(t, svr.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() project, err := adminCli.CreateProject(context.Background(), "fail-webhook-after-retries") assert.NoError(t, err) project.AuthWebhookURL = authServer.URL @@ -294,7 +294,7 @@ func TestAuthWebhook(t *testing.T) { defer func() { assert.NoError(t, svr.Shutdown(true)) }() adminCli := helper.CreateAdminCli(t, svr.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() project, err := adminCli.CreateProject(context.Background(), "auth-request-cache") assert.NoError(t, err) project.AuthWebhookURL = authServer.URL @@ -370,7 +370,7 @@ func TestAuthWebhook(t *testing.T) { defer func() { assert.NoError(t, svr.Shutdown(true)) }() adminCli := helper.CreateAdminCli(t, svr.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() project, err := adminCli.CreateProject(context.Background(), "unauth-request-cache") assert.NoError(t, err) project.AuthWebhookURL = authServer.URL diff --git a/test/integration/document_test.go b/test/integration/document_test.go index 84c49d66d..e69ae49a1 100644 --- a/test/integration/document_test.go +++ b/test/integration/document_test.go @@ -672,7 +672,7 @@ func TestDocument(t *testing.T) { func TestDocumentWithProjects(t *testing.T) { ctx := context.Background() adminCli := helper.CreateAdminCli(t, defaultServer.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() project1, err := adminCli.CreateProject(ctx, "project1") assert.NoError(t, err) diff --git a/test/integration/history_test.go b/test/integration/history_test.go index 24134ab06..52c059518 100644 --- a/test/integration/history_test.go +++ b/test/integration/history_test.go @@ -36,7 +36,7 @@ func TestHistory(t *testing.T) { defer deactivateAndCloseClients(t, clients) adminCli := helper.CreateAdminCli(t, defaultServer.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() t.Run("history test", func(t *testing.T) { ctx := context.Background() diff --git a/test/integration/retention_test.go b/test/integration/retention_test.go index fc36fa2df..863005698 100644 --- a/test/integration/retention_test.go +++ b/test/integration/retention_test.go @@ -76,7 +76,7 @@ func TestRetention(t *testing.T) { adminCli := helper.CreateAdminCli(t, testServer.RPCAddr()) assert.NoError(t, err) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() ctx := context.Background() diff --git a/test/integration/user_test.go b/test/integration/user_test.go index 3f95f0141..304f6c168 100644 --- a/test/integration/user_test.go +++ b/test/integration/user_test.go @@ -30,7 +30,7 @@ import ( func TestUser(t *testing.T) { adminCli := helper.CreateAdminCli(t, defaultServer.RPCAddr()) - defer func() { assert.NoError(t, adminCli.Close()) }() + defer func() { adminCli.Close() }() t.Run("user test", func(t *testing.T) { ctx := context.Background() From 26f7370eed379e0304007627d9105da3e1a79bb1 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Fri, 15 Dec 2023 11:00:42 +0900 Subject: [PATCH 31/33] Change Client.Watch to wait initialization response --- client/client.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/client/client.go b/client/client.go index 81906d9a7..f754d1486 100644 --- a/client/client.go +++ b/client/client.go @@ -68,6 +68,9 @@ var ( // ErrUnsupportedWatchResponseType occurs when the given WatchResponseType // is not supported. ErrUnsupportedWatchResponseType = errors.New("unsupported watch response type") + + // ErrInitializationNotReceived occurs when the first response of the watch stream is not received. + ErrInitializationNotReceived = errors.New("initialization is not received") ) // Attachment represents the document attached. @@ -424,12 +427,14 @@ func (c *Client) Watch( return nil, err } - for stream.Receive() { - pbResp := stream.Msg() - if _, err := handleResponse(pbResp, doc); err != nil { - return nil, err - } - break + // NOTE(hackerwins): We need to receive the first response to initialize + // the watch stream. Watch should be blocked until the first response is + // received. + if !stream.Receive() { + return nil, ErrInitializationNotReceived + } + if _, err := handleResponse(stream.Msg(), doc); err != nil { + return nil, err } if err = stream.Err(); err != nil { return nil, err From 025b5dba79ac1d4af95013276a32b374df889da9 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Fri, 15 Dec 2023 11:23:30 +0900 Subject: [PATCH 32/33] Recover missing headers from watch stream --- client/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/auth.go b/client/auth.go index affe39b60..7e422c6e2 100644 --- a/client/auth.go +++ b/client/auth.go @@ -60,9 +60,9 @@ func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) spec connect.Spec, ) connect.StreamingClientConn { conn := next(ctx, spec) - conn.RequestHeader().Set(types.APIKeyKey, i.apiKey) - + conn.RequestHeader().Set(types.AuthorizationKey, i.token) + conn.RequestHeader().Set(types.UserAgentKey, types.GoSDKType+"/"+version.Version) return conn } } From 34795af6555c0d1f12d6678876c6aefd60149539 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Fri, 15 Dec 2023 13:30:07 +0900 Subject: [PATCH 33/33] Revise codes --- server/rpc/connecthelper/useragent.go | 10 ++++-- server/rpc/interceptors/admin_auth.go | 28 ++++++++++------- server/rpc/interceptors/context.go | 31 ++++++++++--------- .../{agent_test.go => server_test.go} | 6 ++-- 4 files changed, 44 insertions(+), 31 deletions(-) rename test/integration/{agent_test.go => server_test.go} (85%) diff --git a/server/rpc/connecthelper/useragent.go b/server/rpc/connecthelper/useragent.go index 02b5e41ee..07116a414 100644 --- a/server/rpc/connecthelper/useragent.go +++ b/server/rpc/connecthelper/useragent.go @@ -27,10 +27,14 @@ import ( // metadata. func SDKTypeAndVersion(header http.Header) (string, string) { yorkieUserAgent := header.Get(types.UserAgentKey) - if len(yorkieUserAgent) == 0 { + if yorkieUserAgent == "" { return "", "" } - agent := strings.Split(yorkieUserAgent, "/") - return agent[0], agent[1] + split := strings.Split(yorkieUserAgent, "/") + if len(split) != 2 { + return "", "" + } + + return split[0], split[1] } diff --git a/server/rpc/interceptors/admin_auth.go b/server/rpc/interceptors/admin_auth.go index 4940b19ac..2855d308c 100644 --- a/server/rpc/interceptors/admin_auth.go +++ b/server/rpc/interceptors/admin_auth.go @@ -76,12 +76,14 @@ func (i *AdminAuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFu req.Spec().Procedure, ) - i.backend.Metrics.AddServerHandledCounter( - "unary", - strings.Split(req.Spec().Procedure, "/")[1], - strings.Split(req.Spec().Procedure, "/")[2], - connecthelper.ToRPCCodeString(err), - ) + if split := strings.Split(req.Spec().Procedure, "/"); len(split) == 3 { + i.backend.Metrics.AddServerHandledCounter( + "unary", + split[1], + split[2], + connecthelper.ToRPCCodeString(err), + ) + } return res, err } @@ -126,12 +128,14 @@ func (i *AdminAuthInterceptor) WrapStreamingHandler(next connect.StreamingHandle conn.Spec().Procedure, ) - i.backend.Metrics.AddServerHandledCounter( - "server_stream", - strings.Split(conn.Spec().Procedure, "/")[1], - strings.Split(conn.Spec().Procedure, "/")[2], - connecthelper.ToRPCCodeString(err), - ) + if split := strings.Split(conn.Spec().Procedure, "/"); len(split) == 3 { + i.backend.Metrics.AddServerHandledCounter( + "server_stream", + split[1], + split[2], + connecthelper.ToRPCCodeString(err), + ) + } return err } diff --git a/server/rpc/interceptors/context.go b/server/rpc/interceptors/context.go index 753112570..076b15a55 100644 --- a/server/rpc/interceptors/context.go +++ b/server/rpc/interceptors/context.go @@ -79,12 +79,14 @@ func (i *ContextInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc req.Spec().Procedure, ) - i.backend.Metrics.AddServerHandledCounter( - "unary", - strings.Split(req.Spec().Procedure, "/")[1], - strings.Split(req.Spec().Procedure, "/")[2], - connecthelper.ToRPCCodeString(err), - ) + if split := strings.Split(req.Spec().Procedure, "/"); len(split) == 3 { + i.backend.Metrics.AddServerHandledCounter( + "unary", + split[1], + split[2], + connecthelper.ToRPCCodeString(err), + ) + } return res, err } @@ -126,12 +128,14 @@ func (i *ContextInterceptor) WrapStreamingHandler(next connect.StreamingHandlerF conn.Spec().Procedure, ) - i.backend.Metrics.AddServerHandledCounter( - "server_stream", - strings.Split(conn.Spec().Procedure, "/")[1], - strings.Split(conn.Spec().Procedure, "/")[2], - connecthelper.ToRPCCodeString(err), - ) + if split := strings.Split(conn.Spec().Procedure, "/"); len(split) == 3 { + i.backend.Metrics.AddServerHandledCounter( + "server_stream", + split[1], + split[2], + connecthelper.ToRPCCodeString(err), + ) + } return err } @@ -155,8 +159,7 @@ func (i *ContextInterceptor) buildContext(ctx context.Context, header http.Heade md.APIKey = apiKey } - authorization := header.Get(types.AuthorizationKey) - if authorization != "" { + if authorization := header.Get(types.AuthorizationKey); authorization != "" { md.Authorization = authorization } ctx = metadata.With(ctx, md) diff --git a/test/integration/agent_test.go b/test/integration/server_test.go similarity index 85% rename from test/integration/agent_test.go rename to test/integration/server_test.go index 2f21c8df2..93c53eb99 100644 --- a/test/integration/agent_test.go +++ b/test/integration/server_test.go @@ -20,7 +20,6 @@ package integration import ( "context" - "io" "sync" "testing" @@ -56,7 +55,10 @@ func TestServer(t *testing.T) { assert.Fail(t, "unexpected ctx done") return case wr := <-wrch: - if wr.Err == io.EOF || connect.CodeOf(wr.Err) == connect.CodeCanceled { + // TODO(hackerwins): Define ClientError instead of using ConnectError later. + // For now, we use ConnectError to check whether the stream is closed. To + // simplify the interface, we will define ClientError later. + if connect.CodeOf(wr.Err) == connect.CodeCanceled { assert.Len(t, wr.Presences, 0) wg.Done() return