Documentation
¶
Overview ¶
Package pinning proved local (IPFS daemon) and remote (Pinata) pinning services
Index ¶
- Variables
- func CountPins(chain, status string) uint64
- func IsValid(needle string) bool
- func ListPins(chain, status string, showProgress, countOnly bool, perPage int, ...) ([]string, error)
- func PinOneChunk(chain, path string, remote bool, progressInfo string) (types.ChunkRecord, types.ChunkRecord, error)
- func PinOneFile(chain, dbName, fileName string, remote bool) (base.IpfsHash, base.IpfsHash, error)
- func Unpin(chain string, count bool, sleep float64) error
- type Pin
- type PinSet
- type Service
- type ServiceType
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoPinningService = fmt.Errorf("no pinning service available")
Functions ¶
func ListPins ¶
func ListPins(chain, status string, showProgress, countOnly bool, perPage int, dur time.Duration) ([]string, error)
ListPins pins a file remotely to the pinning service
func PinOneChunk ¶
func PinOneChunk(chain, path string, remote bool, progressInfo string) (types.ChunkRecord, types.ChunkRecord, error)
PinOneChunk pins the named chunk given a path to the local and/or remote pinning service
func PinOneFile ¶
PinOneFile pins the named database given a path to the local and/or remote pinning services if they are available. If the local service is not available, the remote service is used.
Types ¶
type Pin ¶
type Pin struct {
Id string `json:"id"`
IpfsPinHash base.IpfsHash `json:"ipfs_pin_hash"`
Size int `json:"size"`
UserId string `json:"user_id"`
DatePinned string `json:"date_pinned"`
DateUnpinned string `json:"date_unpinned"`
Metadata struct {
Name string `json:"name"`
Keyvalues interface{} `json:"keyvalues"`
} `json:"metadata"`
Regions []struct {
RegionId string `json:"regionId"`
CurrentReplicationCount int `json:"currentReplicationCount"`
DesiredReplicationCount int `json:"desiredReplicationCount"`
} `json:"regions"`
MimeType string `json:"mime_type"`
NumberOfFiles int `json:"number_of_files"`
}
Pin data type carries information about remote pins
Click to show internal directories.
Click to hide internal directories.