diff --git a/config/boolean.go b/config/boolean.go new file mode 100644 index 0000000..35882c1 --- /dev/null +++ b/config/boolean.go @@ -0,0 +1,9 @@ +package config + +type BooleanValue struct { + Name string + Value bool +} + +func (this BooleanValue) GetType() ConfigType { return BOOLEAN } +func (this BooleanValue) GetValue() interface{} { return this.Value } diff --git a/config/config.go b/config/config.go index e3e5d83..e5fdc3e 100644 --- a/config/config.go +++ b/config/config.go @@ -37,43 +37,3 @@ type ConfigValue interface { GetType() ConfigType GetValue() interface{} } - -type BooleanValue struct { - Name string - Value bool -} - -func (this BooleanValue) GetType() ConfigType { return BOOLEAN } -func (this BooleanValue) GetValue() interface{} { return this.Value } - -type NullValue struct { - Name string - Value interface{} -} - -func (this NullValue) GetType() ConfigType { return NULL } -func (this NullValue) GetValue() interface{} { return nil } - -type IntegerValue struct { - Name string - Value int64 -} - -func (this IntegerValue) GetType() ConfigType { return INTEGER } -func (this IntegerValue) GetValue() interface{} { return this.Value } - -type FloatValue struct { - Name string - Value float64 -} - -func (this FloatValue) GetType() ConfigType { return INTEGER } -func (this FloatValue) GetValue() interface{} { return this.Value } - -type StringValue struct { - Name string - Value string -} - -func (this StringValue) GetType() ConfigType { return STRING } -func (this StringValue) GetValue() interface{} { return this.Value } diff --git a/config/float.go b/config/float.go new file mode 100644 index 0000000..df29db5 --- /dev/null +++ b/config/float.go @@ -0,0 +1,9 @@ +package config + +type FloatValue struct { + Name string + Value float64 +} + +func (this FloatValue) GetType() ConfigType { return INTEGER } +func (this FloatValue) GetValue() interface{} { return this.Value } diff --git a/config/integer.go b/config/integer.go new file mode 100644 index 0000000..f39f8ee --- /dev/null +++ b/config/integer.go @@ -0,0 +1,9 @@ +package configTypes + +type IntegerValue struct { + Name string + Value int64 +} + +func (this IntegerValue) GetType() ConfigType { return INTEGER } +func (this IntegerValue) GetValue() interface{} { return this.Value } diff --git a/config/null.go b/config/null.go new file mode 100644 index 0000000..72dc7dc --- /dev/null +++ b/config/null.go @@ -0,0 +1,9 @@ +package configTypes + +type NullValue struct { + Name string + Value interface{} +} + +func (this NullValue) GetType() ConfigType { return NULL } +func (this NullValue) GetValue() interface{} { return nil } diff --git a/config/string.go b/config/string.go new file mode 100644 index 0000000..db0bcaa --- /dev/null +++ b/config/string.go @@ -0,0 +1,9 @@ +package configTypes + +type StringValue struct { + Name string + Value string +} + +func (this StringValue) GetType() ConfigType { return STRING } +func (this StringValue) GetValue() interface{} { return this.Value }