Documentation ¶
Index ¶
- type CreateRequest
- type CreateResponse
- type DeleteOption
- type DeleteOptions
- type Deployment
- type ListOptions
- type Manager
- func (d *Manager) Create(dc *CreateRequest) (cr *CreateResponse, err error)
- func (d *Manager) Delete(id string, options *DeleteOptions) error
- func (d *Manager) Get(id string) (deployment Deployment, err error)
- func (d *Manager) GetList(opts ListOptions) (deployments []*Deployment, err error)
- func (d *Manager) GetListCount(query map[string]string) (count int, err error)
- func (d *Manager) GetResource(id, resourceID string) (resource *ResourceResponse, err error)
- func (d *Manager) GetResourceBinary(id, resourceID string) (data []byte, err error)
- func (d *Manager) GetResources(id string) (resources []*ResourceResponse, err error)
- func (d *Manager) Redeploy(id string, req RedeployRequest) (deployment *CreateResponse, err error)
- type RedeployRequest
- type ResourceResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { DeploymentName string EnableDuplicateFiltering bool DeployChangedOnly bool DeploymentSource string TenantID string Resources map[string]io.Reader }
CreateRequest a request to deployment create
type CreateResponse ¶
type CreateResponse struct { // The id of the deployment ID string `json:"id"` // The name of the deployment Name string `json:"name"` // The source of the deployment Source string `json:"source"` // The tenant id of the deployment TenantID string `json:"tenantId"` // The time when the deployment was created DeploymentTime camunda.Time `json:"deploymentTime"` // Link to the newly created deployment with method, href and rel Links []camunda.ResLink `json:"links"` // A JSON Object containing a property for each of the process definitions, // which are successfully deployed with that deployment DeployedProcessDefinitions map[string]camunda.ProcessDefinitionResponse `json:"deployedProcessDefinitions"` // A JSON Object containing a property for each of the case definitions, // which are successfully deployed with that deployment DeployedCaseDefinitions map[string]camunda.CaseDefinition `json:"deployedCaseDefinitions"` // A JSON Object containing a property for each of the decision definitions, // which are successfully deployed with that deployment DeployedDecisionDefinitions map[string]camunda.DecisionDefinition `json:"deployedDecisionDefinitions"` // A JSON Object containing a property for each of the decision requirements definitions, // which are successfully deployed with that deployment DeployedDecisionRequirementsDefinitions map[string]camunda.ResDecisionRequirementsDefinition `json:"deployedDecisionRequirementsDefinitions"` }
CreateResponse a JSON object corresponding to the DeploymentWithDefinitions interface in the engine
type DeleteOption ¶
type DeleteOption interface{}
func DeleteCascade ¶
func DeleteCascade(cascade bool) DeleteOption
type DeleteOptions ¶
type DeleteOptions struct { // Cascade true, if all process instances, historic process instances and jobs for this deployment should be deleted. Cascade bool `url:"cascade,omitempty"` // SkipCustomListeners true, if only the built-in ExecutionListeners should be notified with the end event. SkipCustomListeners bool `url:"skipCustomListeners,omitempty"` // SkipIoMappings true, if all input/output mappings should not be invoked. SkipIoMappings bool `url:"skipIoMappings,omitempty"` }
DeleteOptions options query map for delete deployment request
type Deployment ¶
type Deployment struct { // The id of the deployment ID string `json:"id"` // The name of the deployment Name string `json:"name"` // The source of the deployment Source string `json:"source"` // The tenant id of the deployment TenantID string `json:"tenantId"` // The date and time of the deployment. DeploymentTime camunda.Time `json:"deploymentTime"` }
Deployment a JSON array of deployment objects
type ListOptions ¶
type ListOptions struct { // id Filter by deployment id. Id string `url:"id,omitempty"` // Name Filter by the deployment name. Exact match. Name string `url:"name,omitempty"` // NameLike Filter by the deployment name that the parameter is a substring of. The // parameter can include the wildcard % to express like-strategy such as: starts with (%name), ends with (name%) or contains (%name%). NameLike string `url:"nameLike,omitempty"` // source Filter by the deployment source. Source string `url:"source,omitempty"` // WithoutSource Filter by the deployment source whereby source is equal to null. WithoutSource string `url:"withoutSource,omitempty"` // TenantIDIn Filter by a comma-separated list of tenant ids. A deployment must have // one of the given tenant ids. TenantIDIn []string `url:"tenantIdIn,omitempty"` // WithoutTenantID Only include deployments which belong to no tenant. Value may only // be true, as false is the default behavior. WithoutTenantID bool `url:"withoutTenantId,omitempty"` // IncludeDeploymentsWithoutTenantID Include deployments which belong to no tenant. Can // be used in combination with tenantIdIn. Value may only be true, as false is the default behavior. IncludeDeploymentsWithoutTenantID bool `url:"includeDeploymentsWithoutTenantId,omitempty"` // After Restricts to all deployments after the given date. By default*, the date must // have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200. After string `url:"after,omitempty"` // Before Restricts to all deployments before the given date. By default*, the date must // have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200. Before string `url:"before,omitempty"` // SortBy Sort the results lexicographically by a given criterion. Valid values are id, // name, deploymentTime and tenantId. Must be used in conjunction with the sortOrder parameter. SortBy string `url:"sortBy,omitempty"` // SortOrder Sort the results in a given order. Values may be asc for ascending order or // desc for descending order. Must be used in conjunction with the sortBy parameter. SortOrder string `url:"sortOrder,omitempty"` // FirstResult Pagination of results. Specifies the index of the first result to return. FirstResult string `url:"firstResult,omitempty"` // MaxResults Pagination of results. Specifies the maximum number of results to return. // Will return less results if there are no more results left. MaxResults int `url:"maxResults,omitempty"` }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager deployment manager instance. You can instantiate the instance from the camunda.Client instance
func NewManager ¶
NewManager initializes a new deployment manager
func (*Manager) Create ¶
func (d *Manager) Create(dc *CreateRequest) (cr *CreateResponse, err error)
Create creates a deployment. See more at: https://docs.camunda.org/manual/latest/reference/rest/deployment/post-deployment/
func (*Manager) Delete ¶
func (d *Manager) Delete(id string, options *DeleteOptions) error
Delete deletes a deployment by id
func (*Manager) Get ¶
func (d *Manager) Get(id string) (deployment Deployment, err error)
Get retrieves a deployment by id, according to the Deployment interface of the engine
func (*Manager) GetList ¶
func (d *Manager) GetList(opts ListOptions) (deployments []*Deployment, err error)
GetList a queries for deployments that fulfill given parameters. Parameters may be the properties of deployments, such as the id or name or a range of the deployment time. The size of the result set can be retrieved by using the Get Deployment count method. Query parameters described in the documentation: https://docs.camunda.org/manual/latest/reference/rest/deployment/get-query/#query-parameters
func (*Manager) GetListCount ¶
GetListCount a queries for the number of deployments that fulfill given parameters. Takes the same parameters as the Get Deployments method
func (*Manager) GetResource ¶
func (d *Manager) GetResource(id, resourceID string) (resource *ResourceResponse, err error)
GetResource retrieves a deployment resource by resource id for the given deployment
func (*Manager) GetResourceBinary ¶
GetResourceBinary retrieves the binary content of a deployment resource for the given deployment by id
func (*Manager) GetResources ¶
func (d *Manager) GetResources(id string) (resources []*ResourceResponse, err error)
GetResources retrieves all deployment resources of a given deployment
func (*Manager) Redeploy ¶
func (d *Manager) Redeploy(id string, req RedeployRequest) (deployment *CreateResponse, err error)
Redeploy a re-deploys an existing deployment. The deployment resources to re-deploy can be restricted by using the properties resourceIds or resourceNames. If no deployment resources to re-deploy are passed then all existing resources of the given deployment are re-deployed
type RedeployRequest ¶
type RedeployRequest struct { // A list of deployment resource ids to re-deploy ResourceIds *string `json:"resourceIds,omitempty"` // A list of deployment resource names to re-deploy ResourceNames *string `json:"resourceNames,omitempty"` // Sets the source of the deployment Source *string `json:"source,omitempty"` }
RedeployRequest a request to redeploy
type ResourceResponse ¶
type ResourceResponse struct { // The id of the deployment resource ID string `json:"id"` // The name of the deployment resource Name string `json:"name"` // The id of the deployment DeploymentID string `json:"deploymentId"` }
ResourceResponse a JSON array containing all deployment resources of the given deployment