Versions in this module Expand all Collapse all v1 v1.6.0 Nov 5, 2021 v1.5.0 Sep 29, 2021 v1.4.0 Sep 9, 2021 v1.3.1 Aug 13, 2021 v1.3.0 Jul 29, 2021 Changes in this version type CodeHost + AccessKey string + Password string + Region string + SecretKey string + Username string type UserInfo + func GetUserDetailByToken(poetryHost, token string) (*UserInfo, error) v1.2.0 Jul 6, 2021 Changes in this version + const AllUsersRoleName + const DefaultOrganization + const GerritProvider + const GitHubProvider + const GitLabProvider + const ProjectOwner + const ProjectType + func ConvertUserInfo(userInfo *UserInfo) *permission.User + type Client struct + func New(host, token string) *Client + func (c *Client) AddEnvRolePermission(productName, envName string, permissionUUIDs []string, roleID int, ...) (int, error) + func (c *Client) AddProductTeam(productName string, teamID int, userIDs []int, log *zap.SugaredLogger) (int, error) + func (c *Client) ContributorRoleExist(productName string, log *zap.SugaredLogger) bool + func (c *Client) CreateContributorRole(product string, log *zap.SugaredLogger) error + func (c *Client) CreateUserEnvPermission(p *UserEnvPermission) error + func (c *Client) DeleteEnvRolePermission(productName, envName string, log *zap.SugaredLogger) (int, error) + func (c *Client) DeleteProductTeam(productName string, log *zap.SugaredLogger) error + func (c *Client) DeleteUserEnvPermission(productName, username string, userID int, log *zap.SugaredLogger) error + func (c *Client) DeleteUserRole(roleID int64, roleType, userID int, productName string, log *zap.SugaredLogger) error + func (c *Client) GetContributorRoleID(productName string, log *zap.SugaredLogger) int64 + func (c *Client) GetJiraInfo() (*JiraInfo, error) + func (c *Client) GetOrganization(orgID int) (*Organization, error) + func (c *Client) GetTeam(teamID int) (*Team, error) + func (c *Client) GetUserEnvPermission(userID int, log *zap.SugaredLogger) ([]*UserEnv, error) + func (c *Client) GetUserPermissionUUIDMap(productName, permissionUUID string, userID int, log *zap.SugaredLogger) (map[string]bool, error) + func (c *Client) GetUserPermissionUUIDs(roleID int64, productName string, log *zap.SugaredLogger) ([]string, error) + func (c *Client) GetUserProject(userID int, log *zap.SugaredLogger) (map[string][]int64, error) + func (c *Client) HasOperatePermission(productName, permissionUUID string, userID int, isSuperUser bool, ...) bool + func (c *Client) ListCodeHosts() ([]*CodeHost, error) + func (c *Client) ListEnvRolePermission(productName, envName string, roleID int64, log *zap.SugaredLogger) ([]*EnvRolePermission, error) + func (c *Client) ListFeatures() ([]string, error) + func (c *Client) ListPermissionUsers(productName string, roleID int64, roleType int, log *zap.SugaredLogger) ([]int, error) + func (c *Client) ListProductPermissionUsers(productName, permissionID string, log *zap.SugaredLogger) ([]string, error) + func (c *Client) ListRoleEnvs(productName, envName string, roleID int64, log *zap.SugaredLogger) ([]*RoleEnv, error) + func (c *Client) ListRolePermissions(roleID int64, roleType int, productName string, log *zap.SugaredLogger) ([]*RolePermission, error) + func (c *Client) ListRoleProjects(roleID int64, log *zap.SugaredLogger) ([]*RoleProduct, error) + func (c *Client) ListRoles(productName string, log *zap.SugaredLogger) (*Role, error) + func (c *Client) ListTeams(orgID int, log *zap.SugaredLogger) ([]*Team, error) + func (c *Client) ListUserEnvPermission(productName string, userID int, log *zap.SugaredLogger) ([]*UserEnv, error) + func (c *Client) ListUserRoles(userID, roleType int, log *zap.SugaredLogger) ([]*UserRole, error) + func (c *Client) SignatureCheck(username, token string) error + func (c *Client) UpdateUserRole(roleID int64, roleType int, productName string, userIDList []int, ...) error + type CodeHost struct + AccessToken string + Address string + ID int + Namespace string + OrgID int + Type string + type EnvRolePermission struct + EnvName string + ID int64 + PermissionUUID string + ProductName string + RoleID int64 + RoleName string + type JiraInfo struct + AccessToken string + CreatedAt int64 + Host string + ID int64 + OrganizationID int + UpdatedAt int64 + User string + func GetJiraInfo(host, token string) (*JiraInfo, error) + type Organization struct + ID int + Name string + Token string + Website string + type ResponseMessage struct + ErrorMsg string + ResultCode int + type Role struct + ID int64 + IsDisabled bool + Name string + ProductName string + RoleType int + UpdateAt int64 + UpdateBy string + type RoleEnv struct + EnvName string + ProductName string + RoleID int + type RolePermission struct + PermissionUUID string + RoleID int64 + type RolePermissionReq struct + PermissionUUID []string + ProductName string + RoleID int64 + RoleType int + type RoleProduct struct + ProductName string + Role Role + RoleID int64 + type Team struct + CreatedAt int64 + Desc string + ID int + IsTeamLeader bool + Name string + OrgID int + UpdatedAt int64 + Users []*UserInfo + type UpdateUserRoleReq struct + ProductName string + RoleID int64 + RoleType int + UserIDList []int + type User interface + GetEmail func() string + GetName func() string + GetPhone func() string + type UserEnv struct + EnvName string + PermissionUUID string + ProductName string + UserID int + type UserEnvPermission struct + EnvName string + PermissionUUIDs []string + ProductName string + UserID int + type UserInfo struct + CreatedAt int64 + Directory string + Email string + ID int + IsAdmin bool + IsSuperUser bool + IsTeamLeader bool + LastLoginAt int64 + Name string + OrganizationID int + Password string + Phone string + UpdatedAt int64 + func ListUsersDetail(poetryHost, authToken, authCookie string) (*UserInfo, error) + type UserRole struct + ProductName string + RoleID int64 + UserID int