package rest_http import ( "git.ali33.ru/fcg-xvii/go-tools/json" "git.ali33.ru/fcg-xvii/rest" ) type RequestIn struct { *rest.RequestIn auth json.Map } func (s *RequestIn) IsAuth() bool { return s.auth != nil } func (s *RequestIn) Auth() json.Map { return s.auth } func (s *RequestIn) OutSuccess(data json.Map, files rest.RequestFiles) rest.IRequestOut { return ResponseSuccess(&rest.Request{ Data: data, Files: files, }) } func (s *RequestIn) OutError(err rest.IErrorArgs) rest.IRequestOut { return ResponseError(err) } func (s *RequestIn) Fields() rest.FieldList { return rest.FieldListFromSlice(s.RData().Slice("Fields", nil)) }