Documentation ¶
Index ¶
- Variables
- func Connect() error
- func MigrateAll() error
- func SetupDBLink()
- type APIToken
- type AccessKey
- type DBVersion
- func (version *DBVersion) CheckExists() (bool, error)
- func (version *DBVersion) GetErrPath() string
- func (version *DBVersion) GetPath() string
- func (version *DBVersion) GetSQL(path string) []string
- func (version *DBVersion) HumanoidVersion() string
- func (version *DBVersion) Run() error
- func (version *DBVersion) TryRollback()
- func (version *DBVersion) VersionString() string
- type Environment
- type Event
- type Inventory
- type Project
- type Repository
- type Session
- type Task
- type TaskOutput
- type Template
- type TemplateSchedule
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Mysql *gorp.DbMap
View Source
var Versions []*DBVersion
Functions ¶
func MigrateAll ¶
func MigrateAll() error
func SetupDBLink ¶
func SetupDBLink()
Types ¶
type AccessKey ¶
type AccessKey struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name" binding:"required"` // 'aws/do/gcloud/ssh', Type string `db:"type" json:"type" binding:"required"` ProjectID *int `db:"project_id" json:"project_id"` Key *string `db:"key" json:"key"` Secret *string `db:"secret" json:"secret"` Removed bool `db:"removed" json:"removed"` }
type DBVersion ¶
type DBVersion struct { Major int Minor int Patch int Build string UpgradedDate *time.Time Notes *string }
func (*DBVersion) CheckExists ¶
func (*DBVersion) GetErrPath ¶
func (*DBVersion) HumanoidVersion ¶
func (*DBVersion) TryRollback ¶
func (version *DBVersion) TryRollback()
func (*DBVersion) VersionString ¶
type Environment ¶
type Environment struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name" binding:"required"` ProjectID int `db:"project_id" json:"project_id"` Password *string `db:"password" json:"password"` JSON string `db:"json" json:"json" binding:"required"` Removed bool `db:"removed" json:"removed"` }
type Event ¶
type Event struct { ProjectID *int `db:"project_id" json:"project_id"` ObjectID *int `db:"object_id" json:"object_id"` ObjectType *string `db:"object_type" json:"object_type"` Description *string `db:"description" json:"description"` Created time.Time `db:"created" json:"created"` ObjectName string `db:"-" json:"object_name"` ProjectName *string `db:"project_name" json:"project_name"` }
type Inventory ¶
type Inventory struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name" binding:"required"` ProjectID int `db:"project_id" json:"project_id"` Inventory string `db:"inventory" json:"inventory"` // accesses dynamic inventory KeyID *int `db:"key_id" json:"key_id"` Key AccessKey `db:"-" json:"-"` // accesses hosts in inventory SshKeyID *int `db:"ssh_key_id" json:"ssh_key_id"` SshKey AccessKey `db:"-" json:"-"` // static/aws/do/gcloud Type string `db:"type" json:"type"` Removed bool `db:"removed" json:"removed"` }
type Project ¶
type Project struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name" binding:"required"` Created time.Time `db:"created" json:"created"` Alert bool `db:"alert" json:"alert"` AlertChat string `db:"alert_chat" json:"alert_chat"` }
func (*Project) CreateProject ¶
type Repository ¶
type Repository struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name" binding:"required"` ProjectID int `db:"project_id" json:"project_id"` GitUrl string `db:"git_url" json:"git_url" binding:"required"` SshKeyID int `db:"ssh_key_id" json:"ssh_key_id" binding:"required"` Removed bool `db:"removed" json:"removed"` SshKey AccessKey `db:"-" json:"-"` }
type Session ¶
type Session struct { ID int `db:"id" json:"id"` UserID int `db:"user_id" json:"user_id"` Created time.Time `db:"created" json:"created"` LastActive time.Time `db:"last_active" json:"last_active"` IP string `db:"ip" json:"ip"` UserAgent string `db:"user_agent" json:"user_agent"` Expired bool `db:"expired" json:"expired"` }
type Task ¶
type Task struct { ID int `db:"id" json:"id"` TemplateID int `db:"template_id" json:"template_id" binding:"required"` Status string `db:"status" json:"status"` Debug bool `db:"debug" json:"debug"` DryRun bool `db:"dry_run" json:"dry_run"` // override variables Playbook string `db:"playbook" json:"playbook"` Environment string `db:"environment" json:"environment"` UserID *int `db:"user_id" json:"user_id"` Created time.Time `db:"created" json:"created"` Start *time.Time `db:"start" json:"start"` End *time.Time `db:"end" json:"end"` }
type TaskOutput ¶
type Template ¶
type Template struct { ID int `db:"id" json:"id"` SshKeyID int `db:"ssh_key_id" json:"ssh_key_id"` ProjectID int `db:"project_id" json:"project_id"` InventoryID int `db:"inventory_id" json:"inventory_id"` RepositoryID int `db:"repository_id" json:"repository_id"` EnvironmentID *int `db:"environment_id" json:"environment_id"` // Alias as described in https://github.com/ansible-semaphore/semaphore/issues/188 Alias string `db:"alias" json:"alias"` // playbook name in the form of "some_play.yml" Playbook string `db:"playbook" json:"playbook"` // to fit into []string Arguments *string `db:"arguments" json:"arguments"` // if true, semaphore will not prepend any arguments to `arguments` like inventory, etc OverrideArguments bool `db:"override_args" json:"override_args"` }
type TemplateSchedule ¶
type User ¶
type User struct { ID int `db:"id" json:"id"` Created time.Time `db:"created" json:"created"` Username string `db:"username" json:"username" binding:"required"` Name string `db:"name" json:"name" binding:"required"` Email string `db:"email" json:"email" binding:"required"` Password string `db:"password" json:"-"` External bool `db:"external" json:"external"` Alert bool `db:"alert" json:"alert"` }
Click to show internal directories.
Click to hide internal directories.