Initial QSfera import
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package qsfera.messages.eventhistory.v0;
|
||||
|
||||
option go_package = "github.com/qsfera/server/protogen/gen/qsfera/messages/eventhistory/v0";
|
||||
|
||||
message Event {
|
||||
// REQUIRED.
|
||||
string type = 1;
|
||||
// REQUIRED.
|
||||
string id = 2;
|
||||
// REQUIRED
|
||||
bytes event = 3;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package qsfera.messages.policies.v0;
|
||||
|
||||
option go_package = "github.com/qsfera/server/protogen/gen/qsfera/messages/policies/v0";
|
||||
|
||||
message User {
|
||||
message ID {
|
||||
string opaque_id = 1;
|
||||
}
|
||||
|
||||
ID id = 1;
|
||||
string username = 2;
|
||||
string mail = 3;
|
||||
string display_name = 4;
|
||||
repeated string groups = 5;
|
||||
}
|
||||
|
||||
message Resource {
|
||||
message ID {
|
||||
string storage_id = 1;
|
||||
string opaque_id = 2;
|
||||
string space_id = 3;
|
||||
}
|
||||
|
||||
ID id = 1;
|
||||
string name = 2;
|
||||
uint64 size = 3;
|
||||
string url = 4;
|
||||
}
|
||||
|
||||
message Request {
|
||||
string method = 1;
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
enum Stage {
|
||||
STAGE_PP = 0;
|
||||
STAGE_HTTP = 1;
|
||||
}
|
||||
|
||||
message Environment {
|
||||
Stage stage = 1;
|
||||
User user = 2;
|
||||
Request request = 3;
|
||||
Resource resource = 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package qsfera.messages.search.v0;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/qsfera/server/protogen/gen/qsfera/messages/search/v0";
|
||||
|
||||
message ResourceID {
|
||||
string storage_id = 1;
|
||||
string opaque_id = 2;
|
||||
string space_id = 3;
|
||||
}
|
||||
|
||||
message Reference {
|
||||
ResourceID resource_id = 1;
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
message Audio {
|
||||
optional string album = 1;
|
||||
optional string albumArtist = 2;
|
||||
optional string artist = 3;
|
||||
optional int64 bitrate = 4;
|
||||
optional string composers = 5;
|
||||
optional string copyright = 6;
|
||||
optional int32 disc = 7;
|
||||
optional int32 discCount = 8;
|
||||
optional int64 duration = 9;
|
||||
optional string genre = 10;
|
||||
optional bool hasDrm = 11;
|
||||
optional bool isVariableBitrate = 12;
|
||||
optional string title = 13;
|
||||
optional int32 track = 14;
|
||||
optional int32 trackCount = 15;
|
||||
optional int32 year = 16;
|
||||
}
|
||||
|
||||
message Image {
|
||||
optional int32 width = 1;
|
||||
optional int32 height = 2;
|
||||
}
|
||||
|
||||
message GeoCoordinates {
|
||||
optional double altitude = 1;
|
||||
optional double latitude = 2;
|
||||
optional double longitude = 3;
|
||||
}
|
||||
|
||||
message Photo {
|
||||
optional string cameraMake = 1;
|
||||
optional string cameraModel = 2;
|
||||
optional float exposureDenominator = 3;
|
||||
optional float exposureNumerator = 4;
|
||||
optional float fNumber = 5;
|
||||
optional float focalLength = 6;
|
||||
optional int32 iso = 7;
|
||||
optional int32 orientation = 8;
|
||||
optional google.protobuf.Timestamp takenDateTime = 9;
|
||||
}
|
||||
|
||||
message Entity {
|
||||
Reference ref = 1;
|
||||
ResourceID id = 2;
|
||||
string name = 3;
|
||||
string etag = 4;
|
||||
uint64 size = 5;
|
||||
google.protobuf.Timestamp last_modified_time = 6;
|
||||
string mime_type = 7;
|
||||
string permissions = 8;
|
||||
uint64 type = 9;
|
||||
bool deleted = 10;
|
||||
string shareRootName = 11;
|
||||
ResourceID parent_id = 12;
|
||||
repeated string tags = 13;
|
||||
string highlights = 14;
|
||||
Audio audio = 15;
|
||||
GeoCoordinates location = 16;
|
||||
ResourceID remote_item_id = 17;
|
||||
Image image = 18;
|
||||
Photo photo = 19;
|
||||
repeated string favorites = 20;
|
||||
}
|
||||
|
||||
message Match {
|
||||
// the matched entity
|
||||
Entity entity = 1;
|
||||
// the match score
|
||||
float score = 2;
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package qsfera.messages.settings.v0;
|
||||
|
||||
option go_package = "github.com/qsfera/server/protogen/gen/qsfera/messages/settings/v0";
|
||||
|
||||
// ---
|
||||
// messages for settings values
|
||||
// ---
|
||||
|
||||
message ValueWithIdentifier {
|
||||
Identifier identifier = 1;
|
||||
Value value = 2;
|
||||
}
|
||||
|
||||
message Identifier {
|
||||
string extension = 1;
|
||||
string bundle = 2;
|
||||
string setting = 3;
|
||||
}
|
||||
|
||||
// ---
|
||||
// messages for role assignment
|
||||
// ---
|
||||
|
||||
message UserRoleAssignment {
|
||||
// id is generated upon saving the assignment
|
||||
string id = 1;
|
||||
string account_uuid = 2;
|
||||
// the role_id is a bundle_id internally
|
||||
string role_id = 3;
|
||||
}
|
||||
|
||||
message UserRoleAssignmentFilter {
|
||||
enum Type {
|
||||
TYPE_UNKNOWN = 0;
|
||||
TYPE_ACCOUNT = 1;
|
||||
TYPE_ROLE = 2;
|
||||
}
|
||||
Type type = 1;
|
||||
oneof term {
|
||||
string account_uuid = 2;
|
||||
string role_id = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// ---
|
||||
// resource payloads
|
||||
// ---
|
||||
|
||||
message Resource {
|
||||
enum Type {
|
||||
TYPE_UNKNOWN = 0;
|
||||
TYPE_SYSTEM = 1;
|
||||
TYPE_FILE = 2;
|
||||
TYPE_SHARE = 3;
|
||||
TYPE_SETTING = 4;
|
||||
TYPE_BUNDLE = 5;
|
||||
TYPE_USER = 6;
|
||||
TYPE_GROUP = 7;
|
||||
}
|
||||
Type type = 1;
|
||||
string id = 2;
|
||||
}
|
||||
|
||||
// ---
|
||||
// payloads for bundles
|
||||
// ---
|
||||
|
||||
message Bundle {
|
||||
enum Type {
|
||||
TYPE_UNKNOWN = 0;
|
||||
TYPE_DEFAULT = 1;
|
||||
TYPE_ROLE = 2;
|
||||
};
|
||||
string id = 1; // @gotags: yaml:"id"
|
||||
string name = 2; // @gotags: yaml:"name"
|
||||
Type type = 3; // @gotags: yaml:"type"
|
||||
string extension = 4; // @gotags: yaml:"extension"
|
||||
string display_name = 5; // @gotags: yaml:"display_name"
|
||||
repeated Setting settings = 6; // @gotags: yaml:"settings"
|
||||
Resource resource = 7; // @gotags: yaml:"resource"
|
||||
}
|
||||
|
||||
message Setting {
|
||||
string id = 1; // @gotags: yaml:"id"
|
||||
string name = 2; // @gotags: yaml:"name"
|
||||
string display_name = 3; // @gotags: yaml:"display_name"
|
||||
string description = 4; // @gotags: yaml:"description"
|
||||
oneof value {
|
||||
Int int_value = 5; // @gotags: yaml:"int_value"
|
||||
String string_value = 6; // @gotags: yaml:"string_value"
|
||||
Bool bool_value = 7; // @gotags: yaml:"bool_value"
|
||||
SingleChoiceList single_choice_value = 8; // @gotags: yaml:"single_choice_value"
|
||||
MultiChoiceList multi_choice_value = 9; // @gotags: yaml:"multi_choice_value"
|
||||
Permission permission_value = 10; // @gotags: yaml:"permission_value"
|
||||
MultiChoiceCollection multi_choice_collection_value = 12; // @gotags: yaml:"multi_choice_collection_value"
|
||||
}
|
||||
Resource resource = 11; // @gotags: yaml:"resource"
|
||||
}
|
||||
|
||||
message Int {
|
||||
int64 default = 1; // @gotags: yaml:"default"
|
||||
int64 min = 2; // @gotags: yaml:"min"
|
||||
int64 max = 3; // @gotags: yaml:"max"
|
||||
int64 step = 4; // @gotags: yaml:"step"
|
||||
string placeholder = 5; // @gotags: yaml:"placeholder"
|
||||
}
|
||||
|
||||
message String {
|
||||
string default = 1; // @gotags: yaml:"default"
|
||||
bool required = 2; // @gotags: yaml:"required"
|
||||
int32 min_length = 3; // @gotags: yaml:"min_length"
|
||||
int32 max_length = 4; // @gotags: yaml:"max_length"
|
||||
string placeholder = 5; // @gotags: yaml:"placeholder"
|
||||
}
|
||||
|
||||
message Bool {
|
||||
bool default = 1; // @gotags: yaml:"default"
|
||||
string label = 2; // @gotags: yaml:"label"
|
||||
}
|
||||
|
||||
message SingleChoiceList {
|
||||
repeated ListOption options = 1; // @gotags: yaml:"options"
|
||||
}
|
||||
|
||||
message MultiChoiceList {
|
||||
repeated ListOption options = 1; // @gotags: yaml:"options"
|
||||
}
|
||||
|
||||
message ListOption {
|
||||
ListOptionValue value = 1; // @gotags: yaml:"value"
|
||||
bool default = 2; // @gotags: yaml:"default"
|
||||
string display_value = 3; // @gotags: yaml:"display_value"
|
||||
}
|
||||
|
||||
message MultiChoiceCollection {
|
||||
repeated MultiChoiceCollectionOption options = 1; // @gotags: yaml:"options"
|
||||
}
|
||||
|
||||
message MultiChoiceCollectionOption {
|
||||
MultiChoiceCollectionOptionValue value = 1; // @gotags: yaml:"value"
|
||||
string key = 2; // @gotags: yaml:"key"
|
||||
string attribute = 3; // @gotags: yaml:"attribute"
|
||||
string display_value = 4; // @gotags: yaml:"display_value"
|
||||
}
|
||||
|
||||
message MultiChoiceCollectionOptionValue {
|
||||
oneof option {
|
||||
Int int_value = 1; // @gotags: yaml:"int_value"
|
||||
String string_value = 2; // @gotags: yaml:"string_value"
|
||||
Bool bool_value = 3; // @gotags: yaml:"bool_value"
|
||||
}
|
||||
}
|
||||
|
||||
message Permission {
|
||||
enum Operation {
|
||||
OPERATION_UNKNOWN = 0;
|
||||
OPERATION_CREATE = 1;
|
||||
OPERATION_READ = 2;
|
||||
OPERATION_UPDATE = 3;
|
||||
OPERATION_DELETE = 4;
|
||||
OPERATION_WRITE = 5;// WRITE is a combination of CREATE and UPDATE
|
||||
OPERATION_READWRITE = 6;// READWRITE is a combination of READ and WRITE
|
||||
}
|
||||
Operation operation = 1; // @gotags: yaml:"operation"
|
||||
enum Constraint {
|
||||
CONSTRAINT_UNKNOWN = 0;
|
||||
CONSTRAINT_OWN = 1;
|
||||
CONSTRAINT_SHARED = 2;
|
||||
CONSTRAINT_ALL = 3;
|
||||
}
|
||||
Constraint constraint = 2; // @gotags: yaml:"constraint"
|
||||
}
|
||||
|
||||
// ---
|
||||
// payloads for values
|
||||
// ---
|
||||
|
||||
message Value {
|
||||
// id is the id of the Value. It is generated on saving it.
|
||||
string id = 1; // @gotags: yaml:"id"
|
||||
string bundle_id = 2; // @gotags: yaml:"bundle_id"
|
||||
// setting_id is the id of the setting from within its bundle.
|
||||
string setting_id = 3; // @gotags: yaml:"setting_id"
|
||||
string account_uuid = 4; // @gotags: yaml:"account_uuid"
|
||||
Resource resource = 5; // @gotags: yaml:"resource"
|
||||
oneof value {
|
||||
bool bool_value = 6; // @gotags: yaml:"bool_value"
|
||||
int64 int_value = 7; // @gotags: yaml:"int_value"
|
||||
string string_value = 8; // @gotags: yaml:"string_value"
|
||||
ListValue list_value = 9; // @gotags: yaml:"list_value"
|
||||
CollectionValue collection_value = 10; // @gotags: yaml:"collection_value"
|
||||
}
|
||||
}
|
||||
|
||||
message ListValue {
|
||||
repeated ListOptionValue values = 1; // @gotags: yaml:"values"
|
||||
}
|
||||
|
||||
message ListOptionValue {
|
||||
oneof option {
|
||||
string string_value = 1; // @gotags: yaml:"string_value"
|
||||
int64 int_value = 2; // @gotags: yaml:"int_value"
|
||||
bool bool_value = 3; // @gotags: yaml:"bool_value"
|
||||
}
|
||||
}
|
||||
|
||||
message CollectionValue {
|
||||
repeated CollectionOption values = 1; // @gotags: yaml:"values"
|
||||
}
|
||||
|
||||
message CollectionOption {
|
||||
// required
|
||||
string key = 1; // @gotags: yaml:"key"
|
||||
oneof option {
|
||||
int64 int_value = 2; // @gotags: yaml:"int_value"
|
||||
string string_value = 3; // @gotags: yaml:"string_value"
|
||||
bool bool_value = 4; // @gotags: yaml:"bool_value"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package qsfera.messages.thumbnails.v0;
|
||||
|
||||
option go_package = "github.com/qsfera/server/protogen/gen/qsfera/messages/thumbnails/v0";
|
||||
|
||||
message WebdavSource {
|
||||
// REQUIRED.
|
||||
string url = 1;
|
||||
// REQUIRED.
|
||||
bool is_public_link = 2;
|
||||
// OPTIONAL.
|
||||
string webdav_authorization = 3;
|
||||
// OPTIONAL.
|
||||
string reva_authorization = 4;
|
||||
// OPTIONAL.
|
||||
string public_link_token = 5;
|
||||
}
|
||||
|
||||
message CS3Source {
|
||||
string path = 1;
|
||||
string authorization = 2;
|
||||
}
|
||||
|
||||
// The file types to which the thumbnail can be encoded to.
|
||||
enum ThumbnailType {
|
||||
PNG = 0; // Represents PNG type
|
||||
JPG = 1; // Represents JPG type
|
||||
GIF = 2; // Represents GIF type
|
||||
}
|
||||
Reference in New Issue
Block a user