store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(sgc StoreGetConfiguration) ([]byte, error)

Get is used to retrieve a store message - i.e. a file - on the Aleph network.

It uses the file's hash generated at publish time to retrieve it.

func Publish

func Publish(configuration StorePublishConfiguration) (string, error)

Types

type StoreContent

type StoreContent struct {
	Address     string  `json:"address"`
	Time        float64 `json:"time"`
	ItemType    string  `json:"item_type"`
	ItemHash    string  `json:"item_hash"`
	Size        int64   `json:"size"`
	ContentType string  `json:"content_type"`
	Ref         string  `json:"ref,omitempty"`
}

type StoreGetConfiguration

type StoreGetConfiguration struct {
	FileHash  string
	APIServer string
}

type StorePublishConfiguration

type StorePublishConfiguration struct {
	APIServer     string
	Account       accounts.Account
	StorageEngine messages.StorageEngine
	Channel       string
	File          io.Reader
}

Jump to

Keyboard shortcuts

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