|
@@ -29,14 +29,14 @@ import jakarta.validation.constraints.Pattern;
|
|
|
@Entity
|
|
@Entity
|
|
|
@Table(name = "devops_repo_auth_config")
|
|
@Table(name = "devops_repo_auth_config")
|
|
|
public class RepoAuthConfig extends BaseEntity {
|
|
public class RepoAuthConfig extends BaseEntity {
|
|
|
- @ValidEnum(value = RepoType.class, message = "请选择正确的仓库类型")
|
|
|
|
|
- private String type;
|
|
|
|
|
|
|
+ @ValidEnum(value = RepoAuthType.class, message = "请选择的认证类型")
|
|
|
|
|
+ private String authType;
|
|
|
@Pattern(regexp = "^\\S*$", message = "认证名字不能包含空白符")
|
|
@Pattern(regexp = "^\\S*$", message = "认证名字不能包含空白符")
|
|
|
@Length(max = 255, message = "认证名字的最大长度不能超过 255 个字符")
|
|
@Length(max = 255, message = "认证名字的最大长度不能超过 255 个字符")
|
|
|
@Column(nullable = false, unique = true)
|
|
@Column(nullable = false, unique = true)
|
|
|
private String name;
|
|
private String name;
|
|
|
- @ValidEnum(value = RepoAuthType.class, message = "请选择的仓库认证类型")
|
|
|
|
|
- private String authType;
|
|
|
|
|
|
|
+ @ValidEnum(value = RepoType.class, message = "请选择正确的仓库类型")
|
|
|
|
|
+ private String type;
|
|
|
|
|
|
|
|
@NotBlank(groups = {HttpRepoAuth.class}, message = "认证用户名不能为空")
|
|
@NotBlank(groups = {HttpRepoAuth.class}, message = "认证用户名不能为空")
|
|
|
@Length(max = 255, message = "认证用户名的最大长度不能超过 255 个字符")
|
|
@Length(max = 255, message = "认证用户名的最大长度不能超过 255 个字符")
|
|
@@ -59,6 +59,6 @@ public class RepoAuthConfig extends BaseEntity {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public RepoAuth getRepoAuth() {
|
|
public RepoAuth getRepoAuth() {
|
|
|
- return new RepoAuth(this.type, this.name, this.authType, this.username, this.password, this.rsaPrikey);
|
|
|
|
|
|
|
+ return new RepoAuth("this.type", this.name, this.authType, this.username, this.password, this.rsaPrikey);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|