property

package
v0.0.0-...-49281bb Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdate

func CreateOrUpdate(DB *gorm.DB, name string, m map[string]interface{}) error

func GetLdapApiFromDB

func GetLdapApiFromDB(DB *gorm.DB) (*ldap.LDAP, error)

func GetProperty

func GetProperty(DB *gorm.DB, name string) (map[string]interface{}, error)

Types

type AliYun

type AliYun struct {
	Token string `json:"token"`
	Host  string `json:"host"`
}

type Email

type Email struct {
	Token string `json:"token"`
	Host  string `json:"host"`
}

type Gitlab

type Gitlab struct {
	Token string `json:"token"`
	Host  string `json:"host"`
}

type IProperty

type IProperty interface {
	Query(c *gin.Context)
	Create(c *gin.Context)
	Update(c *gin.Context)
	Delete(c *gin.Context)
	QueryLDAP(c *gin.Context)
	CreateOrUpdateLDAP(c *gin.Context)
	CheckLDAPConnect(c *gin.Context)
	QueryEmail(c *gin.Context)
	CreateOrUpdateEmail(c *gin.Context)
	QueryAliYun(c *gin.Context)
	CreateOrUpdateAliYun(c *gin.Context)
	QueryGitlab(c *gin.Context)
	CreateOrUpdateGitlab(c *gin.Context)
	QueryJenkins(c *gin.Context)
	CreateOrUpdateJenkins(c *gin.Context)
}

func NewService

func NewService(DB *gorm.DB) IProperty

type Jenkins

type Jenkins struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Host     string `json:"host"`
}

func GetJenkins

func GetJenkins(DB *gorm.DB) (Jenkins, error)

type LDAP

type LDAP struct {
	Enable    string `json:"enable"` // "true" or "false"
	Addr      string `json:"addr"`
	TLS       string `json:"tls"`
	ManagerDN string `json:"username"`
	Password  string `json:"password"`
	BaseDN    string `json:"base_dn"`
	Filter    string `json:"filter"`
}

type LDAPCheckUser

type LDAPCheckUser struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Property

type Property struct {
	DB *gorm.DB
}

func (Property) CheckLDAPConnect

func (r Property) CheckLDAPConnect(c *gin.Context)

func (Property) Create

func (r Property) Create(c *gin.Context)

func (Property) CreateOrUpdateAliYun

func (r Property) CreateOrUpdateAliYun(c *gin.Context)

func (Property) CreateOrUpdateEmail

func (r Property) CreateOrUpdateEmail(c *gin.Context)

func (Property) CreateOrUpdateGitlab

func (r Property) CreateOrUpdateGitlab(c *gin.Context)

func (Property) CreateOrUpdateJenkins

func (r Property) CreateOrUpdateJenkins(c *gin.Context)

func (Property) CreateOrUpdateLDAP

func (r Property) CreateOrUpdateLDAP(c *gin.Context)

func (Property) Delete

func (r Property) Delete(c *gin.Context)

func (Property) Query

func (r Property) Query(c *gin.Context)

func (Property) QueryAliYun

func (r Property) QueryAliYun(c *gin.Context)

func (Property) QueryEmail

func (r Property) QueryEmail(c *gin.Context)

func (Property) QueryGitlab

func (r Property) QueryGitlab(c *gin.Context)

func (Property) QueryJenkins

func (r Property) QueryJenkins(c *gin.Context)

func (Property) QueryLDAP

func (r Property) QueryLDAP(c *gin.Context)

func (Property) Update

func (r Property) Update(c *gin.Context)

type Role

type Role struct {
	ID   uint   `json:"id"`
	Name string `gorm:"column:name;" json:"name"`
}

Jump to

Keyboard shortcuts

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