update api docs

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-06-20 17:21:04 +08:00
committed by zryfish
parent aec4146c17
commit ae8ee99da3
7 changed files with 99 additions and 99 deletions

View File

@@ -21,10 +21,10 @@ const (
)
type DevOpsProjectMembership struct {
Username string `json:"username" description:"member's usernameusername can uniquely identify a user"`
ProjectId string `json:"project_id" db:"project_id" description:"the devops projects which project membership belongs to"`
Role string `json:"role" description:"devops project membership's role type. e.g. owner '"`
Status string `json:"status" description:"Desperated, status of project membership. e.g. active "`
Username string `json:"username" description:"Member's usernameusername can uniquely identify a user"`
ProjectId string `json:"project_id" db:"project_id" description:"the DevOps Projects which project membership belongs to"`
Role string `json:"role" description:"DevOps Project membership's role type. e.g. owner '"`
Status string `json:"status" description:"Desperated, Status of project membership. e.g. active "`
GrantBy string `json:"grand_by,omitempty" description:"Username of the user who assigned the role"`
}

View File

@@ -37,11 +37,11 @@ type PageableDevOpsProject struct {
}
type DevOpsProject struct {
ProjectId string `json:"project_id" db:"project_id" description:"ProjectId must be unique within a namespace, it is generated by kubesphere."`
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'"`
Name string `json:"name" description:"DevOps Projects's Name"`
Description string `json:"description,omitempty" description:"DevOps Projets's Description, used to describe the DevOps Project'"`
Description string `json:"description,omitempty" description:"DevOps Projects's Description, used to describe the DevOps Project'"`
Creator string `json:"creator" description:"Creator's username'"`

View File

@@ -26,30 +26,30 @@ const (
)
type JenkinsCredential struct {
Id string `json:"id" description:"id of credential"`
Type string `json:"type" description:"type of credential,such as ssh/kubeconfig"`
DisplayName string `json:"display_name,omitempty" description:"credential's display name'"`
Id string `json:"id" description:"Id of Credential, e.g. dockerhub-id"`
Type string `json:"type" description:"Type of Credential, e.g. ssh/kubeconfig"`
DisplayName string `json:"display_name,omitempty" description:"Credential's display name'"`
Fingerprint *struct {
FileName string `json:"file_name,omitempty" description:"credential's display name and description"`
Hash string `json:"hash,omitempty" description:"credential's hash'"`
FileName string `json:"file_name,omitempty" description:"Credential's display name and description"`
Hash string `json:"hash,omitempty" description:"Credential's hash"`
Usage []*struct {
Name string `json:"name,omitempty" description:"jenkins pipeline full name"`
Name string `json:"name,omitempty" description:"Jenkins pipeline full name"`
Ranges struct {
Ranges []*struct {
Start int `json:"start,omitempty" description:"start build number"`
End int `json:"end,omitempty" description:"end build number"`
Start int `json:"start,omitempty" description:"Start build number"`
End int `json:"end,omitempty" description:"End build number"`
} `json:"ranges,omitempty"`
} `json:"ranges,omitempty" description:"all build num using credential"`
} `json:"usage,omitempty" description:"all usage of credential"`
} `json:"fingerprint,omitempty" description:"usage of credential"`
Description string `json:"description,omitempty" description:"credential's description'"`
Domain string `json:"domain,omitempty" description:"credential's domain,In ks we only use the default domain, default '_''"`
CreateTime *time.Time `json:"create_time,omitempty" description:"credential's create_time'"`
Creator string `json:"creator,omitempty" description:"creator's username"`
UsernamePasswordCredential *UsernamePasswordCredential `json:"username_password,omitempty" description:"username password credential struct"`
SshCredential *SshCredential `json:"ssh,omitempty" description:"ssh credential struct"`
SecretTextCredential *SecretTextCredential `json:"secret_text,omitempty" description:"secret_text credential struct"`
KubeconfigCredential *KubeconfigCredential `json:"kubeconfig,omitempty" description:"kubeconfig credential struct"`
} `json:"ranges,omitempty" description:"The build number of all pipelines that use this credential"`
} `json:"usage,omitempty" description:"all usage of Credential"`
} `json:"fingerprint,omitempty" description:"usage of the Credential"`
Description string `json:"description,omitempty" description:"Credential's description'"`
Domain string `json:"domain,omitempty" description:"Credential's domain,In ks we only use the default domain, default '_''"`
CreateTime *time.Time `json:"create_time,omitempty" description:"Credential's create_time'"`
Creator string `json:"creator,omitempty" description:"Creator's username"`
UsernamePasswordCredential *UsernamePasswordCredential `json:"username_password,omitempty" description:"username password Credential struct"`
SshCredential *SshCredential `json:"ssh,omitempty" description:"ssh Credential struct"`
SecretTextCredential *SecretTextCredential `json:"secret_text,omitempty" description:"secret_text Credential struct"`
KubeconfigCredential *KubeconfigCredential `json:"kubeconfig,omitempty" description:"kubeconfig Credential struct"`
}
type UsernamePasswordCredential struct {