Documentation ¶
Index ¶
- type Error
- type ErrorCode
- type Service
- func (s *Service) AddModule(name string, module interface{})
- func (s *Service) Prepare(eng *vivard.Engine, prov dep.Provider) (err error)
- func (s *Service) Process(ctx context.Context, operation string, context map[string]interface{}, ...) (map[string]interface{}, error)
- func (s *Service) ProcessSingleRet(ctx context.Context, operation string, context map[string]interface{}) (interface{}, error)
- func (s *Service) Provide() interface{}
- func (s *Service) SetContext(ctx map[string]interface{})
- func (s *Service) Start(eng *vivard.Engine, prov dep.Provider) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Process ¶
func (s *Service) Process(ctx context.Context, operation string, context map[string]interface{}, results []string) (map[string]interface{}, error)
Process looks for script to process given operation and runs it context objects will be put in the global scope of script return value contains the result of execution (with key "_") and variables's listed in results argument values
func (*Service) ProcessSingleRet ¶
func (s *Service) ProcessSingleRet(ctx context.Context, operation string, context map[string]interface{}) (interface{}, error)
ProcessSingleRet looks for script to process given operation and runs it context objects will be put in the global scope of script return value is the result of execution
func (*Service) SetContext ¶
SetContext sets context for all subsequantial calls
Click to show internal directories.
Click to hide internal directories.