new proto3 definitions
This commit is contained in:
parent
594241d24e
commit
df66bbd609
53 changed files with 9438 additions and 32 deletions
33
README.md
33
README.md
|
@ -2,38 +2,7 @@
|
|||
|
||||
Cross-language definitions for standard LBRY types.
|
||||
|
||||
## Using LBRY types in your code
|
||||
|
||||
### Go
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import pb "github.com/lbryio/types/go"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
title := "Coherence"
|
||||
metadata := pb.Metadata{Title:&title}
|
||||
fmt.Printf("Let's watch %s on LBRY!\n", metadata.GetTitle())
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Python
|
||||
|
||||
todo
|
||||
|
||||
### Javascript
|
||||
|
||||
todo
|
||||
|
||||
## Compiling types
|
||||
|
||||
You only need to do this if you're modifying the types themselves.
|
||||
|
||||
- Download [the protoc binary](https://github.com/google/protobuf/releases) and put it in your path. Make sure you get the one starting with `protoc`, not `protobuf`.
|
||||
- `./build.sh`
|
||||
`v1/` contains the old proto2 files. `v2/` contains the new proto3 files. See the README.md file in each dir for instructions on using each.
|
||||
|
||||
## License
|
||||
|
||||
|
|
32
v1/README.md
Normal file
32
v1/README.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Using LBRY types in your code
|
||||
|
||||
## Go
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import pb "github.com/lbryio/types/go"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
title := "Coherence"
|
||||
metadata := pb.Metadata{Title:&title}
|
||||
fmt.Printf("Let's watch %s on LBRY!\n", metadata.GetTitle())
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
todo
|
||||
|
||||
## Javascript
|
||||
|
||||
todo
|
||||
|
||||
# Compiling types
|
||||
|
||||
You only need to do this if you're modifying the types themselves.
|
||||
|
||||
- Download [the protoc binary](https://github.com/google/protobuf/releases) and put it in your path. Make sure you get the one starting with `protoc`, not `protobuf`.
|
||||
- `./build.sh`
|
32
v2/README.md
Normal file
32
v2/README.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Using LBRY types in your code
|
||||
|
||||
## Go
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import pb "github.com/lbryio/types/go"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
title := "Coherence"
|
||||
metadata := pb.Metadata{Title:&title}
|
||||
fmt.Printf("Let's watch %s on LBRY!\n", metadata.GetTitle())
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
todo
|
||||
|
||||
## Javascript
|
||||
|
||||
todo
|
||||
|
||||
# Compiling types
|
||||
|
||||
You only need to do this if you're modifying the types themselves.
|
||||
|
||||
- Download [the protoc binary](https://github.com/google/protobuf/releases) and put it in your path. Make sure you get the one starting with `protoc`, not `protobuf`.
|
||||
- `./build.sh`
|
31
v2/build.sh
Executable file
31
v2/build.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
#set -x
|
||||
|
||||
version_gte() {
|
||||
[ "$1" = "$(echo -e "$1\n$2" | sort -V | tail -n1)" ]
|
||||
}
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
|
||||
hash protoc 2>/dev/null || { echo >&2 -e 'error: protoc binary not found\nDownload it from https://github.com/google/protobuf/releases and put it in your path.\nMake sure you get the one starting with `protoc`, not `protobuf`.'; exit 1; }
|
||||
|
||||
|
||||
PROTOC="$(which protoc)"
|
||||
VERSION="$($PROTOC --version | cut -d' ' -f2)"
|
||||
MIN_VERSION="3.0"
|
||||
|
||||
version_gte "$VERSION" "$MIN_VERSION" || { echo >&2 "error: protoc version must be >= $MIN_VERSION (your $PROTOC is $VERSION)"; exit 1; }
|
||||
|
||||
|
||||
hash protoc-gen-go 2>/dev/null || go get -u github.com/golang/protobuf/protoc-gen-go
|
||||
hash protoc-gen-go 2>/dev/null || { echo >&2 'error: Make sure $GOPATH/bin is in your $PATH'; exit 1; }
|
||||
|
||||
|
||||
mkdir -p $DIR/go $DIR/python $DIR/js $DIR/cpp
|
||||
find $DIR/go $DIR/python $DIR/js $DIR/cpp -type f -delete
|
||||
|
||||
|
||||
protoc --proto_path="$DIR/proto" --python_out="$DIR/python" --go_out="$DIR/go" --js_out="import_style=commonjs,binary:$DIR/js" --cpp_out="$DIR/cpp" $DIR/proto/*.proto
|
3728
v2/cpp/claim.pb.cc
Normal file
3728
v2/cpp/claim.pb.cc
Normal file
File diff suppressed because it is too large
Load diff
2666
v2/cpp/claim.pb.h
Normal file
2666
v2/cpp/claim.pb.h
Normal file
File diff suppressed because it is too large
Load diff
569
v2/go/claim.pb.go
Normal file
569
v2/go/claim.pb.go
Normal file
|
@ -0,0 +1,569 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: claim.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Claim_Type int32
|
||||
|
||||
const (
|
||||
Claim_STREAM Claim_Type = 0
|
||||
Claim_CHANNEL Claim_Type = 1
|
||||
)
|
||||
|
||||
var Claim_Type_name = map[int32]string{
|
||||
0: "STREAM",
|
||||
1: "CHANNEL",
|
||||
}
|
||||
|
||||
var Claim_Type_value = map[string]int32{
|
||||
"STREAM": 0,
|
||||
"CHANNEL": 1,
|
||||
}
|
||||
|
||||
func (x Claim_Type) String() string {
|
||||
return proto.EnumName(Claim_Type_name, int32(x))
|
||||
}
|
||||
|
||||
func (Claim_Type) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{0, 0}
|
||||
}
|
||||
|
||||
type Fee_Currency int32
|
||||
|
||||
const (
|
||||
Fee_LBC Fee_Currency = 0
|
||||
Fee_USD Fee_Currency = 1
|
||||
)
|
||||
|
||||
var Fee_Currency_name = map[int32]string{
|
||||
0: "LBC",
|
||||
1: "USD",
|
||||
}
|
||||
|
||||
var Fee_Currency_value = map[string]int32{
|
||||
"LBC": 0,
|
||||
"USD": 1,
|
||||
}
|
||||
|
||||
func (x Fee_Currency) String() string {
|
||||
return proto.EnumName(Fee_Currency_name, int32(x))
|
||||
}
|
||||
|
||||
func (Fee_Currency) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{3, 0}
|
||||
}
|
||||
|
||||
type Claim struct {
|
||||
Type Claim_Type `protobuf:"varint,1,opt,name=type,proto3,enum=pb.Claim_Type" json:"type,omitempty"`
|
||||
Stream *Stream `protobuf:"bytes,2,opt,name=stream,proto3" json:"stream,omitempty"`
|
||||
Channel *Channel `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Claim) Reset() { *m = Claim{} }
|
||||
func (m *Claim) String() string { return proto.CompactTextString(m) }
|
||||
func (*Claim) ProtoMessage() {}
|
||||
func (*Claim) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{0}
|
||||
}
|
||||
|
||||
func (m *Claim) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Claim.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Claim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Claim.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Claim) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Claim.Merge(m, src)
|
||||
}
|
||||
func (m *Claim) XXX_Size() int {
|
||||
return xxx_messageInfo_Claim.Size(m)
|
||||
}
|
||||
func (m *Claim) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Claim.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Claim proto.InternalMessageInfo
|
||||
|
||||
func (m *Claim) GetType() Claim_Type {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return Claim_STREAM
|
||||
}
|
||||
|
||||
func (m *Claim) GetStream() *Stream {
|
||||
if m != nil {
|
||||
return m.Stream
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Claim) GetChannel() *Channel {
|
||||
if m != nil {
|
||||
return m.Channel
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Channel struct {
|
||||
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
ContactEmail string `protobuf:"bytes,4,opt,name=contact_email,json=contactEmail,proto3" json:"contact_email,omitempty"`
|
||||
HomepageUrl string `protobuf:"bytes,5,opt,name=homepage_url,json=homepageUrl,proto3" json:"homepage_url,omitempty"`
|
||||
ThumbnailUrl string `protobuf:"bytes,16,opt,name=thumbnail_url,json=thumbnailUrl,proto3" json:"thumbnail_url,omitempty"`
|
||||
CoverUrl string `protobuf:"bytes,17,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Channel) Reset() { *m = Channel{} }
|
||||
func (m *Channel) String() string { return proto.CompactTextString(m) }
|
||||
func (*Channel) ProtoMessage() {}
|
||||
func (*Channel) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{1}
|
||||
}
|
||||
|
||||
func (m *Channel) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Channel.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Channel.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Channel) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Channel.Merge(m, src)
|
||||
}
|
||||
func (m *Channel) XXX_Size() int {
|
||||
return xxx_messageInfo_Channel.Size(m)
|
||||
}
|
||||
func (m *Channel) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Channel.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Channel proto.InternalMessageInfo
|
||||
|
||||
func (m *Channel) GetPublicKey() []byte {
|
||||
if m != nil {
|
||||
return m.PublicKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Channel) GetTitle() string {
|
||||
if m != nil {
|
||||
return m.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Channel) GetDescription() string {
|
||||
if m != nil {
|
||||
return m.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Channel) GetContactEmail() string {
|
||||
if m != nil {
|
||||
return m.ContactEmail
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Channel) GetHomepageUrl() string {
|
||||
if m != nil {
|
||||
return m.HomepageUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Channel) GetThumbnailUrl() string {
|
||||
if m != nil {
|
||||
return m.ThumbnailUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Channel) GetCoverUrl() string {
|
||||
if m != nil {
|
||||
return m.CoverUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Stream struct {
|
||||
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"`
|
||||
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Author string `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"`
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
MediaType string `protobuf:"bytes,6,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
|
||||
License string `protobuf:"bytes,7,opt,name=license,proto3" json:"license,omitempty"`
|
||||
File *File `protobuf:"bytes,8,opt,name=file,proto3" json:"file,omitempty"`
|
||||
Fee *Fee `protobuf:"bytes,16,opt,name=fee,proto3" json:"fee,omitempty"`
|
||||
LicenseUrl string `protobuf:"bytes,17,opt,name=license_url,json=licenseUrl,proto3" json:"license_url,omitempty"`
|
||||
ThumbnailUrl string `protobuf:"bytes,18,opt,name=thumbnail_url,json=thumbnailUrl,proto3" json:"thumbnail_url,omitempty"`
|
||||
Duration uint32 `protobuf:"varint,19,opt,name=duration,proto3" json:"duration,omitempty"`
|
||||
Tags []string `protobuf:"bytes,20,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
ReleaseTime int64 `protobuf:"varint,21,opt,name=release_time,json=releaseTime,proto3" json:"release_time,omitempty"`
|
||||
Video *Video `protobuf:"bytes,22,opt,name=video,proto3" json:"video,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Stream) Reset() { *m = Stream{} }
|
||||
func (m *Stream) String() string { return proto.CompactTextString(m) }
|
||||
func (*Stream) ProtoMessage() {}
|
||||
func (*Stream) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{2}
|
||||
}
|
||||
|
||||
func (m *Stream) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Stream.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Stream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Stream.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Stream) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Stream.Merge(m, src)
|
||||
}
|
||||
func (m *Stream) XXX_Size() int {
|
||||
return xxx_messageInfo_Stream.Size(m)
|
||||
}
|
||||
func (m *Stream) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Stream.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Stream proto.InternalMessageInfo
|
||||
|
||||
func (m *Stream) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Stream) GetLanguage() string {
|
||||
if m != nil {
|
||||
return m.Language
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetTitle() string {
|
||||
if m != nil {
|
||||
return m.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetAuthor() string {
|
||||
if m != nil {
|
||||
return m.Author
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetDescription() string {
|
||||
if m != nil {
|
||||
return m.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetMediaType() string {
|
||||
if m != nil {
|
||||
return m.MediaType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetLicense() string {
|
||||
if m != nil {
|
||||
return m.License
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetFile() *File {
|
||||
if m != nil {
|
||||
return m.File
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Stream) GetFee() *Fee {
|
||||
if m != nil {
|
||||
return m.Fee
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Stream) GetLicenseUrl() string {
|
||||
if m != nil {
|
||||
return m.LicenseUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetThumbnailUrl() string {
|
||||
if m != nil {
|
||||
return m.ThumbnailUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Stream) GetDuration() uint32 {
|
||||
if m != nil {
|
||||
return m.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Stream) GetTags() []string {
|
||||
if m != nil {
|
||||
return m.Tags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Stream) GetReleaseTime() int64 {
|
||||
if m != nil {
|
||||
return m.ReleaseTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Stream) GetVideo() *Video {
|
||||
if m != nil {
|
||||
return m.Video
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Fee struct {
|
||||
Currency Fee_Currency `protobuf:"varint,1,opt,name=currency,proto3,enum=pb.Fee_Currency" json:"currency,omitempty"`
|
||||
Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Fee) Reset() { *m = Fee{} }
|
||||
func (m *Fee) String() string { return proto.CompactTextString(m) }
|
||||
func (*Fee) ProtoMessage() {}
|
||||
func (*Fee) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{3}
|
||||
}
|
||||
|
||||
func (m *Fee) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Fee.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Fee.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Fee) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Fee.Merge(m, src)
|
||||
}
|
||||
func (m *Fee) XXX_Size() int {
|
||||
return xxx_messageInfo_Fee.Size(m)
|
||||
}
|
||||
func (m *Fee) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Fee.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Fee proto.InternalMessageInfo
|
||||
|
||||
func (m *Fee) GetCurrency() Fee_Currency {
|
||||
if m != nil {
|
||||
return m.Currency
|
||||
}
|
||||
return Fee_LBC
|
||||
}
|
||||
|
||||
func (m *Fee) GetAddress() []byte {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Fee) GetAmount() uint64 {
|
||||
if m != nil {
|
||||
return m.Amount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type File struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *File) Reset() { *m = File{} }
|
||||
func (m *File) String() string { return proto.CompactTextString(m) }
|
||||
func (*File) ProtoMessage() {}
|
||||
func (*File) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{4}
|
||||
}
|
||||
|
||||
func (m *File) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_File.Unmarshal(m, b)
|
||||
}
|
||||
func (m *File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_File.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *File) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_File.Merge(m, src)
|
||||
}
|
||||
func (m *File) XXX_Size() int {
|
||||
return xxx_messageInfo_File.Size(m)
|
||||
}
|
||||
func (m *File) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_File.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_File proto.InternalMessageInfo
|
||||
|
||||
func (m *File) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *File) GetSize() uint64 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Video struct {
|
||||
Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
|
||||
Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Video) Reset() { *m = Video{} }
|
||||
func (m *Video) String() string { return proto.CompactTextString(m) }
|
||||
func (*Video) ProtoMessage() {}
|
||||
func (*Video) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bae86789b513b1db, []int{5}
|
||||
}
|
||||
|
||||
func (m *Video) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Video.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Video) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Video.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Video) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Video.Merge(m, src)
|
||||
}
|
||||
func (m *Video) XXX_Size() int {
|
||||
return xxx_messageInfo_Video.Size(m)
|
||||
}
|
||||
func (m *Video) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Video.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Video proto.InternalMessageInfo
|
||||
|
||||
func (m *Video) GetWidth() uint32 {
|
||||
if m != nil {
|
||||
return m.Width
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Video) GetHeight() uint32 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("pb.Claim_Type", Claim_Type_name, Claim_Type_value)
|
||||
proto.RegisterEnum("pb.Fee_Currency", Fee_Currency_name, Fee_Currency_value)
|
||||
proto.RegisterType((*Claim)(nil), "pb.Claim")
|
||||
proto.RegisterType((*Channel)(nil), "pb.Channel")
|
||||
proto.RegisterType((*Stream)(nil), "pb.Stream")
|
||||
proto.RegisterType((*Fee)(nil), "pb.Fee")
|
||||
proto.RegisterType((*File)(nil), "pb.File")
|
||||
proto.RegisterType((*Video)(nil), "pb.Video")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("claim.proto", fileDescriptor_bae86789b513b1db) }
|
||||
|
||||
var fileDescriptor_bae86789b513b1db = []byte{
|
||||
// 614 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x94, 0xcf, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc6, 0xeb, 0xda, 0x49, 0xec, 0x71, 0x52, 0x85, 0xa5, 0x54, 0xa6, 0xb4, 0x6a, 0x30, 0x42,
|
||||
0xca, 0x01, 0xe5, 0x50, 0xc4, 0x03, 0x94, 0xd0, 0x0a, 0x89, 0xd2, 0xc3, 0xb6, 0xe5, 0x1a, 0x6d,
|
||||
0xec, 0x69, 0xbc, 0x62, 0xfd, 0x47, 0xf6, 0xba, 0x28, 0x5c, 0x79, 0x08, 0x5e, 0x84, 0xa7, 0xe2,
|
||||
0x29, 0xd0, 0x8e, 0x37, 0x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a3,
|
||||
0x11, 0xb7, 0xd9, 0xb2, 0x4f, 0xff, 0x1a, 0x6f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xbb,
|
||||
0x5b, 0xad, 0x44, 0x04, 0x00, 0x00,
|
||||
}
|
1812
v2/js/claim_pb.js
Normal file
1812
v2/js/claim_pb.js
Normal file
File diff suppressed because it is too large
Load diff
65
v2/proto/claim.proto
Normal file
65
v2/proto/claim.proto
Normal file
|
@ -0,0 +1,65 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
message Claim {
|
||||
enum Type {
|
||||
STREAM = 0;
|
||||
CHANNEL = 1;
|
||||
}
|
||||
|
||||
Type type = 1; // do we need this?
|
||||
Stream stream = 2;
|
||||
Channel channel = 3;
|
||||
}
|
||||
|
||||
message Channel {
|
||||
bytes public_key = 1;
|
||||
string title = 2;
|
||||
string description = 3;
|
||||
string contact_email = 4;
|
||||
string homepage_url = 5;
|
||||
|
||||
string thumbnail_url = 16;
|
||||
string cover_url = 17;
|
||||
}
|
||||
|
||||
message Stream {
|
||||
bytes hash = 1;
|
||||
string language = 2;
|
||||
string title = 3;
|
||||
string author = 4;
|
||||
string description = 5;
|
||||
string media_type = 6;
|
||||
string license = 7;
|
||||
File file = 8;
|
||||
|
||||
Fee fee = 16;
|
||||
string license_url = 17;
|
||||
string thumbnail_url = 18;
|
||||
uint32 duration = 19;
|
||||
repeated string tags = 20;
|
||||
int64 release_time = 21; // seconds since UNIX epoch
|
||||
Video video = 22;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
message Video {
|
||||
uint32 width = 1;
|
||||
uint32 height = 2;
|
||||
}
|
502
v2/python/claim_pb2.py
Normal file
502
v2/python/claim_pb2.py
Normal file
|
@ -0,0 +1,502 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: claim.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='claim.proto',
|
||||
package='pb',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x0b\x63laim.proto\x12\x02pb\"\x80\x01\n\x05\x43laim\x12\x1c\n\x04type\x18\x01 \x01(\x0e\x32\x0e.pb.Claim.Type\x12\x1a\n\x06stream\x18\x02 \x01(\x0b\x32\n.pb.Stream\x12\x1c\n\x07\x63hannel\x18\x03 \x01(\x0b\x32\x0b.pb.Channel\"\x1f\n\x04Type\x12\n\n\x06STREAM\x10\x00\x12\x0b\n\x07\x43HANNEL\x10\x01\"\x98\x01\n\x07\x43hannel\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rcontact_email\x18\x04 \x01(\t\x12\x14\n\x0chomepage_url\x18\x05 \x01(\t\x12\x15\n\rthumbnail_url\x18\x10 \x01(\t\x12\x11\n\tcover_url\x18\x11 \x01(\t\"\xab\x02\n\x06Stream\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x10\n\x08language\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06\x61uthor\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12\x0f\n\x07license\x18\x07 \x01(\t\x12\x16\n\x04\x66ile\x18\x08 \x01(\x0b\x32\x08.pb.File\x12\x14\n\x03\x66\x65\x65\x18\x10 \x01(\x0b\x32\x07.pb.Fee\x12\x13\n\x0blicense_url\x18\x11 \x01(\t\x12\x15\n\rthumbnail_url\x18\x12 \x01(\t\x12\x10\n\x08\x64uration\x18\x13 \x01(\r\x12\x0c\n\x04tags\x18\x14 \x03(\t\x12\x14\n\x0crelease_time\x18\x15 \x01(\x03\x12\x18\n\x05video\x18\x16 \x01(\x0b\x32\t.pb.Video\"h\n\x03\x46\x65\x65\x12\"\n\x08\x63urrency\x18\x01 \x01(\x0e\x32\x10.pb.Fee.Currency\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x04\"\x1c\n\x08\x43urrency\x12\x07\n\x03LBC\x10\x00\x12\x07\n\x03USD\x10\x01\"\"\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\"&\n\x05Video\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\rb\x06proto3')
|
||||
)
|
||||
|
||||
|
||||
|
||||
_CLAIM_TYPE = _descriptor.EnumDescriptor(
|
||||
name='Type',
|
||||
full_name='pb.Claim.Type',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='STREAM', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='CHANNEL', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=117,
|
||||
serialized_end=148,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_CLAIM_TYPE)
|
||||
|
||||
_FEE_CURRENCY = _descriptor.EnumDescriptor(
|
||||
name='Currency',
|
||||
full_name='pb.Fee.Currency',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='LBC', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='USD', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=683,
|
||||
serialized_end=711,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_FEE_CURRENCY)
|
||||
|
||||
|
||||
_CLAIM = _descriptor.Descriptor(
|
||||
name='Claim',
|
||||
full_name='pb.Claim',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='type', full_name='pb.Claim.type', index=0,
|
||||
number=1, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='stream', full_name='pb.Claim.stream', index=1,
|
||||
number=2, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='channel', full_name='pb.Claim.channel', index=2,
|
||||
number=3, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
_CLAIM_TYPE,
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=20,
|
||||
serialized_end=148,
|
||||
)
|
||||
|
||||
|
||||
_CHANNEL = _descriptor.Descriptor(
|
||||
name='Channel',
|
||||
full_name='pb.Channel',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='public_key', full_name='pb.Channel.public_key', index=0,
|
||||
number=1, type=12, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b(""),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='title', full_name='pb.Channel.title', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='description', full_name='pb.Channel.description', index=2,
|
||||
number=3, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='contact_email', full_name='pb.Channel.contact_email', index=3,
|
||||
number=4, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='homepage_url', full_name='pb.Channel.homepage_url', index=4,
|
||||
number=5, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='thumbnail_url', full_name='pb.Channel.thumbnail_url', index=5,
|
||||
number=16, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='cover_url', full_name='pb.Channel.cover_url', index=6,
|
||||
number=17, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=151,
|
||||
serialized_end=303,
|
||||
)
|
||||
|
||||
|
||||
_STREAM = _descriptor.Descriptor(
|
||||
name='Stream',
|
||||
full_name='pb.Stream',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='hash', full_name='pb.Stream.hash', index=0,
|
||||
number=1, type=12, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b(""),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='language', full_name='pb.Stream.language', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='title', full_name='pb.Stream.title', index=2,
|
||||
number=3, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='author', full_name='pb.Stream.author', index=3,
|
||||
number=4, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='description', full_name='pb.Stream.description', index=4,
|
||||
number=5, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='media_type', full_name='pb.Stream.media_type', index=5,
|
||||
number=6, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='license', full_name='pb.Stream.license', index=6,
|
||||
number=7, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='file', full_name='pb.Stream.file', index=7,
|
||||
number=8, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='fee', full_name='pb.Stream.fee', index=8,
|
||||
number=16, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='license_url', full_name='pb.Stream.license_url', index=9,
|
||||
number=17, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='thumbnail_url', full_name='pb.Stream.thumbnail_url', index=10,
|
||||
number=18, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='duration', full_name='pb.Stream.duration', index=11,
|
||||
number=19, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='tags', full_name='pb.Stream.tags', index=12,
|
||||
number=20, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='release_time', full_name='pb.Stream.release_time', index=13,
|
||||
number=21, type=3, cpp_type=2, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='video', full_name='pb.Stream.video', index=14,
|
||||
number=22, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=306,
|
||||
serialized_end=605,
|
||||
)
|
||||
|
||||
|
||||
_FEE = _descriptor.Descriptor(
|
||||
name='Fee',
|
||||
full_name='pb.Fee',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='currency', full_name='pb.Fee.currency', index=0,
|
||||
number=1, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='address', full_name='pb.Fee.address', index=1,
|
||||
number=2, type=12, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b(""),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='amount', full_name='pb.Fee.amount', index=2,
|
||||
number=3, type=4, cpp_type=4, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
_FEE_CURRENCY,
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=607,
|
||||
serialized_end=711,
|
||||
)
|
||||
|
||||
|
||||
_FILE = _descriptor.Descriptor(
|
||||
name='File',
|
||||
full_name='pb.File',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='name', full_name='pb.File.name', index=0,
|
||||
number=1, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='size', full_name='pb.File.size', index=1,
|
||||
number=2, type=4, cpp_type=4, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=713,
|
||||
serialized_end=747,
|
||||
)
|
||||
|
||||
|
||||
_VIDEO = _descriptor.Descriptor(
|
||||
name='Video',
|
||||
full_name='pb.Video',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='width', full_name='pb.Video.width', index=0,
|
||||
number=1, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='height', full_name='pb.Video.height', index=1,
|
||||
number=2, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=749,
|
||||
serialized_end=787,
|
||||
)
|
||||
|
||||
_CLAIM.fields_by_name['type'].enum_type = _CLAIM_TYPE
|
||||
_CLAIM.fields_by_name['stream'].message_type = _STREAM
|
||||
_CLAIM.fields_by_name['channel'].message_type = _CHANNEL
|
||||
_CLAIM_TYPE.containing_type = _CLAIM
|
||||
_STREAM.fields_by_name['file'].message_type = _FILE
|
||||
_STREAM.fields_by_name['fee'].message_type = _FEE
|
||||
_STREAM.fields_by_name['video'].message_type = _VIDEO
|
||||
_FEE.fields_by_name['currency'].enum_type = _FEE_CURRENCY
|
||||
_FEE_CURRENCY.containing_type = _FEE
|
||||
DESCRIPTOR.message_types_by_name['Claim'] = _CLAIM
|
||||
DESCRIPTOR.message_types_by_name['Channel'] = _CHANNEL
|
||||
DESCRIPTOR.message_types_by_name['Stream'] = _STREAM
|
||||
DESCRIPTOR.message_types_by_name['Fee'] = _FEE
|
||||
DESCRIPTOR.message_types_by_name['File'] = _FILE
|
||||
DESCRIPTOR.message_types_by_name['Video'] = _VIDEO
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Claim = _reflection.GeneratedProtocolMessageType('Claim', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CLAIM,
|
||||
__module__ = 'claim_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.Claim)
|
||||
))
|
||||
_sym_db.RegisterMessage(Claim)
|
||||
|
||||
Channel = _reflection.GeneratedProtocolMessageType('Channel', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CHANNEL,
|
||||
__module__ = 'claim_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.Channel)
|
||||
))
|
||||
_sym_db.RegisterMessage(Channel)
|
||||
|
||||
Stream = _reflection.GeneratedProtocolMessageType('Stream', (_message.Message,), dict(
|
||||
DESCRIPTOR = _STREAM,
|
||||
__module__ = 'claim_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.Stream)
|
||||
))
|
||||
_sym_db.RegisterMessage(Stream)
|
||||
|
||||
Fee = _reflection.GeneratedProtocolMessageType('Fee', (_message.Message,), dict(
|
||||
DESCRIPTOR = _FEE,
|
||||
__module__ = 'claim_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.Fee)
|
||||
))
|
||||
_sym_db.RegisterMessage(Fee)
|
||||
|
||||
File = _reflection.GeneratedProtocolMessageType('File', (_message.Message,), dict(
|
||||
DESCRIPTOR = _FILE,
|
||||
__module__ = 'claim_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.File)
|
||||
))
|
||||
_sym_db.RegisterMessage(File)
|
||||
|
||||
Video = _reflection.GeneratedProtocolMessageType('Video', (_message.Message,), dict(
|
||||
DESCRIPTOR = _VIDEO,
|
||||
__module__ = 'claim_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.Video)
|
||||
))
|
||||
_sym_db.RegisterMessage(Video)
|
||||
|
||||
|
||||
# @@protoc_insertion_point(module_scope)
|
Loading…
Reference in a new issue