Documentation ¶
Overview ¶
config package for ras.
Index ¶
- Constants
- Variables
- func GetAuthKeyFile() string
- func GetDBHost() string
- func GetDBName() string
- func GetDBPassword() string
- func GetDBPort() int
- func GetDBUser() string
- func GetDigestAlgorithm() string
- func GetExtractRules() typdefs.ExtractRules
- func GetHBDuration() time.Duration
- func GetHttpsKeyCert() *x509.Certificate
- func GetHttpsKeyCertFile() string
- func GetHttpsPort() string
- func GetHttpsPrivateKey() crypto.PrivateKey
- func GetHttpsPrivateKeyFile() string
- func GetHttpsSwitch() bool
- func GetIP() string
- func GetIsAllUpdate() *bool
- func GetLogFile() string
- func GetLoggerMode() *bool
- func GetMgrStrategy() string
- func GetOnlineDuration() time.Duration
- func GetPcaKeyCert() *x509.Certificate
- func GetPcaPrivateKey() crypto.PrivateKey
- func GetRestPort() string
- func GetRimRootCert() *x509.Certificate
- func GetRootKeyCert() *x509.Certificate
- func GetRootPrivateKey() crypto.PrivateKey
- func GetServerPort() string
- func GetTaInputs() map[string]typdefs.TaReportInput
- func GetTaVerifyType() int
- func GetTestMode() bool
- func GetTrustDuration() time.Duration
- func HandleFlags()
- func InitFlags()
- func LoadConfigs()
- func SaveConfigs()
- func SetAuthKeyFile(filename string)
- func SetDBHost(host string)
- func SetDBName(dbName string)
- func SetDBPassword(password string)
- func SetDBPort(port int)
- func SetDBUser(user string)
- func SetDigestAlgorithm(s string)
- func SetExtractRules(val string)
- func SetHBDuration(v time.Duration)
- func SetHttpsPort(s string)
- func SetHttpsSwitch(p string)
- func SetIsAllUpdate(b bool)
- func SetLoggerMode(testMode bool)
- func SetMgrStrategy(s string)
- func SetOnlineDuration(v time.Duration)
- func SetRestPort(s string)
- func SetServerPort(s string)
- func SetTaVerifyType(vtype int)
- func SetTestMode(m bool)
- func SetTrustDuration(v time.Duration)
Constants ¶
const ( // RasVersion means ras version RasVersion = "2.0.2" // AutoStrategy means mgr strategy is auto AutoStrategy = "auto" // ManualStrategy means mgr strategy is manual ManualStrategy = "manual" )
Variables ¶
var ( // VersionFlag means version flag VersionFlag *bool = nil // TokenFlag means token flag TokenFlag *bool = nil )
Functions ¶
func GetAuthKeyFile ¶
func GetAuthKeyFile() string
GetAuthKeyFile returns the auth token key configuration.
func GetDBPassword ¶
func GetDBPassword() string
GetDBPassword returns the database user password configuration.
func GetDigestAlgorithm ¶
func GetDigestAlgorithm() string
GetDigestAlgorithm returns digest algorithm configuration.
func GetExtractRules ¶
func GetExtractRules() typdefs.ExtractRules
GetExtractRules returns the ras extract rules configuration.
func GetHBDuration ¶
GetHBDuration returns heart beat duration configuration.
func GetHttpsKeyCert ¶
func GetHttpsKeyCert() *x509.Certificate
GetHttpsKeyCert returns the https key certificate configuration.
func GetHttpsKeyCertFile ¶
func GetHttpsKeyCertFile() string
GetHttpsKeyCertFile returns the HttpsKeyCertFile configuration.
func GetHttpsPort ¶
func GetHttpsPort() string
GetHttpsPort returns the ras restful api interface ip:port configuration.
func GetHttpsPrivateKey ¶
func GetHttpsPrivateKey() crypto.PrivateKey
GetHttpsPrivateKey returns the https private key configuration.
func GetHttpsPrivateKeyFile ¶
func GetHttpsPrivateKeyFile() string
GetHttpsPrivateKeyFile returns the HttpsPrivateKeyFile configuration.
func GetHttpsSwitch ¶
func GetHttpsSwitch() bool
GetHttpsSwitch returns the ras restful api interface protocol(http or https) configuration.
func GetIsAllUpdate ¶
func GetIsAllUpdate() *bool
GetIsAllUpdate returns the ras isallupdate configuration.
func GetMgrStrategy ¶
func GetMgrStrategy() string
GetMgrStrategy returns the ras mgrStrategy configuration.
func GetOnlineDuration ¶
GetOnlineDuration returns client online expire duration configuration.
func GetPcaKeyCert ¶
func GetPcaKeyCert() *x509.Certificate
GetPcaKeyCert returns the pca key certificate configuration.
func GetPcaPrivateKey ¶
func GetPcaPrivateKey() crypto.PrivateKey
GetPcaPrivateKey returns the pca private key configuration.
func GetRestPort ¶
func GetRestPort() string
GetRestPort returns the ras restful api interface ip:port configuration.
func GetRimRootCert ¶
func GetRimRootCert() *x509.Certificate
GetRimRootCert returns the root key certificate configuration for RIM signature check.
func GetRootKeyCert ¶
func GetRootKeyCert() *x509.Certificate
GetRootKeyCert returns the root key certificate configuration.
func GetRootPrivateKey ¶
func GetRootPrivateKey() crypto.PrivateKey
GetRootPrivateKey returns the root private key configuration.
func GetServerPort ¶
func GetServerPort() string
GetServerPort returns the ras service ip:port configuration.
func GetTaInputs ¶
func GetTaInputs() map[string]typdefs.TaReportInput
GetTaInputs return ta inputs.
func GetTaVerifyType ¶
func GetTaVerifyType() int
GetTaVerifyType returns ta verify type configuration.
func GetTrustDuration ¶
GetTrustDuration returns trust report expire duration configuration.
func SaveConfigs ¶
func SaveConfigs()
SaveConfigs saves all config variables to the config.yaml file.
func SetAuthKeyFile ¶
func SetAuthKeyFile(filename string)
SetAuthKeyFile sets the auth token key configuration.
func SetDBPassword ¶
func SetDBPassword(password string)
SetDBPassword sets the database user password configuration.
func SetDigestAlgorithm ¶
func SetDigestAlgorithm(s string)
SetDigestAlgorithm sets digest algorithm configuration.
func SetExtractRules ¶
func SetExtractRules(val string)
SetExtractRules sets the ras extract rules configuration.
func SetHBDuration ¶
SetHBDuration sets heart beat duration configuration.
func SetHttpsPort ¶
func SetHttpsPort(s string)
SetHttpsPort sets the ras restful api interface ip:port configuration.
func SetHttpsSwitch ¶
func SetHttpsSwitch(p string)
SetHttpsSwitch sets the ras restful api interface protocol(http or https) configuration.
func SetIsAllUpdate ¶
func SetIsAllUpdate(b bool)
SetIsAllUpdate sets the ras isallupdate configuration.
func SetLoggerMode ¶
func SetLoggerMode(testMode bool)
SetLoggerMode sets ras log file configuration.
func SetMgrStrategy ¶
func SetMgrStrategy(s string)
SetMgrStrategy sets the ras mgrStrategy configuration.
func SetOnlineDuration ¶
SetOnlineDuration sets client online expire duration configuration.
func SetRestPort ¶
func SetRestPort(s string)
SetRestPort sets the ras restful api interface ip:port configuration.
func SetServerPort ¶
func SetServerPort(s string)
SetServerPort sets the ras service ip:port configuration.
func SetTaVerifyType ¶
func SetTaVerifyType(vtype int)
vtype shuold be 1/2/3 SetTaVerifyType sets ta verify type configuration.
func SetTrustDuration ¶
SetTrustDuration sets trust report expire duration configuration.
Types ¶
This section is empty.