Documentation
¶
Index ¶
- Constants
- func ResolveDirCid(dir *metadata.DirectoryReference, node *node.Node) (*encoding.CID, error)
- type AccountInfoResponse
- type AccountLoginChallengeResponse
- type AccountLoginRequest
- type AccountPin
- type AccountPinBinaryResponse
- type AccountPinResponse
- type AccountPinStatusResponse
- type AccountRegisterChallengeResponse
- type AccountRegisterRequest
- type AccountStats
- type AccountStatsResponse
- type AccountStatsTotal
- type AccountTier
- type AppUploadResponse
- type DebugStorageLocation
- type DebugStorageLocationsResponse
- type FileParams
- type RegistryQueryResponse
- type RegistrySetRequest
- type S5API
- func (s *S5API) AuthTokenName() string
- func (s *S5API) Can(_ http.ResponseWriter, r *http.Request) bool
- func (s S5API) Config() config.APIConfig
- func (s *S5API) Configure(router *mux.Router) error
- func (s *S5API) Domain() string
- func (s *S5API) Handle(w http.ResponseWriter, r *http.Request)
- func (s *S5API) Init() ([]core.ContextBuilderOption, error)
- func (s S5API) Subdomain() string
- type S5Error
- type S5File
- func (f *S5File) CID() *encoding.CID
- func (f *S5File) Close() error
- func (f *S5File) Exists() bool
- func (f *S5File) Hash() []byte
- func (f *S5File) HashString() string
- func (f *S5File) Info() (fs.FileInfo, error)
- func (f *S5File) IsDir() bool
- func (f *S5File) Manifest() (s5libmetadata.Metadata, error)
- func (f *S5File) Mime() string
- func (f *S5File) Modtime() time.Time
- func (f *S5File) Name() string
- func (f *S5File) Proof() ([]byte, error)
- func (f *S5File) Read(p []byte) (n int, err error)
- func (f *S5File) ReadDir(n int) ([]fs.DirEntry, error)
- func (f *S5File) Record() (*core.UploadMetadata, error)
- func (f *S5File) RootCID() *encoding.CID
- func (f *S5File) Seek(offset int64, whence int) (int64, error)
- func (f *S5File) Size() uint64
- func (f *S5File) Stat() (fs.FileInfo, error)
- func (f *S5File) StorageProtocol() core.StorageProtocol
- func (f *S5File) Type() fs.FileMode
- type S5FileInfo
- type SmallUploadResponse
Constants ¶
View Source
const ( // File-related errors ErrKeyFileUploadFailed = "ErrFileUploadFailed" ErrKeyFileDownloadFailed = "ErrFileDownloadFailed" ErrKeyMetadataFetchFailed = "ErrMetadataFetchFailed" ErrKeyInvalidFileFormat = "ErrInvalidFileFormat" ErrKeyUnsupportedFileType = "ErrUnsupportedFileType" ErrKeyFileProcessingFailed = "ErrFileProcessingFailed" // Storage and data handling errors ErrKeyStorageOperationFailed = "ErrStorageOperationFailed" ErrKeyResourceNotFound = "ErrResourceNotFound" ErrKeyResourceLimitExceeded = "ErrResourceLimitExceeded" ErrKeyDataIntegrityError = "ErrDataIntegrityError" // User and permission errors ErrKeyPermissionDenied = "ErrPermissionDenied" ErrKeyInvalidOperation = "ErrInvalidOperation" ErrKeyAuthenticationFailed = "ErrAuthenticationFailed" ErrKeyAuthorizationFailed = "ErrAuthorizationFailed" // Network and communication errors ErrKeyNetworkError = "ErrNetworkError" // General errors ErrKeyInternalError = "ErrInternalError" ErrKeyConfigurationError = "ErrConfigurationError" ErrKeyOperationTimeout = "ErrOperationTimeout" )
S5-specific error keys
Variables ¶
This section is empty.
Functions ¶
func ResolveDirCid ¶
Types ¶
type AccountInfoResponse ¶
type AccountInfoResponse struct { Email string `json:"email"` QuotaExceeded bool `json:"quotaExceeded"` EmailConfirmed bool `json:"emailConfirmed"` IsRestricted bool `json:"isRestricted"` Tier AccountTier `json:"tier"` }
type AccountLoginChallengeResponse ¶
type AccountLoginChallengeResponse struct {
Challenge string `json:"challenge"`
}
type AccountLoginRequest ¶
type AccountPin ¶
type AccountPinBinaryResponse ¶
func (AccountPinBinaryResponse) EncodeMsgpack ¶
func (a AccountPinBinaryResponse) EncodeMsgpack(enc *msgpack.Encoder) error
type AccountPinResponse ¶
type AccountPinResponse struct {
Pins []AccountPin `json:"pins"`
}
type AccountPinStatusResponse ¶
type AccountPinStatusResponse struct { Status models.ImportStatus `json:"status"` Progress float64 `json:"progress"` }
type AccountRegisterChallengeResponse ¶
type AccountRegisterChallengeResponse struct {
Challenge string `json:"challenge"`
}
type AccountRegisterRequest ¶
type AccountStats ¶
type AccountStats struct {
Total AccountStatsTotal `json:"total"`
}
type AccountStatsResponse ¶
type AccountStatsResponse struct { AccountInfoResponse Stats AccountStats `json:"stats"` }
type AccountStatsTotal ¶
type AccountStatsTotal struct {
UsedStorage uint64 `json:"usedStorage"`
}
type AccountTier ¶
type AppUploadResponse ¶
type AppUploadResponse struct {
CID string `json:"cid"`
}
type DebugStorageLocation ¶
type DebugStorageLocationsResponse ¶
type DebugStorageLocationsResponse struct {
Locations []DebugStorageLocation `json:"locations"`
}
type FileParams ¶
type RegistryQueryResponse ¶
type RegistrySetRequest ¶
type S5API ¶
type S5API struct {
// contains filtered or unexported fields
}
func (*S5API) AuthTokenName ¶
type S5Error ¶
S5Error struct for representing S5-specific errors
func (*S5Error) HttpStatus ¶
type S5File ¶
type S5File struct {
// contains filtered or unexported fields
}
func NewFile ¶
func NewFile(params FileParams) *S5File
func (*S5File) HashString ¶
func (*S5File) StorageProtocol ¶
func (f *S5File) StorageProtocol() core.StorageProtocol
type S5FileInfo ¶
type S5FileInfo struct {
// contains filtered or unexported fields
}
func (S5FileInfo) IsDir ¶
func (s S5FileInfo) IsDir() bool
func (S5FileInfo) ModTime ¶
func (s S5FileInfo) ModTime() time.Time
func (S5FileInfo) Mode ¶
func (s S5FileInfo) Mode() fs.FileMode
func (S5FileInfo) Name ¶
func (s S5FileInfo) Name() string
func (S5FileInfo) Size ¶
func (s S5FileInfo) Size() int64
func (S5FileInfo) Sys ¶
func (s S5FileInfo) Sys() any
type SmallUploadResponse ¶
type SmallUploadResponse struct {
CID string `json:"cid"`
}
Click to show internal directories.
Click to hide internal directories.