Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Base ¶
type Base struct { ID uint `gorm:"primary_key" json:"id"` UUID uuid.UUID `gorm:"type:uuid" json:"uuid"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Base struct to be used for all the dnow models
type EmailToken ¶
type GithubAccount ¶
type Repository ¶
type Repository struct { Base RepositoryName string `gorm:"unique" json:"repository_name"` BuildPack string `json:"buildpack" gorm:"default:'nodeJS'"` Path string `json:"path"` PathDocker string `json:"path_docker"` Description string `json:"description"` State string `json:"state" gorm:"default:'stopped'"` UserID uint `json:"user_id"` UserName string `json:"user_name"` ContainerID string `json:"container_id" gorm:"default:'0'"` DNSID string `json:"dns_id"` Variables []Variable `json:"variables"` GithubLinked bool `json:"github_linked"` GithubURL string `json:"github_url"` }
func (*Repository) AfterCreate ¶
func (repo *Repository) AfterCreate(scope *gorm.Scope) (err error)
func (*Repository) AfterDelete ¶
func (repository *Repository) AfterDelete(scope *gorm.Scope) (err error)
AfterCreate will set a UUID rather than numeric ID.
//TODO 1) Clean associated dirs 2) Add hook files 3) Lauch default container 4) Change owner ship to www-data
func (*Repository) BeforeCreate ¶
func (repo *Repository) BeforeCreate(scope *gorm.Scope) (err error)
BeforeCreate will set a UUID rather than numeric ID.
func (*Repository) BeforeDelete ¶
func (repository *Repository) BeforeDelete(scope *gorm.Scope) (err error)
type User ¶
type User struct { Base UserName string `gorm:"unique" json:"user_name"` Email string `gorm:"unique" json:"email"` Password string `json:"password"` MD5 string `json:"password_md5"` Verified bool `json:"verified" gorm:"default:false"` Repositories []Repository GithubAccount GithubAccount }
func (*User) AfterCreate ¶
AfterCreate will create user dir with www-data user.
//TODO 1) Create bare repository 2) Add hook files 3) Lauch default container 4) Change owner ship to www-data
Click to show internal directories.
Click to hide internal directories.