Documentation
¶
Index ¶
- type CustomHandler
- func (handler *CustomHandler) DecryptMessage() (string, error)
- func (handler *CustomHandler) Fail(message string)
- func (handler *CustomHandler) GetMessage() (notify *request.RequestNotify, err error)
- func (handler *CustomHandler) RespondWith(attributes *object.StringMap, sign bool) *CustomHandler
- func (handler *CustomHandler) Strict(result interface{})
- func (handler *CustomHandler) ToResponse() (response *http.Response, err error)
- type CustomNotify
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomHandler ¶
type CustomHandler struct {
App kernel.ApplicationPaymentInterface
Message *request.RequestNotify
Attributes *object.StringMap
Check bool
Sign bool
ExternalBody io.Reader
// contains filtered or unexported fields
}
func NewCustomHandler ¶
func NewCustomHandler(app kernel.ApplicationPaymentInterface, body io.Reader) *CustomHandler
func (*CustomHandler) DecryptMessage ¶
func (handler *CustomHandler) DecryptMessage() (string, error)
func (*CustomHandler) Fail ¶
func (handler *CustomHandler) Fail(message string)
func (*CustomHandler) GetMessage ¶
func (handler *CustomHandler) GetMessage() (notify *request.RequestNotify, err error)
func (*CustomHandler) RespondWith ¶
func (handler *CustomHandler) RespondWith(attributes *object.StringMap, sign bool) *CustomHandler
func (*CustomHandler) Strict ¶
func (handler *CustomHandler) Strict(result interface{})
func (*CustomHandler) ToResponse ¶
func (handler *CustomHandler) ToResponse() (response *http.Response, err error)
type CustomNotify ¶
type CustomNotify[T any] struct { *CustomHandler }
CustomNotify 框架内没有实现的,可以使用这个自己实现
func NewCustomNotify ¶
func NewCustomNotify[T any](app kernel.ApplicationPaymentInterface, body io.Reader) *CustomNotify[T]
func (*CustomNotify[T]) Handle ¶
func (comp *CustomNotify[T]) Handle(closure func(message *request.RequestNotify, transaction *T, fail func(message string)) interface{}) (*http.Response, error)
Click to show internal directories.
Click to hide internal directories.