models

package
v0.0.0-...-89c19b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	gorm.Model
	CreatedBy   string  `json:"created_by"`
	UpdatedBy   string  `json:"updated_by"`
	Deleted     uint    `json:"deteled"`
	State       uint    `json:"state" gorm:"default:1"`
	Name        string  `json:"name"`
	CnName      string  `json:"cn_name"`
	Description string  `json:"description"`
	Harbor      string  `json:"harbor"`
	UserID      uint    `json:"user_id"`
	ProjectID   uint    `json:"project_id"`
	User        User    `gorm:"save_associations:false"`
	Project     Project `gorm:"save_associations:false"`
}

Application 应用结构体

func (*Application) BeforeCreate

func (application *Application) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*Application) BeforeUpdate

func (application *Application) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdatedAt赋值

type Deploy

type Deploy struct {
	gorm.Model
	CreatedBy     string      `json:"created_by"`
	UpdatedBy     string      `json:"updated_by"`
	Deleted       uint        `json:"deteled"`
	State         uint        `json:"state" gorm:"default:1"`
	Name          string      `json:"name"`
	Version       string      `json:"version"`
	Reason        string      `json:"reason"`
	Harbor        string      `json:"harbor"`
	Yaml          string      `json:"yaml" gorm:"type:text"`
	Step          uint        `json:"step"`
	Result        string      `json:"result"`
	Log           string      `json:"log" gorm:"type:text"`
	EnvironmentID uint        `json:"environment_id"`
	K8sID         uint        `json:"k8s_id"`
	UserID        uint        `json:"user_id"`
	ProjectID     uint        `json:"project_id"`
	ApplicationID uint        `json:"application_id"`
	User          User        `gorm:"save_associations:false"`
	Project       Project     `gorm:"save_associations:false"`
	Application   Application `gorm:"save_associations:false"`
	K8s           K8s         `gorm:"save_associations:false"`
	Environment   Environment `gorm:"save_associations:false"`
}

Deploy 发布单结构体

func (*Deploy) BeforeCreate

func (deploy *Deploy) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*Deploy) BeforeUpdate

func (deploy *Deploy) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdatedAt赋值

type DockerTag

type DockerTag struct {
	Name     string `json:"name"`
	PushTime string `json:"push_time"`
}

DockerTag 结构体

type Environment

type Environment struct {
	gorm.Model
	CreatedBy   string `json:"created_by"`
	UpdatedBy   string `json:"updated_by"`
	Deleted     uint   `json:"deteled"`
	State       uint   `json:"state"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Environment 环境列表

func (*Environment) BeforeCreate

func (environment *Environment) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*Environment) BeforeUpdate

func (environment *Environment) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdateAt赋值

type K8s

type K8s struct {
	gorm.Model
	CreatedBy     string      `json:"created_by"`
	UpdatedBy     string      `json:"updated_by"`
	Deleted       uint        `json:"deteled"`
	State         uint        `json:"state"`
	Name          string      `json:"name"`
	EnvironmentID uint        `json:"environment_id"`
	Conf          string      `json:"conf" gorm:"type:text"`
	Terminal      string      `json:"terminal"`
	UserID        uint        `json:"user_id"`
	Environment   Environment `gorm:"save_associations:false"`
	User          User        `gorm:"save_associations:false"`
}

K8s K8s集群结构体

func (*K8s) BeforeCreate

func (k8s *K8s) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*K8s) BeforeUpdate

func (k8s *K8s) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdateAt赋值

type Pod

type Pod struct {
	gorm.Model
	CreatedBy     string      `json:"created_by"`
	UpdatedBy     string      `json:"updated_by"`
	Deleted       uint        `json:"deteled"`
	State         uint        `json:"state"`
	PodName       string      `json:"podname"`
	NameSpace     string      `json:"namespace"`
	Container     string      `json:"container"`
	Image         string      `json:"image"`
	Version       string      `json:"version"`
	EnvironmentID uint        `json:"environment_id"`
	K8sID         uint        `json:"k8s_id"`
	UserID        uint        `json:"user_id"`
	ApplicationID uint        `json:"application_id"`
	User          User        `gorm:"save_associations:false"`
	Application   Application `gorm:"save_associations:false"`
	Environment   Environment `gorm:"save_associations:false"`
	K8s           K8s         `gorm:"save_associations:false"`
}

Pod Pod在线列表

func (*Pod) BeforeCreate

func (pod *Pod) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*Pod) BeforeUpdate

func (pod *Pod) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdateAt赋值

type Project

type Project struct {
	gorm.Model
	CreatedBy   string `json:"created_by"`
	UpdatedBy   string `json:"updated_by"`
	Deleted     uint   `json:"deteled"`
	State       uint   `json:"state"`
	Name        string `json:"name"`
	CnName      string `json:"cn_name"`
	Description string `json:"description"`
	UserID      uint   `json:"user_id"`
}

Project 项目结构体

func (*Project) BeforeCreate

func (project *Project) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedOn赋值

func (*Project) BeforeUpdate

func (project *Project) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdateAt赋值

type Release

type Release struct {
	gorm.Model
	CreatedBy   string  `json:"created_by"`
	UpdatedBy   string  `json:"updated_by"`
	Deleted     uint    `json:"deteled"`
	State       uint    `json:"state" gorm:"default:1"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Branch      string  `json:"branch"`
	Yaml        string  `json:"yaml" gorm:"type:text"`
	UserID      uint    `json:"user_id"`
	ProjectID   uint    `json:"project_id"`
	User        User    `gorm:"save_associations:false"`
	Project     Project `gorm:"save_associations:false"`
}

Release 版本单结构体

func (*Release) BeforeCreate

func (release *Release) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*Release) BeforeUpdate

func (release *Release) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate ModifiedOn赋值

type User

type User struct {
	gorm.Model
	CreatedBy string `json:"created_by"`
	UpdatedBy string `json:"updated_by"`
	Deleted   uint   `json:"deteled"`
	State     uint   `json:"state" gorm:"default:1"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	UserType  uint   `json:"user_type"`

	Application *[]Application
}

User 用户授权信息

func (*User) BeforeCreate

func (user *User) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*User) BeforeSave

func (user *User) BeforeSave(scope *gorm.Scope) (err error)

func (*User) BeforeUpdate

func (user *User) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdateAt赋值

type UserRole

type UserRole struct {
	UserID   uint
	UserName string
	UserType uint
}

UserRole 用户身份结构体

type Yaml

type Yaml struct {
	gorm.Model
	CreatedBy     string      `json:"created_by"`
	UpdatedBy     string      `json:"updated_by"`
	Deleted       uint        `json:"deteled"`
	State         uint        `json:"state"`
	Name          string      `json:"name"`
	Description   string      `json:"description"`
	Yaml          string      `json:"yaml" gorm:"type:text"`
	K8sID         uint        `json:"k8s_id"`
	ApplicationID uint        `json:"application_id"`
	UserID        uint        `json:"user_id"`
	K8s           K8s         `gorm:"save_associations:false"`
	Application   Application `gorm:"save_associations:false"`
	User          User        `gorm:"save_associations:false"`
}

Yaml Yaml结构体

func (*Yaml) BeforeCreate

func (yaml *Yaml) BeforeCreate(scope *gorm.Scope) error

BeforeCreate CreatedAt赋值

func (*Yaml) BeforeUpdate

func (yaml *Yaml) BeforeUpdate(scope *gorm.Scope) error

BeforeUpdate UpdateAt赋值

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL