models

package
v0.0.0-...-be240b2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAllInTest

func InitAllInTest()

Types

type Account

type Account struct {
	Id       int64
	Name     string `json:"name" form:"name"`
	Password string `json:"password" form:"password"`
}

func (Account) Add

func (this Account) Add(account *Account) (int64, error)

增加

func (Account) GetById

func (this Account) GetById(id int64) (*Account, error)

查询

func (Account) GetByName

func (this Account) GetByName(name string) (*Account, error)

func (Account) Remove

func (this Account) Remove(id int64) error

删除

func (Account) Update

func (this Account) Update(account *Account) error

修改

type ConstructRecord

type ConstructRecord struct {
	Id             int64  `json:"id" form:"id"`
	AccountId      int64  `json:"account_id" form:"account_id"`
	ProjectId      int64  `json:"project_id" form:"project_id"`
	MirrorId       int64  `json:"mirror_id" form:"mirror_id"`
	ConstructStart int64  `json:"construct_start" form:"construct_start"`
	ConstructEnd   int64  `json:"construct_end" form:"construct_end"`
	ConstructStatu int    `json:"construct_statu" form:"construct_statu"`
	ConstructLog   string `json:"construct_log" form:"construct_log"`
}

func (ConstructRecord) Add

func (this ConstructRecord) Add(constructRecord *ConstructRecord) (int64, error)

增加

func (ConstructRecord) CountAllConstructByPage

func (this ConstructRecord) CountAllConstructByPage() (int64, error)

func (ConstructRecord) GetById

func (this ConstructRecord) GetById(id int64) (*ConstructRecord, error)

查询(根据构建记录id查询)

func (ConstructRecord) GetByProjectId

func (this ConstructRecord) GetByProjectId(projectId int64) (*ConstructRecord, error)

func (ConstructRecord) GetByProjectIdAndStatu

func (this ConstructRecord) GetByProjectIdAndStatu(projectId int64) (*ConstructRecord, error)

func (ConstructRecord) QueryAllConstructByPage

func (this ConstructRecord) QueryAllConstructByPage(size int, start int) ([]*ConstructRecord, error)

查询(分页查询所有记录)

func (ConstructRecord) QueryAllConstructRecord

func (this ConstructRecord) QueryAllConstructRecord() ([]*ConstructRecord, error)

查询(所有数据)

func (ConstructRecord) QueryByAccountId

func (this ConstructRecord) QueryByAccountId(accountId int64) ([]*ConstructRecord, error)

查询(根据用户id查询)

func (ConstructRecord) QueryByProjectId

func (this ConstructRecord) QueryByProjectId(projectId int64) ([]*ConstructRecord, error)

查询(根据工程id查询)

func (ConstructRecord) Remove

func (this ConstructRecord) Remove(id int64) error

删除

func (ConstructRecord) Update

func (this ConstructRecord) Update(constructRecord *ConstructRecord) error

修改

type Deploy

type Deploy struct {
	Id           int64  `json:"id" form:"id"`
	ServiceId    int64  `json:"service_id" form:"service_id"`
	AccountId    int64  `json:"account_id" form:"account_id"`
	DeployStart  int64  `json:"deploy_start" form:"deploy_start"`
	DeployEnd    int64  `json:"deploy_end" form:"deploy_end"`
	HostList     string `json:"host_list" form:"host_list"`
	MirrorList   int64  `json:"mirror_list" form:"mirror_list"`
	DockerConfig string `json:"docker_config" form:"docker_config"`
	DeployStatu  int    `json:"deploy_statu" form:"deploy_statu"`
	DeployLog    string `json:"deploy_log" form:"deploy_log"`
}

func (Deploy) Add

func (this Deploy) Add(deploy *Deploy) (int64, error)

增加

func (Deploy) CountAllDeployByPage

func (this Deploy) CountAllDeployByPage() (int64, error)

func (Deploy) GetById

func (this Deploy) GetById(id int64) (*Deploy, error)

查询(根据部署id查询)

func (Deploy) GetByServiceId

func (this Deploy) GetByServiceId(serviceId int64) (*Deploy, error)

func (Deploy) GetDeployBackData

func (this Deploy) GetDeployBackData(serviceId int64) (*Deploy, error)

func (Deploy) QueryAllDeploy

func (this Deploy) QueryAllDeploy() ([]*Deploy, error)

查询(所有部署)

func (Deploy) QueryAllDeployByPage

func (this Deploy) QueryAllDeployByPage(size int, start int) ([]*Deploy, error)

查询(分页查询所有记录)

func (Deploy) QueryByAccountId

func (this Deploy) QueryByAccountId(accountId int64) ([]*Deploy, error)

查询(根据用户id查询)

func (Deploy) QueryByServiceId

func (this Deploy) QueryByServiceId(serviceId int64) ([]*Deploy, error)

查询(根据服务id查询)

func (Deploy) Remove

func (this Deploy) Remove(id int64) error

删除

func (Deploy) Update

func (this Deploy) Update(deploy *Deploy) error

修改

type DeployData

type DeployData struct {
	Stage           []DeployStage `json:"stage"`
	Stage_num       int           `json:"stage_num"`
	Progress_status int           `json:"progress_status"`
}

type DeployMachine

type DeployMachine struct {
	Id             int64  `json:"id"`
	Name           string `json:"name"`
	Machine_status int    `json:"machine_status"`
	Step           string `json:"step"`
}

type DeployStage

type DeployStage struct {
	Stage_status int             `json:"stage_status"`
	Machine      []DeployMachine `json:"machine"`
}

type Host

type Host struct {
	Id       int64  `json:"id" form:"id"`
	HostName string `json:"host_name" form:"host_name"`
	Ip       string `json:"ip" form:"ip"`
}

func (Host) Add

func (this Host) Add(host *Host) (int64, error)

增加

func (Host) CountAllHost

func (this Host) CountAllHost() (int64, error)

func (Host) GetByHostName

func (this Host) GetByHostName(hostName string) (*Host, error)

查询(根据主机名字查询)

func (Host) GetById

func (this Host) GetById(id int64) (*Host, error)

查询(根据主机id查询)

func (Host) GetByIp

func (this Host) GetByIp(ip string) (*Host, error)

查询(根据ip查询)

func (Host) QueryAllHost

func (this Host) QueryAllHost() ([]*Host, error)

查询(所有数据)

func (Host) Remove

func (this Host) Remove(id int64) error

删除

func (Host) Update

func (this Host) Update(host *Host) error

修改

type Mirror

type Mirror struct {
	Id             int64  `json:"id" form:"id"`
	MirrorName     string `json:"mirror_name" form:"mirror_name"`
	MirrorVersion  string `json:"mirror_version" form:"mirror_version"`
	MirrorDescribe string `json:"mirror_describe" form:"mirror_describe"`
}

func (Mirror) Add

func (this Mirror) Add(mirror *Mirror) (int64, error)

增加

func (Mirror) CountAllMirror

func (this Mirror) CountAllMirror() (int64, error)

func (Mirror) GetById

func (this Mirror) GetById(id int64) (*Mirror, error)

查询(根据镜像id查询)

func (Mirror) QueryAllMirror

func (this Mirror) QueryAllMirror() ([]*Mirror, error)

查询(查询所有工程)

func (Mirror) QueryByMirrorName

func (this Mirror) QueryByMirrorName(mirrorName string) ([]*Mirror, error)

查询(根据镜像名字查询)

func (Mirror) Remove

func (this Mirror) Remove(id int64) error

删除

func (Mirror) Update

func (this Mirror) Update(mirror *Mirror) error

修改

type Project

type Project struct {
	Id              int64  `json:"id" form:"id"`
	AccountId       int64  `json:"account_id" form:"account_id"`
	ProjectName     string `json:"project_name" form:"project_name"`
	ProjectDescribe string `json:"project_describe" form:"project_describe"`
	GitDockerPath   string `json:"git_docker_path" form:"git_docker_path"`
	CreateDate      int64  `json:"create_date" form:"create_date"`
	UpdateDate      int64  `json:"update_date" form:"update_date"`
	IsDel           int    `json:"is_del" form:"is_del"`
	ProjectMember   string `json:"project_member" form:"project_member"`
}

func (Project) Add

func (this Project) Add(project *Project) (int64, error)

增加

func (Project) CountAllProject

func (this Project) CountAllProject() (int64, error)

func (Project) CountBySearch

func (this Project) CountBySearch(projectName string, project *Project) (int64, error)

func (Project) GetById

func (this Project) GetById(id int64) (*Project, error)

查询(根据工程id查询)

func (Project) GetByProjectName

func (this Project) GetByProjectName(projectName string) (*Project, error)

查询(根据工程名精确查询)

func (Project) QueryAllProject

func (this Project) QueryAllProject() ([]*Project, error)

查询(查询所有工程)

func (Project) QueryAllProjectByPage

func (this Project) QueryAllProjectByPage(size int, start int) ([]*Project, error)

查询(分页查询所有工程)

func (Project) QueryByAccountId

func (this Project) QueryByAccountId(accountId int64) ([]*Project, error)

查询(根据创建者查询)

func (Project) QueryByProjectName

func (this Project) QueryByProjectName(projectName string) ([]*Project, error)

查询(根据工程名模糊查询)

func (Project) QueryProjectBySearch

func (this Project) QueryProjectBySearch(projectName string, project *Project) ([]*Project, error)

查询(根据工程名查询)

func (Project) Remove

func (this Project) Remove(id int64) error

删除

func (Project) Update

func (this Project) Update(project *Project) error

修改

type Service

type Service struct {
	Id              int64  `json:"id" form:"id"`
	AccountId       int64  `json:"account_id" form:"account_id"`
	ServiceName     string `json:"service_name" form:"service_name"`
	ServiceDescribe string `json:"service_describe" form:"service_describe"`
	HostList        string `json:"host_list" form:"host_list"`
	MirrorList      int64  `json:"mirror_list" form:"mirror_list"`
	DockerConfig    string `json:"docker_config" form:"docker_config"`
	CreateDate      int64  `json:"create_date" form:"create_date"`
	UpdateDate      int64  `json:"update_date" form:"update_date"`
	ServiceMember   string `json:"service_member" form:"service_member"`
	IsDel           int    `json:"is_del" form:"is_del"`
	ServiceStatu    int    `json:"service_statu" form:"service_statu"`
}

func (Service) Add

func (this Service) Add(service *Service) (int64, error)

增加

func (Service) CountAllService

func (this Service) CountAllService() (int64, error)

func (Service) CountServiceBySearch

func (this Service) CountServiceBySearch(serviceName string, service *Service) (int64, error)

func (Service) GetById

func (this Service) GetById(id int64) (*Service, error)

查询(根据服务id查询)

func (Service) GetByServiceName

func (this Service) GetByServiceName(serviceName string) (*Service, error)

查询(根据服务名精确查询)

func (Service) QueryAllService

func (this Service) QueryAllService() ([]*Service, error)

查询(查询所有服务)

func (Service) QueryAllServiceByPage

func (this Service) QueryAllServiceByPage(size int, start int) ([]*Service, error)

查询(分页查询所有服务)

func (Service) QueryByAccountId

func (this Service) QueryByAccountId(accountId int64) ([]*Service, error)

查询(根据服务创建者查询)

func (Service) QueryByServiceName

func (this Service) QueryByServiceName(serviceName string) ([]*Service, error)

查询(根据服务名模糊查询)

func (Service) QueryServiceBySearch

func (this Service) QueryServiceBySearch(serviceName string, service *Service) ([]*Service, error)

查询(根据服务名查询)

func (Service) Remove

func (this Service) Remove(id int64) error

删除

func (Service) Update

func (this Service) Update(service *Service) error

修改

type ServiceData

type ServiceData struct {
	Stage []ServiceStage `json:"stage"`
}

type ServiceMachine

type ServiceMachine struct {
	Id               int64  `json:"id"`
	Name             string `json:"name"`
	Container_status string `json:"container_status"`
}

type ServiceStage

type ServiceStage struct {
	Machine []ServiceMachine `json:"machine"`
}

Jump to

Keyboard shortcuts

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