pb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_pressure_pb_pressure_proto protoreflect.FileDescriptor

Functions

func Marshal

func Marshal[T pressure](x T) []byte

func Read

func Read[T pressure](r io.Reader, x T) (err error)

Types

type Chunk

type Chunk struct {
	Len      *int32  `protobuf:"varint,1,opt,name=len,proto3,oneof" json:"len,omitempty"` // No. of bytes of data in this chunk
	Index    int32   `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`   // Index of the chunk being sent
	Data     []byte  `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Filename *string `protobuf:"bytes,4,opt,name=filename,proto3,oneof" json:"filename,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

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

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetData

func (x *Chunk) GetData() []byte

func (*Chunk) GetFilename

func (x *Chunk) GetFilename() string

func (*Chunk) GetIndex

func (x *Chunk) GetIndex() int32

func (*Chunk) GetLen

func (x *Chunk) GetLen() int32

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

func (x *Chunk) ProtoReflect() protoreflect.Message

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type ChunkRequest

type ChunkRequest struct {
	Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // Index of the chunk that we want
	// contains filtered or unexported fields
}

func (*ChunkRequest) Descriptor deprecated

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

Deprecated: Use ChunkRequest.ProtoReflect.Descriptor instead.

func (*ChunkRequest) GetIndex

func (x *ChunkRequest) GetIndex() int32

func (*ChunkRequest) ProtoMessage

func (*ChunkRequest) ProtoMessage()

func (*ChunkRequest) ProtoReflect

func (x *ChunkRequest) ProtoReflect() protoreflect.Message

func (*ChunkRequest) Reset

func (x *ChunkRequest) Reset()

func (*ChunkRequest) String

func (x *ChunkRequest) String() string

type Index

type Index struct {
	NChunks  int32  `protobuf:"varint,1,opt,name=n_chunks,json=nChunks,proto3" json:"n_chunks,omitempty"` // No. of chunks in the file
	Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	Progress int32  `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` // No. of chunks already received
	// contains filtered or unexported fields
}

func (*Index) Descriptor deprecated

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

Deprecated: Use Index.ProtoReflect.Descriptor instead.

func (*Index) GetFilename

func (x *Index) GetFilename() string

func (*Index) GetNChunks

func (x *Index) GetNChunks() int32

func (*Index) GetProgress

func (x *Index) GetProgress() int32

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) ProtoReflect

func (x *Index) ProtoReflect() protoreflect.Message

func (*Index) Reset

func (x *Index) Reset()

func (*Index) Save

func (x *Index) Save()

func (*Index) String

func (x *Index) String() string

Jump to

Keyboard shortcuts

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