Documentation
¶
Index ¶
- func DeleteApplication(application *Application) error
- func DeleteApplicationInventory(applicationInventory *ApplicationInventory) error
- func DeleteInventory(inventory *Inventory) error
- func DeleteNotificationChannel(notificationChannel *NotificationChannel) error
- func DeleteProject(project *Project) error
- func DeleteRepository(repository *Repository) error
- func DeleteSshKey(key *SshKey) error
- func DeleteSurvey(survey *Survey) error
- func DeleteSurveyInput(surveyInput *SurveyInput) error
- func DeleteTeam(team *Team) error
- func DeleteTemplate(template *Template) error
- func DeleteUser(user *User) error
- func GetApplicationNotifications(id uint) *[]ApplicationNotification
- func GetDB() *gorm.DB
- func GetInventoriesByApplicationId(id uint) *[]Inventory
- func GetProjectNotifications(id uint) *[]ProjectNotification
- func GetSettingBoolValue(groupName string, key string, defaultValue bool) bool
- func GetSettingValue(groupName string, key string, defaultValue string) string
- func GetSurveyInputsByTemplateID(id uint) (*[]SurveyInput, error)
- func GetTemplateNotifications(id uint) *[]TemplateNotification
- func InitDatabase()
- func SaveApplication(application *Application) error
- func SaveApplicationInventory(applicationInventory *ApplicationInventory) error
- func SaveApplicationNotification(notification *ApplicationNotification) error
- func SaveInventory(inventory *Inventory) error
- func SaveJob(job *Job) error
- func SaveJobLog(jobLog *JobLog)
- func SaveNotificationChannel(notificationChannel *NotificationChannel) error
- func SaveProject(project *Project) error
- func SaveProjectNotification(notification *ProjectNotification) error
- func SavePushSubscription(endpoint string, sub string, userID uint) error
- func SaveRepository(repository *Repository) error
- func SaveSettings(settings *[]Setting) error
- func SaveSshKey(key *SshKey) error
- func SaveSurvey(survey *Survey) error
- func SaveSurveyInput(surveyInput *SurveyInput) error
- func SaveTeam(team *Team) error
- func SaveTemplate(template *Template) error
- func SaveTemplateNotification(notification *TemplateNotification) error
- func SaveUser(user *User) error
- func UpdateJobStatus(job *Job, updates map[string]interface{}) error
- type Application
- type ApplicationInventory
- type ApplicationNotification
- type Inventory
- type Job
- type JobLog
- type JobType
- type Key
- type NotificationChannel
- type Password
- type Permissions
- type Project
- type ProjectFile
- type ProjectNotification
- type PushSubscription
- type RelatedNotification
- type Repository
- type Setting
- type SettingGroup
- type SshKey
- type Status
- type Survey
- type SurveyInput
- type Team
- type Template
- type TemplateNotification
- type User
- type UserType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteApplication ¶
func DeleteApplication(application *Application) error
func DeleteApplicationInventory ¶
func DeleteApplicationInventory(applicationInventory *ApplicationInventory) error
func DeleteInventory ¶
func DeleteNotificationChannel ¶
func DeleteNotificationChannel(notificationChannel *NotificationChannel) error
func DeleteProject ¶
func DeleteRepository ¶
func DeleteRepository(repository *Repository) error
func DeleteSshKey ¶
func DeleteSurvey ¶
func DeleteSurveyInput ¶
func DeleteSurveyInput(surveyInput *SurveyInput) error
func DeleteTeam ¶
func DeleteTemplate ¶
func DeleteUser ¶
func GetApplicationNotifications ¶
func GetApplicationNotifications(id uint) *[]ApplicationNotification
func GetProjectNotifications ¶
func GetProjectNotifications(id uint) *[]ProjectNotification
func GetSettingBoolValue ¶
func GetSettingValue ¶
func GetSurveyInputsByTemplateID ¶
func GetSurveyInputsByTemplateID(id uint) (*[]SurveyInput, error)
func GetTemplateNotifications ¶
func GetTemplateNotifications(id uint) *[]TemplateNotification
func InitDatabase ¶
func InitDatabase()
func SaveApplication ¶
func SaveApplication(application *Application) error
func SaveApplicationInventory ¶
func SaveApplicationInventory(applicationInventory *ApplicationInventory) error
func SaveApplicationNotification ¶
func SaveApplicationNotification(notification *ApplicationNotification) error
func SaveInventory ¶
func SaveJobLog ¶
func SaveJobLog(jobLog *JobLog)
func SaveNotificationChannel ¶
func SaveNotificationChannel(notificationChannel *NotificationChannel) error
func SaveProject ¶
func SaveProjectNotification ¶
func SaveProjectNotification(notification *ProjectNotification) error
func SavePushSubscription ¶
func SaveRepository ¶
func SaveRepository(repository *Repository) error
func SaveSettings ¶
func SaveSshKey ¶
func SaveSurvey ¶
func SaveSurveyInput ¶
func SaveSurveyInput(surveyInput *SurveyInput) error
func SaveTemplate ¶
func SaveTemplateNotification ¶
func SaveTemplateNotification(notification *TemplateNotification) error
func UpdateJobStatus ¶
Types ¶
type Application ¶
type Application struct { gorm.Model Permissions Permissions Name string `gorm:"type:text"` AnsibleName string `gorm:"type:text"` Project Project ProjectID uint Repository Repository RepositoryID uint RepositoryArtifact string Inventories []*ApplicationInventory AnsiblePlaybook string `gorm:"type:text"` RepositoryGroup string `gorm:"type:text"` }
func GetApplication ¶
func GetApplication(id uint) *Application
func GetApplications ¶
func GetApplications() ([]*Application, error)
type ApplicationInventory ¶
type ApplicationInventory struct { gorm.Model IsActive bool Application Application ApplicationID uint Inventory Inventory InventoryID uint Name string `gorm:"type:text"` ApplicationUrls string `gorm:"type:text"` ExtraVariables string `gorm:"type:text"` Playbook string `gorm:"type:text"` Key SshKey KeyID uint VaultKey SshKey VaultKeyID uint }
func GetApplicationInventories ¶
func GetApplicationInventories() ([]*ApplicationInventory, error)
func GetApplicationInventory ¶
func GetApplicationInventory(id uint) *ApplicationInventory
type ApplicationNotification ¶
type ApplicationNotification struct { ApplicationID uint `gorm:"primary_key"` RelatedNotification }
type Inventory ¶
type Inventory struct { gorm.Model Permissions Permissions Name string `gorm:"type:text"` Project Project ProjectID uint SourceFile string ApplicationInventories []*ApplicationInventory }
func GetInventories ¶
func GetInventories() []*Inventory
func GetInventory ¶
type Job ¶
type Job struct { gorm.Model Type JobType StartedAt time.Time FinishedAt time.Time Application Application ApplicationID uint Playbook string `gorm:"type:text"` Project Project ProjectID uint Inventory Inventory InventoryID uint Template Template TemplateID uint Key SshKey KeyID uint VaultKey SshKey VaultKeyID uint User User UserID uint Status Status Version string `gorm:"type:text"` ExtraVariables string `gorm:"type:text"` }
func GetLatestDeployments ¶
func GetLatestDeployments() []*Job
func GetLatestSCMPulls ¶
func GetLatestSCMPulls() []*Job
type JobLog ¶
type JobLog struct { gorm.Model `json:"-"` Job Job `json:"-"` JobID uint `json:"-";gorm:"index:job"` Order uint `;json:"-"` Message string `gorm:"type:text"` }
func GetJobLogs ¶
type NotificationChannel ¶
type NotificationChannel struct { gorm.Model Name string `gorm:"type:text"` Description string `gorm:"type:text"` Type string `gorm:"type:text"` Recipients string `gorm:"type:text"` WebhookURL string `gorm:"type:text"` UserID uint }
func GetNotificationChannel ¶
func GetNotificationChannel(id uint) *NotificationChannel
func GetNotificationChannels ¶
func GetNotificationChannels() []*NotificationChannel
type Password ¶
type Password string
func (Password) MarshalJSON ¶
Marshaler ignores the field value completely.
type Permissions ¶
func (*Permissions) UnmarshalJSON ¶
func (*Permissions) UnmarshalJSON(data []byte) error
Unmarshaler ignores the field value completely.
type Project ¶
type Project struct { gorm.Model Name string `gorm:"type:text"` RepoUrl string `gorm:"type:text"` RepoBranch string `gorm:"type:text"` RepoUser string `gorm:"type:text"` SshKeyID uint SshKey SshKey }
func GetProject ¶
func GetProjects ¶
func GetProjects() []*Project
type ProjectFile ¶
type ProjectFile string
type ProjectNotification ¶
type ProjectNotification struct { ProjectID uint `gorm:"primary_key"` RelatedNotification }
type PushSubscription ¶
type PushSubscription struct { gorm.Model Endpoint string `gorm:"type:text"` Sub string `gorm:"type:text"` UserID uint }
func FindByEndpoint ¶
func FindByEndpoint(endpoint string) *PushSubscription
func FindByUserID ¶
func FindByUserID(id uint) []*PushSubscription
type RelatedNotification ¶
type RelatedNotification struct { NotificationChannel NotificationChannel NotificationChannelID uint `gorm:"primary_key"` StartEnabled bool SuccessEnabled bool FailEnabled bool }
func GetRelatedNotifications ¶
func GetRelatedNotifications(job Job) (error, []RelatedNotification)
type Repository ¶
type Repository struct { gorm.Model Name string `gorm:"type:text"` Type string `gorm:"type:text"` Url string `gorm:"type:text"` Username string `gorm:"type:text"` Password string `gorm:"type:text"` NexusName string `gorm:"type:text"` }
func GetRepositories ¶
func GetRepositories() []*Repository
func GetRepository ¶
func GetRepository(id uint) *Repository
type SettingGroup ¶
func GetSettingGroups ¶
func GetSettingGroups() []*SettingGroup
type SshKey ¶
type SshKey struct { gorm.Model Permissions Permissions Title string `gorm:"type:text"` Key Key `gorm:"type:text"` }
func GetSshKeys ¶
func GetSshKeys() []*SshKey
type Survey ¶
type Survey struct { gorm.Model Enabled bool Inputs []SurveyInput TemplateID uint }
func GetSurveyByTemplateID ¶
type SurveyInput ¶
type SurveyInput struct { gorm.Model Label string `gorm:"type:text"` Hint string `gorm:"type:text"` VariableName string `gorm:"type:text"` Type string `gorm:"type:text"` Options string `gorm:"type:text"` SurveyID uint }
func GetSurveyInput ¶
func GetSurveyInput(id uint) *SurveyInput
type Template ¶
type Template struct { gorm.Model Permissions Permissions Name string `gorm:"type:text"` Project Project ProjectID uint Inventory Inventory InventoryID uint SshKey SshKey SshKeyID uint VaultKey SshKey VaultKeyID uint Playbook string `gorm:"type:text"` PromptSshKey bool PromptVaultKey bool PromptPlaybook bool PromptInventory bool PromptProject bool PromptExtraVariables bool ExtraVariables string `gorm:"type:text"` Survey Survey }
func GetTemplate ¶
func GetTemplates ¶
func GetTemplates() []*Template
type TemplateNotification ¶
type TemplateNotification struct { TemplateID uint `gorm:"primary_key"` RelatedNotification }
Source Files
¶
- application.go
- applicationInventory.go
- applicationNotification.go
- base.go
- inventory.go
- job.go
- jobLog.go
- notificationChannel.go
- permissions.go
- project.go
- projectFile.go
- projectNotification.go
- pushSubscriptions.go
- relatedNotification.go
- repository.go
- setting.go
- settingGroup.go
- sshKey.go
- status.go
- survey.go
- surveyInput.go
- team.go
- template.go
- templateNotification.go
- user.go
Click to show internal directories.
Click to hide internal directories.