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
a423dac1
Commit
a423dac1
authored
May 27, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak memo property
parent
2b4c2b23
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
394 additions
and
367 deletions
+394
-367
apidocs.swagger.yaml
docs/apidocs.swagger.yaml
+2
-0
memo_service.proto
proto/api/v1/memo_service.proto
+1
-0
memo_service.pb.go
proto/gen/api/v1/memo_service.pb.go
+364
-354
memo.pb.go
proto/gen/store/memo.pb.go
+23
-13
memo.proto
proto/store/memo.proto
+1
-0
memo_service.go
server/router/api/v1/memo_service.go
+3
-0
No files found.
docs/apidocs.swagger.yaml
View file @
a423dac1
...
...
@@ -2703,6 +2703,8 @@ definitions:
type
:
boolean
hasTaskList
:
type
:
boolean
hasCode
:
type
:
boolean
v1MemoRelation
:
type
:
object
properties
:
...
...
proto/api/v1/memo_service.proto
View file @
a423dac1
...
...
@@ -207,6 +207,7 @@ message MemoProperty {
repeated
string
tags
=
1
;
bool
has_link
=
2
;
bool
has_task_list
=
3
;
bool
has_code
=
4
;
}
message
CreateMemoRequest
{
...
...
proto/gen/api/v1/memo_service.pb.go
View file @
a423dac1
This diff is collapsed.
Click to expand it.
proto/gen/store/memo.pb.go
View file @
a423dac1
...
...
@@ -76,6 +76,7 @@ type MemoPayload_Property struct {
Tags
[]
string
`protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
HasLink
bool
`protobuf:"varint,2,opt,name=has_link,json=hasLink,proto3" json:"has_link,omitempty"`
HasTaskList
bool
`protobuf:"varint,3,opt,name=has_task_list,json=hasTaskList,proto3" json:"has_task_list,omitempty"`
HasCode
bool
`protobuf:"varint,4,opt,name=has_code,json=hasCode,proto3" json:"has_code,omitempty"`
}
func
(
x
*
MemoPayload_Property
)
Reset
()
{
...
...
@@ -131,32 +132,41 @@ func (x *MemoPayload_Property) GetHasTaskList() bool {
return
false
}
func
(
x
*
MemoPayload_Property
)
GetHasCode
()
bool
{
if
x
!=
nil
{
return
x
.
HasCode
}
return
false
}
var
File_store_memo_proto
protoreflect
.
FileDescriptor
var
file_store_memo_proto_rawDesc
=
[]
byte
{
0x0a
,
0x10
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x12
,
0x0b
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x22
,
0x
ab
,
0x01
,
0x0a
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x50
,
0x61
,
0x79
,
0x6c
,
0x6f
,
0x61
,
0x64
,
0x12
,
0x
c6
,
0x01
,
0x0a
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x50
,
0x61
,
0x79
,
0x6c
,
0x6f
,
0x61
,
0x64
,
0x12
,
0x3d
,
0x0a
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x65
,
0x72
,
0x74
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x21
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x50
,
0x61
,
0x79
,
0x6c
,
0x6f
,
0x61
,
0x64
,
0x2e
,
0x50
,
0x72
,
0x6f
,
0x70
,
0x65
,
0x72
,
0x74
,
0x79
,
0x52
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x65
,
0x72
,
0x74
,
0x79
,
0x1a
,
0x
5d
,
0x65
,
0x72
,
0x74
,
0x79
,
0x52
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x65
,
0x72
,
0x74
,
0x79
,
0x1a
,
0x
78
,
0x0a
,
0x08
,
0x50
,
0x72
,
0x6f
,
0x70
,
0x65
,
0x72
,
0x74
,
0x79
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x74
,
0x61
,
0x67
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x04
,
0x74
,
0x61
,
0x67
,
0x73
,
0x12
,
0x19
,
0x0a
,
0x08
,
0x68
,
0x61
,
0x73
,
0x5f
,
0x6c
,
0x69
,
0x6e
,
0x6b
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x07
,
0x68
,
0x61
,
0x73
,
0x4c
,
0x69
,
0x6e
,
0x6b
,
0x12
,
0x22
,
0x0a
,
0x0d
,
0x68
,
0x61
,
0x73
,
0x5f
,
0x74
,
0x61
,
0x73
,
0x6b
,
0x5f
,
0x6c
,
0x69
,
0x73
,
0x74
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x0b
,
0x68
,
0x61
,
0x73
,
0x54
,
0x61
,
0x73
,
0x6b
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x42
,
0x94
,
0x01
,
0x0a
,
0x0f
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x42
,
0x09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x73
,
0x3a
,
0x3a
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
proto/store/memo.proto
View file @
a423dac1
...
...
@@ -12,5 +12,6 @@ message MemoPayload {
repeated
string
tags
=
1
;
bool
has_link
=
2
;
bool
has_task_list
=
3
;
bool
has_code
=
4
;
}
}
server/router/api/v1/memo_service.go
View file @
a423dac1
...
...
@@ -811,6 +811,7 @@ func convertMemoPropertyFromStore(property *storepb.MemoPayload_Property) *v1pb.
Tags
:
property
.
Tags
,
HasLink
:
property
.
HasLink
,
HasTaskList
:
property
.
HasTaskList
,
HasCode
:
property
.
HasCode
,
}
}
...
...
@@ -1081,6 +1082,8 @@ func getMemoPropertyFromContent(content string) (*storepb.MemoPayload_Property,
property
.
HasLink
=
true
case
*
ast
.
TaskList
:
property
.
HasTaskList
=
true
case
*
ast
.
Code
,
*
ast
.
CodeBlock
:
property
.
HasCode
=
true
}
})
return
property
,
nil
...
...
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