record

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIpfsMode = errors.New("Invalid ipfs mode.")

Functions

This section is empty.

Types

type CidRecord

type CidRecord struct {
	Cid          cidlib.Cid `json:"cid"`
	ProviderType IpfsMode   `json:"provtype"`
}

func NewCidRecord

func NewCidRecord(cid string, ptype IpfsMode) (*CidRecord, error)

func (CidRecord) MarshalJSON

func (rec CidRecord) MarshalJSON() ([]byte, error)

func (*CidRecord) Marshall

func (rec *CidRecord) Marshall() ([]byte, error)

func (*CidRecord) UnmarshalJSON

func (rec *CidRecord) UnmarshalJSON(data []byte) error

type IpfsMode added in v0.1.0

type IpfsMode int
const (
	NONE        IpfsMode = -1
	NORMAL_IPFS IpfsMode = iota + 1
	SECURE_IPFS
)

func (IpfsMode) String added in v0.1.0

func (mode IpfsMode) String() string

func (IpfsMode) Validate added in v0.1.1

func (mode IpfsMode) Validate() error

Jump to

Keyboard shortcuts

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