Documentation ¶
Index ¶
- type DefaultHttpApiSimpleHandler
- func (d *DefaultHttpApiSimpleHandler) ContentTypes() (RequestFormat, ResponseFormat)
- func (d *DefaultHttpApiSimpleHandler) Handle(request *HttpRequest, msbHandler MsbHandler) *HttpResponse
- func (d *DefaultHttpApiSimpleHandler) HttpMethods() []HttpMethod
- func (d *DefaultHttpApiSimpleHandler) Name() string
- func (d *DefaultHttpApiSimpleHandler) RequestType() reflect.Type
- func (d *DefaultHttpApiSimpleHandler) UrlMapping() string
- type HandleResult
- type HttpApiSimpleHandler
- type HttpMethod
- type HttpRequest
- type HttpResponse
- type JobResultIndicator
- type MsbContext
- type MsbHandler
- type Process
- type RequestFormat
- type ResponseFormat
- type SchedulingJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHttpApiSimpleHandler ¶
type DefaultHttpApiSimpleHandler struct { HandlerName string HttpMethodList []HttpMethod RequestPayloadFormat RequestFormat ResponsePayloadFormat ResponseFormat URL string RequestPayloadObjectType reflect.Type }
func (*DefaultHttpApiSimpleHandler) ContentTypes ¶
func (d *DefaultHttpApiSimpleHandler) ContentTypes() (RequestFormat, ResponseFormat)
func (*DefaultHttpApiSimpleHandler) Handle ¶
func (d *DefaultHttpApiSimpleHandler) Handle(request *HttpRequest, msbHandler MsbHandler) *HttpResponse
func (*DefaultHttpApiSimpleHandler) HttpMethods ¶
func (d *DefaultHttpApiSimpleHandler) HttpMethods() []HttpMethod
func (*DefaultHttpApiSimpleHandler) Name ¶
func (d *DefaultHttpApiSimpleHandler) Name() string
func (*DefaultHttpApiSimpleHandler) RequestType ¶
func (d *DefaultHttpApiSimpleHandler) RequestType() reflect.Type
func (*DefaultHttpApiSimpleHandler) UrlMapping ¶
func (d *DefaultHttpApiSimpleHandler) UrlMapping() string
type HandleResult ¶
type HandleResult struct {
Result interface{}
}
type HttpApiSimpleHandler ¶
type HttpApiSimpleHandler interface { Name() string HttpMethods() []HttpMethod ContentTypes() (RequestFormat, ResponseFormat) UrlMapping() string RequestType() reflect.Type Handle(request *HttpRequest, msbHandler MsbHandler) *HttpResponse }
type HttpMethod ¶
type HttpMethod int
const ( HttpMethodGet HttpMethod = 1 HttpMethodPost HttpMethod = 2 HttpMethodPut HttpMethod = 3 HttpMethodDelete HttpMethod = 4 HttpMethodOptions HttpMethod = 5 HttpMethodHead HttpMethod = 6 HttpMethodPatch HttpMethod = 7 )
type HttpRequest ¶
type HttpRequest struct { RequestURI string Params httprouter.Params RequestObject interface{} }
type HttpResponse ¶
type HttpResponse struct { HttpStatus int HttpContentType string HandleResult }
type JobResultIndicator ¶
type JobResultIndicator int
const ( JobResultSuccess JobResultIndicator = 1 JobResultRetry JobResultIndicator = 2 JobResultFail JobResultIndicator = 3 )
type MsbContext ¶
type MsbHandler ¶
type Process ¶
type Process interface { Name() string Call(msbCtx MsbContext, param interface{}) (interface{}, error) }
type RequestFormat ¶
type RequestFormat int
const ( RequestFormatUrlEncoded RequestFormat = 1 RequestFormatJson RequestFormat = 2 RequestFormatMultipart RequestFormat = 3 )
type ResponseFormat ¶
type ResponseFormat int
const ( ResponseFormatRawBinary ResponseFormat = 1 ResponseFormatJson ResponseFormat = 2 )
type SchedulingJob ¶
type SchedulingJob interface { Name() string Handler(msbHandler MsbHandler) (JobResultIndicator, error) CronConfig() string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.