meta

package
v0.0.0-...-52bbd4c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeFileMetaList

func EncodeFileMetaList(lst []*FileMeta) ([]byte, error)

EncodeFileMetaList encodes a list of file metas

Types

type FileMeta

type FileMeta struct {
	FileName        string
	IpfsHash        string
	DataKey         tribecrypto.FileBoxer
	WriteAccessList []ethcommon.Address // if empty --> everyone has write access to it
}

FileMeta stores all data that is necessary to reach and read a file from IPFS

func DecodeFileMeta

func DecodeFileMeta(data []byte) (*FileMeta, error)

DecodeFileMeta decodes a single file meta

func DecodeFileMetaList

func DecodeFileMetaList(data []byte) ([]*FileMeta, error)

DecodeFileMetaList decodes a list of file metas

func NewFileMeta

func NewFileMeta(fileName string, hasWriteAccess []ethcommon.Address) (*FileMeta, error)

NewFileMeta creates a new file meta

func (*FileMeta) Encode

func (meta *FileMeta) Encode() ([]byte, error)

Encode encodes a file meta

func (*FileMeta) Equal

func (meta *FileMeta) Equal(other *FileMeta) bool

Equal decides if two files are identical to each other or not

type GroupMeta

type GroupMeta struct {
	Address ethCommon.Address
	Boxer   tribecrypto.SymmetricKey
}

GroupMeta stores the information that is necessary to be able to participate in a group's life and to read its shared files

func (*GroupMeta) Encode

func (meta *GroupMeta) Encode() ([]byte, error)

Encode encodes the group meta

Jump to

Keyboard shortcuts

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