users

package
v0.15.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	AddGroup(api.Group) ([]byte, error)
	AddUserToGroup(api.UserGroupRole) ([]byte, error)
	AddProjectToGroup(api.ProjectGroups) ([]byte, error)
	RemoveUserFromGroup(api.UserGroup) ([]byte, error)
	RemoveGroupsFromProject(api.ProjectGroups) ([]byte, error)
	DeleteGroup(api.Group) ([]byte, error)
	ListUsers(string) ([]byte, error)
	AddUser(api.User) ([]byte, error)
	AddSSHKeyToUser(api.User, api.SSHKey) ([]byte, error)
	DeleteSSHKey(string) ([]byte, error)
	DeleteUser(api.User) ([]byte, error)
	ModifyUser(api.User, api.User) ([]byte, error)
	ListUserSSHKeys(string, string, bool) ([]byte, error)
	ListGroups(string) ([]byte, error)
	ListGroupProjects(string, bool) ([]byte, error)
}

Client .

func New

func New(lc *lagoon.Config, debug bool) (Client, error)

New .

type Data

type Data struct {
	User []UserData
}

Data .

func (*Data) AddItem

func (ud *Data) AddItem(userData UserData)

AddItem .

type ExtendedSSHKey

type ExtendedSSHKey struct {
	*api.SSHKey
	Email string `json:"email"`
}

ExtendedSSHKey .

type GroupMembers

type GroupMembers []struct {
	ID      string   `json:"id"`
	Members []Member `json:"members"`
	Name    string   `json:"name"`
}

GroupMembers .

type Member

type Member struct {
	Role string `json:"role"`
	User struct {
		ID        string       `json:"id"`
		Email     string       `json:"email"`
		FirstName string       `json:"firstName"`
		SSHKeys   []api.SSHKey `json:"sshKeys"`
		LastName  string       `json:"lastName"`
	} `json:"user"`
}

Member .

type UserData

type UserData struct {
	ID        string       `json:"id"`
	Email     string       `json:"email"`
	FirstName string       `json:"firstName"`
	LastName  string       `json:"lastName"`
	SSHKeys   []api.SSHKey `json:"sshKeys"`
	Groups    []UserGroup  `json:"groups"`
}

UserData .

type UserGroup

type UserGroup struct {
	Name string `json:"name"`
	ID   string `json:"id"`
	Role string `json:"role"`
}

UserGroup .

type Users

type Users struct {
	// contains filtered or unexported fields
}

Users .

func (*Users) AddGroup

func (u *Users) AddGroup(group api.Group) ([]byte, error)

AddGroup function

func (*Users) AddGroupWithParent

func (u *Users) AddGroupWithParent(group api.Group, parent api.Group) ([]byte, error)

AddGroupWithParent function

func (*Users) AddProjectToGroup

func (u *Users) AddProjectToGroup(groups api.ProjectGroups) ([]byte, error)

AddProjectToGroup function

func (*Users) AddSSHKeyToUser

func (u *Users) AddSSHKeyToUser(user api.User, sshKey api.SSHKey) ([]byte, error)

AddSSHKeyToUser function

func (*Users) AddUser

func (u *Users) AddUser(user api.User) ([]byte, error)

AddUser function

func (*Users) AddUserToGroup

func (u *Users) AddUserToGroup(userGroup api.UserGroupRole) ([]byte, error)

AddUserToGroup function

func (*Users) DeleteGroup

func (u *Users) DeleteGroup(group api.Group) ([]byte, error)

DeleteGroup function

func (*Users) DeleteSSHKey

func (u *Users) DeleteSSHKey(keyName string) ([]byte, error)

DeleteSSHKey function

func (*Users) DeleteUser

func (u *Users) DeleteUser(user api.User) ([]byte, error)

DeleteUser function

func (*Users) ListGroupProjects

func (u *Users) ListGroupProjects(name string, allProjects bool) ([]byte, error)

ListGroupProjects function

func (*Users) ListGroups

func (u *Users) ListGroups(name string) ([]byte, error)

ListGroups function

func (*Users) ListUserSSHKeys

func (u *Users) ListUserSSHKeys(groupName string, email string, allUsers bool) ([]byte, error)

ListUserSSHKeys function

func (*Users) ListUsers

func (u *Users) ListUsers(groupName string) ([]byte, error)

ListUsers function

func (*Users) ModifyUser

func (u *Users) ModifyUser(user api.User, patch api.User) ([]byte, error)

ModifyUser function

func (*Users) RemoveGroupsFromProject

func (u *Users) RemoveGroupsFromProject(groups api.ProjectGroups) ([]byte, error)

RemoveGroupsFromProject function

func (*Users) RemoveUserFromGroup

func (u *Users) RemoveUserFromGroup(userGroup api.UserGroup) ([]byte, error)

RemoveUserFromGroup function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL