bitswap_message_pb

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage   = fmt.Errorf("proto: integer overflow")
)
View Source
var TicketAck_Type_name = map[int32]string{
	0: "ACCEPT",
	1: "CANCEL",
}
View Source
var TicketAck_Type_value = map[string]int32{
	"ACCEPT": 0,
	"CANCEL": 1,
}
View Source
var Ticket_State_name = map[int32]string{
	0: "New",
	1: "ACK",
	2: "CANCEL",
	3: "TIMEOUT",
}
View Source
var Ticket_State_value = map[string]int32{
	"New":     0,
	"ACK":     1,
	"CANCEL":  2,
	"TIMEOUT": 3,
}

Functions

This section is empty.

Types

type Message

type Message struct {
	Wantlist Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist,proto3" json:"wantlist"`
	Blocks   [][]byte         `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"`
	Payload  []Message_Block  `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload"`
	//Ticketlist ticketlist = 4;
	//TicketAcklist ticketAcklist = 5;
	Ticketlist    []*Ticket    `protobuf:"bytes,4,rep,name=ticketlist,proto3" json:"ticketlist,omitempty"`
	TicketAcklist []*TicketAck `protobuf:"bytes,5,rep,name=ticketAcklist,proto3" json:"ticketAcklist,omitempty"`
}

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) GetBlocks

func (m *Message) GetBlocks() [][]byte

func (*Message) GetPayload

func (m *Message) GetPayload() []Message_Block

func (*Message) GetTicketAcklist

func (m *Message) GetTicketAcklist() []*TicketAck

func (*Message) GetTicketlist

func (m *Message) GetTicketlist() []*Ticket

func (*Message) GetWantlist

func (m *Message) GetWantlist() Message_Wantlist

func (*Message) Marshal

func (m *Message) Marshal() (dAtA []byte, err error)

func (*Message) MarshalTo

func (m *Message) MarshalTo(dAtA []byte) (int, error)

func (*Message) MarshalToSizedBuffer

func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) Size

func (m *Message) Size() (n int)

func (*Message) String

func (m *Message) String() string

func (*Message) Unmarshal

func (m *Message) Unmarshal(dAtA []byte) error

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type Message_Block

type Message_Block struct {
	Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

func (*Message_Block) Descriptor

func (*Message_Block) Descriptor() ([]byte, []int)

func (*Message_Block) GetData

func (m *Message_Block) GetData() []byte

func (*Message_Block) GetPrefix

func (m *Message_Block) GetPrefix() []byte

func (*Message_Block) Marshal

func (m *Message_Block) Marshal() (dAtA []byte, err error)

func (*Message_Block) MarshalTo

func (m *Message_Block) MarshalTo(dAtA []byte) (int, error)

func (*Message_Block) MarshalToSizedBuffer

func (m *Message_Block) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Block) ProtoMessage

func (*Message_Block) ProtoMessage()

func (*Message_Block) Reset

func (m *Message_Block) Reset()

func (*Message_Block) Size

func (m *Message_Block) Size() (n int)

func (*Message_Block) String

func (m *Message_Block) String() string

func (*Message_Block) Unmarshal

func (m *Message_Block) Unmarshal(dAtA []byte) error

func (*Message_Block) XXX_DiscardUnknown

func (m *Message_Block) XXX_DiscardUnknown()

func (*Message_Block) XXX_Marshal

func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message_Block) XXX_Merge

func (m *Message_Block) XXX_Merge(src proto.Message)

func (*Message_Block) XXX_Size

func (m *Message_Block) XXX_Size() int

func (*Message_Block) XXX_Unmarshal

func (m *Message_Block) XXX_Unmarshal(b []byte) error

type Message_Wantlist

type Message_Wantlist struct {
	Entries []Message_Wantlist_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"`
	Full    bool                     `protobuf:"varint,2,opt,name=full,proto3" json:"full,omitempty"`
}

func (*Message_Wantlist) Descriptor

func (*Message_Wantlist) Descriptor() ([]byte, []int)

func (*Message_Wantlist) GetEntries

func (m *Message_Wantlist) GetEntries() []Message_Wantlist_Entry

func (*Message_Wantlist) GetFull

func (m *Message_Wantlist) GetFull() bool

func (*Message_Wantlist) Marshal

func (m *Message_Wantlist) Marshal() (dAtA []byte, err error)

func (*Message_Wantlist) MarshalTo

func (m *Message_Wantlist) MarshalTo(dAtA []byte) (int, error)

func (*Message_Wantlist) MarshalToSizedBuffer

func (m *Message_Wantlist) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Wantlist) ProtoMessage

func (*Message_Wantlist) ProtoMessage()

func (*Message_Wantlist) Reset

func (m *Message_Wantlist) Reset()

func (*Message_Wantlist) Size

func (m *Message_Wantlist) Size() (n int)

func (*Message_Wantlist) String

func (m *Message_Wantlist) String() string

func (*Message_Wantlist) Unmarshal

func (m *Message_Wantlist) Unmarshal(dAtA []byte) error

func (*Message_Wantlist) XXX_DiscardUnknown

func (m *Message_Wantlist) XXX_DiscardUnknown()

func (*Message_Wantlist) XXX_Marshal

func (m *Message_Wantlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message_Wantlist) XXX_Merge

func (m *Message_Wantlist) XXX_Merge(src proto.Message)

func (*Message_Wantlist) XXX_Size

func (m *Message_Wantlist) XXX_Size() int

func (*Message_Wantlist) XXX_Unmarshal

func (m *Message_Wantlist) XXX_Unmarshal(b []byte) error

type Message_Wantlist_Entry

type Message_Wantlist_Entry struct {
	Block    []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	Priority int32  `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
	Cancel   bool   `protobuf:"varint,3,opt,name=cancel,proto3" json:"cancel,omitempty"`
}

func (*Message_Wantlist_Entry) Descriptor

func (*Message_Wantlist_Entry) Descriptor() ([]byte, []int)

func (*Message_Wantlist_Entry) GetBlock

func (m *Message_Wantlist_Entry) GetBlock() []byte

func (*Message_Wantlist_Entry) GetCancel

func (m *Message_Wantlist_Entry) GetCancel() bool

func (*Message_Wantlist_Entry) GetPriority

func (m *Message_Wantlist_Entry) GetPriority() int32

func (*Message_Wantlist_Entry) Marshal

func (m *Message_Wantlist_Entry) Marshal() (dAtA []byte, err error)

func (*Message_Wantlist_Entry) MarshalTo

func (m *Message_Wantlist_Entry) MarshalTo(dAtA []byte) (int, error)

func (*Message_Wantlist_Entry) MarshalToSizedBuffer

func (m *Message_Wantlist_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Wantlist_Entry) ProtoMessage

func (*Message_Wantlist_Entry) ProtoMessage()

func (*Message_Wantlist_Entry) Reset

func (m *Message_Wantlist_Entry) Reset()

func (*Message_Wantlist_Entry) Size

func (m *Message_Wantlist_Entry) Size() (n int)

func (*Message_Wantlist_Entry) String

func (m *Message_Wantlist_Entry) String() string

func (*Message_Wantlist_Entry) Unmarshal

func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error

func (*Message_Wantlist_Entry) XXX_DiscardUnknown

func (m *Message_Wantlist_Entry) XXX_DiscardUnknown()

func (*Message_Wantlist_Entry) XXX_Marshal

func (m *Message_Wantlist_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message_Wantlist_Entry) XXX_Merge

func (m *Message_Wantlist_Entry) XXX_Merge(src proto.Message)

func (*Message_Wantlist_Entry) XXX_Size

func (m *Message_Wantlist_Entry) XXX_Size() int

func (*Message_Wantlist_Entry) XXX_Unmarshal

func (m *Message_Wantlist_Entry) XXX_Unmarshal(b []byte) error

type Ticket

type Ticket struct {
	Publisher string       `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"`
	SendTo    string       `protobuf:"bytes,2,opt,name=sendTo,proto3" json:"sendTo,omitempty"`
	Cid       string       `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"`
	ByteSize  int64        `protobuf:"varint,4,opt,name=byteSize,proto3" json:"byteSize,omitempty"`
	TimeStamp int64        `protobuf:"varint,5,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
	State     Ticket_State `protobuf:"varint,6,opt,name=state,proto3,enum=bitswap.message.pb.Ticket_State" json:"state,omitempty"`
}

func (*Ticket) Descriptor

func (*Ticket) Descriptor() ([]byte, []int)

func (*Ticket) GetByteSize

func (m *Ticket) GetByteSize() int64

func (*Ticket) GetCid

func (m *Ticket) GetCid() string

func (*Ticket) GetPublisher

func (m *Ticket) GetPublisher() string

func (*Ticket) GetSendTo

func (m *Ticket) GetSendTo() string

func (*Ticket) GetState

func (m *Ticket) GetState() Ticket_State

func (*Ticket) GetTimeStamp

func (m *Ticket) GetTimeStamp() int64

func (*Ticket) Marshal

func (m *Ticket) Marshal() (dAtA []byte, err error)

func (*Ticket) MarshalTo

func (m *Ticket) MarshalTo(dAtA []byte) (int, error)

func (*Ticket) MarshalToSizedBuffer

func (m *Ticket) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Ticket) ProtoMessage

func (*Ticket) ProtoMessage()

func (*Ticket) Reset

func (m *Ticket) Reset()

func (*Ticket) Size

func (m *Ticket) Size() (n int)

func (*Ticket) String

func (m *Ticket) String() string

func (*Ticket) Unmarshal

func (m *Ticket) Unmarshal(dAtA []byte) error

func (*Ticket) XXX_DiscardUnknown

func (m *Ticket) XXX_DiscardUnknown()

func (*Ticket) XXX_Marshal

func (m *Ticket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ticket) XXX_Merge

func (m *Ticket) XXX_Merge(src proto.Message)

func (*Ticket) XXX_Size

func (m *Ticket) XXX_Size() int

func (*Ticket) XXX_Unmarshal

func (m *Ticket) XXX_Unmarshal(b []byte) error

type TicketAck

type TicketAck struct {
	Publisher string         `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"`
	Receiver  string         `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	Cid       string         `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"`
	Type      TicketAck_Type `protobuf:"varint,4,opt,name=type,proto3,enum=bitswap.message.pb.TicketAck_Type" json:"type,omitempty"`
}

func (*TicketAck) Descriptor

func (*TicketAck) Descriptor() ([]byte, []int)

func (*TicketAck) GetCid

func (m *TicketAck) GetCid() string

func (*TicketAck) GetPublisher

func (m *TicketAck) GetPublisher() string

func (*TicketAck) GetReceiver

func (m *TicketAck) GetReceiver() string

func (*TicketAck) GetType

func (m *TicketAck) GetType() TicketAck_Type

func (*TicketAck) Marshal

func (m *TicketAck) Marshal() (dAtA []byte, err error)

func (*TicketAck) MarshalTo

func (m *TicketAck) MarshalTo(dAtA []byte) (int, error)

func (*TicketAck) MarshalToSizedBuffer

func (m *TicketAck) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TicketAck) ProtoMessage

func (*TicketAck) ProtoMessage()

func (*TicketAck) Reset

func (m *TicketAck) Reset()

func (*TicketAck) Size

func (m *TicketAck) Size() (n int)

func (*TicketAck) String

func (m *TicketAck) String() string

func (*TicketAck) Unmarshal

func (m *TicketAck) Unmarshal(dAtA []byte) error

func (*TicketAck) XXX_DiscardUnknown

func (m *TicketAck) XXX_DiscardUnknown()

func (*TicketAck) XXX_Marshal

func (m *TicketAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TicketAck) XXX_Merge

func (m *TicketAck) XXX_Merge(src proto.Message)

func (*TicketAck) XXX_Size

func (m *TicketAck) XXX_Size() int

func (*TicketAck) XXX_Unmarshal

func (m *TicketAck) XXX_Unmarshal(b []byte) error

type TicketAck_Type

type TicketAck_Type int32
const (
	TicketAck_ACCEPT TicketAck_Type = 0
	TicketAck_CANCEL TicketAck_Type = 1
)

func (TicketAck_Type) EnumDescriptor

func (TicketAck_Type) EnumDescriptor() ([]byte, []int)

func (TicketAck_Type) String

func (x TicketAck_Type) String() string

type TicketAcklist

type TicketAcklist struct {
	Items []*TicketAck `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}

func (*TicketAcklist) Descriptor

func (*TicketAcklist) Descriptor() ([]byte, []int)

func (*TicketAcklist) GetItems

func (m *TicketAcklist) GetItems() []*TicketAck

func (*TicketAcklist) Marshal

func (m *TicketAcklist) Marshal() (dAtA []byte, err error)

func (*TicketAcklist) MarshalTo

func (m *TicketAcklist) MarshalTo(dAtA []byte) (int, error)

func (*TicketAcklist) MarshalToSizedBuffer

func (m *TicketAcklist) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TicketAcklist) ProtoMessage

func (*TicketAcklist) ProtoMessage()

func (*TicketAcklist) Reset

func (m *TicketAcklist) Reset()

func (*TicketAcklist) Size

func (m *TicketAcklist) Size() (n int)

func (*TicketAcklist) String

func (m *TicketAcklist) String() string

func (*TicketAcklist) Unmarshal

func (m *TicketAcklist) Unmarshal(dAtA []byte) error

func (*TicketAcklist) XXX_DiscardUnknown

func (m *TicketAcklist) XXX_DiscardUnknown()

func (*TicketAcklist) XXX_Marshal

func (m *TicketAcklist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TicketAcklist) XXX_Merge

func (m *TicketAcklist) XXX_Merge(src proto.Message)

func (*TicketAcklist) XXX_Size

func (m *TicketAcklist) XXX_Size() int

func (*TicketAcklist) XXX_Unmarshal

func (m *TicketAcklist) XXX_Unmarshal(b []byte) error

type Ticket_State

type Ticket_State int32
const (
	Ticket_New     Ticket_State = 0
	Ticket_ACK     Ticket_State = 1
	Ticket_CANCEL  Ticket_State = 2
	Ticket_TIMEOUT Ticket_State = 3
)

func (Ticket_State) EnumDescriptor

func (Ticket_State) EnumDescriptor() ([]byte, []int)

func (Ticket_State) String

func (x Ticket_State) String() string

type Ticketlist

type Ticketlist struct {
	Items []*Ticket `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}

func (*Ticketlist) Descriptor

func (*Ticketlist) Descriptor() ([]byte, []int)

func (*Ticketlist) GetItems

func (m *Ticketlist) GetItems() []*Ticket

func (*Ticketlist) Marshal

func (m *Ticketlist) Marshal() (dAtA []byte, err error)

func (*Ticketlist) MarshalTo

func (m *Ticketlist) MarshalTo(dAtA []byte) (int, error)

func (*Ticketlist) MarshalToSizedBuffer

func (m *Ticketlist) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Ticketlist) ProtoMessage

func (*Ticketlist) ProtoMessage()

func (*Ticketlist) Reset

func (m *Ticketlist) Reset()

func (*Ticketlist) Size

func (m *Ticketlist) Size() (n int)

func (*Ticketlist) String

func (m *Ticketlist) String() string

func (*Ticketlist) Unmarshal

func (m *Ticketlist) Unmarshal(dAtA []byte) error

func (*Ticketlist) XXX_DiscardUnknown

func (m *Ticketlist) XXX_DiscardUnknown()

func (*Ticketlist) XXX_Marshal

func (m *Ticketlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ticketlist) XXX_Merge

func (m *Ticketlist) XXX_Merge(src proto.Message)

func (*Ticketlist) XXX_Size

func (m *Ticketlist) XXX_Size() int

func (*Ticketlist) XXX_Unmarshal

func (m *Ticketlist) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL