async

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error[T any](t T, err error) T

/////////////////////

func ErrorCode

func ErrorCode[T any](t T, err error) string

/////////////////////

Types

type Create

type Create[T ICreate] struct {
	Data []T
}

func (*Create[T]) Create

func (m *Create[T]) Create(f func(t T) (string, string)) (map[string]string, []string)

//

type CreateWithDependentIds

type CreateWithDependentIds[T ICreateWithDependentIds] struct {
	Data []T
}

func (*CreateWithDependentIds[T]) Create

func (m *CreateWithDependentIds[T]) Create(f func(name string, t T) (string, string)) (map[string]string, []string)

//

type Delete

type Delete[T IDeleteInterface, S any] struct {
	Data []T
}

func (*Delete[T, S]) Delete

func (m *Delete[T, S]) Delete(f func(t T))

//

type Detach

type Detach[T IDetachInterface, S any] struct {
	Data []T
}

func (*Detach[T, S]) Detach

func (m *Detach[T, S]) Detach(f func(t T) (S, error))

//

type DetachMap

type DetachMap[T IDetachInterface, S any] struct {
	Data map[string]T
}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

func (*DetachMap[T, S]) Detach

func (m *DetachMap[T, S]) Detach(f func(k string, v T) (S, error))

//

type ICreate

type ICreate interface {
	GetName() string
}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type ICreateWithDependentIds

type ICreateWithDependentIds interface {
	GetName() string
	GetDependentIds() []string
}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type IDeleteInterface

type IDeleteInterface interface{}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type IDetachInterface

type IDetachInterface interface{}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type IParamsKV

type IParamsKV interface{}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type ISliceInterface

type ISliceInterface interface{}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type Ids

type Ids struct {
	Ch chan IdsKV
}

func (*Ids) Init

func (kv *Ids) Init(size int)

func (*Ids) Reduce

func (kv *Ids) Reduce() map[string]string

func (*Ids) Send

func (kv *Ids) Send(v IdsKV)

type IdsKV

type IdsKV struct {
	Key   string
	Value string
}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

type Map

type Map[K comparable, V string] struct {
	Data map[K]V
}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

func (*Map[K, V]) Map

func (m *Map[K, V]) Map(f func(k K, v V) error) error

//

type Params

type Params[T IParamsKV] struct {
	Ch chan T
}

func (*Params[T]) Init

func (kv *Params[T]) Init(size int)

func (*Params[T]) Reduce

func (kv *Params[T]) Reduce() []string

func (*Params[T]) Send

func (kv *Params[T]) Send(t T)

type Result

type Result struct {
	Name string
	Id   string
	Ret  string
}

///

type Slice

type Slice[T ISliceInterface] struct {
	Data []T
}

func (*Slice[T]) Slice

func (m *Slice[T]) Slice(f func(t T) error) error

//

type Strings

type Strings struct {
	Ch chan string
}

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////

func (*Strings) Init

func (s *Strings) Init(size int)

func (*Strings) Reduce

func (s *Strings) Reduce() []string

func (*Strings) Send

func (s *Strings) Send(t string)

Jump to

Keyboard shortcuts

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