Documentation
¶
Index ¶
- func Apply[I any](input *I, options ...Option[I])
- type Option
- type Service
- func (s *Service[I, O]) Bind(ctx context.Context, dest interface{}, opts ...state.Option) error
- func (s *Service[I, O]) Execute(ctx context.Context, opts ...state.Option) (*O, error)
- func (s *Service[I, O]) Run(ctx context.Context, input *I, opts ...state.Option) (*O, error)
- func (s *Service[I, O]) RunWithSelector(ctx context.Context, input *I, selector *state.NamedQuerySelector, ...) (*O, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
func NewWithInjector ¶
func NewWithInjector[I any, O any](route *xhttp.Route, getInjector func(ctx context.Context, route xhttp.Route) (state.Injector, error)) *Service[I, O]
NewWithInjector creates a service that resolves an injector via the supplied callback at execution time. It is useful when the caller only has an injector-provider function (instead of a handler.Session).
func (*Service[I, O]) RunWithSelector ¶
Click to show internal directories.
Click to hide internal directories.