Documentation ¶
Index ¶
- type CheckDownloadProgressArgs
- type CheckDownloadProgressReply
- type Download
- type DownloadArgs
- type DownloadProgress
- type DownloadProgressReader
- type DownloadReply
- type DownloadStatus
- type GetArgs
- type GetReply
- type NetworkService
- func (service *NetworkService) CheckDownloadProgress(r *http.Request, req *CheckDownloadProgressArgs, ...) error
- func (service *NetworkService) Download(r *http.Request, req *DownloadArgs, res *DownloadReply) error
- func (service *NetworkService) Get(r *http.Request, req *GetArgs, res *GetReply) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckDownloadProgressArgs ¶
type CheckDownloadProgressArgs struct {
Id string `json:"id"`
}
type Download ¶
type Download struct { FinalSizeBytes int64 `json:"finalSizeBytes"` ProgressBytes int64 `json:"progressBytes"` }
func NewDownload ¶
type DownloadArgs ¶
type DownloadProgress ¶
type DownloadProgressReader ¶
type DownloadProgressReader struct {
// contains filtered or unexported fields
}
func NewDownloadProgressReader ¶
func NewDownloadProgressReader(r io.Reader, ctx *context.Context, service *NetworkService, downloadId string, finalSizeBytes int64) *DownloadProgressReader
type DownloadReply ¶
type DownloadReply struct {
Status DownloadStatus `json:"status"`
}
type DownloadStatus ¶
type DownloadStatus string
const ( DownloadStatusSuccess DownloadStatus = "success" DownloadStatusTimeout = "timeout" )
type NetworkService ¶
type NetworkService struct {
DownloadProgress
}
func NewNetworkService ¶
func NewNetworkService() *NetworkService
func (*NetworkService) CheckDownloadProgress ¶
func (service *NetworkService) CheckDownloadProgress(r *http.Request, req *CheckDownloadProgressArgs, res *CheckDownloadProgressReply) error
func (*NetworkService) Download ¶
func (service *NetworkService) Download(r *http.Request, req *DownloadArgs, res *DownloadReply) error
Click to show internal directories.
Click to hide internal directories.