初始化
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type SubmitResult struct {
|
||||
TaskID string
|
||||
URL string
|
||||
Raw json.RawMessage
|
||||
}
|
||||
|
||||
type PollResult struct {
|
||||
Status string
|
||||
URL string
|
||||
Error string
|
||||
Raw json.RawMessage
|
||||
}
|
||||
|
||||
type HTTPError struct {
|
||||
StatusCode int
|
||||
Body string
|
||||
RetryAfter string
|
||||
}
|
||||
|
||||
func (e *HTTPError) Error() string {
|
||||
return fmt.Sprintf("中转站返回 HTTP %d: %s", e.StatusCode, e.Body)
|
||||
}
|
||||
Reference in New Issue
Block a user