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
144269fb
Commit
144269fb
authored
May 01, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix router
parent
590b6260
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
289 additions
and
289 deletions
+289
-289
.gitignore
.gitignore
+2
-0
apidocs.swagger.yaml
docs/apidocs.swagger.yaml
+12
-17
resource_service.proto
proto/api/v1/resource_service.proto
+5
-1
user_service.proto
proto/api/v1/user_service.proto
+1
-5
resource_service.pb.go
proto/gen/api/v1/resource_service.pb.go
+39
-38
resource_service.pb.gw.go
proto/gen/api/v1/resource_service.pb.gw.go
+128
-7
user_service.pb.go
proto/gen/api/v1/user_service.pb.go
+90
-91
user_service.pb.gw.go
proto/gen/api/v1/user_service.pb.gw.go
+3
-124
acl_config.go
server/router/api/v1/acl_config.go
+3
-2
v1.go
server/router/api/v1/v1.go
+2
-1
frontend.go
server/router/frontend/frontend.go
+1
-2
App.tsx
web/src/App.tsx
+3
-1
No files found.
.gitignore
View file @
144269fb
...
...
@@ -21,3 +21,5 @@ build
bin/air
dev-dist
dist
\ No newline at end of file
docs/apidocs.swagger.yaml
View file @
144269fb
...
...
@@ -1758,7 +1758,7 @@ paths:
/o/r/{uid}
:
get
:
summary
:
GetResourceBinary returns a resource binary by name.
operationId
:
ResourceService_GetResourceBinary
operationId
:
ResourceService_GetResourceBinary
2
responses
:
"
200"
:
description
:
A successful response.
...
...
@@ -1784,10 +1784,10 @@ paths:
type: string
tags
:
-
ResourceService
/o/{name}
/avatar
:
/o/{name}
:
get
:
summary
:
Get
UserAvatarBinary gets the avatar of a user
.
operationId
:
UserService_GetUserAvatarBinary2
summary
:
Get
ResourceBinary returns a resource binary by name
.
operationId
:
ResourceService_GetResourceBinary
responses
:
"
200"
:
description
:
A successful response.
...
...
@@ -1800,26 +1800,21 @@ paths:
parameters
:
-
name
:
name
description
:
|-
The name of the user.
Format: users/{id}
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
in: path
required: true
type: string
pattern: users/[^/]+
-
name
:
httpBody.contentType
description
:
The HTTP Content-Type header value specifying the content type of the body.
in
:
query
required
:
false
type
:
string
-
name
:
httpBody.data
description
:
The HTTP request/response body as raw binary.
pattern: resources/[^/]+
-
name
:
uid
description
:
The user defined id of the resource.
in
:
query
required
:
false
type
:
string
format
:
byte
tags
:
-
User
Service
/{name}/avatar
:
-
Resource
Service
/
o/
{name}/avatar
:
get
:
summary
:
GetUserAvatarBinary gets the avatar of a user.
operationId
:
UserService_GetUserAvatarBinary
...
...
proto/api/v1/resource_service.proto
View file @
144269fb
...
...
@@ -35,7 +35,11 @@ service ResourceService {
}
// GetResourceBinary returns a resource binary by name.
rpc
GetResourceBinary
(
GetResourceBinaryRequest
)
returns
(
google.api.HttpBody
)
{
option
(
google.api.http
)
=
{
get
:
"/o/r/{uid}"
};
option
(
google.api.http
)
=
{
get
:
"/o/{name=resources/*}"
additional_bindings
{
get
:
"/o/r/{uid}"
}
};
option
(
google.api.method_signature
)
=
"name,uid"
;
}
// UpdateResource updates a resource.
...
...
proto/api/v1/user_service.proto
View file @
144269fb
...
...
@@ -29,11 +29,7 @@ service UserService {
}
// GetUserAvatarBinary gets the avatar of a user.
rpc
GetUserAvatarBinary
(
GetUserAvatarBinaryRequest
)
returns
(
google.api.HttpBody
)
{
option
(
google.api.http
)
=
{
get
:
"/{name=users/*}/avatar"
additional_bindings
:
{
get
:
"/o/{name=users/*}/avatar"
}
};
option
(
google.api.http
)
=
{
get
:
"/o/{name=users/*}/avatar"
};
option
(
google.api.method_signature
)
=
"name"
;
}
// CreateUser creates a new user.
...
...
proto/gen/api/v1/resource_service.pb.go
View file @
144269fb
...
...
@@ -656,7 +656,7 @@ var file_api_v1_resource_service_proto_rawDesc = []byte{
0x61
,
0x73
,
0x6b
,
0x52
,
0x0a
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x4d
,
0x61
,
0x73
,
0x6b
,
0x22
,
0x2b
,
0x0a
,
0x15
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x32
,
0x
fb
,
0x06
,
0x0a
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x32
,
0x
95
,
0x07
,
0x0a
,
0x0f
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x12
,
0x72
,
0x0a
,
0x0e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
...
...
@@ -688,43 +688,44 @@ var file_api_v1_resource_service_proto_rawDesc = []byte{
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x29
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1c
,
0x12
,
0x1a
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x70
,
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
,
0x1d
,
0xda
,
0x41
,
0x08
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x2c
,
0x75
,
0x69
,
0x64
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x0c
,
0x12
,
0x0a
,
0x2f
,
0x6f
,
0x2f
,
0x72
,
0x2f
,
0x7b
,
0x75
,
0x69
,
0x64
,
0x7d
,
0x12
,
0x9b
,
0x01
,
0x0a
,
0x0e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x4c
,
0xda
,
0x41
,
0x14
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x2f
,
0x3a
,
0x08
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x32
,
0x23
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x78
,
0x0a
,
0x0e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2e
,
0x45
,
0x6d
,
0x70
,
0x74
,
0x79
,
0x22
,
0x29
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1c
,
0x2a
,
0x1a
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x42
,
0xac
,
0x01
,
0x0a
,
0x10
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x14
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x30
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x61
,
0x70
,
0x69
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x41
,
0x58
,
0xaa
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x41
,
0x70
,
0x69
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x18
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0e
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x41
,
0x70
,
0x69
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x12
,
0x89
,
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
,
0x36
,
0xda
,
0x41
,
0x08
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x2c
,
0x75
,
0x69
,
0x64
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x25
,
0x5a
,
0x0c
,
0x12
,
0x0a
,
0x2f
,
0x6f
,
0x2f
,
0x72
,
0x2f
,
0x7b
,
0x75
,
0x69
,
0x64
,
0x7d
,
0x12
,
0x15
,
0x2f
,
0x6f
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x9b
,
0x01
,
0x0a
,
0x0e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x22
,
0x4c
,
0xda
,
0x41
,
0x14
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x2f
,
0x3a
,
0x08
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x32
,
0x23
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x78
,
0x0a
,
0x0e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x16
,
0x2e
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2e
,
0x45
,
0x6d
,
0x70
,
0x74
,
0x79
,
0x22
,
0x29
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1c
,
0x2a
,
0x1a
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x72
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x42
,
0xac
,
0x01
,
0x0a
,
0x10
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x14
,
0x52
,
0x65
,
0x73
,
0x6f
,
0x75
,
0x72
,
0x63
,
0x65
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x30
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x61
,
0x70
,
0x69
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x41
,
0x58
,
0xaa
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x41
,
0x70
,
0x69
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x18
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0e
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x41
,
0x70
,
0x69
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
proto/gen/api/v1/resource_service.pb.gw.go
View file @
144269fb
...
...
@@ -164,7 +164,7 @@ func local_request_ResourceService_GetResource_0(ctx context.Context, marshaler
}
var
(
filter_ResourceService_GetResourceBinary_0
=
&
utilities
.
DoubleArray
{
Encoding
:
map
[
string
]
int
{
"
uid
"
:
0
},
Base
:
[]
int
{
1
,
1
,
0
},
Check
:
[]
int
{
0
,
1
,
2
}}
filter_ResourceService_GetResourceBinary_0
=
&
utilities
.
DoubleArray
{
Encoding
:
map
[
string
]
int
{
"
name
"
:
0
},
Base
:
[]
int
{
1
,
1
,
0
},
Check
:
[]
int
{
0
,
1
,
2
}}
)
func
request_ResourceService_GetResourceBinary_0
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
client
ResourceServiceClient
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
...
...
@@ -178,6 +178,76 @@ func request_ResourceService_GetResourceBinary_0(ctx context.Context, marshaler
_
=
err
)
val
,
ok
=
pathParams
[
"name"
]
if
!
ok
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"missing parameter %s"
,
"name"
)
}
protoReq
.
Name
,
err
=
runtime
.
String
(
val
)
if
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"type mismatch, parameter: %s, error: %v"
,
"name"
,
err
)
}
if
err
:=
req
.
ParseForm
();
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_ResourceService_GetResourceBinary_0
);
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
msg
,
err
:=
client
.
GetResourceBinary
(
ctx
,
&
protoReq
,
grpc
.
Header
(
&
metadata
.
HeaderMD
),
grpc
.
Trailer
(
&
metadata
.
TrailerMD
))
return
msg
,
metadata
,
err
}
func
local_request_ResourceService_GetResourceBinary_0
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
server
ResourceServiceServer
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
var
protoReq
GetResourceBinaryRequest
var
metadata
runtime
.
ServerMetadata
var
(
val
string
ok
bool
err
error
_
=
err
)
val
,
ok
=
pathParams
[
"name"
]
if
!
ok
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"missing parameter %s"
,
"name"
)
}
protoReq
.
Name
,
err
=
runtime
.
String
(
val
)
if
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"type mismatch, parameter: %s, error: %v"
,
"name"
,
err
)
}
if
err
:=
req
.
ParseForm
();
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_ResourceService_GetResourceBinary_0
);
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
msg
,
err
:=
server
.
GetResourceBinary
(
ctx
,
&
protoReq
)
return
msg
,
metadata
,
err
}
var
(
filter_ResourceService_GetResourceBinary_1
=
&
utilities
.
DoubleArray
{
Encoding
:
map
[
string
]
int
{
"uid"
:
0
},
Base
:
[]
int
{
1
,
1
,
0
},
Check
:
[]
int
{
0
,
1
,
2
}}
)
func
request_ResourceService_GetResourceBinary_1
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
client
ResourceServiceClient
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
var
protoReq
GetResourceBinaryRequest
var
metadata
runtime
.
ServerMetadata
var
(
val
string
ok
bool
err
error
_
=
err
)
val
,
ok
=
pathParams
[
"uid"
]
if
!
ok
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"missing parameter %s"
,
"uid"
)
...
...
@@ -191,7 +261,7 @@ func request_ResourceService_GetResourceBinary_0(ctx context.Context, marshaler
if
err
:=
req
.
ParseForm
();
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_ResourceService_GetResourceBinary_
0
);
err
!=
nil
{
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_ResourceService_GetResourceBinary_
1
);
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
...
...
@@ -200,7 +270,7 @@ func request_ResourceService_GetResourceBinary_0(ctx context.Context, marshaler
}
func
local_request_ResourceService_GetResourceBinary_
0
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
server
ResourceServiceServer
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
func
local_request_ResourceService_GetResourceBinary_
1
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
server
ResourceServiceServer
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
var
protoReq
GetResourceBinaryRequest
var
metadata
runtime
.
ServerMetadata
...
...
@@ -224,7 +294,7 @@ func local_request_ResourceService_GetResourceBinary_0(ctx context.Context, mars
if
err
:=
req
.
ParseForm
();
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_ResourceService_GetResourceBinary_
0
);
err
!=
nil
{
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_ResourceService_GetResourceBinary_
1
);
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
...
...
@@ -499,7 +569,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
inboundMarshaler
,
outboundMarshaler
:=
runtime
.
MarshalerForRequest
(
mux
,
req
)
var
err
error
var
annotatedContext
context
.
Context
annotatedContext
,
err
=
runtime
.
AnnotateIncomingContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.ResourceService/GetResourceBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/
r/{uid
}"
))
annotatedContext
,
err
=
runtime
.
AnnotateIncomingContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.ResourceService/GetResourceBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/
{name=resources/*
}"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
...
...
@@ -516,6 +586,31 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
})
mux
.
Handle
(
"GET"
,
pattern_ResourceService_GetResourceBinary_1
,
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/GetResourceBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/r/{uid}"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
}
resp
,
md
,
err
:=
local_request_ResourceService_GetResourceBinary_1
(
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_GetResourceBinary_1
(
annotatedContext
,
mux
,
outboundMarshaler
,
w
,
req
,
resp
,
mux
.
GetForwardResponseOptions
()
...
)
})
mux
.
Handle
(
"PATCH"
,
pattern_ResourceService_UpdateResource_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
...
...
@@ -701,7 +796,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
inboundMarshaler
,
outboundMarshaler
:=
runtime
.
MarshalerForRequest
(
mux
,
req
)
var
err
error
var
annotatedContext
context
.
Context
annotatedContext
,
err
=
runtime
.
AnnotateContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.ResourceService/GetResourceBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/
r/{uid
}"
))
annotatedContext
,
err
=
runtime
.
AnnotateContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.ResourceService/GetResourceBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/
{name=resources/*
}"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
...
...
@@ -717,6 +812,28 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
})
mux
.
Handle
(
"GET"
,
pattern_ResourceService_GetResourceBinary_1
,
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/GetResourceBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/r/{uid}"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
}
resp
,
md
,
err
:=
request_ResourceService_GetResourceBinary_1
(
annotatedContext
,
inboundMarshaler
,
client
,
req
,
pathParams
)
annotatedContext
=
runtime
.
NewServerMetadataContext
(
annotatedContext
,
md
)
if
err
!=
nil
{
runtime
.
HTTPError
(
annotatedContext
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
}
forward_ResourceService_GetResourceBinary_1
(
annotatedContext
,
mux
,
outboundMarshaler
,
w
,
req
,
resp
,
mux
.
GetForwardResponseOptions
()
...
)
})
mux
.
Handle
(
"PATCH"
,
pattern_ResourceService_UpdateResource_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
...
...
@@ -773,7 +890,9 @@ var (
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_GetResourceBinary_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
1
,
0
,
4
,
1
,
5
,
2
},
[]
string
{
"o"
,
"r"
,
"uid"
},
""
))
pattern_ResourceService_GetResourceBinary_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
1
,
0
,
4
,
2
,
5
,
2
},
[]
string
{
"o"
,
"resources"
,
"name"
},
""
))
pattern_ResourceService_GetResourceBinary_1
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
1
,
0
,
4
,
1
,
5
,
2
},
[]
string
{
"o"
,
"r"
,
"uid"
},
""
))
pattern_ResourceService_UpdateResource_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
2
,
2
,
1
,
0
,
4
,
2
,
5
,
3
},
[]
string
{
"api"
,
"v1"
,
"resources"
,
"resource.name"
},
""
))
...
...
@@ -791,6 +910,8 @@ var (
forward_ResourceService_GetResourceBinary_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_GetResourceBinary_1
=
runtime
.
ForwardResponseMessage
forward_ResourceService_UpdateResource_0
=
runtime
.
ForwardResponseMessage
forward_ResourceService_DeleteResource_0
=
runtime
.
ForwardResponseMessage
...
...
proto/gen/api/v1/user_service.pb.go
View file @
144269fb
...
...
@@ -1269,7 +1269,7 @@ var file_api_v1_user_service_proto_rawDesc = []byte{
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x21
,
0x0a
,
0x0c
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x32
,
0x
d3
,
0x0c
,
0x0a
,
0x0b
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x32
,
0x
b8
,
0x0c
,
0x0a
,
0x0b
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x12
,
0x63
,
0x0a
,
0x09
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x73
,
0x12
,
0x1e
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x73
,
0x52
,
0x65
,
0x71
,
0x75
,
...
...
@@ -1290,98 +1290,97 @@ var file_api_v1_user_service_proto_rawDesc = []byte{
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x22
,
0x25
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x18
,
0x12
,
0x16
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x98
,
0x01
,
0x0a
,
0x13
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
0x42
,
0x69
,
0x6e
,
0x61
,
0x72
,
0x79
,
0x12
,
0x28
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x7d
,
0x12
,
0x7e
,
0x0a
,
0x13
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
0x42
,
0x69
,
0x6e
,
0x61
,
0x72
,
0x79
,
0x12
,
0x28
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
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
,
0x27
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x1a
,
0x12
,
0x18
,
0x2f
,
0x6f
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
0x12
,
0x65
,
0x0a
,
0x0a
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x1f
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x12
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x22
,
0x22
,
0xda
,
0x41
,
0x04
,
0x75
,
0x73
,
0x65
,
0x72
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x15
,
0x3a
,
0x04
,
0x75
,
0x73
,
0x65
,
0x72
,
0x22
,
0x0d
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x12
,
0x7f
,
0x0a
,
0x0a
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x1f
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x12
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x22
,
0x3c
,
0xda
,
0x41
,
0x10
,
0x75
,
0x73
,
0x65
,
0x72
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x23
,
0x3a
,
0x04
,
0x75
,
0x73
,
0x65
,
0x72
,
0x32
,
0x1b
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x75
,
0x73
,
0x65
,
0x72
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x6c
,
0x0a
,
0x0a
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x1f
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
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
,
0x25
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x18
,
0x2a
,
0x16
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x7f
,
0x0a
,
0x0e
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
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
,
0x41
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x34
,
0x5a
,
0x1a
,
0x12
,
0x18
,
0x2f
,
0x6f
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
0x12
,
0x16
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x76
,
0x61
,
0x74
,
0x61
,
0x72
,
0x12
,
0x65
,
0x0a
,
0x0a
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x1f
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x12
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x22
,
0x22
,
0xda
,
0x41
,
0x04
,
0x75
,
0x73
,
0x65
,
0x72
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x15
,
0x3a
,
0x04
,
0x75
,
0x73
,
0x65
,
0x72
,
0x22
,
0x0d
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x12
,
0x7f
,
0x0a
,
0x0a
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x1f
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x12
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x22
,
0x3c
,
0xda
,
0x41
,
0x10
,
0x75
,
0x73
,
0x65
,
0x72
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x23
,
0x3a
,
0x04
,
0x75
,
0x73
,
0x65
,
0x72
,
0x32
,
0x1b
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x75
,
0x73
,
0x65
,
0x72
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x6c
,
0x0a
,
0x0a
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x1f
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
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
,
0x25
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x18
,
0x2a
,
0x16
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x12
,
0x7f
,
0x0a
,
0x0e
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x23
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x47
,
0x65
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x19
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x22
,
0x2d
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x20
,
0x12
,
0x1e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0xa5
,
0x01
,
0x0a
,
0x11
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x26
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x19
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x22
,
0x4d
,
0xda
,
0x41
,
0x13
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x31
,
0x3a
,
0x07
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x32
,
0x26
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x2f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x7d
,
0x12
,
0xa2
,
0x01
,
0x0a
,
0x14
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x12
,
0x29
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x19
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x22
,
0x2d
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x20
,
0x12
,
0x1e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0xa5
,
0x01
,
0x0a
,
0x11
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x26
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x19
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x22
,
0x4d
,
0xda
,
0x41
,
0x13
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x2c
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x31
,
0x3a
,
0x07
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x32
,
0x26
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x2e
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x2f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x7d
,
0x12
,
0xa2
,
0x01
,
0x0a
,
0x14
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x12
,
0x29
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x2a
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x2a
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x52
,
0x65
,
0x73
,
0x70
,
0x6f
,
0x6e
,
0x73
,
0x65
,
0x22
,
0x33
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x26
,
0x12
,
0x24
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x12
,
0x9a
,
0x01
,
0x0a
,
0x15
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x2a
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x1d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x22
,
0x36
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x29
,
0x3a
,
0x01
,
0x2a
,
0x22
,
0x24
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x12
,
0xac
,
0x01
,
0x0a
,
0x15
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x2a
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
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
,
0x4f
,
0xda
,
0x41
,
0x11
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x2c
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x35
,
0x2a
,
0x33
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x2f
,
0x7b
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x7d
,
0x42
,
0xa8
,
0x01
,
0x0a
,
0x10
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x10
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x30
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x61
,
0x70
,
0x69
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x41
,
0x58
,
0xaa
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x41
,
0x70
,
0x69
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x18
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0e
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x41
,
0x70
,
0x69
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x52
,
0x65
,
0x73
,
0x70
,
0x6f
,
0x6e
,
0x73
,
0x65
,
0x22
,
0x33
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x26
,
0x12
,
0x24
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x12
,
0x9a
,
0x01
,
0x0a
,
0x15
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x2a
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x52
,
0x65
,
0x71
,
0x75
,
0x65
,
0x73
,
0x74
,
0x1a
,
0x1d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x22
,
0x36
,
0xda
,
0x41
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x29
,
0x3a
,
0x01
,
0x2a
,
0x22
,
0x24
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x12
,
0xac
,
0x01
,
0x0a
,
0x15
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x2a
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x44
,
0x65
,
0x6c
,
0x65
,
0x74
,
0x65
,
0x55
,
0x73
,
0x65
,
0x72
,
0x41
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
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
,
0x4f
,
0xda
,
0x41
,
0x11
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x2c
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x35
,
0x2a
,
0x33
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x3d
,
0x75
,
0x73
,
0x65
,
0x72
,
0x73
,
0x2f
,
0x2a
,
0x7d
,
0x2f
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x73
,
0x2f
,
0x7b
,
0x61
,
0x63
,
0x63
,
0x65
,
0x73
,
0x73
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x7d
,
0x42
,
0xa8
,
0x01
,
0x0a
,
0x10
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x10
,
0x55
,
0x73
,
0x65
,
0x72
,
0x53
,
0x65
,
0x72
,
0x76
,
0x69
,
0x63
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x30
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x61
,
0x70
,
0x69
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x41
,
0x58
,
0xaa
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x41
,
0x70
,
0x69
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x18
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x41
,
0x70
,
0x69
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0e
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x41
,
0x70
,
0x69
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
proto/gen/api/v1/user_service.pb.gw.go
View file @
144269fb
...
...
@@ -207,76 +207,6 @@ func local_request_UserService_GetUserAvatarBinary_0(ctx context.Context, marsha
}
var
(
filter_UserService_GetUserAvatarBinary_1
=
&
utilities
.
DoubleArray
{
Encoding
:
map
[
string
]
int
{
"name"
:
0
},
Base
:
[]
int
{
1
,
1
,
0
},
Check
:
[]
int
{
0
,
1
,
2
}}
)
func
request_UserService_GetUserAvatarBinary_1
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
client
UserServiceClient
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
var
protoReq
GetUserAvatarBinaryRequest
var
metadata
runtime
.
ServerMetadata
var
(
val
string
ok
bool
err
error
_
=
err
)
val
,
ok
=
pathParams
[
"name"
]
if
!
ok
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"missing parameter %s"
,
"name"
)
}
protoReq
.
Name
,
err
=
runtime
.
String
(
val
)
if
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"type mismatch, parameter: %s, error: %v"
,
"name"
,
err
)
}
if
err
:=
req
.
ParseForm
();
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_UserService_GetUserAvatarBinary_1
);
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
msg
,
err
:=
client
.
GetUserAvatarBinary
(
ctx
,
&
protoReq
,
grpc
.
Header
(
&
metadata
.
HeaderMD
),
grpc
.
Trailer
(
&
metadata
.
TrailerMD
))
return
msg
,
metadata
,
err
}
func
local_request_UserService_GetUserAvatarBinary_1
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
server
UserServiceServer
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
var
protoReq
GetUserAvatarBinaryRequest
var
metadata
runtime
.
ServerMetadata
var
(
val
string
ok
bool
err
error
_
=
err
)
val
,
ok
=
pathParams
[
"name"
]
if
!
ok
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"missing parameter %s"
,
"name"
)
}
protoReq
.
Name
,
err
=
runtime
.
String
(
val
)
if
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"type mismatch, parameter: %s, error: %v"
,
"name"
,
err
)
}
if
err
:=
req
.
ParseForm
();
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
if
err
:=
runtime
.
PopulateQueryParameters
(
&
protoReq
,
req
.
Form
,
filter_UserService_GetUserAvatarBinary_1
);
err
!=
nil
{
return
nil
,
metadata
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"%v"
,
err
)
}
msg
,
err
:=
server
.
GetUserAvatarBinary
(
ctx
,
&
protoReq
)
return
msg
,
metadata
,
err
}
func
request_UserService_CreateUser_0
(
ctx
context
.
Context
,
marshaler
runtime
.
Marshaler
,
client
UserServiceClient
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
(
proto
.
Message
,
runtime
.
ServerMetadata
,
error
)
{
var
protoReq
CreateUserRequest
var
metadata
runtime
.
ServerMetadata
...
...
@@ -880,7 +810,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler
,
outboundMarshaler
:=
runtime
.
MarshalerForRequest
(
mux
,
req
)
var
err
error
var
annotatedContext
context
.
Context
annotatedContext
,
err
=
runtime
.
AnnotateIncomingContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.UserService/GetUserAvatarBinary"
,
runtime
.
WithHTTPPathPattern
(
"/{name=users/*}/avatar"
))
annotatedContext
,
err
=
runtime
.
AnnotateIncomingContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.UserService/GetUserAvatarBinary"
,
runtime
.
WithHTTPPathPattern
(
"/
o/
{name=users/*}/avatar"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
...
...
@@ -897,31 +827,6 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
})
mux
.
Handle
(
"GET"
,
pattern_UserService_GetUserAvatarBinary_1
,
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.UserService/GetUserAvatarBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/{name=users/*}/avatar"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
}
resp
,
md
,
err
:=
local_request_UserService_GetUserAvatarBinary_1
(
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_UserService_GetUserAvatarBinary_1
(
annotatedContext
,
mux
,
outboundMarshaler
,
w
,
req
,
resp
,
mux
.
GetForwardResponseOptions
()
...
)
})
mux
.
Handle
(
"POST"
,
pattern_UserService_CreateUser_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
...
...
@@ -1235,7 +1140,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler
,
outboundMarshaler
:=
runtime
.
MarshalerForRequest
(
mux
,
req
)
var
err
error
var
annotatedContext
context
.
Context
annotatedContext
,
err
=
runtime
.
AnnotateContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.UserService/GetUserAvatarBinary"
,
runtime
.
WithHTTPPathPattern
(
"/{name=users/*}/avatar"
))
annotatedContext
,
err
=
runtime
.
AnnotateContext
(
ctx
,
mux
,
req
,
"/memos.api.v1.UserService/GetUserAvatarBinary"
,
runtime
.
WithHTTPPathPattern
(
"/
o/
{name=users/*}/avatar"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
...
...
@@ -1251,28 +1156,6 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
})
mux
.
Handle
(
"GET"
,
pattern_UserService_GetUserAvatarBinary_1
,
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.UserService/GetUserAvatarBinary"
,
runtime
.
WithHTTPPathPattern
(
"/o/{name=users/*}/avatar"
))
if
err
!=
nil
{
runtime
.
HTTPError
(
ctx
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
}
resp
,
md
,
err
:=
request_UserService_GetUserAvatarBinary_1
(
annotatedContext
,
inboundMarshaler
,
client
,
req
,
pathParams
)
annotatedContext
=
runtime
.
NewServerMetadataContext
(
annotatedContext
,
md
)
if
err
!=
nil
{
runtime
.
HTTPError
(
annotatedContext
,
mux
,
outboundMarshaler
,
w
,
req
,
err
)
return
}
forward_UserService_GetUserAvatarBinary_1
(
annotatedContext
,
mux
,
outboundMarshaler
,
w
,
req
,
resp
,
mux
.
GetForwardResponseOptions
()
...
)
})
mux
.
Handle
(
"POST"
,
pattern_UserService_CreateUser_0
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
pathParams
map
[
string
]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
req
.
Context
())
defer
cancel
()
...
...
@@ -1459,9 +1342,7 @@ var (
pattern_UserService_GetUser_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
2
,
2
,
1
,
0
,
4
,
2
,
5
,
3
},
[]
string
{
"api"
,
"v1"
,
"users"
,
"name"
},
""
))
pattern_UserService_GetUserAvatarBinary_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
1
,
0
,
4
,
2
,
5
,
1
,
2
,
2
},
[]
string
{
"users"
,
"name"
,
"avatar"
},
""
))
pattern_UserService_GetUserAvatarBinary_1
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
1
,
0
,
4
,
2
,
5
,
2
,
2
,
3
},
[]
string
{
"o"
,
"users"
,
"name"
,
"avatar"
},
""
))
pattern_UserService_GetUserAvatarBinary_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
1
,
0
,
4
,
2
,
5
,
2
,
2
,
3
},
[]
string
{
"o"
,
"users"
,
"name"
,
"avatar"
},
""
))
pattern_UserService_CreateUser_0
=
runtime
.
MustPattern
(
runtime
.
NewPattern
(
1
,
[]
int
{
2
,
0
,
2
,
1
,
2
,
2
},
[]
string
{
"api"
,
"v1"
,
"users"
},
""
))
...
...
@@ -1489,8 +1370,6 @@ var (
forward_UserService_GetUserAvatarBinary_0
=
runtime
.
ForwardResponseMessage
forward_UserService_GetUserAvatarBinary_1
=
runtime
.
ForwardResponseMessage
forward_UserService_CreateUser_0
=
runtime
.
ForwardResponseMessage
forward_UserService_UpdateUser_0
=
runtime
.
ForwardResponseMessage
...
...
server/router/api/v1/acl_config.go
View file @
144269fb
...
...
@@ -12,7 +12,7 @@ var authenticationAllowlistMethods = map[string]bool{
"/memos.api.v1.AuthService/SignOut"
:
true
,
"/memos.api.v1.AuthService/SignUp"
:
true
,
"/memos.api.v1.UserService/GetUser"
:
true
,
"/memos.api.v1.UserService/GetUserAvatar
"
:
true
,
"/memos.api.v1.UserService/GetUserAvatar
Binary"
:
true
,
"/memos.api.v1.UserService/SearchUsers"
:
true
,
"/memos.api.v1.MemoService/ListMemos"
:
true
,
"/memos.api.v1.MemoService/GetMemo"
:
true
,
...
...
@@ -20,7 +20,8 @@ var authenticationAllowlistMethods = map[string]bool{
"/memos.api.v1.MemoService/ListMemoResources"
:
true
,
"/memos.api.v1.MemoService/ListMemoRelations"
:
true
,
"/memos.api.v1.MemoService/ListMemoComments"
:
true
,
"/memos.api.v1.LinkService/GetLinkMetadata"
:
true
,
"/memos.api.v1.MarkdownService/GetLinkMetadata"
:
true
,
"/memos.api.v1.ResourceService/GetResourceBinary"
:
true
,
}
// isUnauthorizeAllowedMethod returns whether the method is exempted from authentication.
...
...
server/router/api/v1/v1.go
View file @
144269fb
...
...
@@ -111,7 +111,8 @@ func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Ech
if
err
:=
v1pb
.
RegisterIdentityProviderServiceHandler
(
context
.
Background
(),
gwMux
,
conn
);
err
!=
nil
{
return
err
}
echoServer
.
Any
(
"*"
,
echo
.
WrapHandler
(
gwMux
))
echoServer
.
Any
(
"/api/v1/*"
,
echo
.
WrapHandler
(
gwMux
))
echoServer
.
Any
(
"/o/*"
,
echo
.
WrapHandler
(
gwMux
))
// GRPC web proxy.
options
:=
[]
grpcweb
.
Option
{
...
...
server/router/frontend/frontend.go
View file @
144269fb
...
...
@@ -41,7 +41,7 @@ func NewFrontendService(profile *profile.Profile, store *store.Store) *FrontendS
func
(
s
*
FrontendService
)
Serve
(
ctx
context
.
Context
,
e
*
echo
.
Echo
)
{
skipper
:=
func
(
c
echo
.
Context
)
bool
{
return
util
.
HasPrefixes
(
c
.
Path
(),
"/o
/"
,
"/api/
"
,
"/memos.api.v1"
,
"/robots.txt"
,
"/sitemap.xml"
,
"/m/:name"
)
return
util
.
HasPrefixes
(
c
.
Path
(),
"/o
"
,
"/api
"
,
"/memos.api.v1"
,
"/robots.txt"
,
"/sitemap.xml"
,
"/m/:name"
)
}
// Use echo static middleware to serve the built dist folder.
...
...
@@ -64,7 +64,6 @@ func (s *FrontendService) Serve(ctx context.Context, e *echo.Echo) {
}
})
g
.
Use
(
middleware
.
StaticWithConfig
(
middleware
.
StaticConfig
{
HTML5
:
true
,
Filesystem
:
getFileSystem
(
"dist/assets"
),
}))
...
...
web/src/App.tsx
View file @
144269fb
...
...
@@ -4,12 +4,14 @@ import { useTranslation } from "react-i18next";
import
{
Outlet
}
from
"react-router-dom"
;
import
useLocalStorage
from
"react-use/lib/useLocalStorage"
;
import
{
getSystemColorScheme
}
from
"./helpers/utils"
;
import
useNavigateTo
from
"./hooks/useNavigateTo"
;
import
{
useCommonContext
}
from
"./layouts/CommonContextProvider"
;
import
{
useUserStore
,
useWorkspaceSettingStore
}
from
"./store/v1"
;
import
{
WorkspaceGeneralSetting
,
WorkspaceSettingKey
}
from
"./types/proto/store/workspace_setting"
;
const
App
=
()
=>
{
const
{
i18n
}
=
useTranslation
();
const
navigateTo
=
useNavigateTo
();
const
{
mode
,
setMode
}
=
useColorScheme
();
const
workspaceSettingStore
=
useWorkspaceSettingStore
();
const
userStore
=
useUserStore
();
...
...
@@ -26,7 +28,7 @@ const App = () => {
// Redirect to sign up page if no instance owner.
useEffect
(()
=>
{
if
(
!
workspaceProfile
.
owner
)
{
window
.
location
.
href
=
"/auth/signup"
;
navigateTo
(
"/auth/signup"
)
;
}
},
[
workspaceProfile
.
owner
]);
...
...
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