entry

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

Entry provides addition of metadata to a data reference. Implements collection.Entry.

func New

func New(reference, metadata swarm.Address) *Entry

New creates a new Entry.

func (*Entry) MarshalBinary

func (e *Entry) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*Entry) Metadata

func (e *Entry) Metadata() swarm.Address

Metadata implements collection.Entry

func (*Entry) Reference

func (e *Entry) Reference() swarm.Address

Reference implements collection.Entry

func (*Entry) UnmarshalBinary

func (e *Entry) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Metadata

type Metadata struct {
	MimeType string `json:"mimetype"`
	Filename string `json:"filename"`
}

Metadata provides mime type and filename to file entry.

func NewMetadata

func NewMetadata(fileName string) *Metadata

NewMetadata creates a new Metadata.

func (*Metadata) String

func (m *Metadata) String() string

Jump to

Keyboard shortcuts

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