|
@@ -135,9 +135,37 @@ func (s *RequestIn) RCore() any {
|
|
return s.Core
|
|
return s.Core
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func (s *RequestIn) OutSuccess(data json.Map, files RequestFiles) IRequestOut {
|
|
|
|
+ return &RequestOut{
|
|
|
|
+ Request: &Request{
|
|
|
|
+ Type: RequestTypeOut,
|
|
|
|
+ Command: s.RCommand(),
|
|
|
|
+ Data: data,
|
|
|
|
+ Files: files,
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (s *RequestIn) OutError(err IErrorArgs) IRequestOut {
|
|
|
|
+ return &RequestOut{
|
|
|
|
+ Err: err,
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
|
|
type IRequestOut interface {
|
|
type IRequestOut interface {
|
|
IRequest
|
|
IRequest
|
|
Write(io.Writer) IErrorArgs
|
|
Write(io.Writer) IErrorArgs
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/////////////////////////////////////////////////////////
|
|
|
|
+
|
|
|
|
+type RequestOut struct {
|
|
|
|
+ *Request
|
|
|
|
+ Err IErrorArgs
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (s *RequestOut) Write(w io.Writer) IErrorArgs {
|
|
|
|
+ return nil
|
|
|
|
+}
|