types/v2/proto/claim.proto

80 lines
1.3 KiB
Protocol Buffer
Raw Normal View History

2019-02-27 18:03:57 +01:00
syntax = "proto3";
package pb;
message Claim {
2019-03-13 22:18:57 +01:00
oneof type {
Stream stream = 1;
Channel channel = 2;
}
2019-02-27 18:03:57 +01:00
}
message Channel {
bytes public_key = 1;
2019-03-25 15:55:31 +01:00
repeated string tags = 2;
string title = 3;
string description = 4;
string thumbnail_url = 5;
string language = 6;
string contact_email = 7;
string homepage_url = 8;
string cover_url = 9;
2019-02-27 18:03:57 +01:00
}
message Stream {
bytes hash = 1;
2019-03-25 15:55:31 +01:00
repeated string tags = 2;
2019-02-27 18:03:57 +01:00
string title = 3;
2019-03-25 15:55:31 +01:00
string description = 4;
string thumbnail_url = 5;
string language = 6;
2019-02-27 18:03:57 +01:00
2019-03-25 15:55:31 +01:00
string author = 7;
string license = 8;
string license_url = 9;
int64 release_time = 10; // seconds since UNIX epoch
string media_type = 13;
Fee fee = 14;
File file = 15;
2019-03-25 16:08:46 +01:00
oneof type {
Image image = 16;
Video video = 17;
Audio audio = 18;
}
2019-02-27 18:03:57 +01:00
}
message Fee {
enum Currency {
LBC = 0;
USD = 1;
}
Currency currency = 1;
bytes address = 2;
uint64 amount = 3; // deweys for LBC, cents for USD
}
message File {
string name = 1;
uint64 size = 2;
}
2019-03-25 15:55:31 +01:00
message Image {
uint32 width = 1;
uint32 height = 2;
}
2019-02-27 18:03:57 +01:00
message Video {
uint32 width = 1;
uint32 height = 2;
2019-03-25 15:55:31 +01:00
uint32 duration = 3;
}
message Audio {
uint32 duration = 3;
}