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
35df62a9
Commit
35df62a9
authored
Jun 18, 2025
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove duplicated prefix from enums
parent
d27639f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
69 deletions
+67
-69
activity_service.proto
proto/api/v1/activity_service.proto
+5
-5
activity_service.pb.go
proto/gen/api/v1/activity_service.pb.go
+25
-27
apidocs.swagger.yaml
proto/gen/apidocs.swagger.yaml
+10
-10
activity_service.go
server/router/api/v1/activity_service.go
+2
-2
activity_service.ts
web/src/types/proto/api/v1/activity_service.ts
+25
-25
No files found.
proto/api/v1/activity_service.proto
View file @
35df62a9
...
...
@@ -60,9 +60,9 @@ message Activity {
// Unspecified type.
TYPE_UNSPECIFIED
=
0
;
// Memo comment activity.
TYPE_
MEMO_COMMENT
=
1
;
MEMO_COMMENT
=
1
;
// Version update activity.
TYPE_
VERSION_UPDATE
=
2
;
VERSION_UPDATE
=
2
;
}
// Activity levels.
...
...
@@ -70,11 +70,11 @@ message Activity {
// Unspecified level.
LEVEL_UNSPECIFIED
=
0
;
// Info level.
LEVEL_
INFO
=
1
;
INFO
=
1
;
// Warn level.
LEVEL_
WARN
=
2
;
WARN
=
2
;
// Error level.
LEVEL_
ERROR
=
3
;
ERROR
=
3
;
}
}
...
...
proto/gen/api/v1/activity_service.pb.go
View file @
35df62a9
...
...
@@ -30,22 +30,22 @@ const (
// Unspecified type.
Activity_TYPE_UNSPECIFIED
Activity_Type
=
0
// Memo comment activity.
Activity_
TYPE_
MEMO_COMMENT
Activity_Type
=
1
Activity_MEMO_COMMENT
Activity_Type
=
1
// Version update activity.
Activity_
TYPE_
VERSION_UPDATE
Activity_Type
=
2
Activity_VERSION_UPDATE
Activity_Type
=
2
)
// Enum value maps for Activity_Type.
var
(
Activity_Type_name
=
map
[
int32
]
string
{
0
:
"TYPE_UNSPECIFIED"
,
1
:
"
TYPE_
MEMO_COMMENT"
,
2
:
"
TYPE_
VERSION_UPDATE"
,
1
:
"MEMO_COMMENT"
,
2
:
"VERSION_UPDATE"
,
}
Activity_Type_value
=
map
[
string
]
int32
{
"TYPE_UNSPECIFIED"
:
0
,
"
TYPE_MEMO_COMMENT"
:
1
,
"
TYPE_VERSION_UPDATE"
:
2
,
"TYPE_UNSPECIFIED"
:
0
,
"
MEMO_COMMENT"
:
1
,
"
VERSION_UPDATE"
:
2
,
}
)
...
...
@@ -83,26 +83,26 @@ const (
// Unspecified level.
Activity_LEVEL_UNSPECIFIED
Activity_Level
=
0
// Info level.
Activity_
LEVEL_
INFO
Activity_Level
=
1
Activity_INFO
Activity_Level
=
1
// Warn level.
Activity_
LEVEL_
WARN
Activity_Level
=
2
Activity_WARN
Activity_Level
=
2
// Error level.
Activity_
LEVEL_
ERROR
Activity_Level
=
3
Activity_ERROR
Activity_Level
=
3
)
// Enum value maps for Activity_Level.
var
(
Activity_Level_name
=
map
[
int32
]
string
{
0
:
"LEVEL_UNSPECIFIED"
,
1
:
"
LEVEL_
INFO"
,
2
:
"
LEVEL_
WARN"
,
3
:
"
LEVEL_
ERROR"
,
1
:
"INFO"
,
2
:
"WARN"
,
3
:
"ERROR"
,
}
Activity_Level_value
=
map
[
string
]
int32
{
"LEVEL_UNSPECIFIED"
:
0
,
"
LEVEL_INFO"
:
1
,
"
LEVEL_WARN"
:
2
,
"
LEVEL_ERROR"
:
3
,
"
INFO"
:
1
,
"
WARN"
:
2
,
"
ERROR"
:
3
,
}
)
...
...
@@ -513,7 +513,7 @@ var File_api_v1_activity_service_proto protoreflect.FileDescriptor
const
file_api_v1_activity_service_proto_rawDesc
=
""
+
"
\n
"
+
"
\x1d
api/v1/activity_service.proto
\x12\f
memos.api.v1
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/resource.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
a2
\x04\n
"
+
"
\x1d
api/v1/activity_service.proto
\x12\f
memos.api.v1
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/resource.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
86
\x04\n
"
+
"
\b
Activity
\x12\x1a\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x06\xe0
A
\x03\xe0
A
\b
R
\x04
name
\x12\x1d\n
"
+
"
\a
creator
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x03
R
\a
creator
\x12
4
\n
"
+
...
...
@@ -521,18 +521,16 @@ const file_api_v1_activity_service_proto_rawDesc = "" +
"
\x05
level
\x18\x04
\x01
(
\x0e
2
\x1c
.memos.api.v1.Activity.LevelB
\x03\xe0
A
\x03
R
\x05
level
\x12
@
\n
"
+
"
\v
create_time
\x18\x05
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"createTime
\x12
<
\n
"
+
"
\a
payload
\x18\x06
\x01
(
\v
2
\x1d
.memos.api.v1.ActivityPayloadB
\x03\xe0
A
\x03
R
\a
payload
\"
L
\n
"
+
"
\a
payload
\x18\x06
\x01
(
\v
2
\x1d
.memos.api.v1.ActivityPayloadB
\x03\xe0
A
\x03
R
\a
payload
\"
B
\n
"
+
"
\x04
Type
\x12\x14\n
"
+
"
\x10
TYPE_UNSPECIFIED
\x10\x00\x12\x1
5
\n
"
+
"
\
x11
TYPE_MEMO_COMMENT
\x10\x01\x12\x17
\n
"
+
"
\x
13
TYPE_VERSION_UPDATE
\x10\x02\"
O
\n
"
+
"
\x10
TYPE_UNSPECIFIED
\x10\x00\x12\x1
0
\n
"
+
"
\
f
MEMO_COMMENT
\x10\x01\x12\x12
\n
"
+
"
\x
0e
VERSION_UPDATE
\x10\x02\"
=
\n
"
+
"
\x05
Level
\x12\x15\n
"
+
"
\x11
LEVEL_UNSPECIFIED
\x10\x00\x12\x0e\n
"
+
"
\n
"
+
"LEVEL_INFO
\x10\x01\x12\x0e\n
"
+
"
\n
"
+
"LEVEL_WARN
\x10\x02\x12\x0f\n
"
+
"
\v
LEVEL_ERROR
\x10\x03
:M
\xea
AJ
\n
"
+
"
\x11
LEVEL_UNSPECIFIED
\x10\x00\x12\b\n
"
+
"
\x04
INFO
\x10\x01\x12\b\n
"
+
"
\x04
WARN
\x10\x02\x12\t\n
"
+
"
\x05
ERROR
\x10\x03
:M
\xea
AJ
\n
"
+
"
\x15
memos.api.v1/Activity
\x12\x15
activities/{activity}
\x1a\x04
name*
\n
"
+
"activities2
\b
activity
\"
k
\n
"
+
"
\x0f
ActivityPayload
\x12
M
\n
"
+
...
...
proto/gen/apidocs.swagger.yaml
View file @
35df62a9
...
...
@@ -2513,17 +2513,17 @@ definitions:
type
:
string
enum
:
-
LEVEL_UNSPECIFIED
-
LEVEL_
INFO
-
LEVEL_
WARN
-
LEVEL_
ERROR
-
INFO
-
WARN
-
ERROR
default
:
LEVEL_UNSPECIFIED
description
:
|-
Activity levels.
- LEVEL_UNSPECIFIED: Unspecified level.
-
LEVEL_
INFO: Info level.
-
LEVEL_
WARN: Warn level.
-
LEVEL_
ERROR: Error level.
- INFO: Info level.
- WARN: Warn level.
- ERROR: Error level.
ListNodeKind
:
type
:
string
enum
:
...
...
@@ -3218,15 +3218,15 @@ definitions:
type
:
string
enum
:
-
TYPE_UNSPECIFIED
-
TYPE_
MEMO_COMMENT
-
TYPE_
VERSION_UPDATE
-
MEMO_COMMENT
-
VERSION_UPDATE
default
:
TYPE_UNSPECIFIED
description
:
|-
Activity types.
- TYPE_UNSPECIFIED: Unspecified type.
-
TYPE_
MEMO_COMMENT: Memo comment activity.
-
TYPE_
VERSION_UPDATE: Version update activity.
- MEMO_COMMENT: Memo comment activity.
- VERSION_UPDATE: Version update activity.
v1Attachment
:
type
:
object
properties
:
...
...
server/router/api/v1/activity_service.go
View file @
35df62a9
...
...
@@ -74,7 +74,7 @@ func (s *APIV1Service) convertActivityFromStore(ctx context.Context, activity *s
var
activityType
v1pb
.
Activity_Type
switch
activity
.
Type
{
case
store
.
ActivityTypeMemoComment
:
activityType
=
v1pb
.
Activity_
TYPE_
MEMO_COMMENT
activityType
=
v1pb
.
Activity_MEMO_COMMENT
default
:
activityType
=
v1pb
.
Activity_TYPE_UNSPECIFIED
}
...
...
@@ -83,7 +83,7 @@ func (s *APIV1Service) convertActivityFromStore(ctx context.Context, activity *s
var
activityLevel
v1pb
.
Activity_Level
switch
activity
.
Level
{
case
store
.
ActivityLevelInfo
:
activityLevel
=
v1pb
.
Activity_
LEVEL_
INFO
activityLevel
=
v1pb
.
Activity_INFO
default
:
activityLevel
=
v1pb
.
Activity_LEVEL_UNSPECIFIED
}
...
...
web/src/types/proto/api/v1/activity_service.ts
View file @
35df62a9
...
...
@@ -37,10 +37,10 @@ export interface Activity {
export
enum
Activity_Type
{
/** TYPE_UNSPECIFIED - Unspecified type. */
TYPE_UNSPECIFIED
=
"TYPE_UNSPECIFIED"
,
/**
TYPE_
MEMO_COMMENT - Memo comment activity. */
TYPE_MEMO_COMMENT
=
"TYPE_
MEMO_COMMENT"
,
/**
TYPE_
VERSION_UPDATE - Version update activity. */
TYPE_VERSION_UPDATE
=
"TYPE_
VERSION_UPDATE"
,
/** MEMO_COMMENT - Memo comment activity. */
MEMO_COMMENT
=
"
MEMO_COMMENT"
,
/** VERSION_UPDATE - Version update activity. */
VERSION_UPDATE
=
"
VERSION_UPDATE"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
}
...
...
@@ -50,11 +50,11 @@ export function activity_TypeFromJSON(object: any): Activity_Type {
case
"TYPE_UNSPECIFIED"
:
return
Activity_Type
.
TYPE_UNSPECIFIED
;
case
1
:
case
"
TYPE_
MEMO_COMMENT"
:
return
Activity_Type
.
TYPE_
MEMO_COMMENT
;
case
"MEMO_COMMENT"
:
return
Activity_Type
.
MEMO_COMMENT
;
case
2
:
case
"
TYPE_
VERSION_UPDATE"
:
return
Activity_Type
.
TYPE_
VERSION_UPDATE
;
case
"VERSION_UPDATE"
:
return
Activity_Type
.
VERSION_UPDATE
;
case
-
1
:
case
"UNRECOGNIZED"
:
default
:
...
...
@@ -66,9 +66,9 @@ export function activity_TypeToNumber(object: Activity_Type): number {
switch
(
object
)
{
case
Activity_Type
.
TYPE_UNSPECIFIED
:
return
0
;
case
Activity_Type
.
TYPE_
MEMO_COMMENT
:
case
Activity_Type
.
MEMO_COMMENT
:
return
1
;
case
Activity_Type
.
TYPE_
VERSION_UPDATE
:
case
Activity_Type
.
VERSION_UPDATE
:
return
2
;
case
Activity_Type
.
UNRECOGNIZED
:
default
:
...
...
@@ -80,12 +80,12 @@ export function activity_TypeToNumber(object: Activity_Type): number {
export
enum
Activity_Level
{
/** LEVEL_UNSPECIFIED - Unspecified level. */
LEVEL_UNSPECIFIED
=
"LEVEL_UNSPECIFIED"
,
/**
LEVEL_
INFO - Info level. */
LEVEL_INFO
=
"LEVEL_
INFO"
,
/**
LEVEL_
WARN - Warn level. */
LEVEL_WARN
=
"LEVEL_
WARN"
,
/**
LEVEL_
ERROR - Error level. */
LEVEL_ERROR
=
"LEVEL_
ERROR"
,
/** INFO - Info level. */
INFO
=
"
INFO"
,
/** WARN - Warn level. */
WARN
=
"
WARN"
,
/** ERROR - Error level. */
ERROR
=
"
ERROR"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
}
...
...
@@ -95,14 +95,14 @@ export function activity_LevelFromJSON(object: any): Activity_Level {
case
"LEVEL_UNSPECIFIED"
:
return
Activity_Level
.
LEVEL_UNSPECIFIED
;
case
1
:
case
"
LEVEL_
INFO"
:
return
Activity_Level
.
LEVEL_
INFO
;
case
"INFO"
:
return
Activity_Level
.
INFO
;
case
2
:
case
"
LEVEL_
WARN"
:
return
Activity_Level
.
LEVEL_
WARN
;
case
"WARN"
:
return
Activity_Level
.
WARN
;
case
3
:
case
"
LEVEL_
ERROR"
:
return
Activity_Level
.
LEVEL_
ERROR
;
case
"ERROR"
:
return
Activity_Level
.
ERROR
;
case
-
1
:
case
"UNRECOGNIZED"
:
default
:
...
...
@@ -114,11 +114,11 @@ export function activity_LevelToNumber(object: Activity_Level): number {
switch
(
object
)
{
case
Activity_Level
.
LEVEL_UNSPECIFIED
:
return
0
;
case
Activity_Level
.
LEVEL_
INFO
:
case
Activity_Level
.
INFO
:
return
1
;
case
Activity_Level
.
LEVEL_
WARN
:
case
Activity_Level
.
WARN
:
return
2
;
case
Activity_Level
.
LEVEL_
ERROR
:
case
Activity_Level
.
ERROR
:
return
3
;
case
Activity_Level
.
UNRECOGNIZED
:
default
:
...
...
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