Files
kubesphere/pkg/simple/client/ldap/interface.go
hongming aa05c2baf4 update
Signed-off-by: hongming <talonwan@yunify.com>
2020-03-22 23:17:43 +08:00

22 lines
681 B
Go

package ldap
import "kubesphere.io/kubesphere/pkg/api/iam"
// Interface defines CRUD behaviors of manipulating users
type Interface interface {
// Create create a new user in ldap
Create(user *iam.User) error
// Update updates a user information, return error if user not exists
Update(user *iam.User) error
// Delete deletes a user from ldap, return nil if user not exists
Delete(name string) error
// Get gets a user by its username from ldap, return ErrUserNotExists if user not exists
Get(name string) (*iam.User, error)
// Authenticate checks if (name, password) is valid, return ErrInvalidCredentials if not
Authenticate(name string, password string) error
}