Documentation ¶
Index ¶
- Constants
- func FlagToEnv(name string) string
- type AsserterParameters
- type LogParameters
- type Parameters
- func (k *Parameters) ListenAndServe(s *http.Server) error
- func (k *Parameters) NewHTTPServer(handler http.Handler) (*http.Server, error)
- func (k *Parameters) Param2Config(storeParamsMap map[string]string) (*cfg.Config, error)
- func (k *Parameters) ParseFlags(defaultEndpoint string, printVersionInfoFun func(), ...)
- func (k *Parameters) ValidateFlags()
- type StrParamDetail
Constants ¶
View Source
const ( DefaultPolicyMgmtEndPoint = "0.0.0.0:6733" DefaultAuthzCheckEndPoint = "0.0.0.0:6734" DefaultInsecure = true DefaultEnableAuthz = false DefaultStoreType = cfg.StorageTypeFile //file DefaultStoreWatchEnabled = true EnvVarPrefix = "SPDL" DefaultAuditLogLevel = "info" DefaultAuditLogFormatter = logging.FORMATTER_JSON DefaultAuditLogFilename = "" // Write audit log to os.Stderr by default DefaultAuditLogMaxSize = "10" // MB DefaultAuditLogMaxAge = "0" // Never remove old files based on age DefaultAuditLogMaxBackups = "5" // maximum number of old log files to retain DefaultAsserterClientTimeout = "5" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AsserterParameters ¶
type AsserterParameters struct { AsserterEndpoint StrParamDetail AsserterClientKeyPath StrParamDetail AsserterCaPath StrParamDetail AsserterClientCertPath StrParamDetail AsserterClientTimeout StrParamDetail }
AsserterParameters asserter webhook configurations
type LogParameters ¶
type LogParameters struct { LogLevel StrParamDetail LogFormatter StrParamDetail LogReportCaller StrParamDetail LogFileName StrParamDetail LogMaxSize StrParamDetail LogMaxAge StrParamDetail LogMaxBackups StrParamDetail LogLocalTime StrParamDetail LogCompress StrParamDetail }
LogParameters is the parameters for log configuration
type Parameters ¶
type Parameters struct { ////////// Common flags ////////// Version bool //////////Server config////////////// ConfigFile StrParamDetail Endpoint StrParamDetail Insecure StrParamDetail EnableAuthz StrParamDetail KeyPath StrParamDetail CertPath StrParamDetail ClientCertPath StrParamDetail ForceClientCert StrParamDetail /////////Store config//////////////// StoreType StrParamDetail StoreWatchEnabled StrParamDetail ////////Log config///////////////////// LogConf LogParameters // normal log configuration AuditLogConf LogParameters // audit log configuration // AsserterParameters asserter webhook configuration AsserterConf AsserterParameters }
Parameters is the parameters for Speedle
func (*Parameters) ListenAndServe ¶
func (k *Parameters) ListenAndServe(s *http.Server) error
func (*Parameters) NewHTTPServer ¶
func (*Parameters) Param2Config ¶
func (*Parameters) ParseFlags ¶
func (k *Parameters) ParseFlags(defaultEndpoint string, printVersionInfoFun func(), storeParamsMap map[string]string)
ParseFlags parses command line arguments
func (*Parameters) ValidateFlags ¶
func (k *Parameters) ValidateFlags()
Click to show internal directories.
Click to hide internal directories.