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
d3235f75
Commit
d3235f75
authored
May 22, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak memo definition
parent
e0600388
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
445 additions
and
421 deletions
+445
-421
apidocs.swagger.yaml
docs/apidocs.swagger.yaml
+24
-18
memo_service.proto
proto/api/v1/memo_service.proto
+12
-8
memo_service.pb.go
proto/gen/api/v1/memo_service.pb.go
+408
-395
memo_service.go
server/router/api/v1/memo_service.go
+1
-0
No files found.
docs/apidocs.swagger.yaml
View file @
d3235f75
...
...
@@ -903,15 +903,9 @@ paths:
type
:
string
pinned
:
type
:
boolean
property
:
$ref
:
'
#/definitions/v1MemoProperty'
readOnly
:
true
parent
:
type
:
string
description
:
|-
The name of the parent memo.
Format: memos/{id}
id is the system generated id.
parentId
:
type
:
integer
format
:
int32
readOnly
:
true
resources
:
type
:
array
...
...
@@ -931,6 +925,15 @@ paths:
type
:
object
$ref
:
'
#/definitions/v1Reaction'
readOnly
:
true
property
:
$ref
:
'
#/definitions/v1MemoProperty'
readOnly
:
true
parent
:
type
:
string
title
:
|-
The name of the parent memo.
Format: memos/{id}
readOnly: true
tags
:
-
MemoService
/api/v1/{name_1}
:
...
...
@@ -2658,15 +2661,9 @@ definitions:
type
:
string
pinned
:
type
:
boolean
property
:
$ref
:
'
#/definitions/v1MemoProperty'
readOnly
:
true
parent
:
type
:
string
description
:
|-
The name of the parent memo.
Format: memos/{id}
id is the system generated id.
parentId
:
type
:
integer
format
:
int32
readOnly
:
true
resources
:
type
:
array
...
...
@@ -2686,6 +2683,15 @@ definitions:
type
:
object
$ref
:
'
#/definitions/v1Reaction'
readOnly
:
true
property
:
$ref
:
'
#/definitions/v1MemoProperty'
readOnly
:
true
parent
:
type
:
string
title
:
|-
The name of the parent memo.
Format: memos/{id}
readOnly: true
v1MemoProperty
:
type
:
object
properties
:
...
...
proto/api/v1/memo_service.proto
View file @
d3235f75
...
...
@@ -185,18 +185,22 @@ message Memo {
bool
pinned
=
12
;
MemoProperty
property
=
13
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
optional
int32
parent_id
=
13
[
deprecated
=
true
,
(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The name of the parent memo.
// Format: memos/{id}
// id is the system generated id.
optional
string
parent
=
14
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
Resource
resources
=
14
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
Resource
resource
s
=
15
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
MemoRelation
relation
s
=
15
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
MemoRelation
rela
tions
=
16
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
Reaction
reac
tions
=
16
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
Reaction
reactions
=
17
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
MemoProperty
property
=
17
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The name of the parent memo.
// Format: memos/{id}
optional
string
parent
=
18
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
}
message
MemoProperty
{
...
...
proto/gen/api/v1/memo_service.pb.go
View file @
d3235f75
This diff is collapsed.
Click to expand it.
server/router/api/v1/memo_service.go
View file @
d3235f75
...
...
@@ -797,6 +797,7 @@ func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Mem
memoMessage
.
Property
=
convertMemoPropertyFromStore
(
memo
.
Payload
.
Property
)
}
if
memo
.
ParentID
!=
nil
{
memoMessage
.
ParentId
=
memo
.
ParentID
parent
:=
fmt
.
Sprintf
(
"%s%d"
,
MemoNamePrefix
,
*
memo
.
ParentID
)
memoMessage
.
Parent
=
&
parent
}
...
...
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