From ae7d8a8d8c0dcc1d04a898f18a9fa3ccec4f78e2 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 1 Dec 2017 18:31:54 +0900 Subject: [PATCH] ing --- modules/noauthprobe/config/config.go | 12 ++++++++++++ modules/probe/config/config.go | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 modules/noauthprobe/config/config.go create mode 100644 modules/probe/config/config.go diff --git a/modules/noauthprobe/config/config.go b/modules/noauthprobe/config/config.go new file mode 100644 index 0000000..a76f2c8 --- /dev/null +++ b/modules/noauthprobe/config/config.go @@ -0,0 +1,12 @@ +package config + +import "git.loafle.net/overflow/overflow_commons_go/util" + +const ( + NoAuthProbeConfigFileName = "noauthprobe.json" +) + +type NoAuthProbeConfig struct { + TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"` + DenyDate *util.Timestamp `json:"denyDate,omitempty" yaml:"denyDate" toml:"denyDate"` +} diff --git a/modules/probe/config/config.go b/modules/probe/config/config.go new file mode 100644 index 0000000..6f25eb9 --- /dev/null +++ b/modules/probe/config/config.go @@ -0,0 +1,21 @@ +package config + +const ( + ConfigFileName = "config.json" +) + +type Config struct { + Central CentralConfig `json:"central" yaml:"central" toml:"central"` + Probe ProbeConfig `json:"probe" yaml:"probe" toml:"probe"` +} + +type CentralConfig struct { + URL string `required:"true" json:"url" yaml:"url" toml:"url"` + APIKey string `required:"true" json:"apiKey" yaml:"apiKey" toml:"apiKey"` + ReadBufferSize int `default:"8192" json:"readBufferSize" yaml:"readBufferSize" toml:"readBufferSize"` + WriteBufferSize int `default:"8192" json:"writeBufferSize" yaml:"writeBufferSize" toml:"writeBufferSize"` +} + +type ProbeConfig struct { + Key *string `json:"key,omitempty" yaml:"key" toml:"key"` +}