-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change permissions proto package so it doesn't clash with message (
#198)
- Loading branch information
1 parent
ce843d6
commit 6c8ae5b
Showing
10 changed files
with
108 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+47 Bytes
(100%)
kotlin-messages/kotlin/messages/generated-sources/descriptors/client_protos.dsc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/momentohq/client-sdk-go;client_sdk_go"; | ||
option java_multiple_files = true; | ||
option java_package = "grpc.permission_messages"; | ||
|
||
package permission_messages; | ||
|
||
// Aliases for categories of functionality. | ||
enum CacheRole { | ||
CachePermitNone = 0; | ||
// Restricts access to apis that read and write data from caches: No higher level resource description or modification. | ||
CacheReadWrite = 1; | ||
// Restricts access to apis that read from caches: No higher level resource description or modification. | ||
CacheReadOnly = 2; | ||
// Restricts access to apis that write from caches: No higher level resource description or modification. | ||
// Doesn't allow conditional write APIs (SetIfNotExists, IncreaseTTL etc) | ||
CacheWriteOnly = 3; | ||
} | ||
|
||
// Aliases for categories of functionality. | ||
enum TopicRole { | ||
TopicPermitNone = 0; | ||
// Restricts access to apis that read and write data from topics: No higher level resource description or modification. | ||
TopicReadWrite = 1; | ||
// Restricts access to apis that read from topics: No higher level resource description or modification. | ||
TopicReadOnly = 2; | ||
// Restricts access to apis that write from topics: No higher level resource description or modification. | ||
TopicWriteOnly = 3; | ||
} | ||
|
||
enum SuperUserPermissions { | ||
SuperUser = 0; | ||
} | ||
|
||
message Permissions { | ||
oneof kind { | ||
SuperUserPermissions super_user = 1; | ||
ExplicitPermissions explicit = 2; | ||
} | ||
} | ||
|
||
message ExplicitPermissions { | ||
repeated PermissionsType permissions = 1; | ||
} | ||
|
||
message PermissionsType { | ||
oneof kind { | ||
CachePermissions cache_permissions = 1; | ||
TopicPermissions topic_permissions = 2; | ||
} | ||
|
||
message All {} | ||
|
||
message CacheSelector { | ||
oneof kind { | ||
string cache_name = 1; | ||
} | ||
} | ||
|
||
message CacheItemSelector { | ||
oneof kind { | ||
bytes key = 1; | ||
bytes key_prefix = 2; | ||
} | ||
} | ||
|
||
message CachePermissions { | ||
CacheRole role = 1; | ||
oneof cache { | ||
All all_caches = 2; | ||
CacheSelector cache_selector = 3; | ||
} | ||
oneof cache_item { | ||
All all_items = 4; | ||
CacheItemSelector item_selector = 5; | ||
} | ||
} | ||
|
||
message TopicSelector { | ||
oneof kind { | ||
string topic_name = 1; | ||
} | ||
} | ||
|
||
message TopicPermissions { | ||
TopicRole role = 1; | ||
oneof cache { | ||
All all_caches = 2; | ||
CacheSelector cache_selector = 3; | ||
} | ||
oneof topic { | ||
All all_topics = 4; | ||
TopicSelector topic_selector = 5; | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters