Documentation
¶
Index ¶
- Constants
- type AccessControl
- type AccessType
- type AccessUser
- type Activity
- type AdHocCommand
- type AdHocCommandEvent
- type Credential
- type Error
- type Group
- type Host
- type Inventory
- type InventoryScript
- type InventorySource
- type Job
- type JobTemplate
- type Launch
- type Notification
- type NotificationTemplate
- type Organization
- type PatchCredential
- type PatchGroup
- type PatchHost
- type PatchInventory
- type PatchJobTemplate
- type PatchOrganization
- type PatchProject
- type PatchTeam
- type Project
- type Response
- type SCMUpdate
- type SystemJob
- type Team
- type User
Constants ¶
View Source
const ( CREDENTIAL_KIND_SSH = "ssh" CREDENTIAL_KIND_NET = "net" CREDENTIAL_KIND_WIN = "win" CREDENTIAL_KIND_SCM = "scm" CREDENTIAL_KIND_AWS = "aws" CREDENTIAL_KIND_RAX = "rax" CREDENTIAL_KIND_VMWARE = "vmware" CREDENTIAL_KIND_SATELLITE6 = "satellite6" CREDENTIAL_KIND_CLOUDFORMS = "cloudforms" CREDENTIAL_KIND_GCE = "gce" CREDENTIAL_KIND_AZURE = "azure" CREDENTIAL_KIND_OPENSTACK = "openstack" )
View Source
const ( JOBTYPE_ANSIBLE_JOB = "ansible_job" // A ansible job JOBTYPE_UPDATE_JOB = "update_job" // A project scm update job JOB_LAUNCH_TYPE_MANUAL = "manual" JOB_LAUNCH_TYPE_SYSTEM = "system" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControl ¶
type AccessType ¶
type AccessUser ¶
type AccessUser struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary *AccessType `bson:"-" json:"summary_fields"`
Created time.Time `bson:"created" json:"created"`
Username string `bson:"username" json:"username" binding:"required"`
FirstName string `bson:"first_name" json:"first_name"`
LastName string `bson:"last_name" json:"last_name"`
Email string `bson:"email" json:"email" binding:"required"`
IsSuperUser bool `bson:"is_superuser" json:"is_superuser"`
IsSystemAuditor bool `bson:"is_system_auditor" json:"is_system_auditor"`
Password string `bson:"password" json:"-"`
OrganizationID bson.ObjectId `bson:"organization_id" json:"organization"`
}
type Activity ¶
type Activity struct {
ID bson.ObjectId `bson:"_id" json:"id"`
ObjectID bson.ObjectId `bson:"object_id" json:"object_id"`
ActorID bson.ObjectId `bson:"actor_id" json:"actor_id"`
Type string `bson:"type" json:"type"`
Description string `bson:"description" json:"description"`
Created time.Time `bson:"created" json:"created"`
}
type AdHocCommand ¶
type AdHocCommand struct {
ID bson.ObjectId `bson:"_id" json:"id"`
ModuleName string `bson:"module_name" json:"module_name" binding:"required"`
Limit string `bson:"limit" json:"limit"`
ModuleArgs string `bson:"module_args" json:"module_args"`
JobType string `bson:"job_type" json:"job_type"`
Forks uint8 `bson:"forks" json:"forks"`
Verbosity uint8 `bson:"verbosity" json:"verbosity"`
BecomeEnabled bool `bson:"become_enabled" json:"become_enabled"`
CredentialID bson.ObjectId `bson:"credential_id" json:"credential"`
InventoryID bson.ObjectId `bson:"inventory_id" json:"inventory"`
ExtraVars gin.H `bson:"extra_vars" json:"extra_vars"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"created_by"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"modified_by"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
}
type AdHocCommandEvent ¶
type AdHocCommandEvent struct {
ID bson.ObjectId `bson:"_id" json:"id"`
HostName string `bson:"host_name" json:"host_name" binding:"required"`
Event string `bson:"event" json:"event"`
EventData string `bson:"event_data" json:"event_data"`
Failed bool `bson:"failed" json:"failed"`
Changed bool `bson:"changed" json:"changed"`
Counter uint8 `bson:"counter" json:"counter"`
HostID bson.ObjectId `bson:"host_id" json:"host"`
AdHocCommandID bson.ObjectId `bson:"ad_hoc_command_id" json:"ad_hoc_command_id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
}
type Credential ¶
type Credential struct {
ID bson.ObjectId `bson:"_id" json:"id"`
// required feilds
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
Kind string `bson:"kind" json:"kind" binding:"required,credentialkind"`
//optional feilds
Cloud bool `bson:"cloud,omitempty" json:"cloud"`
Description string `bson:"description,omitempty" json:"description"`
Host string `bson:"host,omitempty" json:"host"`
Username string `bson:"username,omitempty" json:"username"`
Password string `bson:"password,omitempty" json:"password"`
SecurityToken string `bson:"security_token,omitempty" json:"security_token"`
Project string `bson:"project,omitempty" json:"project"`
Domain string `bson:"domain,omitempty" json:"domain"`
SshKeyData string `bson:"ssh_key_data,omitempty" json:"ssh_key_data"`
SshKeyUnlock string `bson:"ssh_key_unlock,omitempty" json:"ssh_key_unlock"`
BecomeMethod string `bson:"become_method,omitempty" json:"become_method" binding:"omitempty,become_method"`
BecomeUsername string `bson:"become_username,omitempty" json:"become_username"`
BecomePassword string `bson:"become_password,omitempty" json:"become_password"`
VaultPassword string `bson:"vault_password,omitempty" json:"vault_password"`
Subscription string `bson:"subscription,omitempty" json:"subscription"`
Tenant string `bson:"tenant,omitempty" json:"tenant"`
Secret string `bson:"secret,omitempty" json:"secret"`
Client string `bson:"client,omitempty" json:"client"`
Authorize bool `bson:"authorize,omitempty" json:"authorize"`
AuthorizePassword string `bson:"authorize_password,omitempty" json:"authorize_password"`
OrganizationID *bson.ObjectId `bson:"organization_id,omitempty" json:"organization"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
Roles []AccessControl `bson:"roles" json:"-"`
}
Organization is the model for organization collection
type Group ¶
type Group struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
Description string `bson:"description" json:"description"`
Variables string `bson:"variables" json:"variables"`
TotalHosts uint32 `bson:"total_hosts" json:"total_hosts"`
HasActiveFailures bool `bson:"has_active_failures" json:"has_active_failures"`
HostsWithActiveFailures uint32 `bson:"hosts_with_active_failures" json:"hosts_with_active_failures"`
TotalGroups uint32 `bson:"total_groups" json:"total_groups"`
GroupsWithActiveFailures uint32 `bson:"groups_with_active_failures" json:"groups_with_active_failures"`
HasInventorySources bool `bson:"has_inventory_sources" json:"has_inventory_sources"`
InventoryID bson.ObjectId `bson:"inventory_id" json:"inventory"`
ParentGroupID *bson.ObjectId `bson:"parent_group_id,omitempty" json:"parent_group,omitempty"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
LastJob gin.H `bson:"-" json:"last_job"`
LastJobHostSummary gin.H `bson:"-" json:"last_job_host_summary"`
}
Organization is the model for organization collection
type Host ¶
type Host struct {
ID bson.ObjectId `bson:"_id" json:"id"`
// required
Name string `bson:"name" json:"name" binding:"required,iphost"`
InventoryID bson.ObjectId `bson:"inventory_id" json:"inventory" binding:"required"`
Description string `bson:"description,omitempty" json:"description"`
GroupID *bson.ObjectId `bson:"group_id,omitempty" json:"group"`
InstanceID string `bson:"instance_id,omitempty" json:"instance_id"`
Variables string `bson:"variables,omitempty" json:"variables"`
Enabled bool `bson:"enabled,omitempty" json:"enabled"`
LastJobID *bson.ObjectId `bson:"last_job_id,omitempty" json:"last_job" binding:"omitempty,naproperty"`
LastJobHostSummaryID *bson.ObjectId `bson:"last_job_host_summary_id,omitempty" json:"last_job_host_summary" binding:"omitempty,naproperty"`
HasActiveFailures bool `bson:"has_active_failures,omitempty" json:"has_active_failures" binding:"omitempty,naproperty"`
HasInventorySources bool `bson:"has_inventory_sources,omitempty" json:"has_inventory_sources" binding:"omitempty,naproperty"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created" binding:"omitempty,naproperty"`
Modified time.Time `bson:"modified" json:"modified" binding:"omitempty,naproperty"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
}
type Inventory ¶
type Inventory struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
// required feilds
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
OrganizationID bson.ObjectId `bson:"organization_id" json:"organization" binding:"required"`
Description string `bson:"description,omitempty" json:"description"`
Variables string `bson:"variables,omitempty" json:"variables"`
// only output
TotalHosts uint32 `bson:"total_hosts,omitempty" json:"total_hosts" binding:"omitempty,naproperty"`
HostsWithActiveFailures uint32 `bson:"hosts_with_active_failures,omitempty" json:"hosts_with_active_failures" binding:"omitempty,naproperty"`
TotalGroups uint32 `bson:"total_groups,omitempty" json:"total_groups" binding:"omitempty,naproperty"`
GroupsWithActiveFailures uint32 `bson:"groups_with_active_failures,omitempty" json:"groups_with_active_failures" binding:"omitempty,naproperty"`
TotalInventorySources uint32 `bson:"total_inventory_sources,omitempty" json:"total_inventory_sources" binding:"omitempty,naproperty"`
InventorySourcesWithFailures uint32 `bson:"inventory_sources_with_failures,omitempty" json:"inventory_sources_with_failures" binding:"omitempty,naproperty"`
HasInventorySources bool `bson:"has_inventory_sources" json:"has_inventory_sources" binding:"omitempty,naproperty"`
HasActiveFailures bool `bson:"has_active_failures" json:"has_active_failures" binding:"omitempty,naproperty"`
CreatedBy bson.ObjectId `bson:"created_by" json:"-"`
ModifiedBy bson.ObjectId `bson:"modified_by" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Roles []AccessControl `bson:"roles" json:"-"`
}
Inventory is the model for Inventory collection
type InventoryScript ¶
type InventoryScript struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Name string `bson:"name" json:"name" binding:"required"`
Description string `bson:"description" json:"description"`
Script string `bson:"script" json:"script" binding:"required"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
}
CustomInventoryScript is the model for organization collection
type InventorySource ¶
type InventorySource struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Source string `bson:"source" json:"source"`
SourcePath string `bson:"source_path" json:"source_path"`
SourceVars string `bson:"source_vars" json:"source_regions"`
SourceRegions string `bson:"source_regions" json:"has_active_failures"`
InstanceFilters string `bson:"instance_filters" json:"instance_filters"`
GroupBy string `bson:"group_by" json:"group_by"`
Overwrite bool `bson:"overwrite" json:"overwrite"`
OverwriteVars bool `bson:"overwrite_vars" json:"overwrite_vars"`
UpdateOnLaunch bool `bson:"update_on_launch" json:"update_on_launch"`
UpdateCacheTimeout uint32 `bson:"update_cache_timeout" json:"update_cache_timeout"`
CredentialID bson.ObjectId `bson:"credential_id" json:"credential"`
GroupID bson.ObjectId `bson:"group_id" json:"group"`
InventoryID bson.ObjectId `bson:"inventory_id" json:"inventory"`
SourceScriptID bson.ObjectId `bson:"source_script_id" json:"source_script"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
}
Inventory is the model for Inventory collection TODO: not implemented
type Job ¶
type Job struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Name string `bson:"name" json:"name" binding:"required"`
Description string `bson:"description,omitempty" json:"description"`
LaunchType string `bson:"launch_type" json:"launch_type"`
CancelFlag bool `bson:"cancel_flag" json:"cancel_flag"`
Status string `bson:"status" json:"status"`
Failed bool `bson:"failed" json:"failed"`
Started time.Time `bson:"started" json:"started"`
Finished time.Time `bson:"finished" json:"finished"`
Elapsed uint32 `bson:"elapsed" json:"elapsed"`
ResultStdout string `bson:"result_stdout" json:"result_stdout"`
ResultTraceback string `bson:"result_traceback" json:"result_traceback"`
JobExplanation string `bson:"job_explanation" json:"job_explanation"`
JobType string `bson:"job_type" json:"job_type"`
Playbook string `bson:"playbook" json:"playbook"`
Forks uint8 `bson:"forks" json:"forks"`
Limit string `bson:"limit,omitempty" json:"limit"`
Verbosity uint8 `bson:"verbosity" json:"verbosity"`
ExtraVars gin.H `bson:"extra_vars,omitempty" json:"extra_vars"`
JobTags string `bson:"job_tags,omitempty" json:"job_tags"`
SkipTags string `bson:"skip_tags,omitempty" json:"skip_tags"`
ForceHandlers bool `bson:"force_handlers" json:"force_handlers"`
StartAtTask string `bson:"start_at_task,omitempty" json:"start_at_task"`
AllowSimultaneous bool `bson:"allow_simultaneous,omitempty" json:"allow_simultaneous"`
MachineCredentialID bson.ObjectId `bson:"credential_id" json:"credential"`
InventoryID bson.ObjectId `bson:"inventory_id" json:"inventory"`
JobTemplateID bson.ObjectId `bson:"job_template_id" json:"job_template"`
ProjectID bson.ObjectId `bson:"project_id" json:"project"`
BecomeEnabled bool `bson:"become_enabled" json:"become_enabled"`
NetworkCredentialID *bson.ObjectId `bson:"network_credential_id,omitempty" json:"network_credential"`
CloudCredentialID *bson.ObjectId `bson:"cloud_credential_id,omitempty" json:"cloud_credential"`
PromptLimit bool `bson:"prompt_limit_on_launch" json:"ask_limit_on_launch"`
PromptInventory bool `bson:"prompt_inventory" json:"ask_inventory_on_launch"`
PromptCredential bool `bson:"prompt_credential" json:"ask_credential_on_launch"`
PromptJobType bool `bson:"prompt_job_type" json:"ask_job_type_on_launch"`
PromptTags bool `bson:"prompt_tags" json:"ask_tags_on_launch"`
PromptVariables bool `bson:"prompt_variables" json:"ask_variables_on_launch"`
// system generated items
JobCWD string `bson:"job_cwd" json:"job_cwd"`
JobARGS []string `bson:"job_args" json:"job_args"`
JobENV []string `bson:"job_env" json:"job_env"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
Roles []AccessControl `bson:"roles" json:"-"`
}
type JobTemplate ¶
type JobTemplate struct {
ID bson.ObjectId `bson:"_id" json:"id"`
// required
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
JobType string `bson:"job_type" json:"job_type" binding:"required,jobtype"`
InventoryID bson.ObjectId `bson:"inventory_id" json:"inventory" binding:"required"`
ProjectID bson.ObjectId `bson:"project_id" json:"project" binding:"required"`
Playbook string `bson:"playbook" json:"playbook" binding:"required"`
MachineCredentialID bson.ObjectId `bson:"credential_id" json:"credential" binding:"required"`
Verbosity uint8 `bson:"verbosity,omitempty" json:"verbosity" binding:"omitempty,max=5"`
Description string `bson:"description,omitempty" json:"description"`
Forks uint8 `bson:"forks,omitempty" json:"forks"`
Limit string `bson:"limit,omitempty" json:"limit" binding:"max=1024"`
ExtraVars gin.H `bson:"extra_vars,omitempty" json:"extra_vars"`
JobTags string `bson:"job_tags,omitempty" json:"job_tags" binding:"max=1024"`
SkipTags string `bson:"skip_tags,omitempty" json:"skip_tags" binding:"max=1024"`
StartAtTask string `bson:"start_at_task,omitempty" json:"start_at_task"`
ForceHandlers bool `bson:"force_handlers,omitempty" json:"force_handlers"`
PromptVariables bool `bson:"ask_variables_on_launch,omitempty" json:"ask_variables_on_launch"`
BecomeEnabled bool `bson:"become_enabled,omitempty" json:"become_enabled"`
CloudCredentialID *bson.ObjectId `bson:"cloud_credential_id,omitempty" json:"cloud_credential"`
NetworkCredentialID *bson.ObjectId `bson:"network_credential_id,omitempty" json:"network_credential"`
PromptLimit bool `bson:"prompt_limit_on_launch,omitempty" json:"ask_limit_on_launch"`
PromptInventory bool `bson:"prompt_inventory,omitempty" json:"ask_inventory_on_launch"`
PromptCredential bool `bson:"prompt_credential,omitempty" json:"ask_credential_on_launch"`
PromptJobType bool `bson:"prompt_job_type,omitempty" json:"ask_job_type_on_launch"`
PromptTags bool `bson:"prompt_tags,omitempty" json:"ask_tags_on_launch"`
PromptSkipTags bool `bson:"prompt_skip_tags,omitempty" json:"ask_skip_tags_on_launch"`
AllowSimultaneous bool `bson:"allow_simultaneous,omitempty" json:"allow_simultaneous"`
PolymorphicCtypeID *bson.ObjectId `bson:"polymorphic_ctype_id,omitempty" json:"polymorphic_ctype"`
// output only
LastJobRun *time.Time `bson:"last_job_run,omitempty" json:"last_job_run" binding:"omitempty,naproperty"`
NextJobRun *time.Time `bson:"next_job_run,omitempty" json:"next_job_run" binding:"omitempty,naproperty"`
Status string `bson:"status,omitempty" json:"status" binding:"omitempty,naproperty"`
CurrentJobID *bson.ObjectId `bson:"current_job_id,omitempty" json:"current_job" binding:"omitempty,naproperty"`
LastJobID *bson.ObjectId `bson:"last_job_id,omitempty" json:"last_job" binding:"omitempty,naproperty"`
NextScheduleID *bson.ObjectId `bson:"next_schedule_id,omitempty" json:"next_schedule" binding:"omitempty,naproperty"`
LastJobFailed bool `bson:"last_job_failed,omitempty" json:"last_job_failed" binding:"omitempty,naproperty"`
HasSchedules bool `bson:"has_schedules,omitempty" json:"has_schedules" binding:"omitempty,naproperty"`
Kind string `bson:"kind,omitempty" json:"-"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created" binding:"omitempty,naproperty"`
Modified time.Time `bson:"modified" json:"modified" binding:"omitempty,naproperty"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
Roles []AccessControl `bson:"roles" json:"-"`
}
type Launch ¶ added in v0.0.2
type Launch struct {
Limit string `bson:"limit,omitempty" json:"limit,omitempty" binding:"omitempty,max=1024"`
ExtraVars gin.H `bson:"extra_vars,omitempty" json:"extra_vars,omitempty"`
JobTags string `bson:"job_tags,omitempty" json:"job_tags,omitempty" binding:"omitempty,max=1024"`
SkipTags string `bson:"skip_tags,omitempty" json:"skip_tags,omitempty" binding:"omitempty,max=1024"`
JobType string `bson:"job_type,omitempty" json:"job_type,omitempty" binding:"omitempty,jobtype"`
InventoryID bson.ObjectId `bson:"inventory_id,omitempty" json:"inventory,omitempty"`
MachineCredentialID bson.ObjectId `bson:"credential_id,omitempty" json:"credential,omitempty"`
}
type Notification ¶
type Notification struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Status string `bson:"status" json:"status"`
Error string `bson:"error" json:"error"`
NotificationsSent uint64 `bson:"notifications_sent" json:"notifications_sent"`
NotificationsType string `bson:"notification_type" json:"notification_type"`
Recipients string `bson:"recipients" json:"recipients"`
Subject string `bson:"subject" json:"subject"`
Body string `bson:"body" json:"body"`
NotificationTemplateId string `bson:"notification_template_id" json:"notification_template_id"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
Access []AccessControl `bson:"access" json:"-"`
}
type NotificationTemplate ¶
type NotificationTemplate struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Description string `bson:"description" json:"description"`
Name string `bson:"name" json:"name"`
NotificationsType string `bson:"notification_type" json:"notification_type"`
NotificationConfiguration string `bson:"notification_configuration" json:"notification_configuration"`
Subject string `bson:"subject" json:"subject"`
CreatedByID bson.ObjectId `bson:"created_by_id" json:"-"`
ModifiedByID bson.ObjectId `bson:"modified_by_id" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
Access []AccessControl `bson:"access" json:"-"`
}
type Organization ¶
type Organization struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
Description string `bson:"description" json:"description"`
CreatedBy bson.ObjectId `bson:"created_by" json:"-"`
ModifiedBy bson.ObjectId `bson:"modified_by" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Roles []AccessControl `bson:"roles" json:"-"`
}
Organization is the model for organization collection
type PatchCredential ¶ added in v0.0.3
type PatchCredential struct {
Name *string `json:"name" binding:"omitempty,min=1,max=500"`
Kind *string `json:"kind" binding:"omitempty,credentialkind"`
Cloud *bool `json:"cloud"`
Description *string `json:"description"`
Host *string `json:"host"`
Username *string `json:"username"`
Password *string `json:"password"`
SecurityToken *string `json:"security_token"`
Project *string `json:"project"`
Domain *string `json:"domain"`
SshKeyData *string `json:"ssh_key_data"`
SshKeyUnlock *string `json:"ssh_key_unlock"`
BecomeMethod *string `json:"become_method" binding:"omitempty,become_method"`
BecomeUsername *string `json:"become_username"`
BecomePassword *string `json:"become_password"`
VaultPassword *string `json:"vault_password"`
Subscription *string `json:"subscription"`
Tenant *string `json:"tenant"`
Secret *string `json:"secret"`
Client *string `json:"client"`
Authorize *bool `json:"authorize"`
AuthorizePassword *string `json:"authorize_password"`
OrganizationID *bson.ObjectId `json:"organization"`
}
type PatchGroup ¶ added in v0.0.3
type PatchHost ¶ added in v0.0.3
type PatchHost struct {
Name *string `json:"name" binding:"omitempty,iphost"`
InventoryID *bson.ObjectId `json:"inventory"`
Description *string `json:"description"`
GroupID *bson.ObjectId `json:"group"`
InstanceID *string `json:"instance_id"`
Variables *string `json:"variables"`
Enabled *bool `json:"enabled"`
}
type PatchInventory ¶ added in v0.0.3
type PatchInventory struct {
// required fields
Name *string `json:"name" binding:"omitempty,min=1,max=500"`
OrganizationID *bson.ObjectId `json:"organization"`
Description *string `json:"description"`
Variables *string `json:"variables"`
}
PatchInventory is the model for patch requests
type PatchJobTemplate ¶ added in v0.0.3
type PatchJobTemplate struct {
Name *string `json:"name" binding:"omitempty,min=1,max=500"`
JobType *string `json:"job_type" binding:"omitempty,jobtype"`
InventoryID *bson.ObjectId `json:"inventory"`
ProjectID *bson.ObjectId `json:"project"`
Playbook *string `json:"playbook"`
MachineCredentialID *bson.ObjectId `json:"credential"`
Verbosity *uint8 `json:"verbosity" binding:"omitempty,min=0,max=5"`
Description *string `json:"description"`
Forks *uint8 `json:"forks"`
Limit *string `json:"limit" binding:"omitempty,max=1024"`
ExtraVars *gin.H `json:"extra_vars"`
JobTags *string `json:"job_tags" binding:"omitempty,max=1024"`
SkipTags *string `json:"skip_tags" binding:"omitempty,max=1024"`
StartAtTask *string `json:"start_at_task"`
ForceHandlers *bool `json:"force_handlers"`
PromptVariables *bool `json:"ask_variables_on_launch"`
BecomeEnabled *bool `json:"become_enabled"`
CloudCredentialID *bson.ObjectId `json:"cloud_credential"`
NetworkCredentialID *bson.ObjectId `json:"network_credential"`
PromptLimit *bool `json:"ask_limit_on_launch"`
PromptInventory *bool `json:"ask_inventory_on_launch"`
PromptCredential *bool `json:"ask_credential_on_launch"`
PromptJobType *bool `json:"ask_job_type_on_launch"`
PromptTags *bool `json:"ask_tags_on_launch"`
PromptSkipTags *bool `json:"ask_skip_tags_on_launch"`
AllowSimultaneous *bool `json:"allow_simultaneous"`
PolymorphicCtypeID *bson.ObjectId `json:"polymorphic_ctype"`
}
type PatchOrganization ¶ added in v0.0.3
type PatchProject ¶ added in v0.0.3
type PatchProject struct {
Name *string `json:"name" binding:"omitempty,min=1,max=500"`
ScmType *string `json:"scm_type" binding:"omitempty,scmtype"`
OrganizationID *bson.ObjectId `json:"organization"`
Description *string `json:"description"`
ScmUrl *string `json:"scm_url" binding:"omitempty,url"`
ScmBranch *string `json:"scm_branch"`
ScmClean *bool `json:"scm_clean"`
ScmDeleteOnUpdate *bool `json:"scm_delete_on_update"`
ScmCredentialID *bson.ObjectId `json:"credential"`
ScmDeleteOnNextUpdate *bool `json:"scm_delete_on_next_update"`
ScmUpdateOnLaunch *bool `json:"scm_update_on_launch"`
ScmUpdateCacheTimeout *int `json:"scm_update_cache_timeout"`
}
All optional
type Project ¶
type Project struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
// required feilds
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
ScmType string `bson:"scm_type" json:"scm_type" binding:"required,scmtype"`
OrganizationID bson.ObjectId `bson:"organization_id" json:"organization" binding:"required"`
Description string `bson:"description,omitempty" json:"description"`
LocalPath string `bson:"local_path,omitempty" json:"local_path" binding:"omitempty,naproperty"`
ScmUrl string `bson:"scm_url,omitempty" json:"scm_url" binding:"url"`
ScmBranch string `bson:"scm_branch,omitempty" json:"scm_branch"`
ScmClean bool `bson:"scm_clean,omitempty" json:"scm_clean"`
ScmDeleteOnUpdate bool `bson:"scm_delete_on_update,omitempty" json:"scm_delete_on_update"`
ScmCredentialID *bson.ObjectId `bson:"credentail_id,omitempty" json:"credential"`
ScmDeleteOnNextUpdate bool `bson:"scm_delete_on_next_update,omitempty" json:"scm_delete_on_next_update"`
ScmUpdateOnLaunch bool `bson:"scm_update_on_launch,omitempty" json:"scm_update_on_launch"`
ScmUpdateCacheTimeout int `bson:"scm_update_cache_timeout,omitempty" json:"scm_update_cache_timeout"`
// only output
LastJob *bson.ObjectId `bson:"last_job,omitempty" json:"last_job" binding:"omitempty,naproperty"`
LastJobRun *time.Time `bson:"last_job_run,omitempty" json:"last_job_run" binding:"omitempty,naproperty"`
LastJobFailed bool `bson:"last_job_failed,omitempty" json:"last_job_failed" binding:"omitempty,naproperty"`
HasSchedules bool `bson:"has_schedules,omitempty" json:"has_schedules" binding:"omitempty,naproperty"`
NextJobRun *time.Time `bson:"next_job_run,omitempty" json:"next_job_run" binding:"omitempty,naproperty"`
Status string `bson:"status,omitempty" json:"status" binding:"omitempty,naproperty"`
LastUpdateFailed bool `bson:"last_update_failed,omitempty" json:"last_update_failed" binding:"omitempty,naproperty"`
LastUpdated *time.Time `bson:"last_updated,omitempty" json:"last_updated" binding:"omitempty,naproperty"`
CreatedBy bson.ObjectId `bson:"created_by" json:"-"`
ModifiedBy bson.ObjectId `bson:"modified_by" json:"-"`
Created time.Time `bson:"created" json:"created" binding:"omitempty,naproperty"`
Modified time.Time `bson:"modified" json:"modified" binding:"omitempty,naproperty"`
Roles []AccessControl `bson:"roles" json:"-"`
}
Project is the model for project collection
type Response ¶
type Response struct {
Count int `json:"count"`
Next interface{} `json:"next"`
Previous interface{} `json:"previous"`
Results interface{} `json:"results"`
}
type SystemJob ¶ added in v0.0.3
type SystemJob struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Name string `bson:"name" json:"name" binding:"required"`
Description string `bson:"description,omitempty" json:"description"`
LaunchType string `bson:"launch_type" json:"launch_type"`
CancelFlag bool `bson:"cancel_flag" json:"cancel_flag"`
Status string `bson:"status" json:"status"`
Failed bool `bson:"failed" json:"failed"`
Started time.Time `bson:"started" json:"started"`
Finished time.Time `bson:"finished" json:"finished"`
Elapsed uint32 `bson:"elapsed" json:"elapsed"`
ResultStdout string `bson:"result_stdout" json:"result_stdout"`
ResultTraceback string `bson:"result_traceback" json:"result_traceback"`
JobExplanation string `bson:"job_explanation" json:"job_explanation"`
JobType string `bson:"job_type" json:"job_type"`
Playbook string `bson:"playbook" json:"playbook"`
Forks uint8 `bson:"forks" json:"forks"`
Limit string `bson:"limit,omitempty" json:"limit"`
Verbosity uint8 `bson:"verbosity" json:"verbosity"`
ExtraVars gin.H `bson:"extra_vars,omitempty" json:"extra_vars"`
JobTags string `bson:"job_tags,omitempty" json:"job_tags"`
SkipTags string `bson:"skip_tags,omitempty" json:"skip_tags"`
ForceHandlers bool `bson:"force_handlers" json:"force_handlers"`
StartAtTask string `bson:"start_at_task,omitempty" json:"start_at_task"`
CredentialID bson.ObjectId `bson:"credential_id,omitempty" json:"credential"`
ProjectID bson.ObjectId `bson:"project_id" json:"project"`
BecomeEnabled bool `bson:"become_enabled" json:"become_enabled"`
// system generated items
JobCWD string `bson:"job_cwd" json:"job_cwd"`
JobARGS []string `bson:"job_args" json:"job_args"`
JobENV []string `bson:"job_env" json:"job_env"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Summary gin.H `bson:"-" json:"summary_fields"`
}
type Team ¶
type Team struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
SummaryFields gin.H `bson:"-" json:"summary_fields"`
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
OrganizationID bson.ObjectId `bson:"organization_id" json:"organization" binding:"required"`
Description string `bson:"description,omitempty" json:"description"`
CreatedBy bson.ObjectId `bson:"created_by" json:"-"`
ModifiedBy bson.ObjectId `bson:"modified_by" json:"-"`
Created time.Time `bson:"created" json:"created"`
Modified time.Time `bson:"modified" json:"modified"`
Roles []AccessControl `bson:"roles" json:"-"`
}
team is the model for organization collection
type User ¶
type User struct {
ID bson.ObjectId `bson:"_id" json:"id"`
Type string `bson:"-" json:"type"`
Url string `bson:"-" json:"url"`
Related gin.H `bson:"-" json:"related"`
Username string `bson:"username" json:"username" binding:"required,min=1,max=500"`
FirstName string `bson:"first_name" json:"first_name"`
LastName string `bson:"last_name" json:"last_name"`
Email string `bson:"email" json:"email" binding:"required"`
IsSuperUser bool `bson:"is_superuser" json:"is_superuser"`
IsSystemAuditor bool `bson:"is_system_auditor" json:"is_system_auditor"`
Password string `bson:"password" json:"-"`
OrganizationID *bson.ObjectId `bson:"organization_id" json:"organization"`
Deleted bool `bson:"deleted" json:"-"`
Created time.Time `bson:"created" json:"created"`
}
User is model for user collection
Click to show internal directories.
Click to hide internal directories.