protocol

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProtocol

func NewProtocol() (core.Protocol, []core.ContextBuilderOption, error)

Types

type Protocol

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

func (Protocol) CompleteProtocolData

func (p Protocol) CompleteProtocolData(_ context.Context, _ uint) error

func (Protocol) Config

func (p Protocol) Config() config.ProtocolConfig

func (Protocol) CreateProtocolData

func (p Protocol) CreateProtocolData(ctx context.Context, id uint, data any) error

func (Protocol) CreateProtocolPin

func (p Protocol) CreateProtocolPin(ctx context.Context, id uint, data any) error

func (Protocol) DeleteProtocolData

func (p Protocol) DeleteProtocolData(ctx context.Context, id uint) error

func (Protocol) DeleteProtocolPin

func (p Protocol) DeleteProtocolPin(ctx context.Context, id uint) error

func (Protocol) EncodeFileName

func (p Protocol) EncodeFileName(hash core.StorageHash) string

func (Protocol) GetMetadataStore

func (p Protocol) GetMetadataStore() *store.MetadataStoreDefault

func (Protocol) GetNode

func (p Protocol) GetNode() *ipfs.Node

func (Protocol) GetProtocolData

func (p Protocol) GetProtocolData(ctx context.Context, tx *gorm.DB, id uint) (any, error)

func (Protocol) GetProtocolDataModel

func (p Protocol) GetProtocolDataModel() any

func (Protocol) GetProtocolPin

func (p Protocol) GetProtocolPin(ctx context.Context, tx *gorm.DB, id uint) (any, error)

func (Protocol) GetProtocolPinModel

func (p Protocol) GetProtocolPinModel() any

func (Protocol) Hash

func (p Protocol) Hash(_ io.Reader, _ uint64) (core.StorageHash, error)

func (Protocol) Name

func (p Protocol) Name() string

func (Protocol) QueryProtocolData

func (p Protocol) QueryProtocolData(_ context.Context, tx *gorm.DB, query any) *gorm.DB

func (Protocol) QueryProtocolPin

func (p Protocol) QueryProtocolPin(ctx context.Context, query any) *gorm.DB

func (Protocol) UpdateProtocolData

func (p Protocol) UpdateProtocolData(ctx context.Context, id uint, data any) error

func (Protocol) UpdateProtocolPin

func (p Protocol) UpdateProtocolPin(ctx context.Context, id uint, data any) error

Directories

Path Synopsis
downloader
package downloader contains a cache for downloading blocks from a renterd node.
package downloader contains a cache for downloading blocks from a renterd node.

Jump to

Keyboard shortcuts

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