mirror of
https://github.com/usememos/memos.git
synced 2024-09-11 03:55:30 +03:00
chore: tweak search resources
This commit is contained in:
parent
95fa145665
commit
44e56844f5
@ -435,29 +435,6 @@ paths:
|
||||
$ref: '#/definitions/v1ExportMemosRequest'
|
||||
tags:
|
||||
- MemoService
|
||||
/api/v1/memos:search:
|
||||
get:
|
||||
summary: SearchMemos searches memos.
|
||||
operationId: MemoService_SearchMemos
|
||||
responses:
|
||||
"200":
|
||||
description: A successful response.
|
||||
schema:
|
||||
$ref: '#/definitions/v1SearchMemosResponse'
|
||||
default:
|
||||
description: An unexpected error response.
|
||||
schema:
|
||||
$ref: '#/definitions/googlerpcStatus'
|
||||
parameters:
|
||||
- name: filter
|
||||
description: |-
|
||||
Filter is used to filter memos returned.
|
||||
Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
tags:
|
||||
- MemoService
|
||||
/api/v1/reactions/{reactionId}:
|
||||
delete:
|
||||
summary: DeleteMemoReaction deletes a reaction for a memo.
|
||||
@ -536,26 +513,6 @@ paths:
|
||||
type: string
|
||||
tags:
|
||||
- ResourceService
|
||||
/api/v1/resources:search:
|
||||
get:
|
||||
summary: SearchResources searches memos.
|
||||
operationId: ResourceService_SearchResources
|
||||
responses:
|
||||
"200":
|
||||
description: A successful response.
|
||||
schema:
|
||||
$ref: '#/definitions/v1SearchResourcesResponse'
|
||||
default:
|
||||
description: An unexpected error response.
|
||||
schema:
|
||||
$ref: '#/definitions/googlerpcStatus'
|
||||
parameters:
|
||||
- name: filter
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
tags:
|
||||
- ResourceService
|
||||
/api/v1/users:
|
||||
get:
|
||||
summary: ListUsers returns a list of users.
|
||||
@ -3035,22 +2992,6 @@ definitions:
|
||||
- ACTIVE
|
||||
- ARCHIVED
|
||||
default: ROW_STATUS_UNSPECIFIED
|
||||
v1SearchMemosResponse:
|
||||
type: object
|
||||
properties:
|
||||
memos:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
$ref: '#/definitions/v1Memo'
|
||||
v1SearchResourcesResponse:
|
||||
type: object
|
||||
properties:
|
||||
resources:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
$ref: '#/definitions/v1Resource'
|
||||
v1SearchUsersResponse:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -28,10 +28,6 @@ service MemoService {
|
||||
rpc ListMemos(ListMemosRequest) returns (ListMemosResponse) {
|
||||
option (google.api.http) = {get: "/api/v1/memos"};
|
||||
}
|
||||
// SearchMemos searches memos.
|
||||
rpc SearchMemos(SearchMemosRequest) returns (SearchMemosResponse) {
|
||||
option (google.api.http) = {get: "/api/v1/memos:search"};
|
||||
}
|
||||
// GetMemo gets a memo.
|
||||
rpc GetMemo(GetMemoRequest) returns (Memo) {
|
||||
option (google.api.http) = {get: "/api/v1/{name=memos/*}"};
|
||||
@ -246,16 +242,6 @@ message ListMemosResponse {
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
message SearchMemosRequest {
|
||||
// Filter is used to filter memos returned.
|
||||
// Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
|
||||
string filter = 1;
|
||||
}
|
||||
|
||||
message SearchMemosResponse {
|
||||
repeated Memo memos = 1;
|
||||
}
|
||||
|
||||
message GetMemoRequest {
|
||||
// The name of the memo.
|
||||
// Format: memos/{id}
|
||||
|
@ -24,10 +24,6 @@ service ResourceService {
|
||||
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v1/resources"};
|
||||
}
|
||||
// SearchResources searches memos.
|
||||
rpc SearchResources(SearchResourcesRequest) returns (SearchResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v1/resources:search"};
|
||||
}
|
||||
// GetResource returns a resource by name.
|
||||
rpc GetResource(GetResourceRequest) returns (Resource) {
|
||||
option (google.api.http) = {get: "/api/v1/{name=resources/*}"};
|
||||
@ -94,14 +90,6 @@ message ListResourcesResponse {
|
||||
repeated Resource resources = 1;
|
||||
}
|
||||
|
||||
message SearchResourcesRequest {
|
||||
string filter = 1;
|
||||
}
|
||||
|
||||
message SearchResourcesResponse {
|
||||
repeated Resource resources = 1;
|
||||
}
|
||||
|
||||
message GetResourceRequest {
|
||||
// The name of the resource.
|
||||
// Format: resources/{id}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -93,42 +93,6 @@ func local_request_MemoService_ListMemos_0(ctx context.Context, marshaler runtim
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_MemoService_SearchMemos_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_MemoService_SearchMemos_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq SearchMemosRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_SearchMemos_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.SearchMemos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_MemoService_SearchMemos_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq SearchMemosRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_SearchMemos_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.SearchMemos(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_MemoService_GetMemo_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetMemoRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@ -1335,31 +1299,6 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_MemoService_SearchMemos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/SearchMemos", runtime.WithHTTPPathPattern("/api/v1/memos:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_MemoService_SearchMemos_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_MemoService_SearchMemos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_MemoService_GetMemo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -1945,28 +1884,6 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_MemoService_SearchMemos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/SearchMemos", runtime.WithHTTPPathPattern("/api/v1/memos:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_MemoService_SearchMemos_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_MemoService_SearchMemos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_MemoService_GetMemo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -2415,8 +2332,6 @@ var (
|
||||
|
||||
pattern_MemoService_ListMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, ""))
|
||||
|
||||
pattern_MemoService_SearchMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, "search"))
|
||||
|
||||
pattern_MemoService_GetMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "name"}, ""))
|
||||
|
||||
pattern_MemoService_GetMemoByUid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "memos:by-uid", "uid"}, ""))
|
||||
@ -2463,8 +2378,6 @@ var (
|
||||
|
||||
forward_MemoService_ListMemos_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_MemoService_SearchMemos_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_MemoService_GetMemo_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_MemoService_GetMemoByUid_0 = runtime.ForwardResponseMessage
|
||||
|
@ -22,7 +22,6 @@ const _ = grpc.SupportPackageIsVersion8
|
||||
const (
|
||||
MemoService_CreateMemo_FullMethodName = "/memos.api.v1.MemoService/CreateMemo"
|
||||
MemoService_ListMemos_FullMethodName = "/memos.api.v1.MemoService/ListMemos"
|
||||
MemoService_SearchMemos_FullMethodName = "/memos.api.v1.MemoService/SearchMemos"
|
||||
MemoService_GetMemo_FullMethodName = "/memos.api.v1.MemoService/GetMemo"
|
||||
MemoService_GetMemoByUid_FullMethodName = "/memos.api.v1.MemoService/GetMemoByUid"
|
||||
MemoService_UpdateMemo_FullMethodName = "/memos.api.v1.MemoService/UpdateMemo"
|
||||
@ -53,8 +52,6 @@ type MemoServiceClient interface {
|
||||
CreateMemo(ctx context.Context, in *CreateMemoRequest, opts ...grpc.CallOption) (*Memo, error)
|
||||
// ListMemos lists memos with pagination and filter.
|
||||
ListMemos(ctx context.Context, in *ListMemosRequest, opts ...grpc.CallOption) (*ListMemosResponse, error)
|
||||
// SearchMemos searches memos.
|
||||
SearchMemos(ctx context.Context, in *SearchMemosRequest, opts ...grpc.CallOption) (*SearchMemosResponse, error)
|
||||
// GetMemo gets a memo.
|
||||
GetMemo(ctx context.Context, in *GetMemoRequest, opts ...grpc.CallOption) (*Memo, error)
|
||||
// GetMemoByUid gets a memo by uid
|
||||
@ -125,16 +122,6 @@ func (c *memoServiceClient) ListMemos(ctx context.Context, in *ListMemosRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memoServiceClient) SearchMemos(ctx context.Context, in *SearchMemosRequest, opts ...grpc.CallOption) (*SearchMemosResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SearchMemosResponse)
|
||||
err := c.cc.Invoke(ctx, MemoService_SearchMemos_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memoServiceClient) GetMemo(ctx context.Context, in *GetMemoRequest, opts ...grpc.CallOption) (*Memo, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Memo)
|
||||
@ -343,8 +330,6 @@ type MemoServiceServer interface {
|
||||
CreateMemo(context.Context, *CreateMemoRequest) (*Memo, error)
|
||||
// ListMemos lists memos with pagination and filter.
|
||||
ListMemos(context.Context, *ListMemosRequest) (*ListMemosResponse, error)
|
||||
// SearchMemos searches memos.
|
||||
SearchMemos(context.Context, *SearchMemosRequest) (*SearchMemosResponse, error)
|
||||
// GetMemo gets a memo.
|
||||
GetMemo(context.Context, *GetMemoRequest) (*Memo, error)
|
||||
// GetMemoByUid gets a memo by uid
|
||||
@ -398,9 +383,6 @@ func (UnimplementedMemoServiceServer) CreateMemo(context.Context, *CreateMemoReq
|
||||
func (UnimplementedMemoServiceServer) ListMemos(context.Context, *ListMemosRequest) (*ListMemosResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListMemos not implemented")
|
||||
}
|
||||
func (UnimplementedMemoServiceServer) SearchMemos(context.Context, *SearchMemosRequest) (*SearchMemosResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SearchMemos not implemented")
|
||||
}
|
||||
func (UnimplementedMemoServiceServer) GetMemo(context.Context, *GetMemoRequest) (*Memo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMemo not implemented")
|
||||
}
|
||||
@ -510,24 +492,6 @@ func _MemoService_ListMemos_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MemoService_SearchMemos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchMemosRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemoServiceServer).SearchMemos(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: MemoService_SearchMemos_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemoServiceServer).SearchMemos(ctx, req.(*SearchMemosRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MemoService_GetMemo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMemoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -903,10 +867,6 @@ var MemoService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ListMemos",
|
||||
Handler: _MemoService_ListMemos_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SearchMemos",
|
||||
Handler: _MemoService_SearchMemos_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMemo",
|
||||
Handler: _MemoService_GetMemo_Handler,
|
||||
|
@ -274,100 +274,6 @@ func (x *ListResourcesResponse) GetResources() []*Resource {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SearchResourcesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SearchResourcesRequest) Reset() {
|
||||
*x = SearchResourcesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SearchResourcesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchResourcesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SearchResourcesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchResourcesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SearchResourcesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SearchResourcesRequest) GetFilter() string {
|
||||
if x != nil {
|
||||
return x.Filter
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SearchResourcesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SearchResourcesResponse) Reset() {
|
||||
*x = SearchResourcesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SearchResourcesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchResourcesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SearchResourcesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchResourcesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SearchResourcesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *SearchResourcesResponse) GetResources() []*Resource {
|
||||
if x != nil {
|
||||
return x.Resources
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetResourceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -382,7 +288,7 @@ type GetResourceRequest struct {
|
||||
func (x *GetResourceRequest) Reset() {
|
||||
*x = GetResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -395,7 +301,7 @@ func (x *GetResourceRequest) String() string {
|
||||
func (*GetResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -408,7 +314,7 @@ func (x *GetResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetResourceRequest) GetName() string {
|
||||
@ -430,7 +336,7 @@ type GetResourceByUidRequest struct {
|
||||
func (x *GetResourceByUidRequest) Reset() {
|
||||
*x = GetResourceByUidRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -443,7 +349,7 @@ func (x *GetResourceByUidRequest) String() string {
|
||||
func (*GetResourceByUidRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetResourceByUidRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -456,7 +362,7 @@ func (x *GetResourceByUidRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetResourceByUidRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetResourceByUidRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetResourceByUidRequest) GetUid() string {
|
||||
@ -482,7 +388,7 @@ type GetResourceBinaryRequest struct {
|
||||
func (x *GetResourceBinaryRequest) Reset() {
|
||||
*x = GetResourceBinaryRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -495,7 +401,7 @@ func (x *GetResourceBinaryRequest) String() string {
|
||||
func (*GetResourceBinaryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetResourceBinaryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -508,7 +414,7 @@ func (x *GetResourceBinaryRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetResourceBinaryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetResourceBinaryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetResourceBinaryRequest) GetName() string {
|
||||
@ -537,7 +443,7 @@ type UpdateResourceRequest struct {
|
||||
func (x *UpdateResourceRequest) Reset() {
|
||||
*x = UpdateResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[9]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -550,7 +456,7 @@ func (x *UpdateResourceRequest) String() string {
|
||||
func (*UpdateResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[9]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -563,7 +469,7 @@ func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{9}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *UpdateResourceRequest) GetResource() *Resource {
|
||||
@ -594,7 +500,7 @@ type DeleteResourceRequest struct {
|
||||
func (x *DeleteResourceRequest) Reset() {
|
||||
*x = DeleteResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[10]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -607,7 +513,7 @@ func (x *DeleteResourceRequest) String() string {
|
||||
func (*DeleteResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[10]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -620,7 +526,7 @@ func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{10}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *DeleteResourceRequest) GetName() string {
|
||||
@ -678,114 +584,98 @@ var file_api_v1_resource_service_proto_rawDesc = []byte{
|
||||
0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x17, 0x53, 0x65, 0x61, 0x72, 0x63,
|
||||
0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x2b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x42, 0x79, 0x55, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22,
|
||||
0x4a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x69,
|
||||
0x6e, 0x61, 0x72, 0x79, 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, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x15,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
|
||||
0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x2b, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x32, 0x9b, 0x08, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 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,
|
||||
0x2b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79,
|
||||
0x55, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4a, 0x0a, 0x18,
|
||||
0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x69, 0x6e, 0x61, 0x72,
|
||||
0x79, 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, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69,
|
||||
0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d,
|
||||
0x61, 0x73, 0x6b, 0x22, 0x2b, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 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,
|
||||
0x32, 0x98, 0x07, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x08, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x72, 0x0a,
|
||||
0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x08,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0d, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x12, 0x80, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61,
|
||||
0x72, 0x63, 0x68, 0x12, 0x72, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x29, 0xda, 0x41,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x55, 0x69, 0x64, 0x12, 0x25, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x55, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x2c, 0xda, 0x41, 0x03, 0x75,
|
||||
0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x62, 0x79, 0x2d, 0x75,
|
||||
0x69, 0x64, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x26,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x3b, 0xda, 0x41,
|
||||
0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x7b,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x4c, 0xda, 0x41, 0x14, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
|
||||
0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x32, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x78, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x29, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a,
|
||||
0x7d, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
||||
0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31,
|
||||
0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41,
|
||||
0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70,
|
||||
0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
|
||||
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||
0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x7d, 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x42, 0x79, 0x55, 0x69, 0x64, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x42, 0x79, 0x55, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x22, 0x2c, 0xda, 0x41, 0x03, 0x75, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x62, 0x79, 0x2d, 0x75, 0x69, 0x64, 0x2f, 0x7b, 0x75, 0x69,
|
||||
0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74,
|
||||
0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x3b, 0xda, 0x41, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x2c,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23,
|
||||
0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x7b, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x22, 0x4c, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x2f, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0x23, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a,
|
||||
0x7d, 0x12, 0x78, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
|
||||
0x22, 0x29, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a,
|
||||
0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xac, 0x01, 0x0a, 0x10,
|
||||
0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58,
|
||||
0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca,
|
||||
0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02,
|
||||
0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
|
||||
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -800,52 +690,47 @@ func file_api_v1_resource_service_proto_rawDescGZIP() []byte {
|
||||
return file_api_v1_resource_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v1_resource_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_api_v1_resource_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v1_resource_service_proto_goTypes = []any{
|
||||
(*Resource)(nil), // 0: memos.api.v1.Resource
|
||||
(*CreateResourceRequest)(nil), // 1: memos.api.v1.CreateResourceRequest
|
||||
(*ListResourcesRequest)(nil), // 2: memos.api.v1.ListResourcesRequest
|
||||
(*ListResourcesResponse)(nil), // 3: memos.api.v1.ListResourcesResponse
|
||||
(*SearchResourcesRequest)(nil), // 4: memos.api.v1.SearchResourcesRequest
|
||||
(*SearchResourcesResponse)(nil), // 5: memos.api.v1.SearchResourcesResponse
|
||||
(*GetResourceRequest)(nil), // 6: memos.api.v1.GetResourceRequest
|
||||
(*GetResourceByUidRequest)(nil), // 7: memos.api.v1.GetResourceByUidRequest
|
||||
(*GetResourceBinaryRequest)(nil), // 8: memos.api.v1.GetResourceBinaryRequest
|
||||
(*UpdateResourceRequest)(nil), // 9: memos.api.v1.UpdateResourceRequest
|
||||
(*DeleteResourceRequest)(nil), // 10: memos.api.v1.DeleteResourceRequest
|
||||
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask
|
||||
(*httpbody.HttpBody)(nil), // 13: google.api.HttpBody
|
||||
(*emptypb.Empty)(nil), // 14: google.protobuf.Empty
|
||||
(*GetResourceRequest)(nil), // 4: memos.api.v1.GetResourceRequest
|
||||
(*GetResourceByUidRequest)(nil), // 5: memos.api.v1.GetResourceByUidRequest
|
||||
(*GetResourceBinaryRequest)(nil), // 6: memos.api.v1.GetResourceBinaryRequest
|
||||
(*UpdateResourceRequest)(nil), // 7: memos.api.v1.UpdateResourceRequest
|
||||
(*DeleteResourceRequest)(nil), // 8: memos.api.v1.DeleteResourceRequest
|
||||
(*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask
|
||||
(*httpbody.HttpBody)(nil), // 11: google.api.HttpBody
|
||||
(*emptypb.Empty)(nil), // 12: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v1_resource_service_proto_depIdxs = []int32{
|
||||
11, // 0: memos.api.v1.Resource.create_time:type_name -> google.protobuf.Timestamp
|
||||
9, // 0: memos.api.v1.Resource.create_time:type_name -> google.protobuf.Timestamp
|
||||
0, // 1: memos.api.v1.CreateResourceRequest.resource:type_name -> memos.api.v1.Resource
|
||||
0, // 2: memos.api.v1.ListResourcesResponse.resources:type_name -> memos.api.v1.Resource
|
||||
0, // 3: memos.api.v1.SearchResourcesResponse.resources:type_name -> memos.api.v1.Resource
|
||||
0, // 4: memos.api.v1.UpdateResourceRequest.resource:type_name -> memos.api.v1.Resource
|
||||
12, // 5: memos.api.v1.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 6: memos.api.v1.ResourceService.CreateResource:input_type -> memos.api.v1.CreateResourceRequest
|
||||
2, // 7: memos.api.v1.ResourceService.ListResources:input_type -> memos.api.v1.ListResourcesRequest
|
||||
4, // 8: memos.api.v1.ResourceService.SearchResources:input_type -> memos.api.v1.SearchResourcesRequest
|
||||
6, // 9: memos.api.v1.ResourceService.GetResource:input_type -> memos.api.v1.GetResourceRequest
|
||||
7, // 10: memos.api.v1.ResourceService.GetResourceByUid:input_type -> memos.api.v1.GetResourceByUidRequest
|
||||
8, // 11: memos.api.v1.ResourceService.GetResourceBinary:input_type -> memos.api.v1.GetResourceBinaryRequest
|
||||
9, // 12: memos.api.v1.ResourceService.UpdateResource:input_type -> memos.api.v1.UpdateResourceRequest
|
||||
10, // 13: memos.api.v1.ResourceService.DeleteResource:input_type -> memos.api.v1.DeleteResourceRequest
|
||||
0, // 14: memos.api.v1.ResourceService.CreateResource:output_type -> memos.api.v1.Resource
|
||||
3, // 15: memos.api.v1.ResourceService.ListResources:output_type -> memos.api.v1.ListResourcesResponse
|
||||
5, // 16: memos.api.v1.ResourceService.SearchResources:output_type -> memos.api.v1.SearchResourcesResponse
|
||||
0, // 17: memos.api.v1.ResourceService.GetResource:output_type -> memos.api.v1.Resource
|
||||
0, // 18: memos.api.v1.ResourceService.GetResourceByUid:output_type -> memos.api.v1.Resource
|
||||
13, // 19: memos.api.v1.ResourceService.GetResourceBinary:output_type -> google.api.HttpBody
|
||||
0, // 20: memos.api.v1.ResourceService.UpdateResource:output_type -> memos.api.v1.Resource
|
||||
14, // 21: memos.api.v1.ResourceService.DeleteResource:output_type -> google.protobuf.Empty
|
||||
14, // [14:22] is the sub-list for method output_type
|
||||
6, // [6:14] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
0, // 3: memos.api.v1.UpdateResourceRequest.resource:type_name -> memos.api.v1.Resource
|
||||
10, // 4: memos.api.v1.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 5: memos.api.v1.ResourceService.CreateResource:input_type -> memos.api.v1.CreateResourceRequest
|
||||
2, // 6: memos.api.v1.ResourceService.ListResources:input_type -> memos.api.v1.ListResourcesRequest
|
||||
4, // 7: memos.api.v1.ResourceService.GetResource:input_type -> memos.api.v1.GetResourceRequest
|
||||
5, // 8: memos.api.v1.ResourceService.GetResourceByUid:input_type -> memos.api.v1.GetResourceByUidRequest
|
||||
6, // 9: memos.api.v1.ResourceService.GetResourceBinary:input_type -> memos.api.v1.GetResourceBinaryRequest
|
||||
7, // 10: memos.api.v1.ResourceService.UpdateResource:input_type -> memos.api.v1.UpdateResourceRequest
|
||||
8, // 11: memos.api.v1.ResourceService.DeleteResource:input_type -> memos.api.v1.DeleteResourceRequest
|
||||
0, // 12: memos.api.v1.ResourceService.CreateResource:output_type -> memos.api.v1.Resource
|
||||
3, // 13: memos.api.v1.ResourceService.ListResources:output_type -> memos.api.v1.ListResourcesResponse
|
||||
0, // 14: memos.api.v1.ResourceService.GetResource:output_type -> memos.api.v1.Resource
|
||||
0, // 15: memos.api.v1.ResourceService.GetResourceByUid:output_type -> memos.api.v1.Resource
|
||||
11, // 16: memos.api.v1.ResourceService.GetResourceBinary:output_type -> google.api.HttpBody
|
||||
0, // 17: memos.api.v1.ResourceService.UpdateResource:output_type -> memos.api.v1.Resource
|
||||
12, // 18: memos.api.v1.ResourceService.DeleteResource:output_type -> google.protobuf.Empty
|
||||
12, // [12:19] is the sub-list for method output_type
|
||||
5, // [5:12] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v1_resource_service_proto_init() }
|
||||
@ -903,30 +788,6 @@ func file_api_v1_resource_service_proto_init() {
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SearchResourcesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SearchResourcesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -938,7 +799,7 @@ func file_api_v1_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
file_api_v1_resource_service_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetResourceByUidRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -950,7 +811,7 @@ func file_api_v1_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
file_api_v1_resource_service_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetResourceBinaryRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -962,7 +823,7 @@ func file_api_v1_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||
file_api_v1_resource_service_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*UpdateResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -974,7 +835,7 @@ func file_api_v1_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v1_resource_service_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
||||
file_api_v1_resource_service_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*DeleteResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -994,7 +855,7 @@ func file_api_v1_resource_service_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v1_resource_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
@ -75,42 +75,6 @@ func local_request_ResourceService_ListResources_0(ctx context.Context, marshale
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_ResourceService_SearchResources_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_ResourceService_SearchResources_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq SearchResourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceService_SearchResources_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.SearchResources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_ResourceService_SearchResources_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq SearchResourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceService_SearchResources_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.SearchResources(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_ResourceService_GetResource_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetResourceRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@ -495,31 +459,6 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_ResourceService_SearchResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/SearchResources", runtime.WithHTTPPathPattern("/api/v1/resources:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_ResourceService_SearchResources_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_ResourceService_SearchResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_ResourceService_GetResource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -730,28 +669,6 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_ResourceService_SearchResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/SearchResources", runtime.WithHTTPPathPattern("/api/v1/resources:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_ResourceService_SearchResources_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_ResourceService_SearchResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_ResourceService_GetResource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -870,8 +787,6 @@ var (
|
||||
|
||||
pattern_ResourceService_ListResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "resources"}, ""))
|
||||
|
||||
pattern_ResourceService_SearchResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "resources"}, "search"))
|
||||
|
||||
pattern_ResourceService_GetResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "resources", "name"}, ""))
|
||||
|
||||
pattern_ResourceService_GetResourceByUid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "resources:by-uid", "uid"}, ""))
|
||||
@ -888,8 +803,6 @@ var (
|
||||
|
||||
forward_ResourceService_ListResources_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_ResourceService_SearchResources_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_ResourceService_GetResource_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_ResourceService_GetResourceByUid_0 = runtime.ForwardResponseMessage
|
||||
|
@ -23,7 +23,6 @@ const _ = grpc.SupportPackageIsVersion8
|
||||
const (
|
||||
ResourceService_CreateResource_FullMethodName = "/memos.api.v1.ResourceService/CreateResource"
|
||||
ResourceService_ListResources_FullMethodName = "/memos.api.v1.ResourceService/ListResources"
|
||||
ResourceService_SearchResources_FullMethodName = "/memos.api.v1.ResourceService/SearchResources"
|
||||
ResourceService_GetResource_FullMethodName = "/memos.api.v1.ResourceService/GetResource"
|
||||
ResourceService_GetResourceByUid_FullMethodName = "/memos.api.v1.ResourceService/GetResourceByUid"
|
||||
ResourceService_GetResourceBinary_FullMethodName = "/memos.api.v1.ResourceService/GetResourceBinary"
|
||||
@ -39,8 +38,6 @@ type ResourceServiceClient interface {
|
||||
CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*Resource, error)
|
||||
// ListResources lists all resources.
|
||||
ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error)
|
||||
// SearchResources searches memos.
|
||||
SearchResources(ctx context.Context, in *SearchResourcesRequest, opts ...grpc.CallOption) (*SearchResourcesResponse, error)
|
||||
// GetResource returns a resource by name.
|
||||
GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*Resource, error)
|
||||
// GetResourceByUid returns a resource by uid.
|
||||
@ -81,16 +78,6 @@ func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResou
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *resourceServiceClient) SearchResources(ctx context.Context, in *SearchResourcesRequest, opts ...grpc.CallOption) (*SearchResourcesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SearchResourcesResponse)
|
||||
err := c.cc.Invoke(ctx, ResourceService_SearchResources_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *resourceServiceClient) GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*Resource, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Resource)
|
||||
@ -149,8 +136,6 @@ type ResourceServiceServer interface {
|
||||
CreateResource(context.Context, *CreateResourceRequest) (*Resource, error)
|
||||
// ListResources lists all resources.
|
||||
ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
|
||||
// SearchResources searches memos.
|
||||
SearchResources(context.Context, *SearchResourcesRequest) (*SearchResourcesResponse, error)
|
||||
// GetResource returns a resource by name.
|
||||
GetResource(context.Context, *GetResourceRequest) (*Resource, error)
|
||||
// GetResourceByUid returns a resource by uid.
|
||||
@ -174,9 +159,6 @@ func (UnimplementedResourceServiceServer) CreateResource(context.Context, *Creat
|
||||
func (UnimplementedResourceServiceServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListResources not implemented")
|
||||
}
|
||||
func (UnimplementedResourceServiceServer) SearchResources(context.Context, *SearchResourcesRequest) (*SearchResourcesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SearchResources not implemented")
|
||||
}
|
||||
func (UnimplementedResourceServiceServer) GetResource(context.Context, *GetResourceRequest) (*Resource, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetResource not implemented")
|
||||
}
|
||||
@ -241,24 +223,6 @@ func _ResourceService_ListResources_Handler(srv interface{}, ctx context.Context
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ResourceService_SearchResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchResourcesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ResourceServiceServer).SearchResources(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ResourceService_SearchResources_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ResourceServiceServer).SearchResources(ctx, req.(*SearchResourcesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ResourceService_GetResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetResourceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -364,10 +328,6 @@ var ResourceService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ListResources",
|
||||
Handler: _ResourceService_ListResources_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SearchResources",
|
||||
Handler: _ResourceService_SearchResources_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetResource",
|
||||
Handler: _ResourceService_GetResource_Handler,
|
||||
|
@ -141,38 +141,6 @@ func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosReq
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV1Service) SearchMemos(ctx context.Context, request *v1pb.SearchMemosRequest) (*v1pb.SearchMemosResponse, error) {
|
||||
defaultSearchLimit := 10
|
||||
memoFind := &store.FindMemo{
|
||||
// Exclude comments by default.
|
||||
ExcludeComments: true,
|
||||
Limit: &defaultSearchLimit,
|
||||
}
|
||||
err := s.buildMemoFindWithFilter(ctx, memoFind, request.Filter)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "failed to build find memos with filter: %v", err)
|
||||
}
|
||||
|
||||
memos, err := s.Store.ListMemos(ctx, memoFind)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to search memos: %v", err)
|
||||
}
|
||||
|
||||
memoMessages := []*v1pb.Memo{}
|
||||
for _, memo := range memos {
|
||||
memoMessage, err := s.convertMemoFromStore(ctx, memo)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to convert memo")
|
||||
}
|
||||
memoMessages = append(memoMessages, memoMessage)
|
||||
}
|
||||
|
||||
response := &v1pb.SearchMemosResponse{
|
||||
Memos: memoMessages,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest) (*v1pb.Memo, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
@ -950,7 +918,7 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store.
|
||||
find.PayloadFind = &store.FindMemoPayload{}
|
||||
}
|
||||
if filter != "" {
|
||||
filter, err := parseSearchMemosFilter(filter)
|
||||
filter, err := parseMemoFilter(filter)
|
||||
if err != nil {
|
||||
return status.Errorf(codes.InvalidArgument, "invalid filter: %v", err)
|
||||
}
|
||||
@ -1067,8 +1035,8 @@ func (s *APIV1Service) getContentLengthLimit(ctx context.Context) (int, error) {
|
||||
return int(workspaceMemoRelatedSetting.ContentLengthLimit), nil
|
||||
}
|
||||
|
||||
// SearchMemosFilterCELAttributes are the CEL attributes.
|
||||
var SearchMemosFilterCELAttributes = []cel.EnvOption{
|
||||
// MemoFilterCELAttributes are the CEL attributes.
|
||||
var MemoFilterCELAttributes = []cel.EnvOption{
|
||||
cel.Variable("content_search", cel.ListType(cel.StringType)),
|
||||
cel.Variable("visibilities", cel.ListType(cel.StringType)),
|
||||
cel.Variable("tag", cel.StringType),
|
||||
@ -1087,7 +1055,7 @@ var SearchMemosFilterCELAttributes = []cel.EnvOption{
|
||||
cel.Variable("has_incomplete_tasks", cel.BoolType),
|
||||
}
|
||||
|
||||
type SearchMemosFilter struct {
|
||||
type MemoFilter struct {
|
||||
ContentSearch []string
|
||||
Visibilities []store.Visibility
|
||||
Tag *string
|
||||
@ -1105,8 +1073,8 @@ type SearchMemosFilter struct {
|
||||
HasIncompleteTasks bool
|
||||
}
|
||||
|
||||
func parseSearchMemosFilter(expression string) (*SearchMemosFilter, error) {
|
||||
e, err := cel.NewEnv(SearchMemosFilterCELAttributes...)
|
||||
func parseMemoFilter(expression string) (*MemoFilter, error) {
|
||||
e, err := cel.NewEnv(MemoFilterCELAttributes...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -1114,17 +1082,17 @@ func parseSearchMemosFilter(expression string) (*SearchMemosFilter, error) {
|
||||
if issues != nil {
|
||||
return nil, errors.Errorf("found issue %v", issues)
|
||||
}
|
||||
filter := &SearchMemosFilter{}
|
||||
filter := &MemoFilter{}
|
||||
expr, err := cel.AstToParsedExpr(ast)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
callExpr := expr.GetExpr().GetCallExpr()
|
||||
findSearchMemosField(callExpr, filter)
|
||||
findMemoField(callExpr, filter)
|
||||
return filter, nil
|
||||
}
|
||||
|
||||
func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) {
|
||||
func findMemoField(callExpr *expr.Expr_Call, filter *MemoFilter) {
|
||||
if len(callExpr.Args) == 2 {
|
||||
idExpr := callExpr.Args[0].GetIdentExpr()
|
||||
if idExpr != nil {
|
||||
@ -1188,7 +1156,7 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) {
|
||||
for _, arg := range callExpr.Args {
|
||||
callExpr := arg.GetCallExpr()
|
||||
if callExpr != nil {
|
||||
findSearchMemosField(callExpr, filter)
|
||||
findMemoField(callExpr, filter)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/cel-go/cel"
|
||||
"github.com/lithammer/shortuuid/v4"
|
||||
"github.com/pkg/errors"
|
||||
expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
|
||||
"google.golang.org/genproto/googleapis/api/httpbody"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@ -102,35 +100,6 @@ func (s *APIV1Service) ListResources(ctx context.Context, _ *v1pb.ListResourcesR
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV1Service) SearchResources(ctx context.Context, request *v1pb.SearchResourcesRequest) (*v1pb.SearchResourcesResponse, error) {
|
||||
if request.Filter == "" {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "filter is empty")
|
||||
}
|
||||
filter, err := parseSearchResourcesFilter(request.Filter)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "failed to parse filter: %v", err)
|
||||
}
|
||||
resourceFind := &store.FindResource{}
|
||||
if filter.Filename != nil {
|
||||
resourceFind.FilenameSearch = filter.Filename
|
||||
}
|
||||
user, err := s.GetCurrentUser(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
}
|
||||
resourceFind.CreatorID = &user.ID
|
||||
resources, err := s.Store.ListResources(ctx, resourceFind)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to search resources: %v", err)
|
||||
}
|
||||
|
||||
response := &v1pb.SearchResourcesResponse{}
|
||||
for _, resource := range resources {
|
||||
response.Resources = append(response.Resources, s.convertResourceFromStore(ctx, resource))
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV1Service) GetResource(ctx context.Context, request *v1pb.GetResourceRequest) (*v1pb.Resource, error) {
|
||||
id, err := ExtractResourceIDFromName(request.Name)
|
||||
if err != nil {
|
||||
@ -437,50 +406,3 @@ func replaceFilenameWithPathTemplate(path, filename string) string {
|
||||
})
|
||||
return path
|
||||
}
|
||||
|
||||
// SearchResourcesFilterCELAttributes are the CEL attributes for SearchResourcesFilter.
|
||||
var SearchResourcesFilterCELAttributes = []cel.EnvOption{
|
||||
cel.Variable("filename", cel.StringType),
|
||||
}
|
||||
|
||||
type SearchResourcesFilter struct {
|
||||
Filename *string
|
||||
}
|
||||
|
||||
func parseSearchResourcesFilter(expression string) (*SearchResourcesFilter, error) {
|
||||
e, err := cel.NewEnv(SearchResourcesFilterCELAttributes...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ast, issues := e.Compile(expression)
|
||||
if issues != nil {
|
||||
return nil, errors.Errorf("found issue %v", issues)
|
||||
}
|
||||
filter := &SearchResourcesFilter{}
|
||||
expr, err := cel.AstToParsedExpr(ast)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
callExpr := expr.GetExpr().GetCallExpr()
|
||||
findSearchResourcesField(callExpr, filter)
|
||||
return filter, nil
|
||||
}
|
||||
|
||||
func findSearchResourcesField(callExpr *expr.Expr_Call, filter *SearchResourcesFilter) {
|
||||
if len(callExpr.Args) == 2 {
|
||||
idExpr := callExpr.Args[0].GetIdentExpr()
|
||||
if idExpr != nil {
|
||||
if idExpr.Name == "filename" {
|
||||
filename := callExpr.Args[1].GetConstExpr().GetStringValue()
|
||||
filter.Filename = &filename
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
for _, arg := range callExpr.Args {
|
||||
callExpr := arg.GetCallExpr()
|
||||
if callExpr != nil {
|
||||
findSearchResourcesField(callExpr, filter)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user