Documentation ¶
Index ¶
- func New(url string, opts ...client.Option) *playbookSvc
- type ClonePlaybookInput
- type Metadata
- type Playbook
- type PlaybookExecution
- type PlaybookExecutions
- type PlaybookInput
- type PlaybookInstance
- type PlaybookInstanceInput
- type PlaybookRetries
- type PlaybookTrigger
- type PlaybookTriggerInput
- type PlaybookTriggerType
- type PlaybookVersion
- type PlaybookVersionInput
- type Service
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClonePlaybookInput ¶
type Playbook ¶
type Playbook struct { Metadata `json:",inline" yaml:",inline"` Tenant string `json:"tenant"` Requires []*connectors.ConnectorInterface `json:"requires"` // connector interfaces used by playbook dsl (Contains only the IDs) Categories []*connectors.ConnectorCategory `json:"categories"` // connector categories supported by those types (Contains only the IDs) Versions []*PlaybookVersion `json:"versions"` // versions in sorted order most recent first Head *PlaybookVersion `json:"head"` // defaults to most recent version but can be rolled back to a previous version Title *string `json:"title"` }
Playbook is an entry in catalog of available playbooks"
type PlaybookExecution ¶
type PlaybookExecution struct { ID string `json:"id"` CreatedAt time.Time `json:"createdAt"` CreatedBy string `json:"createdBy"` UpdatedAt time.Time `json:"updatedAt"` Tenant string `json:"tenant"` Instance *PlaybookInstance `json:"instance"` State string `json:"state"` Inputs common.Object `json:"inputs"` Outputs common.Object `json:"outputs"` }
PlaybookExecution represents the state of a current playbook execution
type PlaybookExecutions ¶
type PlaybookExecutions struct { Executions []*PlaybookExecution TotalCount int }
type PlaybookInput ¶
type PlaybookInput struct { common.ObjectMetaInput Head *common.ID `json:"head"` Version *PlaybookVersionInput `json:"version"` Categories common.IDs `json:"categories" yaml:"categories"` Title *string `json:"title,omitempty"` }
PlaybookInput defines the mutable fields of a playbook. Modifications the version will create a new version
type PlaybookInstance ¶
type PlaybookInstance struct { Metadata `json:",inline" yaml:",inline"` Tenant string `json:"tenant"` CreatedBy string `json:"createdBy"` Playbook *Playbook `json:"playbook"` Version *PlaybookVersion `json:"version"` Trigger *PlaybookTrigger `json:"trigger"` Enabled bool `json:"enabled"` Inputs common.Object `json:"inputs"` Retries *PlaybookRetries `json:"retries"` Connections []*connectors.Connection `json:"connections"` }
PlaybookInstance defines the configuration of a playbook in a user account"
type PlaybookInstanceInput ¶
type PlaybookInstanceInput struct { common.ObjectMetaInput Trigger PlaybookTriggerInput `json:"trigger"` Enabled bool `json:"enabled"` Inputs common.Object `json:"inputs"` Connections common.IDs `json:"connections"` }
PlaybookInstanceInput defines the mutable fields of a playbook instance
type PlaybookRetries ¶
type PlaybookTrigger ¶
type PlaybookTrigger struct { ID string `json:"id"` Tenant string `json:"tenant"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Name string `json:"name"` Description string `json:"description"` Instance *PlaybookInstance `json:"instance"` Type *PlaybookTriggerType `json:"type"` Config common.Object `json:"config"` }
PlaybookTrigger defines a set of attributes common to different trigger types
type PlaybookTriggerInput ¶
type PlaybookTriggerType ¶
type PlaybookTriggerType struct { ID string `json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Name string `json:"name"` Description string `json:"description"` Parameters common.Object `json:"parameters"` }
PlaybookTriggerType defines an available triggering mechanism
type PlaybookVersion ¶
type PlaybookVersion struct { ID string `json:"id"` CreatedAt time.Time `json:"createdAt"` CreatedBy string `json:"createdBy"` Playbook *Playbook `json:"playbook"` Requires []*connectors.ConnectorInterface `json:"retries"` Inputs common.Object `json:"inputs"` Outputs common.Object `json:"outputs"` Dsl common.Object `json:"dsl"` }
PlaybookVersion maintains a change record of the playbook definition. Multiple versions of a playbook could be in use concurrently"
type PlaybookVersionInput ¶
type PlaybookVersionInput struct { Inputs common.Object `json:"inputs" yaml:"inputs" gorm:"type:JSONB"` Outputs common.Object `json:"outputs" yaml:"outputs" gorm:"type:JSONB"` Requires common.IDs `json:"requires" yaml:"requires" gorm:"type:uuid[]"` DSL common.Object `json:"dsl" yaml:"dsl" gorm:"type:JSONB"` }
PlaybookVersionInput defines the mutable fields of a playbook version
type Service ¶
type Service interface { GetPlaybook(playbookID string, opts ...graphql.RequestOption) (*Playbook, error) GetPlaybooks(categoryID *string, tags *common.Tags, opts ...graphql.RequestOption) ([]*Playbook, error) GetPlaybookInstance(playbookInstanceID string, opts ...graphql.RequestOption) (*PlaybookInstance, error) GetPlaybookInstances(playbookID *string, opts ...graphql.RequestOption) ([]*PlaybookInstance, error) GetPlaybookExecution(playbookExecutionID string, opts ...graphql.RequestOption) (*PlaybookExecution, error) GetPlaybookExecutions(playbookInstanceID string, pagination common.Pagination, opts ...graphql.RequestOption) (*PlaybookExecutions, error) GetPlaybookTriggerType(id *string, name *string, opts ...graphql.RequestOption) (*PlaybookTriggerType, error) GetPlaybookTriggerTypes(opts ...graphql.RequestOption) ([]*PlaybookTriggerType, error) GetPlaybookTrigger(playbookTriggerID string, opts ...graphql.RequestOption) (*PlaybookTrigger, error) GetPlaybookTriggers(triggerTypeIDs []string, opts ...graphql.RequestOption) ([]*PlaybookTrigger, error) CreatePlaybookInstance(playbookID string, input *PlaybookInstanceInput, opts ...graphql.RequestOption) (*PlaybookInstance, error) UpdatePlaybookInstance(playbookInstanceID string, input *PlaybookInstanceInput, opts ...graphql.RequestOption) (*PlaybookInstance, error) DeletePlaybookInstance(playbookInstanceID string, opts ...graphql.RequestOption) (*PlaybookInstance, error) ExecutePlaybookInstance(playbookInstanceID string, params common.Object, opts ...graphql.RequestOption) (*PlaybookExecution, error) CreatePlaybook(input *PlaybookInput, opts ...graphql.RequestOption) (*Playbook, error) ClonePlaybook(input ClonePlaybookInput, opts ...graphql.RequestOption) (*Playbook, error) UpdatePlaybook(playbookID string, input *PlaybookInput, opts ...graphql.RequestOption) (*Playbook, error) DeletePlaybook(playbookID string, opts ...graphql.RequestOption) (*Playbook, error) ExecutePlaybook(playbookID string, parameters common.Object, opts ...graphql.RequestOption) (*PlaybookExecution, error) SetPlaybookInstanceState(playbookInstanceID string, enabled bool, opts ...graphql.RequestOption) (*PlaybookInstance, error) PlaybookInstanceCreated(ctx context.Context, playbooks common.IDs, options ...graphql.SubscriptionOption) (Subscription, error) PlaybookInstanceUpdated(ctx context.Context, playbooks common.IDs, options ...graphql.SubscriptionOption) (Subscription, error) PlaybookInstanceDeleted(ctx context.Context, playbooks common.IDs, options ...graphql.SubscriptionOption) (Subscription, error) }