models

package
v0.0.0-...-966fcb4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RespCodeSuccess int = 1000
	RespCodeFailed  int = 1001
	RespCodeData    int = 1002
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallBackJobInfo

type CallBackJobInfo struct {
	ProjectID   int    `json:"gitlab_project_id"`
	PipelineID  int    `json:"gitlab_pipeline_id"`
	JobID       int    `json:"gitlab_job_id"`
	GitBranch   string `json:"git_branch"`
	GitCommitID string `json:"git_commit_id"`
	Type        int    `json:"type"`
	Status      int    `json:"status"`
	LogsReady   string `json:"logs_ready"`
	ExtData     string `json:"ext_data"`
}

type CancelJobReq

type CancelJobReq struct {
	JobIDs   []int `json:"job_ids"`
	Multiple bool  `json:"multiple"`
}

type CommitsWithPipelines

type CommitsWithPipelines []*gitlab.Commit

func (CommitsWithPipelines) Len

func (cp CommitsWithPipelines) Len() int

func (CommitsWithPipelines) Less

func (cp CommitsWithPipelines) Less(i, j int) bool

func (CommitsWithPipelines) Swap

func (cp CommitsWithPipelines) Swap(i, j int)

type CommonResp

type CommonResp struct {
	Code      int         `json:"code"`
	Message   string      `json:"message"`
	Timestamp int64       `json:"timestamp"`
	Data      interface{} `json:"data,omitempty"`
}

type DeployProjectReq

type DeployProjectReq struct {
	ProjectID int `json:"project_id"`
	JobID     int `json:"job_id"`
}

type Deployment

type Deployment struct {
	ID                     NullInt32  `json:"id" form:"id" db:"id"`
	Name                   NullString `json:"name" form:"name" db:"name"`
	NameSpace              NullString `json:"namespace" form:"namespace" db:"namespace"`
	SpecReplicas           NullInt32  `json:"spec_replicas" form:"spec_replicas" db:"spec_replicas"`
	Replicas               NullInt32  `json:"replicas" form:"replicas" db:"replicas"`
	AvailableReplicas      NullInt32  `json:"available_replicas" form:"available_replicas" db:"available_replicas"`
	UnavailableReplicas    NullInt32  `json:"unavailable_replicas" form:"unavailable_replicas" db:"unavailable_replicas"`
	NewRsName              NullString `json:"new_rs_name" form:"new_rs_name" db:"new_rs_name"`
	NewRsAvailableReplicas NullInt32  `json:"new_rs_available_replicas" form:"new_rs_available_replicas" db:"new_rs_available_replicas"`
	OldRsName              NullString `json:"old_rs_name" form:"old_rs_name" db:"old_rs_name"`
	OldRsAvailableReplicas NullInt32  `json:"old_rs_available_replicas" form:"old_rs_available_replicas" db:"old_rs_available_replicas"`
	ImageTag               NullString `json:"image_tag" form:"image_tag" db:"image_tag"`
	Deleted                NullBool   `json:"deleted" form:"deleted" db:"deleted"`
	CreateTime             NullInt64  `db:"create_time"`
	UpdateTime             NullInt64  `db:"update_time"`
}

type GDNSEtcdAllRecords

type GDNSEtcdAllRecords map[string]GDNSEtcdRecords

type GDNSEtcdRecords

type GDNSEtcdRecords map[uint16][]GDNSRecord

type GDNSGetAllRecordRequest

type GDNSGetAllRecordRequest struct {
	Domain    string `json:"domain" form:"domain"`
	SubDomain string `json:"sub_domain" form:"sub_domain"`
}

type GDNSRecord

type GDNSRecord struct {
	Domain    string `json:"domain"`
	SubDomain string `json:"sub_domain"`
	Type      uint16 `json:"type"`
	Record    string `json:"record"`
	TTL       uint32 `json:"ttl"`
}

type Job

type Job struct {
	ID               NullInt32  `json:"id" form:"id" db:"id"`
	GitLabProjectID  NullInt32  `json:"gitlab_project_id" form:"gitlab_project_id" db:"gitlab_project_id"`
	GitLabPipelineID NullInt32  `json:"gitlab_pipeline_id" form:"gitlab_pipeline_id" db:"gitlab_pipeline_id"`
	GitLabJobID      NullInt32  `json:"gitlab_job_id" form:"gitlab_job_id" db:"gitlab_job_id"`
	GitLabJobName    NullString `json:"gitlab_job_name" form:"gitlab_job_name" db:"gitlab_job_name"`
	Type             NullInt32  `json:"type" form:"type" db:"type"`
	GitBranch        NullString `json:"git_branch" form:"git_branch" db:"git_branch"`
	GitCommitID      NullString `json:"git_commit_id" form:"git_commit_id" db:"git_commit_id"`
	ExtData          NullString `json:"ext_data" form:"ext_data" db:"ext_data"`
	LogsReady        NullString `json:"logs_ready" form:"logs_ready" db:"logs_ready"`
	Status           NullInt32  `json:"status" form:"status" db:"status"`
	UserID           NullInt32  `json:"user_id" form:"user_id" db:"user_id"`
	UserName         NullString `json:"user_name" form:"user_name" db:"user_name"`
	CreateTime       NullInt64  `db:"create_time"`
	UpdateTime       NullInt64  `db:"update_time"`
}

type NullBool

type NullBool struct {
	sql.NullBool
}

func (NullBool) MarshalJSON

func (v NullBool) MarshalJSON() ([]byte, error)

func (*NullBool) UnmarshalJSON

func (v *NullBool) UnmarshalJSON(data []byte) error

type NullFloat64

type NullFloat64 struct {
	sql.NullFloat64
}

func (NullFloat64) MarshalJSON

func (v NullFloat64) MarshalJSON() ([]byte, error)

func (*NullFloat64) UnmarshalJSON

func (v *NullFloat64) UnmarshalJSON(data []byte) error

type NullInt32

type NullInt32 struct {
	sql.NullInt32
}

func (NullInt32) MarshalJSON

func (v NullInt32) MarshalJSON() ([]byte, error)

func (*NullInt32) UnmarshalJSON

func (v *NullInt32) UnmarshalJSON(data []byte) error

type NullInt64

type NullInt64 struct {
	sql.NullInt64
}

func (NullInt64) MarshalJSON

func (v NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) UnmarshalJSON

func (v *NullInt64) UnmarshalJSON(data []byte) error

type NullString

type NullString struct {
	sql.NullString
}

func (NullString) MarshalJSON

func (v NullString) MarshalJSON() ([]byte, error)

func (*NullString) UnmarshalJSON

func (v *NullString) UnmarshalJSON(data []byte) error

type NullTime

type NullTime struct {
	sql.NullTime
}

func (NullTime) MarshalJSON

func (v NullTime) MarshalJSON() ([]byte, error)

func (*NullTime) UnmarshalJSON

func (v *NullTime) UnmarshalJSON(data []byte) error

type Project

type Project struct {
	ID               NullInt32  `json:"id" form:"id" db:"id"`
	Name             NullString `json:"name" form:"name" db:"name"`
	GitLabProjectID  NullInt32  `json:"gitlab_project_id" form:"gitlab_project_id" db:"gitlab_project_id"`
	GitLabProjectURL NullString `json:"gitlab_project_url" form:"gitlab_project_url" db:"gitlab_project_url"`
	GitBranch        NullString `json:"git_branch" form:"git_branch" db:"git_branch"`
	GitCommitID      NullString `json:"git_commit_id" form:"git_commit_id" db:"git_commit_id"`
	GitCommitMessage NullString `json:"git_commit_message" form:"git_commit_message" db:"git_commit_message"`
	DeploymentID     NullInt32  `json:"k8s_deployment_id" form:"k8s_deployment_id" db:"k8s_deployment_id"`
	Status           NullInt32  `json:"status" form:"status" db:"status"`
	CreateTime       NullInt64  `db:"create_time"`
	UpdateTime       NullInt64  `db:"update_time"`
}

type ProjectResp

type ProjectResp []ProjectRespData

func (ProjectResp) Len

func (pr ProjectResp) Len() int

func (ProjectResp) Less

func (pr ProjectResp) Less(i, j int) bool

func (ProjectResp) Swap

func (pr ProjectResp) Swap(i, j int)

type ProjectRespData

type ProjectRespData struct {
	ID                NullInt32  `json:"id" db:"id"`
	Name              NullString `json:"name" db:"name"`
	GitLabProjectID   NullInt32  `json:"gitlab_project_id" db:"gitlab_project_id"`
	GitLabProjectURL  NullString `json:"gitlab_project_url" db:"gitlab_project_url"`
	ImageTag          NullString `json:"image_tag" db:"image_tag"`
	SpecReplicas      NullInt32  `json:"spec_replicas" db:"spec_replicas"`
	AvailableReplicas NullInt32  `json:"available_replicas" db:"available_replicas"`
	Status            NullInt32  `json:"status" db:"status"`
}

type TriggerJobReq

type TriggerJobReq struct {
	ProjectID  int    `json:"gitlab_project_id"`
	PipelineID int    `json:"gitlab_pipeline_id"`
	Stage      string `json:"gitlab_stage"`
	Multiple   bool   `json:"multiple"`
}

type User

type User struct {
	ID         NullInt32  `json:"id" form:"id" db:"id"`
	Name       NullString `json:"name" form:"name" db:"name"`
	Email      NullString `json:"email" form:"email" db:"email"`
	Mobile     NullString `json:"mobile" form:"mobile" db:"mobile"`
	Password   NullString `json:"password" form:"password" db:"password"`
	Lock       NullBool   `json:"lock" form:"lock" db:"lock"`
	Salt       NullString `db:"salt"`
	CreateTime NullInt64  `db:"create_time"`
	UpdateTime NullInt64  `db:"update_time"`
	LoginTime  NullInt64  `db:"login_time"`
}

type UserReq

type UserReq struct {
	Name     string `json:"name" form:"name"`
	Email    string `json:"email" form:"email"`
	Mobile   string `json:"mobile" form:"mobile"`
	Password string `json:"password" form:"password"`
}

type UserResp

type UserResp struct {
	Name   string `json:"name"`
	Email  string `json:"email"`
	Mobile string `json:"mobile"`
	Lock   bool   `json:"lock"`
}

Jump to

Keyboard shortcuts

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