kit

package
v0.0.0-...-56ff150 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 14 Imported by: 11

Documentation

Index

Constants

View Source
const Letter = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

Variables

This section is empty.

Functions

func CreateConfig

func CreateConfig(cluster common.ClusterDB, kubeconfig string) error

func DeleteConfig

func DeleteConfig(kubeconfig string) error

func DeleteItemForList

func DeleteItemForList(item string, list []string) []string

func EnhanceGin

func EnhanceGin(g *gin.Engine) *gin.Engine

func IsExist

func IsExist(kubconfig string) bool

func JsonToJson

func JsonToJson(context []byte) ([]byte, string, error)

为了获取部署的kind

func RandString

func RandString(count int) string

func UUID

func UUID(prefix string) string

func YamlToJson

func YamlToJson(context string) ([]byte, string, error)

Types

type Controller

type Controller struct {
	Kind string `json:"kind"`
}

type LDAPClient

type LDAPClient struct {
	URL                string
	Attributes         []string
	Base               string
	BindDN             string
	BindPassword       string
	GroupFilter        string
	ServerName         string
	UserFilter         string
	Conn               *ldap.Conn
	InsecureSkipVerify bool
	UseTLS             bool
	SkipTLSVerify      bool
	ClientCertificates []tls.Certificate
}

func LdapLookup

func LdapLookup(url, bindDN, bindPassword, baseDN, userFilter string, tls bool) *LDAPClient

func (*LDAPClient) Authenticate

func (lc *LDAPClient) Authenticate(username, password string) (bool, map[string]string, error)

认证

func (*LDAPClient) Close

func (lc *LDAPClient) Close()

关闭连接

func (*LDAPClient) Connect

func (lc *LDAPClient) Connect() error

连接LDAP服务

func (*LDAPClient) GetUser

func (lc *LDAPClient) GetUser(username string) (map[string]string, error)

GetGroupsOfUser returns the group for a user.

Jump to

Keyboard shortcuts

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