Skip to content

Commit

Permalink
chore: add authType field in SCMSource (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujian7 authored and caicloud-bot committed Feb 27, 2019
1 parent 727342f commit d1a7807
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/server/apis/v1alpha1/types.go
Expand Up @@ -141,8 +141,20 @@ type SCMSource struct {
Password string `json:"password"`
// Token is the credential to access SCM.
Token string `json:"token"`
// AuthType is the type of auth way, can be Token or Password
AuthType SCMAuthType `json:"authType"`
}

// SCMAuthType represents the type of SCM auth, support password and token.
type SCMAuthType string

const (
// AuthTypePassword represents using password to auth
AuthTypePassword SCMAuthType = "Password"
// AuthTypeToken represents using token to auth
AuthTypeToken = "Token"
)

// ClusterSource contains info about clusters.
type ClusterSource struct {
// Credential is the credential info of the cluster
Expand Down

0 comments on commit d1a7807

Please sign in to comment.