chore: retire private visibility

This commit is contained in:
Steven 2024-08-31 22:08:57 +08:00
parent b74e4f90c1
commit a49f87c55f
12 changed files with 34 additions and 147 deletions

View File

@ -36,10 +36,6 @@
"shortcut": {
"visits": "{{count}} visits",
"visibility": {
"private": {
"self": "Private",
"description": "Only you can access"
},
"workspace": {
"self": "Workspace",
"description": "Workspace members can access"

View File

@ -33,10 +33,6 @@
"shortcut": {
"visits": "{{count}} visites",
"visibility": {
"private": {
"self": "Privé",
"description": "Vous seul pouvez accéder"
},
"workspace": {
"self": "Espace de travail",
"description": "Les membres de l'espace de travail ont accès"

View File

@ -34,10 +34,6 @@
"shortcut": {
"visits": "{{count}} látogatás",
"visibility": {
"private": {
"self": "Privát",
"description": "Csak Ön férhet hozzá"
},
"workspace": {
"self": "Munkaterület",
"description": "A munkaterület tagjai hozzáférhetnek"

View File

@ -34,10 +34,6 @@
"shortcut": {
"visits": "{{count}} 回訪問",
"visibility": {
"private": {
"self": "非公開",
"description": "あなただけがアクセスできます"
},
"workspace": {
"self": "ワークスペース",
"description": "ワークスペースメンバーがアクセスできます"

View File

@ -34,10 +34,6 @@
"shortcut": {
"visits": "{{count}} перехода",
"visibility": {
"private": {
"self": "Частная",
"description": "Только Вы иммете доступ"
},
"workspace": {
"self": "Команда",
"description": "Члены команды имеют доступ"

View File

@ -33,10 +33,6 @@
"shortcut": {
"visits": "{{count}} ziyaret",
"visibility": {
"private": {
"self": "Özel",
"description": "Yalnızca siz erişebilirsiniz"
},
"workspace": {
"self": "Çalışma Alanı",
"description": "Çalışma alanı üyeleri erişebilir"

View File

@ -33,10 +33,6 @@
"shortcut": {
"visits": "{{count}} 次访问",
"visibility": {
"private": {
"self": "私有的",
"description": "仅您可以访问"
},
"workspace": {
"self": "工作区",
"description": "工作区成员可以访问"

View File

@ -10,19 +10,10 @@ enum State {
INACTIVE = 2;
}
// deprecated
enum RowStatus {
ROW_STATUS_UNSPECIFIED = 0;
NORMAL = 1;
ARCHIVED = 2;
}
enum Visibility {
VISIBILITY_UNSPECIFIED = 0;
PRIVATE = 1 [deprecated = true];
WORKSPACE = 1;
WORKSPACE = 2;
PUBLIC = 3;
PUBLIC = 2;
}

View File

@ -4,7 +4,6 @@
## Table of Contents
- [api/v1/common.proto](#api_v1_common-proto)
- [RowStatus](#slash-api-v1-RowStatus)
- [State](#slash-api-v1-State)
- [Visibility](#slash-api-v1-Visibility)
@ -111,19 +110,6 @@
<a name="slash-api-v1-RowStatus"></a>
### RowStatus
deprecated
| Name | Number | Description |
| ---- | ------ | ----------- |
| ROW_STATUS_UNSPECIFIED | 0 | |
| NORMAL | 1 | |
| ARCHIVED | 2 | |
<a name="slash-api-v1-State"></a>
### State
@ -145,9 +131,8 @@ deprecated
| Name | Number | Description |
| ---- | ------ | ----------- |
| VISIBILITY_UNSPECIFIED | 0 | |
| PRIVATE | 1 | |
| WORKSPACE | 2 | |
| PUBLIC | 3 | |
| WORKSPACE | 1 | |
| PUBLIC | 2 | |

View File

@ -69,79 +69,25 @@ func (State) EnumDescriptor() ([]byte, []int) {
return file_api_v1_common_proto_rawDescGZIP(), []int{0}
}
// deprecated
type RowStatus int32
const (
RowStatus_ROW_STATUS_UNSPECIFIED RowStatus = 0
RowStatus_NORMAL RowStatus = 1
RowStatus_ARCHIVED RowStatus = 2
)
// Enum value maps for RowStatus.
var (
RowStatus_name = map[int32]string{
0: "ROW_STATUS_UNSPECIFIED",
1: "NORMAL",
2: "ARCHIVED",
}
RowStatus_value = map[string]int32{
"ROW_STATUS_UNSPECIFIED": 0,
"NORMAL": 1,
"ARCHIVED": 2,
}
)
func (x RowStatus) Enum() *RowStatus {
p := new(RowStatus)
*p = x
return p
}
func (x RowStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RowStatus) Descriptor() protoreflect.EnumDescriptor {
return file_api_v1_common_proto_enumTypes[1].Descriptor()
}
func (RowStatus) Type() protoreflect.EnumType {
return &file_api_v1_common_proto_enumTypes[1]
}
func (x RowStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RowStatus.Descriptor instead.
func (RowStatus) EnumDescriptor() ([]byte, []int) {
return file_api_v1_common_proto_rawDescGZIP(), []int{1}
}
type Visibility int32
const (
Visibility_VISIBILITY_UNSPECIFIED Visibility = 0
// Deprecated: Marked as deprecated in api/v1/common.proto.
Visibility_PRIVATE Visibility = 1
Visibility_WORKSPACE Visibility = 2
Visibility_PUBLIC Visibility = 3
Visibility_WORKSPACE Visibility = 1
Visibility_PUBLIC Visibility = 2
)
// Enum value maps for Visibility.
var (
Visibility_name = map[int32]string{
0: "VISIBILITY_UNSPECIFIED",
1: "PRIVATE",
2: "WORKSPACE",
3: "PUBLIC",
1: "WORKSPACE",
2: "PUBLIC",
}
Visibility_value = map[string]int32{
"VISIBILITY_UNSPECIFIED": 0,
"PRIVATE": 1,
"WORKSPACE": 2,
"PUBLIC": 3,
"WORKSPACE": 1,
"PUBLIC": 2,
}
)
@ -156,11 +102,11 @@ func (x Visibility) String() string {
}
func (Visibility) Descriptor() protoreflect.EnumDescriptor {
return file_api_v1_common_proto_enumTypes[2].Descriptor()
return file_api_v1_common_proto_enumTypes[1].Descriptor()
}
func (Visibility) Type() protoreflect.EnumType {
return &file_api_v1_common_proto_enumTypes[2]
return &file_api_v1_common_proto_enumTypes[1]
}
func (x Visibility) Number() protoreflect.EnumNumber {
@ -169,7 +115,7 @@ func (x Visibility) Number() protoreflect.EnumNumber {
// Deprecated: Use Visibility.Descriptor instead.
func (Visibility) EnumDescriptor() ([]byte, []int) {
return file_api_v1_common_proto_rawDescGZIP(), []int{2}
return file_api_v1_common_proto_rawDescGZIP(), []int{1}
}
var File_api_v1_common_proto protoreflect.FileDescriptor
@ -180,28 +126,23 @@ var file_api_v1_common_proto_rawDesc = []byte{
0x2e, 0x76, 0x31, 0x2a, 0x38, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11,
0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12,
0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x2a, 0x41, 0x0a,
0x09, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x4f,
0x57, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c,
0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02,
0x2a, 0x54, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,
0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x07, 0x50, 0x52,
0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x57,
0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55,
0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73,
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x66, 0x68,
0x6f, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 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, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68,
0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c,
0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41,
0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x0e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a,
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x2a, 0x43, 0x0a,
0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56,
0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x4f, 0x52, 0x4b, 0x53,
0x50, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43,
0x10, 0x02, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x66, 0x68, 0x6f, 0x73, 0x74, 0x65,
0x64, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 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, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x70, 0x69,
0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c,
0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56,
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e,
0x53, 0x6c, 0x61, 0x73, 0x68, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -216,11 +157,10 @@ func file_api_v1_common_proto_rawDescGZIP() []byte {
return file_api_v1_common_proto_rawDescData
}
var file_api_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_api_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_api_v1_common_proto_goTypes = []any{
(State)(0), // 0: slash.api.v1.State
(RowStatus)(0), // 1: slash.api.v1.RowStatus
(Visibility)(0), // 2: slash.api.v1.Visibility
(Visibility)(0), // 1: slash.api.v1.Visibility
}
var file_api_v1_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@ -240,7 +180,7 @@ func file_api_v1_common_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_v1_common_proto_rawDesc,
NumEnums: 3,
NumEnums: 2,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,

View File

@ -928,7 +928,6 @@ definitions:
type: string
enum:
- VISIBILITY_UNSPECIFIED
- PRIVATE
- WORKSPACE
- PUBLIC
default: VISIBILITY_UNSPECIFIED

View File

@ -58,7 +58,7 @@ func convertVisibilityFromStorepb(visibility storepb.Visibility) v1pb.Visibility
func convertVisibilityToStorepb(visibility v1pb.Visibility) storepb.Visibility {
switch visibility {
case v1pb.Visibility_PRIVATE, v1pb.Visibility_WORKSPACE:
case v1pb.Visibility_WORKSPACE:
return storepb.Visibility_WORKSPACE
case v1pb.Visibility_PUBLIC:
return storepb.Visibility_PUBLIC