本文整理匯總了Golang中github.com/google/cups-connector/lib.Config.LocalPrintingEnable方法的典型用法代碼示例。如果您正苦於以下問題:Golang Config.LocalPrintingEnable方法的具體用法?Golang Config.LocalPrintingEnable怎麽用?Golang Config.LocalPrintingEnable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/google/cups-connector/lib.Config
的用法示例。
在下文中一共展示了Config.LocalPrintingEnable方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: commonUpdateConfig
//.........這裏部分代碼省略.........
config.XMPPPingTimeout = lib.DefaultConfig.XMPPPingTimeout
}
if _, exists := configMap["gcp_xmpp_ping_interval_default"]; !exists {
dirty = true
fmt.Println("Added gcp_xmpp_ping_interval_default")
config.XMPPPingInterval = lib.DefaultConfig.XMPPPingInterval
}
if _, exists := configMap["gcp_base_url"]; !exists {
dirty = true
fmt.Println("Added gcp_base_url")
config.GCPBaseURL = lib.DefaultConfig.GCPBaseURL
}
if _, exists := configMap["gcp_oauth_client_id"]; !exists {
dirty = true
fmt.Println("Added gcp_oauth_client_id")
config.GCPOAuthClientID = lib.DefaultConfig.GCPOAuthClientID
}
if _, exists := configMap["gcp_oauth_client_secret"]; !exists {
dirty = true
fmt.Println("Added gcp_oauth_client_secret")
config.GCPOAuthClientSecret = lib.DefaultConfig.GCPOAuthClientSecret
}
if _, exists := configMap["gcp_oauth_auth_url"]; !exists {
dirty = true
fmt.Println("Added gcp_oauth_auth_url")
config.GCPOAuthAuthURL = lib.DefaultConfig.GCPOAuthAuthURL
}
if _, exists := configMap["gcp_oauth_token_url"]; !exists {
dirty = true
fmt.Println("Added gcp_oauth_token_url")
config.GCPOAuthTokenURL = lib.DefaultConfig.GCPOAuthTokenURL
}
if _, exists := configMap["gcp_max_concurrent_downloads"]; !exists {
dirty = true
fmt.Println("Added gcp_max_concurrent_downloads")
config.GCPMaxConcurrentDownloads = lib.DefaultConfig.GCPMaxConcurrentDownloads
}
if _, exists := configMap["cups_job_queue_size"]; !exists {
dirty = true
fmt.Println("Added cups_job_queue_size")
config.NativeJobQueueSize = lib.DefaultConfig.NativeJobQueueSize
}
if _, exists := configMap["cups_printer_poll_interval"]; !exists {
dirty = true
fmt.Println("Added cups_printer_poll_interval")
config.NativePrinterPollInterval = lib.DefaultConfig.NativePrinterPollInterval
}
if _, exists := configMap["prefix_job_id_to_job_title"]; !exists {
dirty = true
fmt.Println("Added prefix_job_id_to_job_title")
config.PrefixJobIDToJobTitle = lib.DefaultConfig.PrefixJobIDToJobTitle
}
if _, exists := configMap["display_name_prefix"]; !exists {
dirty = true
fmt.Println("Added display_name_prefix")
config.DisplayNamePrefix = lib.DefaultConfig.DisplayNamePrefix
}
if _, exists := configMap["snmp_enable"]; !exists {
dirty = true
fmt.Println("Added snmp_enable")
config.SNMPEnable = lib.DefaultConfig.SNMPEnable
}
if _, exists := configMap["snmp_community"]; !exists {
dirty = true
fmt.Println("Added snmp_community")
config.SNMPCommunity = lib.DefaultConfig.SNMPCommunity
}
if _, exists := configMap["snmp_max_connections"]; !exists {
dirty = true
fmt.Println("Added snmp_max_connections")
config.SNMPMaxConnections = lib.DefaultConfig.SNMPMaxConnections
}
if _, exists := configMap["printer_blacklist"]; !exists {
dirty = true
fmt.Println("Added printer_blacklist")
config.PrinterBlacklist = lib.DefaultConfig.PrinterBlacklist
}
if _, exists := configMap["local_printing_enable"]; !exists {
dirty = true
fmt.Println("Added local_printing_enable")
config.LocalPrintingEnable = lib.DefaultConfig.LocalPrintingEnable
}
if _, exists := configMap["cloud_printing_enable"]; !exists {
dirty = true
_, robot_token_exists := configMap["robot_refresh_token"]
fmt.Println("Added cloud_printing_enable")
if robot_token_exists {
config.CloudPrintingEnable = true
} else {
config.CloudPrintingEnable = lib.DefaultConfig.CloudPrintingEnable
}
}
if _, exists := configMap["log_level"]; !exists {
dirty = true
fmt.Println("Added log_level")
config.LogLevel = lib.DefaultConfig.LogLevel
}
return dirty
}