import "github.com/jenkins-x/jx/pkg/users"
git.go user_details.go users.go
AddAccountReference adds an account reference and label (created from gitProviderKey and id) to the user
CreateUser creates a new default User
DeleteUser deletes the user resource but does not uninstall the underlying namespaces
func GetUsers(jxClient versioned.Interface, ns string) (map[string]*jenkinsv1.User, []string, error)
GetUsers returns the pending users with the sorted order of names
func Resolve(id string, providerKey string, jxClient versioned.Interface, namespace string, selectUsers func(id string, users []jenkinsv1.User) (string, []jenkinsv1.User, *jenkinsv1.User, error)) (*jenkinsv1.User, error)
Resolve does the heavy lifting for user resolution. This function is not normally called directly but by a dedicated user resolver (e.g. GitUserResolver) * checking the user custom resources to see if the user is present there * calling selectUsers to try to identify the user as often user info is not complete in a git response
type GitUserResolver struct { GitProvider gits.GitProvider JXClient jenkninsv1client.Interface Namespace string }
GitUserResolver allows git users to be converted to Jenkins X users
func (r *GitUserResolver) GitProviderKey() string
GitProviderKey returns the provider key for this GitUserResolver
GitSignatureAsUser resolves the signature to a Jenkins X User
func (r *GitUserResolver) GitUserLogin(user *jenkinsv1.User) string
GitUserLogin returns the login for the git provider, or an empty string if not found
func (r *GitUserResolver) GitUserSliceAsUserDetailsSlice(users []gits.GitUser) ([]jenkinsv1.UserDetails, error)
GitUserSliceAsUserDetailsSlice resolves a slice of git users to a slice of Jenkins X User Details
GitUserToUser performs type conversion from a GitUser to a Jenkins X user, attaching the Git Provider account to Accounts
Resolve will convert the GitUser to a Jenkins X user and attempt to complete the user info by: * checking the user custom resources to see if the user is present there * making a call to the gitProvider as often user info is not complete in a git response
func (r *GitUserResolver) UpdateUserFromPRAuthor(author *jenkinsv1.User, pullRequest *gits.GitPullRequest, commits []*gits.GitCommit) (*jenkinsv1.User, error)
UpdateUserFromPRAuthor will attempt to use the
UserToGitUser performs type conversion from a Jenkins X User to a Git User
type UserDetailService struct {
// contains filtered or unexported fields
}
func NewUserDetailService(jxClient versioned.Interface, namespace string) UserDetailService
func (this *UserDetailService) CreateOrUpdateUser(u *v1.UserDetails) error
Package users imports 12 packages (graph). Updated 2020-08-08. Refresh now. Tools for package owners.