other/collection/gallery.proto
// proto version3
syntax = "proto3";
package collection;
option go_package = "github.com/ali2210/wizdwarf/structs/collection";
// create protocol buffer structure
message Pictures {
string Pic_id = 1;
string Pic_src = 2;
string Pic_date= 3;
string Pic_time = 4;
string User_agent_id = 5;
string Pic_tags = 6;
map<string, string> CDR = 7; // key : multi-format cid , value : link of storage
}
// create array of Pictures for multiple pictures
message Collection {
repeated Pictures gallery = 1;
}
// compressed message require hash of avatar
message Compressed{
string User_agent_id = 1;
string Pic_id = 2;
}
// metadata file contain few pictures properties
message Metadata_File{
string Pic_src = 1;
string CDR =2;
string User_agent_id = 3;
}
// content route required hash of avatar object and who will share it
message ContentRoute{
string User_agent_id = 1;
bool IsP2PAddress = 2;
}
// stream services
service StreamService {
// store new picture as collection
rpc NewPictures (Pictures) returns (Collection);
// with search picture functionality ; user will allow to get avatar information
rpc SearchPictures (Compressed) returns (ContentRoute);
// avatar online allow user to reused avatar
rpc GetMetadata (Compressed) returns (Metadata_File);
}