Documentation ¶
Overview ¶
Package api provides types used by the Sia API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectoriesResponse ¶
type DirectoriesResponse struct { Directories []DirectoryInfo `json:"directories"` Files []FileInfo `json:"files"` }
DirectoriesResponse is the response for https://sia.tech/docs/#renter-dir-siapath-get
type DirectoryInfo ¶
type DirectoryInfo struct { AggregateHealth float64 `json:"aggregatehealth"` AggregateLastHealthCheckTime time.Time `json:"aggregatelasthealthchecktime"` AggregateMaxHealth float64 `json:"aggregatemaxhealth"` AggregateMaxHealthPercentage float64 `json:"aggregatemaxhealthpercentage"` AggregateMinRedundancy float64 `json:"aggregateminredundancy"` AggregateMostRecentModTime time.Time `json:"aggregatemostrecentmodtime"` AggregateNumFiles uint64 `json:"aggregatenumfiles"` AggregateNumStuckChunks uint64 `json:"aggregatenumstuckchunks"` AggregateNumSubDirs uint64 `json:"aggregatenumsubdirs"` AggregateSize uint64 `json:"aggregatesize"` AggregateStuckHealth float64 `json:"aggregatestuckhealth"` Health float64 `json:"health"` LastHealthCheckTime time.Time `json:"lasthealthchecktime"` MaxHealthPercentage float64 `json:"maxhealthpercentage"` MaxHealth float64 `json:"maxhealth"` MinRedundancy float64 `json:"minredundancy"` MostRecentModTime time.Time `json:"mostrecentmodtime"` NumFiles uint64 `json:"numfiles"` NumStuckChunks uint64 `json:"numstuckchunks"` NumSubDirs uint64 `json:"numsubdirs"` SiaPath string `json:"siapath"` Size uint64 `json:"size"` StuckHealth float64 `json:"stuckhealth"` }
DirectoryInfo is used in https://sia.tech/docs/#renter-dir-siapath-get
type Error ¶
Error contains an error message per https://sia.tech/docs/#error
type FileInfo ¶
type FileInfo struct { AccessTime time.Time `json:"accesstime"` Available bool `json:"available"` ChangeTime time.Time `json:"changetime"` CipherType string `json:"ciphertype"` CreateTime time.Time `json:"createtime"` Expiration uint64 `json:"expiration"` Filesize uint64 `json:"filesize"` Health float64 `json:"health"` LocalPath string `json:"localpath"` MaxHealth float64 `json:"maxhealth"` MaxHealthPercent float64 `json:"maxhealthpercent"` ModTime time.Time `json:"modtime"` NumStuckChunks uint64 `json:"numstuckchunks"` OnDisk bool `json:"ondisk"` Recoverable bool `json:"recoverable"` Redundancy float64 `json:"redundancy"` Renewing bool `json:"renewing"` SiaPath string `json:"siapath"` Stuck bool `json:"stuck"` StuckHealth float64 `json:"stuckhealth"` UploadedBytes uint64 `json:"uploadedbytes"` UploadProgress float64 `json:"uploadprogress"` }
FileInfo is used in https://sia.tech/docs/#renter-files-get
type FileResponse ¶
type FileResponse struct {
File FileInfo `json:"file"`
}
FileResponse is the response for https://sia.tech/docs/#renter-file-siapath-get
type FilesResponse ¶
type FilesResponse struct {
Files []FileInfo `json:"files"`
}
FilesResponse is the response for https://sia.tech/docs/#renter-files-get
Click to show internal directories.
Click to hide internal directories.