status

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 NewResponseWriterFromErrMsg(errMsg string, status int) *responseWriter

func NewResponseWriterFromError added in v0.1.18

func NewResponseWriterFromError(err error) *responseWriter

Types

type Filters added in v0.1.18

type Filters struct {
	SagaID   string
	SagaName string
	Status   string
}

type Pagination added in v0.1.18

type Pagination struct {
	Offset int
	Limit  int
}

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 SagaStatus struct {
	SagaUID string      `json:"saga_uid"`
	Status  string      `json:"status"`
	Payload interface{} `json:"payload"`
	Events  []SagaEvent `json:"events"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL