Documentation
¶
Index ¶
- Constants
- type AccessControl
- type AccessType
- type AccessUser
- type Activity
- type Credential
- type Error
- type Notification
- type NotificationTemplate
- type Organization
- type PatchCredential
- type PatchOrganization
- type PatchProject
- type PatchTeam
- type Project
- type Response
- type SCMUpdate
- type Team
- type User
Constants ¶
View Source
const ( CREDENTIAL_KIND_SSH = "ssh" CREDENTIAL_KIND_NET = "net" CREDENTIAL_KIND_WIN = "windows" 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" )
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 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:"-"`
}
Credential is the model for Credential collection
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"`
Summary gin.H `bson:"-" json:"summary_fields"`
Name string `bson:"name" json:"name" binding:"required,min=1,max=500"`
Description string `bson:"description" json:"description"`
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"`
Roles []AccessControl `bson:"roles" json:"-"`
}
Organization is the model for organization collection
type PatchCredential ¶
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 PatchOrganization ¶
type PatchProject ¶
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"`
}
PatchProject is the model for PATCH requests
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 fields
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"`
Kind string `bson:"kind,omitempty" json:"kind" binding:"project_kind"`
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"`
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"`
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 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"`
Summary 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"`
CreatedByID bson.ObjectId `bson:"created_by" json:"-"`
ModifiedByID 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.