unixfs_pb

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Data_DataType_name = map[int32]string{
	0: "Raw",
	1: "Directory",
	2: "File",
	3: "Metadata",
	4: "Symlink",
	5: "HAMTShard",
}
View Source
var Data_DataType_value = map[string]int32{
	"Raw":       0,
	"Directory": 1,
	"File":      2,
	"Metadata":  3,
	"Symlink":   4,
	"HAMTShard": 5,
}

Functions

This section is empty.

Types

type Data

type Data struct {
	Type                 *Data_DataType `protobuf:"varint,1,req,name=Type,enum=unixfs.v1.pb.Data_DataType" json:"Type,omitempty"`
	Data                 []byte         `protobuf:"bytes,2,opt,name=Data" json:"Data,omitempty"`
	Filesize             *uint64        `protobuf:"varint,3,opt,name=filesize" json:"filesize,omitempty"`
	Blocksizes           []uint64       `protobuf:"varint,4,rep,name=blocksizes" json:"blocksizes,omitempty"`
	HashType             *uint64        `protobuf:"varint,5,opt,name=hashType" json:"hashType,omitempty"`
	Fanout               *uint64        `protobuf:"varint,6,opt,name=fanout" json:"fanout,omitempty"`
	Mode                 *uint32        `protobuf:"varint,7,opt,name=mode" json:"mode,omitempty"`
	Mtime                *IPFSTimestamp `protobuf:"bytes,8,opt,name=mtime" json:"mtime,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Data) Descriptor

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

func (*Data) GetBlocksizes

func (m *Data) GetBlocksizes() []uint64

func (*Data) GetData

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

func (*Data) GetFanout

func (m *Data) GetFanout() uint64

func (*Data) GetFilesize

func (m *Data) GetFilesize() uint64

func (*Data) GetHashType

func (m *Data) GetHashType() uint64

func (*Data) GetMode

func (m *Data) GetMode() uint32

func (*Data) GetMtime

func (m *Data) GetMtime() *IPFSTimestamp

func (*Data) GetType

func (m *Data) GetType() Data_DataType

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) Reset

func (m *Data) Reset()

func (*Data) String

func (m *Data) String() string

func (*Data) XXX_DiscardUnknown

func (m *Data) XXX_DiscardUnknown()

func (*Data) XXX_Marshal

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

func (*Data) XXX_Merge

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

func (*Data) XXX_Size

func (m *Data) XXX_Size() int

func (*Data) XXX_Unmarshal

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

type Data_DataType

type Data_DataType int32
const (
	Data_Raw       Data_DataType = 0
	Data_Directory Data_DataType = 1
	Data_File      Data_DataType = 2
	Data_Metadata  Data_DataType = 3
	Data_Symlink   Data_DataType = 4
	Data_HAMTShard Data_DataType = 5
)

func (Data_DataType) Enum

func (x Data_DataType) Enum() *Data_DataType

func (Data_DataType) EnumDescriptor

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

func (Data_DataType) String

func (x Data_DataType) String() string

func (*Data_DataType) UnmarshalJSON

func (x *Data_DataType) UnmarshalJSON(data []byte) error

type IPFSTimestamp

type IPFSTimestamp struct {
	// Represents seconds of UTC time since Unix epoch
	// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
	// 9999-12-31T23:59:59Z inclusive.
	Seconds *int64 `protobuf:"varint,1,req,name=seconds" json:"seconds,omitempty"`
	// Non-negative fractions of a second at nanosecond resolution. Negative
	// second values with fractions must still have non-negative nanos values
	// that count forward in time. Must be from 0 to 999,999,999
	// inclusive.
	Nanos                *uint32  `protobuf:"fixed32,2,opt,name=nanos" json:"nanos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

mostly copied from proto 3 - with int32 nanos changed to fixed32 for js-ipfs compatibility https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto

func (*IPFSTimestamp) Descriptor

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

func (*IPFSTimestamp) GetNanos

func (m *IPFSTimestamp) GetNanos() uint32

func (*IPFSTimestamp) GetSeconds

func (m *IPFSTimestamp) GetSeconds() int64

func (*IPFSTimestamp) ProtoMessage

func (*IPFSTimestamp) ProtoMessage()

func (*IPFSTimestamp) Reset

func (m *IPFSTimestamp) Reset()

func (*IPFSTimestamp) String

func (m *IPFSTimestamp) String() string

func (*IPFSTimestamp) XXX_DiscardUnknown

func (m *IPFSTimestamp) XXX_DiscardUnknown()

func (*IPFSTimestamp) XXX_Marshal

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

func (*IPFSTimestamp) XXX_Merge

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

func (*IPFSTimestamp) XXX_Size

func (m *IPFSTimestamp) XXX_Size() int

func (*IPFSTimestamp) XXX_Unmarshal

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

type Metadata

type Metadata struct {
	MimeType             *string  `protobuf:"bytes,1,opt,name=MimeType" json:"MimeType,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Metadata) Descriptor

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

func (*Metadata) GetMimeType

func (m *Metadata) GetMimeType() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

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

func (*Metadata) XXX_Merge

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

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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