Documentation
¶
Index ¶
- func NewResponseWriter(body interface{}, status int) *responseWriter
- func NewResponseWriterFromErrMsg(errMsg string, status int) *responseWriter
- func NewResponseWriterFromError(err error) *responseWriter
- type Filters
- type Pagination
- type ResponseError
- type SagaBatch
- type SagaEvent
- type SagaStatus
- type StatusHandler
- type StatusService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResponseWriter ¶ added in v0.1.18
func NewResponseWriter(body interface{}, status int) *responseWriter
func NewResponseWriterFromErrMsg ¶ added in v0.1.18
func NewResponseWriterFromError ¶ added in v0.1.18
func NewResponseWriterFromError(err error) *responseWriter
Types ¶
type Pagination ¶ added in v0.1.18
type ResponseError ¶ added in v0.1.17
type ResponseError struct {
// contains filtered or unexported fields
}
func NewResponseError ¶ added in v0.1.17
func NewResponseError(status int, err error) ResponseError
func (ResponseError) Status ¶ added in v0.1.17
func (e ResponseError) Status() int
Status returns http status code
type SagaBatch ¶ added in v0.1.18
type SagaBatch struct { Total int `json:"total"` Items []SagaStatus `json:"items"` }
type SagaEvent ¶
type SagaEvent struct {
saga.HistoryEvent
}
type SagaStatus ¶ added in v0.1.18
type StatusHandler ¶
type StatusHandler struct {
// contains filtered or unexported fields
}
func NewStatusHandler ¶
func NewStatusHandler(logger log.Logger, service StatusService) *StatusHandler
func (*StatusHandler) GetFilteredBy ¶
func (h *StatusHandler) GetFilteredBy(resp http.ResponseWriter, r *http.Request)
func (*StatusHandler) GetStatus ¶
func (h *StatusHandler) GetStatus(resp http.ResponseWriter, r *http.Request)
type StatusService ¶
type StatusService interface { GetStatus(ctx context.Context, sagaId string) (*SagaStatus, error) GetFilteredBy(ctx context.Context, filters *Filters, pagination *Pagination) (*SagaBatch, error) }
func NewStatusService ¶
func NewStatusService(store saga.Store) StatusService
Click to show internal directories.
Click to hide internal directories.