Documentation ¶
Index ¶
- func RunAll(ctx context.Context, registry Registry, actions []*Action) (bool, error)
- type Action
- func (a Action) Clone() *Action
- func (a Action) Expand(root *stage.Process, expander data.Map) *Action
- func (a *Action) Init(ctx context.Context, fs afs.Service) error
- func (a Action) JobReference() *bigquery.JobReference
- func (a Action) RequestStringValue(key string) string
- func (a Action) RequestValue(key string) interface{}
- func (a Action) ServiceRequest() interface{}
- func (a *Action) SetRequest(req interface{}) error
- type Actions
- func (a *Actions) AddOnFailure(actions ...*Action)
- func (a *Actions) AddOnSuccess(actions ...*Action)
- func (a Actions) Clone() *Actions
- func (a Actions) CloneOnFailure() *Actions
- func (a *Actions) Expand(root *stage.Process, action string, sourceURIs []string) *Actions
- func (a *Actions) FinalizeOnSuccess(actions ...*Action)
- func (a *Actions) Init(ctx context.Context, fs afs.Service) error
- func (a Actions) IsEmpty() bool
- func (a Actions) ToRun(err error, job *base.Job) []*Action
- type Registry
- type Response
- type Service
- type ServiceAction
- type When
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { Action string `json:",omitempty"` When *When `json:",omitempty"` Meta *activity.Meta `json:",omitempty"` Request map[string]interface{} `json:",omitempty"` *Actions `json:",omitempty"` // contains filtered or unexported fields }
Action represents route action
func NewActionFromURL ¶
NewActionFromURL create a new actions from URL
func (Action) JobReference ¶
func (a Action) JobReference() *bigquery.JobReference
JobReference returns a job reference
func (Action) RequestStringValue ¶
RequestStringValue returns request string value for supplied key
func (Action) RequestValue ¶
RequestValue returns request value for supplied key
func (Action) ServiceRequest ¶
func (a Action) ServiceRequest() interface{}
ServiceRequest returns a service request
func (*Action) SetRequest ¶
SetRequest set request for supplied req instance
type Actions ¶
type Actions struct { Job *bigquery.Job `json:",omitempty"` OnSuccess []*Action `json:",omitempty"` OnFailure []*Action `json:",omitempty"` }
Actions represents actions
func NewActions ¶
NewActions creates an actions
func (*Actions) AddOnFailure ¶
AddOnFailure adds on failure action
func (*Actions) AddOnSuccess ¶
AddOnSuccess adds on sucess action
func (Actions) CloneOnFailure ¶
CloneOnFailure returns actions to run
func (*Actions) FinalizeOnSuccess ¶
type Registry ¶
type Registry interface { Service(name string) (Service, error) RegisterService(name string, service Service) RegisterAction(name string, service *ServiceAction) Action(name string) (*ServiceAction, error) Actions(service string) []string }
Registry represents services actions
type Response ¶
type Response interface{}
Response represents generic response
type ServiceAction ¶
ServiceAction represets service action
func NewServiceAction ¶
func NewServiceAction(service string, request interface{}) *ServiceAction
NewServiceAction creates a service action
func (*ServiceAction) SetServiceRequest ¶
func (a *ServiceAction) SetServiceRequest(action *Action) error
SetServiceRequest creates a new request