Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
44e56844
Commit
44e56844
authored
Jul 22, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak search resources
parent
95fa1456
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
700 additions
and
1427 deletions
+700
-1427
apidocs.swagger.yaml
docs/apidocs.swagger.yaml
+0
-59
memo_service.proto
proto/api/v1/memo_service.proto
+0
-14
resource_service.proto
proto/api/v1/resource_service.proto
+0
-12
memo_service.pb.go
proto/gen/api/v1/memo_service.pb.go
+549
-688
memo_service.pb.gw.go
proto/gen/api/v1/memo_service.pb.gw.go
+0
-87
memo_service_grpc.pb.go
proto/gen/api/v1/memo_service_grpc.pb.go
+0
-40
resource_service.pb.go
proto/gen/api/v1/resource_service.pb.go
+141
-280
resource_service.pb.gw.go
proto/gen/api/v1/resource_service.pb.gw.go
+0
-87
resource_service_grpc.pb.go
proto/gen/api/v1/resource_service_grpc.pb.go
+0
-40
memo_service.go
server/router/api/v1/memo_service.go
+10
-42
resource_service.go
server/router/api/v1/resource_service.go
+0
-78
No files found.
docs/apidocs.swagger.yaml
View file @
44e56844
...
@@ -435,29 +435,6 @@ paths:
...
@@ -435,29 +435,6 @@ paths:
$ref
:
'
#/definitions/v1ExportMemosRequest'
$ref
:
'
#/definitions/v1ExportMemosRequest'
tags
:
tags
:
-
MemoService
-
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}
:
/api/v1/reactions/{reactionId}
:
delete
:
delete
:
summary
:
DeleteMemoReaction deletes a reaction for a memo.
summary
:
DeleteMemoReaction deletes a reaction for a memo.
...
@@ -536,26 +513,6 @@ paths:
...
@@ -536,26 +513,6 @@ paths:
type
:
string
type
:
string
tags
:
tags
:
-
ResourceService
-
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
:
/api/v1/users
:
get
:
get
:
summary
:
ListUsers returns a list of users.
summary
:
ListUsers returns a list of users.
...
@@ -3035,22 +2992,6 @@ definitions:
...
@@ -3035,22 +2992,6 @@ definitions:
-
ACTIVE
-
ACTIVE
-
ARCHIVED
-
ARCHIVED
default
:
ROW_STATUS_UNSPECIFIED
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
:
v1SearchUsersResponse
:
type
:
object
type
:
object
properties
:
properties
:
...
...
proto/api/v1/memo_service.proto
View file @
44e56844
...
@@ -28,10 +28,6 @@ service MemoService {
...
@@ -28,10 +28,6 @@ service MemoService {
rpc
ListMemos
(
ListMemosRequest
)
returns
(
ListMemosResponse
)
{
rpc
ListMemos
(
ListMemosRequest
)
returns
(
ListMemosResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v1/memos"
};
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.
// GetMemo gets a memo.
rpc
GetMemo
(
GetMemoRequest
)
returns
(
Memo
)
{
rpc
GetMemo
(
GetMemoRequest
)
returns
(
Memo
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v1/{name=memos/*}"
};
option
(
google.api.http
)
=
{
get
:
"/api/v1/{name=memos/*}"
};
...
@@ -246,16 +242,6 @@ message ListMemosResponse {
...
@@ -246,16 +242,6 @@ message ListMemosResponse {
string
next_page_token
=
2
;
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
{
message
GetMemoRequest
{
// The name of the memo.
// The name of the memo.
// Format: memos/{id}
// Format: memos/{id}
...
...
proto/api/v1/resource_service.proto
View file @
44e56844
...
@@ -24,10 +24,6 @@ service ResourceService {
...
@@ -24,10 +24,6 @@ service ResourceService {
rpc
ListResources
(
ListResourcesRequest
)
returns
(
ListResourcesResponse
)
{
rpc
ListResources
(
ListResourcesRequest
)
returns
(
ListResourcesResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v1/resources"
};
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.
// GetResource returns a resource by name.
rpc
GetResource
(
GetResourceRequest
)
returns
(
Resource
)
{
rpc
GetResource
(
GetResourceRequest
)
returns
(
Resource
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v1/{name=resources/*}"
};
option
(
google.api.http
)
=
{
get
:
"/api/v1/{name=resources/*}"
};
...
@@ -94,14 +90,6 @@ message ListResourcesResponse {
...
@@ -94,14 +90,6 @@ message ListResourcesResponse {
repeated
Resource
resources
=
1
;
repeated
Resource
resources
=
1
;
}
}
message
SearchResourcesRequest
{
string
filter
=
1
;
}
message
SearchResourcesResponse
{
repeated
Resource
resources
=
1
;
}
message
GetResourceRequest
{
message
GetResourceRequest
{
// The name of the resource.
// The name of the resource.
// Format: resources/{id}
// Format: resources/{id}
...
...
proto/gen/api/v1/memo_service.pb.go
View file @
44e56844
This source diff could not be displayed because it is too large. You can
view the blob
instead.
proto/gen/api/v1/memo_service.pb.gw.go
View file @
44e56844
...
@@ -93,42 +93,6 @@ func local_request_MemoService_ListMemos_0(ctx context.Context, marshaler runtim
...
@@ -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
)
{
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
protoReq
GetMemoRequest
var
metadata
runtime
.
ServerMetadata
var
metadata
runtime
.
ServerMetadata
...
@@ -1335,31 +1299,6 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
...
@@ -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
)
{
mux
.
Handle
(
"GET"
,
pattern_MemoService_GetMemo_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
defer
cancel
()
...
@@ -1945,28 +1884,6 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
...
@@ -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
)
{
mux
.
Handle
(
"GET"
,
pattern_MemoService_GetMemo_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
defer
cancel
()
...
@@ -2415,8 +2332,6 @@ var (
...
@@ -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_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_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"
},
""
))
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 (
...
@@ -2463,8 +2378,6 @@ var (
forward_MemoService_ListMemos_0
=
runtime
.
ForwardResponseMessage
forward_MemoService_ListMemos_0
=
runtime
.
ForwardResponseMessage
forward_MemoService_SearchMemos_0
=
runtime
.
ForwardResponseMessage
forward_MemoService_GetMemo_0
=
runtime
.
ForwardResponseMessage
forward_MemoService_GetMemo_0
=
runtime
.
ForwardResponseMessage
forward_MemoService_GetMemoByUid_0
=
runtime
.
ForwardResponseMessage
forward_MemoService_GetMemoByUid_0
=
runtime
.
ForwardResponseMessage
...
...
proto/gen/api/v1/memo_service_grpc.pb.go
View file @
44e56844
...
@@ -22,7 +22,6 @@ const _ = grpc.SupportPackageIsVersion8
...
@@ -22,7 +22,6 @@ const _ = grpc.SupportPackageIsVersion8
const
(
const
(
MemoService_CreateMemo_FullMethodName
=
"/memos.api.v1.MemoService/CreateMemo"
MemoService_CreateMemo_FullMethodName
=
"/memos.api.v1.MemoService/CreateMemo"
MemoService_ListMemos_FullMethodName
=
"/memos.api.v1.MemoService/ListMemos"
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_GetMemo_FullMethodName
=
"/memos.api.v1.MemoService/GetMemo"
MemoService_GetMemoByUid_FullMethodName
=
"/memos.api.v1.MemoService/GetMemoByUid"
MemoService_GetMemoByUid_FullMethodName
=
"/memos.api.v1.MemoService/GetMemoByUid"
MemoService_UpdateMemo_FullMethodName
=
"/memos.api.v1.MemoService/UpdateMemo"
MemoService_UpdateMemo_FullMethodName
=
"/memos.api.v1.MemoService/UpdateMemo"
...
@@ -53,8 +52,6 @@ type MemoServiceClient interface {
...
@@ -53,8 +52,6 @@ type MemoServiceClient interface {
CreateMemo
(
ctx
context
.
Context
,
in
*
CreateMemoRequest
,
opts
...
grpc
.
CallOption
)
(
*
Memo
,
error
)
CreateMemo
(
ctx
context
.
Context
,
in
*
CreateMemoRequest
,
opts
...
grpc
.
CallOption
)
(
*
Memo
,
error
)
// ListMemos lists memos with pagination and filter.
// ListMemos lists memos with pagination and filter.
ListMemos
(
ctx
context
.
Context
,
in
*
ListMemosRequest
,
opts
...
grpc
.
CallOption
)
(
*
ListMemosResponse
,
error
)
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 gets a memo.
GetMemo
(
ctx
context
.
Context
,
in
*
GetMemoRequest
,
opts
...
grpc
.
CallOption
)
(
*
Memo
,
error
)
GetMemo
(
ctx
context
.
Context
,
in
*
GetMemoRequest
,
opts
...
grpc
.
CallOption
)
(
*
Memo
,
error
)
// GetMemoByUid gets a memo by uid
// GetMemoByUid gets a memo by uid
...
@@ -125,16 +122,6 @@ func (c *memoServiceClient) ListMemos(ctx context.Context, in *ListMemosRequest,
...
@@ -125,16 +122,6 @@ func (c *memoServiceClient) ListMemos(ctx context.Context, in *ListMemosRequest,
return
out
,
nil
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
)
{
func
(
c
*
memoServiceClient
)
GetMemo
(
ctx
context
.
Context
,
in
*
GetMemoRequest
,
opts
...
grpc
.
CallOption
)
(
*
Memo
,
error
)
{
cOpts
:=
append
([]
grpc
.
CallOption
{
grpc
.
StaticMethod
()},
opts
...
)
cOpts
:=
append
([]
grpc
.
CallOption
{
grpc
.
StaticMethod
()},
opts
...
)
out
:=
new
(
Memo
)
out
:=
new
(
Memo
)
...
@@ -343,8 +330,6 @@ type MemoServiceServer interface {
...
@@ -343,8 +330,6 @@ type MemoServiceServer interface {
CreateMemo
(
context
.
Context
,
*
CreateMemoRequest
)
(
*
Memo
,
error
)
CreateMemo
(
context
.
Context
,
*
CreateMemoRequest
)
(
*
Memo
,
error
)
// ListMemos lists memos with pagination and filter.
// ListMemos lists memos with pagination and filter.
ListMemos
(
context
.
Context
,
*
ListMemosRequest
)
(
*
ListMemosResponse
,
error
)
ListMemos
(
context
.
Context
,
*
ListMemosRequest
)
(
*
ListMemosResponse
,
error
)
// SearchMemos searches memos.
SearchMemos
(
context
.
Context
,
*
SearchMemosRequest
)
(
*
SearchMemosResponse
,
error
)
// GetMemo gets a memo.
// GetMemo gets a memo.
GetMemo
(
context
.
Context
,
*
GetMemoRequest
)
(
*
Memo
,
error
)
GetMemo
(
context
.
Context
,
*
GetMemoRequest
)
(
*
Memo
,
error
)
// GetMemoByUid gets a memo by uid
// GetMemoByUid gets a memo by uid
...
@@ -398,9 +383,6 @@ func (UnimplementedMemoServiceServer) CreateMemo(context.Context, *CreateMemoReq
...
@@ -398,9 +383,6 @@ func (UnimplementedMemoServiceServer) CreateMemo(context.Context, *CreateMemoReq
func
(
UnimplementedMemoServiceServer
)
ListMemos
(
context
.
Context
,
*
ListMemosRequest
)
(
*
ListMemosResponse
,
error
)
{
func
(
UnimplementedMemoServiceServer
)
ListMemos
(
context
.
Context
,
*
ListMemosRequest
)
(
*
ListMemosResponse
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method ListMemos not implemented"
)
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
)
{
func
(
UnimplementedMemoServiceServer
)
GetMemo
(
context
.
Context
,
*
GetMemoRequest
)
(
*
Memo
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method GetMemo not implemented"
)
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
...
@@ -510,24 +492,6 @@ func _MemoService_ListMemos_Handler(srv interface{}, ctx context.Context, dec fu
return
interceptor
(
ctx
,
in
,
info
,
handler
)
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
)
{
func
_MemoService_GetMemo_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
GetMemoRequest
)
in
:=
new
(
GetMemoRequest
)
if
err
:=
dec
(
in
);
err
!=
nil
{
if
err
:=
dec
(
in
);
err
!=
nil
{
...
@@ -903,10 +867,6 @@ var MemoService_ServiceDesc = grpc.ServiceDesc{
...
@@ -903,10 +867,6 @@ var MemoService_ServiceDesc = grpc.ServiceDesc{
MethodName
:
"ListMemos"
,
MethodName
:
"ListMemos"
,
Handler
:
_MemoService_ListMemos_Handler
,
Handler
:
_MemoService_ListMemos_Handler
,
},
},
{
MethodName
:
"SearchMemos"
,
Handler
:
_MemoService_SearchMemos_Handler
,
},
{
{
MethodName
:
"GetMemo"
,
MethodName
:
"GetMemo"
,
Handler
:
_MemoService_GetMemo_Handler
,
Handler
:
_MemoService_GetMemo_Handler
,
...
...
proto/gen/api/v1/resource_service.pb.go
View file @
44e56844
...
@@ -274,100 +274,6 @@ func (x *ListResourcesResponse) GetResources() []*Resource {
...
@@ -274,100 +274,6 @@ func (x *ListResourcesResponse) GetResources() []*Resource {
return
nil
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
{
type
GetResourceRequest
struct
{
state
protoimpl
.
MessageState
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -382,7 +288,7 @@ type GetResourceRequest struct {
...
@@ -382,7 +288,7 @@ type GetResourceRequest struct {
func
(
x
*
GetResourceRequest
)
Reset
()
{
func
(
x
*
GetResourceRequest
)
Reset
()
{
*
x
=
GetResourceRequest
{}
*
x
=
GetResourceRequest
{}
if
protoimpl
.
UnsafeEnabled
{
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
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -395,7 +301,7 @@ func (x *GetResourceRequest) String() string {
...
@@ -395,7 +301,7 @@ func (x *GetResourceRequest) String() string {
func
(
*
GetResourceRequest
)
ProtoMessage
()
{}
func
(
*
GetResourceRequest
)
ProtoMessage
()
{}
func
(
x
*
GetResourceRequest
)
ProtoReflect
()
protoreflect
.
Message
{
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
{
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -408,7 +314,7 @@ func (x *GetResourceRequest) ProtoReflect() protoreflect.Message {
...
@@ -408,7 +314,7 @@ func (x *GetResourceRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetResourceRequest.ProtoReflect.Descriptor instead.
// Deprecated: Use GetResourceRequest.ProtoReflect.Descriptor instead.
func
(
*
GetResourceRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
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
{
func
(
x
*
GetResourceRequest
)
GetName
()
string
{
...
@@ -430,7 +336,7 @@ type GetResourceByUidRequest struct {
...
@@ -430,7 +336,7 @@ type GetResourceByUidRequest struct {
func
(
x
*
GetResourceByUidRequest
)
Reset
()
{
func
(
x
*
GetResourceByUidRequest
)
Reset
()
{
*
x
=
GetResourceByUidRequest
{}
*
x
=
GetResourceByUidRequest
{}
if
protoimpl
.
UnsafeEnabled
{
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
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -443,7 +349,7 @@ func (x *GetResourceByUidRequest) String() string {
...
@@ -443,7 +349,7 @@ func (x *GetResourceByUidRequest) String() string {
func
(
*
GetResourceByUidRequest
)
ProtoMessage
()
{}
func
(
*
GetResourceByUidRequest
)
ProtoMessage
()
{}
func
(
x
*
GetResourceByUidRequest
)
ProtoReflect
()
protoreflect
.
Message
{
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
{
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -456,7 +362,7 @@ func (x *GetResourceByUidRequest) ProtoReflect() protoreflect.Message {
...
@@ -456,7 +362,7 @@ func (x *GetResourceByUidRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetResourceByUidRequest.ProtoReflect.Descriptor instead.
// Deprecated: Use GetResourceByUidRequest.ProtoReflect.Descriptor instead.
func
(
*
GetResourceByUidRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
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
{
func
(
x
*
GetResourceByUidRequest
)
GetUid
()
string
{
...
@@ -482,7 +388,7 @@ type GetResourceBinaryRequest struct {
...
@@ -482,7 +388,7 @@ type GetResourceBinaryRequest struct {
func
(
x
*
GetResourceBinaryRequest
)
Reset
()
{
func
(
x
*
GetResourceBinaryRequest
)
Reset
()
{
*
x
=
GetResourceBinaryRequest
{}
*
x
=
GetResourceBinaryRequest
{}
if
protoimpl
.
UnsafeEnabled
{
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
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -495,7 +401,7 @@ func (x *GetResourceBinaryRequest) String() string {
...
@@ -495,7 +401,7 @@ func (x *GetResourceBinaryRequest) String() string {
func
(
*
GetResourceBinaryRequest
)
ProtoMessage
()
{}
func
(
*
GetResourceBinaryRequest
)
ProtoMessage
()
{}
func
(
x
*
GetResourceBinaryRequest
)
ProtoReflect
()
protoreflect
.
Message
{
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
{
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -508,7 +414,7 @@ func (x *GetResourceBinaryRequest) ProtoReflect() protoreflect.Message {
...
@@ -508,7 +414,7 @@ func (x *GetResourceBinaryRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetResourceBinaryRequest.ProtoReflect.Descriptor instead.
// Deprecated: Use GetResourceBinaryRequest.ProtoReflect.Descriptor instead.
func
(
*
GetResourceBinaryRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
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
{
func
(
x
*
GetResourceBinaryRequest
)
GetName
()
string
{
...
@@ -537,7 +443,7 @@ type UpdateResourceRequest struct {
...
@@ -537,7 +443,7 @@ type UpdateResourceRequest struct {
func
(
x
*
UpdateResourceRequest
)
Reset
()
{
func
(
x
*
UpdateResourceRequest
)
Reset
()
{
*
x
=
UpdateResourceRequest
{}
*
x
=
UpdateResourceRequest
{}
if
protoimpl
.
UnsafeEnabled
{
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
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -550,7 +456,7 @@ func (x *UpdateResourceRequest) String() string {
...
@@ -550,7 +456,7 @@ func (x *UpdateResourceRequest) String() string {
func
(
*
UpdateResourceRequest
)
ProtoMessage
()
{}
func
(
*
UpdateResourceRequest
)
ProtoMessage
()
{}
func
(
x
*
UpdateResourceRequest
)
ProtoReflect
()
protoreflect
.
Message
{
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
{
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -563,7 +469,7 @@ func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message {
...
@@ -563,7 +469,7 @@ func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead.
// Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead.
func
(
*
UpdateResourceRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
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
{
func
(
x
*
UpdateResourceRequest
)
GetResource
()
*
Resource
{
...
@@ -594,7 +500,7 @@ type DeleteResourceRequest struct {
...
@@ -594,7 +500,7 @@ type DeleteResourceRequest struct {
func
(
x
*
DeleteResourceRequest
)
Reset
()
{
func
(
x
*
DeleteResourceRequest
)
Reset
()
{
*
x
=
DeleteResourceRequest
{}
*
x
=
DeleteResourceRequest
{}
if
protoimpl
.
UnsafeEnabled
{
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
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -607,7 +513,7 @@ func (x *DeleteResourceRequest) String() string {
...
@@ -607,7 +513,7 @@ func (x *DeleteResourceRequest) String() string {
func
(
*
DeleteResourceRequest
)
ProtoMessage
()
{}
func
(
*
DeleteResourceRequest
)
ProtoMessage
()
{}
func
(
x
*
DeleteResourceRequest
)
ProtoReflect
()
protoreflect
.
Message
{
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
{
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -620,7 +526,7 @@ func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
...
@@ -620,7 +526,7 @@ func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteResourceRequest.ProtoReflect.Descriptor instead.
// Deprecated: Use DeleteResourceRequest.ProtoReflect.Descriptor instead.
func
(
*
DeleteResourceRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
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
{
func
(
x
*
DeleteResourceRequest
)
GetName
()
string
{
...
@@ -678,114 +584,98 @@ var file_api_v1_resource_service_proto_rawDesc = []byte{
...
@@ -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
,
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
,
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
,
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
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x22
,
0x28
,
0x0a
,
0x12
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x16
,
0x0a
,
0x06
,
0x66
,
0x69
,
0x6c
,
0x74
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x22
,
0x06
,
0x66
,
0x69
,
0x6c
,
0x74
,
0x65
,
0x72
,
0x22
,
0x4f
,
0x0a
,
0x17
,
0x53
,
0x65
,
0x61
,
0x72
,
0x63
,
0x2b
,
0x0a
,
0x17
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x42
,
0x79
,
0x68
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x52
,
0x65
,
0x73
,
0x70
,
0x6f
,
0x6e
,
0x55
,
0x69
,
0x64
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x10
,
0x0a
,
0x03
,
0x75
,
0x69
,
0x73
,
0x65
,
0x12
,
0x34
,
0x0a
,
0x09
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x18
,
0x64
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x03
,
0x75
,
0x69
,
0x64
,
0x22
,
0x4a
,
0x0a
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x42
,
0x69
,
0x6e
,
0x61
,
0x72
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x09
,
0x72
,
0x79
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x22
,
0x28
,
0x0a
,
0x12
,
0x47
,
0x65
,
0x74
,
0x52
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x12
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x22
,
0x88
,
0x01
,
0x0a
,
0x15
,
0x55
,
0x70
,
0x64
,
0x6d
,
0x65
,
0x22
,
0x2b
,
0x0a
,
0x17
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x65
,
0x42
,
0x79
,
0x55
,
0x69
,
0x64
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x10
,
0x0a
,
0x73
,
0x74
,
0x12
,
0x32
,
0x0a
,
0x08
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x18
,
0x01
,
0x03
,
0x75
,
0x69
,
0x64
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x03
,
0x75
,
0x69
,
0x64
,
0x22
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x4a
,
0x0a
,
0x18
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x42
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x08
,
0x72
,
0x65
,
0x6e
,
0x61
,
0x72
,
0x79
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x3b
,
0x0a
,
0x0b
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x1a
,
0x2e
,
0x67
,
0x6f
,
0x1a
,
0x0a
,
0x08
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2e
,
0x46
,
0x69
,
0x09
,
0x52
,
0x08
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x22
,
0x88
,
0x01
,
0x0a
,
0x15
,
0x65
,
0x6c
,
0x64
,
0x4d
,
0x61
,
0x73
,
0x6b
,
0x52
,
0x0a
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x4d
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x61
,
0x73
,
0x6b
,
0x22
,
0x2b
,
0x0a
,
0x15
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x32
,
0x0a
,
0x08
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x32
,
0x98
,
0x07
,
0x0a
,
0x0f
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x53
,
0x65
,
0x72
,
0x08
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x3b
,
0x0a
,
0x0b
,
0x75
,
0x70
,
0x64
,
0x76
,
0x69
,
0x63
,
0x65
,
0x12
,
0x72
,
0x0a
,
0x0e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x1a
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x2e
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x2e
,
0x46
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x4d
,
0x61
,
0x73
,
0x6b
,
0x52
,
0x0a
,
0x75
,
0x70
,
0x64
,
0x61
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x74
,
0x65
,
0x4d
,
0x61
,
0x73
,
0x6b
,
0x22
,
0x2b
,
0x0a
,
0x15
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x72
,
0x63
,
0x65
,
0x22
,
0x23
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1d
,
0x3a
,
0x08
,
0x72
,
0x65
,
0x73
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x11
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x72
,
0x61
,
0x6d
,
0x65
,
0x32
,
0x9b
,
0x08
,
0x0a
,
0x0f
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x12
,
0x73
,
0x0a
,
0x0d
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x12
,
0x72
,
0x0a
,
0x0e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x12
,
0x22
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
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
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x52
,
0x65
,
0x73
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x52
,
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
,
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
,
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
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x29
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x11
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1c
,
0x12
,
0x1a
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x31
,
0x2f
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x12
,
0x73
,
0x0a
,
0x0d
,
0x4c
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x69
,
0x73
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x12
,
0x22
,
0x2e
,
0x6d
,
0x7d
,
0x12
,
0x7f
,
0x0a
,
0x10
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x42
,
0x79
,
0x55
,
0x69
,
0x64
,
0x12
,
0x25
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x1a
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x42
,
0x79
,
0x55
,
0x69
,
0x64
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x6d
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x52
,
0x65
,
0x73
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x70
,
0x6f
,
0x6e
,
0x73
,
0x65
,
0x22
,
0x19
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x13
,
0x12
,
0x11
,
0x2f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x2c
,
0xda
,
0x41
,
0x03
,
0x75
,
0x69
,
0x64
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x02
,
0x20
,
0x12
,
0x1e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x12
,
0x80
,
0x01
,
0x0a
,
0x0f
,
0x53
,
0x65
,
0x61
,
0x72
,
0x63
,
0x68
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x3a
,
0x62
,
0x79
,
0x2d
,
0x75
,
0x69
,
0x64
,
0x2f
,
0x7b
,
0x75
,
0x69
,
0x72
,
0x63
,
0x65
,
0x73
,
0x12
,
0x24
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x64
,
0x7d
,
0x12
,
0x8e
,
0x01
,
0x0a
,
0x11
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x53
,
0x65
,
0x61
,
0x72
,
0x63
,
0x68
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x42
,
0x69
,
0x6e
,
0x61
,
0x72
,
0x79
,
0x12
,
0x26
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x63
,
0x65
,
0x73
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x25
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x53
,
0x65
,
0x61
,
0x72
,
0x63
,
0x68
,
0x72
,
0x63
,
0x65
,
0x42
,
0x69
,
0x6e
,
0x61
,
0x72
,
0x79
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x52
,
0x65
,
0x73
,
0x70
,
0x6f
,
0x6e
,
0x73
,
0x1a
,
0x14
,
0x2e
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x48
,
0x74
,
0x65
,
0x22
,
0x20
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1a
,
0x12
,
0x18
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x74
,
0x70
,
0x42
,
0x6f
,
0x64
,
0x79
,
0x22
,
0x3b
,
0xda
,
0x41
,
0x0d
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x2c
,
0x76
,
0x31
,
0x2f
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x3a
,
0x73
,
0x65
,
0x61
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x25
,
0x12
,
0x23
,
0x72
,
0x63
,
0x68
,
0x12
,
0x72
,
0x0a
,
0x0b
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x2f
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x63
,
0x65
,
0x12
,
0x20
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x7b
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x6e
,
0x61
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x6d
,
0x65
,
0x7d
,
0x12
,
0x9b
,
0x01
,
0x0a
,
0x0e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x29
,
0xda
,
0x41
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1c
,
0x12
,
0x1a
,
0x2f
,
0x61
,
0x70
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x7f
,
0x0a
,
0x10
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x72
,
0x63
,
0x65
,
0x22
,
0x4c
,
0xda
,
0x41
,
0x14
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x42
,
0x79
,
0x55
,
0x69
,
0x64
,
0x12
,
0x25
,
0x2e
,
0x6d
,
0x65
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x02
,
0x2f
,
0x3a
,
0x08
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x32
,
0x23
,
0x2f
,
0x61
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x42
,
0x79
,
0x55
,
0x69
,
0x64
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x2e
,
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
,
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
,
0x7d
,
0x12
,
0x78
,
0x0a
,
0x0e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x14
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x30
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2e
,
0x45
,
0x6d
,
0x70
,
0x74
,
0x79
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x61
,
0x70
,
0x69
,
0x76
,
0x31
,
0x22
,
0x29
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1c
,
0x2a
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x41
,
0x58
,
0xaa
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x41
,
0x1a
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x70
,
0x69
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x42
,
0xac
,
0x01
,
0x0a
,
0x10
,
0x69
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x18
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x42
,
0x14
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x02
,
0x0e
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x41
,
0x70
,
0x69
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x30
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
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
(
var
(
...
@@ -800,52 +690,47 @@ func file_api_v1_resource_service_proto_rawDescGZIP() []byte {
...
@@ -800,52 +690,47 @@ func file_api_v1_resource_service_proto_rawDescGZIP() []byte {
return
file_api_v1_resource_service_proto_rawDescData
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
{
var
file_api_v1_resource_service_proto_goTypes
=
[]
any
{
(
*
Resource
)(
nil
),
// 0: memos.api.v1.Resource
(
*
Resource
)(
nil
),
// 0: memos.api.v1.Resource
(
*
CreateResourceRequest
)(
nil
),
// 1: memos.api.v1.CreateResourceRequest
(
*
CreateResourceRequest
)(
nil
),
// 1: memos.api.v1.CreateResourceRequest
(
*
ListResourcesRequest
)(
nil
),
// 2: memos.api.v1.ListResourcesRequest
(
*
ListResourcesRequest
)(
nil
),
// 2: memos.api.v1.ListResourcesRequest
(
*
ListResourcesResponse
)(
nil
),
// 3: memos.api.v1.ListResourcesResponse
(
*
ListResourcesResponse
)(
nil
),
// 3: memos.api.v1.ListResourcesResponse
(
*
SearchResourcesRequest
)(
nil
),
// 4: memos.api.v1.SearchResourcesRequest
(
*
GetResourceRequest
)(
nil
),
// 4: memos.api.v1.GetResourceRequest
(
*
SearchResourcesResponse
)(
nil
),
// 5: memos.api.v1.SearchResourcesResponse
(
*
GetResourceByUidRequest
)(
nil
),
// 5: memos.api.v1.GetResourceByUidRequest
(
*
GetResourceRequest
)(
nil
),
// 6: memos.api.v1.GetResourceRequest
(
*
GetResourceBinaryRequest
)(
nil
),
// 6: memos.api.v1.GetResourceBinaryRequest
(
*
GetResourceByUidRequest
)(
nil
),
// 7: memos.api.v1.GetResourceByUidRequest
(
*
UpdateResourceRequest
)(
nil
),
// 7: memos.api.v1.UpdateResourceRequest
(
*
GetResourceBinaryRequest
)(
nil
),
// 8: memos.api.v1.GetResourceBinaryRequest
(
*
DeleteResourceRequest
)(
nil
),
// 8: memos.api.v1.DeleteResourceRequest
(
*
UpdateResourceRequest
)(
nil
),
// 9: memos.api.v1.UpdateResourceRequest
(
*
timestamppb
.
Timestamp
)(
nil
),
// 9: google.protobuf.Timestamp
(
*
DeleteResourceRequest
)(
nil
),
// 10: memos.api.v1.DeleteResourceRequest
(
*
fieldmaskpb
.
FieldMask
)(
nil
),
// 10: google.protobuf.FieldMask
(
*
timestamppb
.
Timestamp
)(
nil
),
// 11: google.protobuf.Timestamp
(
*
httpbody
.
HttpBody
)(
nil
),
// 11: google.api.HttpBody
(
*
fieldmaskpb
.
FieldMask
)(
nil
),
// 12: google.protobuf.FieldMask
(
*
emptypb
.
Empty
)(
nil
),
// 12: google.protobuf.Empty
(
*
httpbody
.
HttpBody
)(
nil
),
// 13: google.api.HttpBody
(
*
emptypb
.
Empty
)(
nil
),
// 14: google.protobuf.Empty
}
}
var
file_api_v1_resource_service_proto_depIdxs
=
[]
int32
{
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
,
// 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
,
// 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
,
// 3: memos.api.v1.UpdateResourceRequest.resource:type_name -> memos.api.v1.Resource
0
,
// 4: memos.api.v1.UpdateResourceRequest.resource:type_name -> memos.api.v1.Resource
10
,
// 4: memos.api.v1.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask
12
,
// 5: memos.api.v1.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask
1
,
// 5: memos.api.v1.ResourceService.CreateResource:input_type -> memos.api.v1.CreateResourceRequest
1
,
// 6: memos.api.v1.ResourceService.CreateResource:input_type -> memos.api.v1.CreateResourceRequest
2
,
// 6: memos.api.v1.ResourceService.ListResources:input_type -> memos.api.v1.ListResourcesRequest
2
,
// 7: memos.api.v1.ResourceService.ListResources:input_type -> memos.api.v1.ListResourcesRequest
4
,
// 7: memos.api.v1.ResourceService.GetResource:input_type -> memos.api.v1.GetResourceRequest
4
,
// 8: memos.api.v1.ResourceService.SearchResources:input_type -> memos.api.v1.SearchResourcesRequest
5
,
// 8: memos.api.v1.ResourceService.GetResourceByUid:input_type -> memos.api.v1.GetResourceByUidRequest
6
,
// 9: memos.api.v1.ResourceService.GetResource:input_type -> memos.api.v1.GetResourceRequest
6
,
// 9: memos.api.v1.ResourceService.GetResourceBinary:input_type -> memos.api.v1.GetResourceBinaryRequest
7
,
// 10: memos.api.v1.ResourceService.GetResourceByUid:input_type -> memos.api.v1.GetResourceByUidRequest
7
,
// 10: memos.api.v1.ResourceService.UpdateResource:input_type -> memos.api.v1.UpdateResourceRequest
8
,
// 11: memos.api.v1.ResourceService.GetResourceBinary:input_type -> memos.api.v1.GetResourceBinaryRequest
8
,
// 11: memos.api.v1.ResourceService.DeleteResource:input_type -> memos.api.v1.DeleteResourceRequest
9
,
// 12: memos.api.v1.ResourceService.UpdateResource:input_type -> memos.api.v1.UpdateResourceRequest
0
,
// 12: memos.api.v1.ResourceService.CreateResource:output_type -> memos.api.v1.Resource
10
,
// 13: memos.api.v1.ResourceService.DeleteResource:input_type -> memos.api.v1.DeleteResourceRequest
3
,
// 13: memos.api.v1.ResourceService.ListResources:output_type -> memos.api.v1.ListResourcesResponse
0
,
// 14: memos.api.v1.ResourceService.CreateResource:output_type -> memos.api.v1.Resource
0
,
// 14: memos.api.v1.ResourceService.GetResource:output_type -> memos.api.v1.Resource
3
,
// 15: memos.api.v1.ResourceService.ListResources:output_type -> memos.api.v1.ListResourcesResponse
0
,
// 15: memos.api.v1.ResourceService.GetResourceByUid:output_type -> memos.api.v1.Resource
5
,
// 16: memos.api.v1.ResourceService.SearchResources:output_type -> memos.api.v1.SearchResourcesResponse
11
,
// 16: memos.api.v1.ResourceService.GetResourceBinary:output_type -> google.api.HttpBody
0
,
// 17: memos.api.v1.ResourceService.GetResource:output_type -> memos.api.v1.Resource
0
,
// 17: memos.api.v1.ResourceService.UpdateResource:output_type -> memos.api.v1.Resource
0
,
// 18: memos.api.v1.ResourceService.GetResourceByUid:output_type -> memos.api.v1.Resource
12
,
// 18: memos.api.v1.ResourceService.DeleteResource:output_type -> google.protobuf.Empty
13
,
// 19: memos.api.v1.ResourceService.GetResourceBinary:output_type -> google.api.HttpBody
12
,
// [12:19] is the sub-list for method output_type
0
,
// 20: memos.api.v1.ResourceService.UpdateResource:output_type -> memos.api.v1.Resource
5
,
// [5:12] is the sub-list for method input_type
14
,
// 21: memos.api.v1.ResourceService.DeleteResource:output_type -> google.protobuf.Empty
5
,
// [5:5] is the sub-list for extension type_name
14
,
// [14:22] is the sub-list for method output_type
5
,
// [5:5] is the sub-list for extension extendee
6
,
// [6:14] is the sub-list for method input_type
0
,
// [0:5] is the sub-list for field type_name
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
}
}
func
init
()
{
file_api_v1_resource_service_proto_init
()
}
func
init
()
{
file_api_v1_resource_service_proto_init
()
}
...
@@ -903,30 +788,6 @@ func 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
{
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
{
switch
v
:=
v
.
(
*
GetResourceRequest
);
i
{
case
0
:
case
0
:
return
&
v
.
state
return
&
v
.
state
...
@@ -938,7 +799,7 @@ func file_api_v1_resource_service_proto_init() {
...
@@ -938,7 +799,7 @@ func file_api_v1_resource_service_proto_init() {
return
nil
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
{
switch
v
:=
v
.
(
*
GetResourceByUidRequest
);
i
{
case
0
:
case
0
:
return
&
v
.
state
return
&
v
.
state
...
@@ -950,7 +811,7 @@ func file_api_v1_resource_service_proto_init() {
...
@@ -950,7 +811,7 @@ func file_api_v1_resource_service_proto_init() {
return
nil
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
{
switch
v
:=
v
.
(
*
GetResourceBinaryRequest
);
i
{
case
0
:
case
0
:
return
&
v
.
state
return
&
v
.
state
...
@@ -962,7 +823,7 @@ func file_api_v1_resource_service_proto_init() {
...
@@ -962,7 +823,7 @@ func file_api_v1_resource_service_proto_init() {
return
nil
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
{
switch
v
:=
v
.
(
*
UpdateResourceRequest
);
i
{
case
0
:
case
0
:
return
&
v
.
state
return
&
v
.
state
...
@@ -974,7 +835,7 @@ func file_api_v1_resource_service_proto_init() {
...
@@ -974,7 +835,7 @@ func file_api_v1_resource_service_proto_init() {
return
nil
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
{
switch
v
:=
v
.
(
*
DeleteResourceRequest
);
i
{
case
0
:
case
0
:
return
&
v
.
state
return
&
v
.
state
...
@@ -994,7 +855,7 @@ func file_api_v1_resource_service_proto_init() {
...
@@ -994,7 +855,7 @@ func file_api_v1_resource_service_proto_init() {
GoPackagePath
:
reflect
.
TypeOf
(
x
{})
.
PkgPath
(),
GoPackagePath
:
reflect
.
TypeOf
(
x
{})
.
PkgPath
(),
RawDescriptor
:
file_api_v1_resource_service_proto_rawDesc
,
RawDescriptor
:
file_api_v1_resource_service_proto_rawDesc
,
NumEnums
:
0
,
NumEnums
:
0
,
NumMessages
:
11
,
NumMessages
:
9
,
NumExtensions
:
0
,
NumExtensions
:
0
,
NumServices
:
1
,
NumServices
:
1
,
},
},
...
...
proto/gen/api/v1/resource_service.pb.gw.go
View file @
44e56844
...
@@ -75,42 +75,6 @@ func local_request_ResourceService_ListResources_0(ctx context.Context, marshale
...
@@ -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
)
{
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
protoReq
GetResourceRequest
var
metadata
runtime
.
ServerMetadata
var
metadata
runtime
.
ServerMetadata
...
@@ -495,31 +459,6 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
...
@@ -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
)
{
mux
.
Handle
(
"GET"
,
pattern_ResourceService_GetResource_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
defer
cancel
()
...
@@ -730,28 +669,6 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
...
@@ -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
)
{
mux
.
Handle
(
"GET"
,
pattern_ResourceService_GetResource_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
defer
cancel
()
...
@@ -870,8 +787,6 @@ var (
...
@@ -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_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_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"
},
""
))
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 (
...
@@ -888,8 +803,6 @@ var (
forward_ResourceService_ListResources_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_ListResources_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_SearchResources_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_GetResource_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_GetResource_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_GetResourceByUid_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_GetResourceByUid_0
=
runtime
.
ForwardResponseMessage
...
...
proto/gen/api/v1/resource_service_grpc.pb.go
View file @
44e56844
...
@@ -23,7 +23,6 @@ const _ = grpc.SupportPackageIsVersion8
...
@@ -23,7 +23,6 @@ const _ = grpc.SupportPackageIsVersion8
const
(
const
(
ResourceService_CreateResource_FullMethodName
=
"/memos.api.v1.ResourceService/CreateResource"
ResourceService_CreateResource_FullMethodName
=
"/memos.api.v1.ResourceService/CreateResource"
ResourceService_ListResources_FullMethodName
=
"/memos.api.v1.ResourceService/ListResources"
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_GetResource_FullMethodName
=
"/memos.api.v1.ResourceService/GetResource"
ResourceService_GetResourceByUid_FullMethodName
=
"/memos.api.v1.ResourceService/GetResourceByUid"
ResourceService_GetResourceByUid_FullMethodName
=
"/memos.api.v1.ResourceService/GetResourceByUid"
ResourceService_GetResourceBinary_FullMethodName
=
"/memos.api.v1.ResourceService/GetResourceBinary"
ResourceService_GetResourceBinary_FullMethodName
=
"/memos.api.v1.ResourceService/GetResourceBinary"
...
@@ -39,8 +38,6 @@ type ResourceServiceClient interface {
...
@@ -39,8 +38,6 @@ type ResourceServiceClient interface {
CreateResource
(
ctx
context
.
Context
,
in
*
CreateResourceRequest
,
opts
...
grpc
.
CallOption
)
(
*
Resource
,
error
)
CreateResource
(
ctx
context
.
Context
,
in
*
CreateResourceRequest
,
opts
...
grpc
.
CallOption
)
(
*
Resource
,
error
)
// ListResources lists all resources.
// ListResources lists all resources.
ListResources
(
ctx
context
.
Context
,
in
*
ListResourcesRequest
,
opts
...
grpc
.
CallOption
)
(
*
ListResourcesResponse
,
error
)
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 returns a resource by name.
GetResource
(
ctx
context
.
Context
,
in
*
GetResourceRequest
,
opts
...
grpc
.
CallOption
)
(
*
Resource
,
error
)
GetResource
(
ctx
context
.
Context
,
in
*
GetResourceRequest
,
opts
...
grpc
.
CallOption
)
(
*
Resource
,
error
)
// GetResourceByUid returns a resource by uid.
// GetResourceByUid returns a resource by uid.
...
@@ -81,16 +78,6 @@ func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResou
...
@@ -81,16 +78,6 @@ func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResou
return
out
,
nil
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
)
{
func
(
c
*
resourceServiceClient
)
GetResource
(
ctx
context
.
Context
,
in
*
GetResourceRequest
,
opts
...
grpc
.
CallOption
)
(
*
Resource
,
error
)
{
cOpts
:=
append
([]
grpc
.
CallOption
{
grpc
.
StaticMethod
()},
opts
...
)
cOpts
:=
append
([]
grpc
.
CallOption
{
grpc
.
StaticMethod
()},
opts
...
)
out
:=
new
(
Resource
)
out
:=
new
(
Resource
)
...
@@ -149,8 +136,6 @@ type ResourceServiceServer interface {
...
@@ -149,8 +136,6 @@ type ResourceServiceServer interface {
CreateResource
(
context
.
Context
,
*
CreateResourceRequest
)
(
*
Resource
,
error
)
CreateResource
(
context
.
Context
,
*
CreateResourceRequest
)
(
*
Resource
,
error
)
// ListResources lists all resources.
// ListResources lists all resources.
ListResources
(
context
.
Context
,
*
ListResourcesRequest
)
(
*
ListResourcesResponse
,
error
)
ListResources
(
context
.
Context
,
*
ListResourcesRequest
)
(
*
ListResourcesResponse
,
error
)
// SearchResources searches memos.
SearchResources
(
context
.
Context
,
*
SearchResourcesRequest
)
(
*
SearchResourcesResponse
,
error
)
// GetResource returns a resource by name.
// GetResource returns a resource by name.
GetResource
(
context
.
Context
,
*
GetResourceRequest
)
(
*
Resource
,
error
)
GetResource
(
context
.
Context
,
*
GetResourceRequest
)
(
*
Resource
,
error
)
// GetResourceByUid returns a resource by uid.
// GetResourceByUid returns a resource by uid.
...
@@ -174,9 +159,6 @@ func (UnimplementedResourceServiceServer) CreateResource(context.Context, *Creat
...
@@ -174,9 +159,6 @@ func (UnimplementedResourceServiceServer) CreateResource(context.Context, *Creat
func
(
UnimplementedResourceServiceServer
)
ListResources
(
context
.
Context
,
*
ListResourcesRequest
)
(
*
ListResourcesResponse
,
error
)
{
func
(
UnimplementedResourceServiceServer
)
ListResources
(
context
.
Context
,
*
ListResourcesRequest
)
(
*
ListResourcesResponse
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method ListResources not implemented"
)
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
)
{
func
(
UnimplementedResourceServiceServer
)
GetResource
(
context
.
Context
,
*
GetResourceRequest
)
(
*
Resource
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method GetResource not implemented"
)
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method GetResource not implemented"
)
}
}
...
@@ -241,24 +223,6 @@ func _ResourceService_ListResources_Handler(srv interface{}, ctx context.Context
...
@@ -241,24 +223,6 @@ func _ResourceService_ListResources_Handler(srv interface{}, ctx context.Context
return
interceptor
(
ctx
,
in
,
info
,
handler
)
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
)
{
func
_ResourceService_GetResource_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
GetResourceRequest
)
in
:=
new
(
GetResourceRequest
)
if
err
:=
dec
(
in
);
err
!=
nil
{
if
err
:=
dec
(
in
);
err
!=
nil
{
...
@@ -364,10 +328,6 @@ var ResourceService_ServiceDesc = grpc.ServiceDesc{
...
@@ -364,10 +328,6 @@ var ResourceService_ServiceDesc = grpc.ServiceDesc{
MethodName
:
"ListResources"
,
MethodName
:
"ListResources"
,
Handler
:
_ResourceService_ListResources_Handler
,
Handler
:
_ResourceService_ListResources_Handler
,
},
},
{
MethodName
:
"SearchResources"
,
Handler
:
_ResourceService_SearchResources_Handler
,
},
{
{
MethodName
:
"GetResource"
,
MethodName
:
"GetResource"
,
Handler
:
_ResourceService_GetResource_Handler
,
Handler
:
_ResourceService_GetResource_Handler
,
...
...
server/router/api/v1/memo_service.go
View file @
44e56844
...
@@ -141,38 +141,6 @@ func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosReq
...
@@ -141,38 +141,6 @@ func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosReq
return
response
,
nil
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
)
{
func
(
s
*
APIV1Service
)
GetMemo
(
ctx
context
.
Context
,
request
*
v1pb
.
GetMemoRequest
)
(
*
v1pb
.
Memo
,
error
)
{
id
,
err
:=
ExtractMemoIDFromName
(
request
.
Name
)
id
,
err
:=
ExtractMemoIDFromName
(
request
.
Name
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -950,7 +918,7 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store.
...
@@ -950,7 +918,7 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store.
find
.
PayloadFind
=
&
store
.
FindMemoPayload
{}
find
.
PayloadFind
=
&
store
.
FindMemoPayload
{}
}
}
if
filter
!=
""
{
if
filter
!=
""
{
filter
,
err
:=
parse
SearchMemos
Filter
(
filter
)
filter
,
err
:=
parse
Memo
Filter
(
filter
)
if
err
!=
nil
{
if
err
!=
nil
{
return
status
.
Errorf
(
codes
.
InvalidArgument
,
"invalid filter: %v"
,
err
)
return
status
.
Errorf
(
codes
.
InvalidArgument
,
"invalid filter: %v"
,
err
)
}
}
...
@@ -1067,8 +1035,8 @@ func (s *APIV1Service) getContentLengthLimit(ctx context.Context) (int, error) {
...
@@ -1067,8 +1035,8 @@ func (s *APIV1Service) getContentLengthLimit(ctx context.Context) (int, error) {
return
int
(
workspaceMemoRelatedSetting
.
ContentLengthLimit
),
nil
return
int
(
workspaceMemoRelatedSetting
.
ContentLengthLimit
),
nil
}
}
//
SearchMemos
FilterCELAttributes are the CEL attributes.
//
Memo
FilterCELAttributes are the CEL attributes.
var
SearchMemos
FilterCELAttributes
=
[]
cel
.
EnvOption
{
var
Memo
FilterCELAttributes
=
[]
cel
.
EnvOption
{
cel
.
Variable
(
"content_search"
,
cel
.
ListType
(
cel
.
StringType
)),
cel
.
Variable
(
"content_search"
,
cel
.
ListType
(
cel
.
StringType
)),
cel
.
Variable
(
"visibilities"
,
cel
.
ListType
(
cel
.
StringType
)),
cel
.
Variable
(
"visibilities"
,
cel
.
ListType
(
cel
.
StringType
)),
cel
.
Variable
(
"tag"
,
cel
.
StringType
),
cel
.
Variable
(
"tag"
,
cel
.
StringType
),
...
@@ -1087,7 +1055,7 @@ var SearchMemosFilterCELAttributes = []cel.EnvOption{
...
@@ -1087,7 +1055,7 @@ var SearchMemosFilterCELAttributes = []cel.EnvOption{
cel
.
Variable
(
"has_incomplete_tasks"
,
cel
.
BoolType
),
cel
.
Variable
(
"has_incomplete_tasks"
,
cel
.
BoolType
),
}
}
type
SearchMemos
Filter
struct
{
type
Memo
Filter
struct
{
ContentSearch
[]
string
ContentSearch
[]
string
Visibilities
[]
store
.
Visibility
Visibilities
[]
store
.
Visibility
Tag
*
string
Tag
*
string
...
@@ -1105,8 +1073,8 @@ type SearchMemosFilter struct {
...
@@ -1105,8 +1073,8 @@ type SearchMemosFilter struct {
HasIncompleteTasks
bool
HasIncompleteTasks
bool
}
}
func
parse
SearchMemosFilter
(
expression
string
)
(
*
SearchMemos
Filter
,
error
)
{
func
parse
MemoFilter
(
expression
string
)
(
*
Memo
Filter
,
error
)
{
e
,
err
:=
cel
.
NewEnv
(
SearchMemos
FilterCELAttributes
...
)
e
,
err
:=
cel
.
NewEnv
(
Memo
FilterCELAttributes
...
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -1114,17 +1082,17 @@ func parseSearchMemosFilter(expression string) (*SearchMemosFilter, error) {
...
@@ -1114,17 +1082,17 @@ func parseSearchMemosFilter(expression string) (*SearchMemosFilter, error) {
if
issues
!=
nil
{
if
issues
!=
nil
{
return
nil
,
errors
.
Errorf
(
"found issue %v"
,
issues
)
return
nil
,
errors
.
Errorf
(
"found issue %v"
,
issues
)
}
}
filter
:=
&
SearchMemos
Filter
{}
filter
:=
&
Memo
Filter
{}
expr
,
err
:=
cel
.
AstToParsedExpr
(
ast
)
expr
,
err
:=
cel
.
AstToParsedExpr
(
ast
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
callExpr
:=
expr
.
GetExpr
()
.
GetCallExpr
()
callExpr
:=
expr
.
GetExpr
()
.
GetCallExpr
()
find
SearchMemos
Field
(
callExpr
,
filter
)
find
Memo
Field
(
callExpr
,
filter
)
return
filter
,
nil
return
filter
,
nil
}
}
func
find
SearchMemosField
(
callExpr
*
expr
.
Expr_Call
,
filter
*
SearchMemos
Filter
)
{
func
find
MemoField
(
callExpr
*
expr
.
Expr_Call
,
filter
*
Memo
Filter
)
{
if
len
(
callExpr
.
Args
)
==
2
{
if
len
(
callExpr
.
Args
)
==
2
{
idExpr
:=
callExpr
.
Args
[
0
]
.
GetIdentExpr
()
idExpr
:=
callExpr
.
Args
[
0
]
.
GetIdentExpr
()
if
idExpr
!=
nil
{
if
idExpr
!=
nil
{
...
@@ -1188,7 +1156,7 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) {
...
@@ -1188,7 +1156,7 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) {
for
_
,
arg
:=
range
callExpr
.
Args
{
for
_
,
arg
:=
range
callExpr
.
Args
{
callExpr
:=
arg
.
GetCallExpr
()
callExpr
:=
arg
.
GetCallExpr
()
if
callExpr
!=
nil
{
if
callExpr
!=
nil
{
find
SearchMemos
Field
(
callExpr
,
filter
)
find
Memo
Field
(
callExpr
,
filter
)
}
}
}
}
}
}
...
...
server/router/api/v1/resource_service.go
View file @
44e56844
...
@@ -12,10 +12,8 @@ import (
...
@@ -12,10 +12,8 @@ import (
"strings"
"strings"
"time"
"time"
"github.com/google/cel-go/cel"
"github.com/lithammer/shortuuid/v4"
"github.com/lithammer/shortuuid/v4"
"github.com/pkg/errors"
"github.com/pkg/errors"
expr
"google.golang.org/genproto/googleapis/api/expr/v1alpha1"
"google.golang.org/genproto/googleapis/api/httpbody"
"google.golang.org/genproto/googleapis/api/httpbody"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/grpc/status"
...
@@ -102,35 +100,6 @@ func (s *APIV1Service) ListResources(ctx context.Context, _ *v1pb.ListResourcesR
...
@@ -102,35 +100,6 @@ func (s *APIV1Service) ListResources(ctx context.Context, _ *v1pb.ListResourcesR
return
response
,
nil
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
)
{
func
(
s
*
APIV1Service
)
GetResource
(
ctx
context
.
Context
,
request
*
v1pb
.
GetResourceRequest
)
(
*
v1pb
.
Resource
,
error
)
{
id
,
err
:=
ExtractResourceIDFromName
(
request
.
Name
)
id
,
err
:=
ExtractResourceIDFromName
(
request
.
Name
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -437,50 +406,3 @@ func replaceFilenameWithPathTemplate(path, filename string) string {
...
@@ -437,50 +406,3 @@ func replaceFilenameWithPathTemplate(path, filename string) string {
})
})
return
path
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
)
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment