pipeline

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

type Pipeline[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any]() *Pipeline[T]

func (*Pipeline[T]) Append added in v1.0.13

func (t *Pipeline[T]) Append(fn StepFn[T]) *Pipeline[T]

func (*Pipeline[T]) Prepend added in v1.0.13

func (t *Pipeline[T]) Prepend(fn StepFn[T]) *Pipeline[T]

func (*Pipeline[T]) RunList added in v1.0.13

func (t *Pipeline[T]) RunList(items []T) []T

func (*Pipeline[T]) RunSingle added in v1.0.13

func (t *Pipeline[T]) RunSingle(item T) T

type PipelineTry

type PipelineTry[T any] struct {
	// contains filtered or unexported fields
}

func NewTry

func NewTry[T any]() *PipelineTry[T]

func (*PipelineTry[T]) Append added in v1.0.13

func (t *PipelineTry[T]) Append(fn StepWithErrFn[T]) *PipelineTry[T]

func (*PipelineTry[T]) Prepend added in v1.0.13

func (t *PipelineTry[T]) Prepend(fn StepWithErrFn[T]) *PipelineTry[T]

func (*PipelineTry[T]) Run

func (t *PipelineTry[T]) Run(in T) trier.Try[T]

type PipelineWithErr added in v1.0.13

type PipelineWithErr[T any] struct {
	// contains filtered or unexported fields
}

func NewWithError added in v1.0.13

func NewWithError[T any]() *PipelineWithErr[T]

func (*PipelineWithErr[T]) Append added in v1.0.13

func (t *PipelineWithErr[T]) Append(fn StepWithErrFn[T]) *PipelineWithErr[T]

func (*PipelineWithErr[T]) Prepend added in v1.0.13

func (t *PipelineWithErr[T]) Prepend(fn StepWithErrFn[T]) *PipelineWithErr[T]

func (*PipelineWithErr[T]) Run added in v1.0.13

func (t *PipelineWithErr[T]) Run(in T) (T, error)

type StepFn

type StepFn[T any] func(T) T

func StringRemover added in v1.0.13

func StringRemover[T ~string](remove string) StepFn[T]

type StepWithErrFn added in v1.0.13

type StepWithErrFn[T any] func(T) (T, error)

func SimpleStep added in v1.0.13

func SimpleStep[T any](fn func(T) T) StepWithErrFn[T]

Jump to

Keyboard shortcuts

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