Documentation ¶
Index ¶
- func CloseDb()
- func IdGen() string
- func OpenDb(addr string)
- func PinAdd(ctx context.Context, status *PinStatus) error
- func PinCount(ctx context.Context) (int64, error)
- func PinDelete(ctx context.Context, reqId string) error
- func PinUpdate(ctx context.Context, status *PinStatus) error
- type Pin
- type PinStatus
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pin ¶
type Pin struct { // Content Identifier (CID) to be pinned recursively Cid string `json:"cid"` // Optional name for pinned data; can be used for lookups later Name string `json:"name,omitempty"` // Optional list of multiaddrs known to provide the data Origins []string `json:"origins,omitempty"` // Optional metadata for pin object Meta map[string]string `json:"meta,omitempty"` }
Pin - Pin object
type PinStatus ¶
type PinStatus struct { // Globally unique identifier of the pin request; can be used to check the status of ongoing pinning, or pin removal Requestid string `json:"requestid"` Status Status `json:"status"` // Immutable timestamp indicating when a pin request entered a pinning service; can be used for filtering results and pagination Created time.Time `json:"created"` Pin Pin `json:"pin"` // List of multiaddrs designated by pinning service for transferring any new data from external peers Delegates []string `json:"delegates"` // Optional info for PinStatus response Info map[string]string `json:"info,omitempty"` }
PinStatus - Pin object with status
Click to show internal directories.
Click to hide internal directories.