mock

package
v0.0.0-...-4b8d076 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const GroupServiceAccount userinfo.AccountType = 2
View Source
const LdapGroupDN = "ou=groups,dc=mgmt,dc=example,dc=com"
View Source
const LdapServiceDN = "ou=services,dc=mgmt,dc=example,dc=com"
View Source
const LdapUserDN = "ou=people,dc=mgmt,dc=example,dc=com"
View Source
const UserServiceAccount userinfo.AccountType = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type LdapGroupInfo

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

type LdapServiceInfo

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

type LdapUserInfo

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

type MockLdap

type MockLdap struct {
	Groups          map[string]LdapGroupInfo
	Users           map[string]LdapUserInfo
	SuperAdminGroup string
	Services        map[string]LdapServiceInfo
}

func New

func New() *MockLdap

func (*MockLdap) AddmemberstoExisting

func (m *MockLdap) AddmemberstoExisting(groupinfo userinfo.GroupInfo) error

func (*MockLdap) ChangeDescription

func (m *MockLdap) ChangeDescription(groupname string, managegroup string) error

func (*MockLdap) CreateGroup

func (m *MockLdap) CreateGroup(groupinfo userinfo.GroupInfo) error

func (*MockLdap) CreateServiceAccount

func (m *MockLdap) CreateServiceAccount(groupinfo userinfo.GroupInfo) error

func (*MockLdap) CreateUser

func (m *MockLdap) CreateUser(username string, givenName, email []string) error

func (*MockLdap) CreategroupDn

func (m *MockLdap) CreategroupDn(groupname string) string

func (*MockLdap) DeleteGroup

func (m *MockLdap) DeleteGroup(groupnames []string) error

func (*MockLdap) DeletemembersfromGroup

func (m *MockLdap) DeletemembersfromGroup(groupinfo userinfo.GroupInfo) error

func (*MockLdap) GetAllGroupsManagedBy

func (m *MockLdap) GetAllGroupsManagedBy() ([][]string, error)

func (*MockLdap) GetDescriptionvalue

func (m *MockLdap) GetDescriptionvalue(groupname string) (string, error)

func (*MockLdap) GetEmailofauser

func (m *MockLdap) GetEmailofauser(username string) ([]string, error)

func (*MockLdap) GetEmailofusersingroup

func (m *MockLdap) GetEmailofusersingroup(groupname string) ([]string, error)

func (*MockLdap) GetGroupUsersAndManagers

func (m *MockLdap) GetGroupUsersAndManagers(groupname string) ([]string, []string, string, error)

func (*MockLdap) GetGroupandManagedbyAttributeValue

func (m *MockLdap) GetGroupandManagedbyAttributeValue(groupnames []string) ([][]string, error)

func (*MockLdap) GetGroupsInfoOfUser

func (m *MockLdap) GetGroupsInfoOfUser(groupdn string, username string) ([][]string, error)

func (*MockLdap) GetUserAttributes

func (m *MockLdap) GetUserAttributes(username string) ([]string, []string, error)

func (*MockLdap) GetallGroups

func (m *MockLdap) GetallGroups() ([]string, error)

func (*MockLdap) GetallUsers

func (m *MockLdap) GetallUsers() ([]string, error)

func (*MockLdap) GetgroupsofUser

func (m *MockLdap) GetgroupsofUser(username string) ([]string, error)

func (*MockLdap) GetmaximumGidnumber

func (m *MockLdap) GetmaximumGidnumber(s string) (string, error)

func (*MockLdap) GetmaximumUidnumber

func (m *MockLdap) GetmaximumUidnumber(s string) (string, error)

func (*MockLdap) GetusersofaGroup

func (m *MockLdap) GetusersofaGroup(groupname string) ([]string, string, error)

func (*MockLdap) GroupnameExistsornot

func (m *MockLdap) GroupnameExistsornot(groupname string) (bool, string, error)

func (*MockLdap) IsgroupAdminorNot

func (m *MockLdap) IsgroupAdminorNot(username string, groupname string) (bool, error)

func (*MockLdap) IsgroupmemberorNot

func (m *MockLdap) IsgroupmemberorNot(groupname string, username string) (bool, string, error)

func (*MockLdap) ParseSuperadmins

func (m *MockLdap) ParseSuperadmins() []string

func (*MockLdap) ServiceAccountExistsornot

func (m *MockLdap) ServiceAccountExistsornot(groupname string) (bool, string, error)

func (*MockLdap) UserisadminOrNot

func (m *MockLdap) UserisadminOrNot(username string) bool

func (*MockLdap) UsernameExistsornot

func (m *MockLdap) UsernameExistsornot(username string) (bool, error)

Jump to

Keyboard shortcuts

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