github.com/minio/console@v1.4.1/pkg/logger/const.go (about) 1 // This file is part of MinIO Console Server 2 // Copyright (c) 2022 MinIO, Inc. 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Affero General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Affero General Public License for more details. 13 // 14 // You should have received a copy of the GNU Affero General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17 package logger 18 19 import ( 20 "context" 21 22 "github.com/minio/console/pkg/logger/target/http" 23 ) 24 25 // Audit/Logger constants 26 const ( 27 EnvLoggerJSONEnable = "CONSOLE_LOGGER_JSON_ENABLE" 28 EnvLoggerAnonymousEnable = "CONSOLE_LOGGER_ANONYMOUS_ENABLE" 29 EnvLoggerQuietEnable = "CONSOLE_LOGGER_QUIET_ENABLE" 30 31 EnvGlobalDeploymentID = "CONSOLE_GLOBAL_DEPLOYMENT_ID" 32 EnvLoggerWebhookEnable = "CONSOLE_LOGGER_WEBHOOK_ENABLE" 33 EnvLoggerWebhookEndpoint = "CONSOLE_LOGGER_WEBHOOK_ENDPOINT" 34 EnvLoggerWebhookAuthToken = "CONSOLE_LOGGER_WEBHOOK_AUTH_TOKEN" 35 EnvLoggerWebhookClientCert = "CONSOLE_LOGGER_WEBHOOK_CLIENT_CERT" 36 EnvLoggerWebhookClientKey = "CONSOLE_LOGGER_WEBHOOK_CLIENT_KEY" 37 EnvLoggerWebhookQueueSize = "CONSOLE_LOGGER_WEBHOOK_QUEUE_SIZE" 38 39 EnvAuditWebhookEnable = "CONSOLE_AUDIT_WEBHOOK_ENABLE" 40 EnvAuditWebhookEndpoint = "CONSOLE_AUDIT_WEBHOOK_ENDPOINT" 41 EnvAuditWebhookAuthToken = "CONSOLE_AUDIT_WEBHOOK_AUTH_TOKEN" 42 EnvAuditWebhookClientCert = "CONSOLE_AUDIT_WEBHOOK_CLIENT_CERT" 43 EnvAuditWebhookClientKey = "CONSOLE_AUDIT_WEBHOOK_CLIENT_KEY" 44 EnvAuditWebhookQueueSize = "CONSOLE_AUDIT_WEBHOOK_QUEUE_SIZE" 45 ) 46 47 // Config console and http logger targets 48 type Config struct { 49 HTTP map[string]http.Config `json:"http"` 50 AuditWebhook map[string]http.Config `json:"audit"` 51 } 52 53 var ( 54 globalDeploymentID string 55 GlobalContext context.Context 56 )