Documentation ¶
Index ¶
- Constants
- Variables
- func AgentGet() *gorequest.SuperAgent
- func CookieClean()
- func CookieFilter(cookies []*http.Cookie, filter string) (string, error)
- func CookieLoad() (string, error)
- func CookieSave(beegosessionID string) error
- func Delete(targetURL string)
- func Get(targetURL string)
- func GetStruct(targetURL string, st interface{})
- func Head(targetURL string)
- func Multipart(targetURL string, files ...string)
- func Post(targetURL string, body string)
- func Put(targetURL string, body string)
- func ReadPasswordFromTerm() (string, error)
- func URLGen(uri string) string
- type Beegocookie
- type SysConfig
Constants ¶
View Source
const Logo = `` /* 442-byte string literal not displayed */
View Source
const Mark = `+----------------------+------------------------------------------+`
Variables ¶
View Source
var ( UTCBuildTime = "unknown" ClientVersion = "unknown" GoVersion = "unknown" GitBranch = "unknown" GitTag = "unknown" GitHash = "unknown" )
These variables are populated via the Go linker.
Functions ¶
func AgentGet ¶
func AgentGet() *gorequest.SuperAgent
func CookieClean ¶
func CookieClean()
CookieClean removes .cookie.yaml file entirely.
This function is called only in stage of logout.
func CookieFilter ¶
CookieFilter filters specific cookie string.
func CookieLoad ¶
CookieLoad loads beegosessionID from .cookie.yaml.
func CookieSave ¶
CookieSave saves beegosessionID into .cookie.yaml .
This function is called only in stage of login, and will reset the content of .cookie.yaml no matter whether it exists or not.
func ReadPasswordFromTerm ¶
ReadPasswordFromTerm gets user password from stdin without showing on screen
Types ¶
type SysConfig ¶
type SysConfig struct { AuthMode string `yaml:"auth_mode" json:"auth_mode"` EmailFrom string `yaml:"email_from" json:"email_from"` EmailHost string `yaml:"email_host" json:"email_host"` EmailPort int `yaml:"email_port" json:"email_port"` EmailIdentity string `yaml:"email_identity" json:"email_identity"` EmailUsername string `yaml:"email_username" json:"email_username"` EmailSsl bool `yaml:"email_ssl" json:"email_ssl"` EmailInsecure bool `yaml:"email_insecure" json:"email_insecure"` LdapURL string `yaml:"ldap_url" json:"ldap_url"` LdapBaseDN string `yaml:"ldap_base_dn" json:"ldap_base_dn"` LdapFilter string `yaml:"ldap_filter" json:"ldap_filter"` LdapScope int `yaml:"ldap_scope" json:"ldap_scope"` LdapUID string `yaml:"ldap_uid" jsonb:"ldap_uid"` LdapSearchDN string `yaml:"ldap_search_dn" json:"ldap_search_dn"` LdapTimeout int `yaml:"ldap_timeout" json:"ldap_timeout"` ProjectCreationRestriction string `yaml:"project_creation_restriction" json:"project_creation_restriction"` SelfRegistration bool `yaml:"self_registration" json:"self_registration"` TokenExpiration int `yaml:"token_expiration" json:"token_expiration"` VerifyRemoteCert bool `yaml:"verify_remote_cert" json:"verify_remote_cert"` ScanAllPolicy struct { Type string `yaml:"type" json:"type"` Parameter struct { DailyTime int `yaml:"daily_time" json:"daily_time"` } `yaml:"parameter" json:"parameter"` } `yaml:"scan_all_policy" json:"scan_all_policy"` }
SysConfig defines system configurations
func SysConfigLoad ¶
SysConfigLoad loads system configuration from conf/config.yaml.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.