1. change glog to klog
2. move types to api package to avoid cyclic import
This commit is contained in:
@@ -14,11 +14,12 @@ limitations under the License.
|
||||
package devops
|
||||
|
||||
import (
|
||||
"kubesphere.io/kubesphere/pkg/api/devops/v1alpha2"
|
||||
"kubesphere.io/kubesphere/pkg/utils/idutils"
|
||||
"time"
|
||||
)
|
||||
|
||||
var DevOpsProjectColumns = GetColumnsFromStruct(&DevOpsProject{})
|
||||
var DevOpsProjectColumns = GetColumnsFromStruct(&v1alpha2.DevOpsProject{})
|
||||
|
||||
const (
|
||||
DevOpsProjectTableName = "project"
|
||||
@@ -31,33 +32,8 @@ const (
|
||||
DevOpsProjectCreateTimeColumn = "project.create_time"
|
||||
)
|
||||
|
||||
type PageableDevOpsProject struct {
|
||||
Items []*DevOpsProject `json:"items"`
|
||||
TotalCount int `json:"total_count"`
|
||||
}
|
||||
|
||||
type DevOpsProject struct {
|
||||
ProjectId string `json:"project_id" db:"project_id" description:"ProjectId must be unique within a workspace, it is generated by kubesphere."`
|
||||
|
||||
Name string `json:"name" description:"DevOps Projects's Name"`
|
||||
|
||||
Description string `json:"description,omitempty" description:"DevOps Projects's Description, used to describe the DevOps Project"`
|
||||
|
||||
Creator string `json:"creator" description:"Creator's username"`
|
||||
|
||||
CreateTime time.Time `json:"create_time" description:"DevOps Project's Creation time"`
|
||||
|
||||
Status string `json:"status" description:"DevOps project's status. e.g. active"`
|
||||
|
||||
Visibility string `json:"visibility,omitempty" description:"Deprecated Field"`
|
||||
|
||||
Extra string `json:"extra,omitempty" description:"Internal Use"`
|
||||
|
||||
Workspace string `json:"workspace" description:"The workspace to which the devops project belongs"`
|
||||
}
|
||||
|
||||
func NewDevOpsProject(name, description, creator, extra, workspace string) *DevOpsProject {
|
||||
return &DevOpsProject{
|
||||
func NewDevOpsProject(name, description, creator, extra, workspace string) *v1alpha2.DevOpsProject {
|
||||
return &v1alpha2.DevOpsProject{
|
||||
ProjectId: idutils.GetUuid(DevOpsProjectPrefix),
|
||||
Name: name,
|
||||
Description: description,
|
||||
|
||||
Reference in New Issue
Block a user