noop

package module
v0.0.0-...-f2a9e3e Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsNoop

func ContainsNoop(ctx context.Context) bool

func MiddleWareGin

func MiddleWareGin() gin.HandlerFunc

func Middleware

func Middleware(n http.Handler) http.Handler

func NewCtxWithActions

func NewCtxWithActions(ctx context.Context, actions *Actions) context.Context

func NewCtxWithNoop

func NewCtxWithNoop(ctx context.Context, isNoop bool) context.Context

func NewHttpRequest

func NewHttpRequest(req *http.Request) *http.Request

Types

type Actions

type Actions struct {
	Events chan []interface{}
}

func ActionsFromCtx

func ActionsFromCtx(ctx context.Context) *Actions

func NewActions

func NewActions() *Actions

func (*Actions) AddEvent

func (a *Actions) AddEvent(events ...Event)

func (*Actions) GetEvents

func (a *Actions) GetEvents() []Event

func (*Actions) Marshal

func (a *Actions) Marshal() ([]byte, error)

type Event

type Event struct {
	Name        string      `json:"name"` // ",omitempty"`
	NextSubject string      `json:"nextSubject"`
	Meta        interface{} `json:"meta,omitempty"`
}

type Json

type Json struct {
	Events []interface{} `json:"Events"`
}

Jump to

Keyboard shortcuts

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