Avec un parser soap un peu plus modulaire et un debut de ControlHandler sur les services qui fait des choses
This commit is contained in:
@@ -3,6 +3,7 @@ package statevariables
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"reflect"
|
||||
@@ -88,6 +89,17 @@ func (instance *StateVarInstance) AllowedValues() []interface{} {
|
||||
return instance.allowedValues
|
||||
}
|
||||
|
||||
func (instance *StateVarInstance) HasParser() bool {
|
||||
return instance.parse != nil
|
||||
}
|
||||
|
||||
func (instance *StateVarInstance) ParseValue(value string) (interface{}, error) {
|
||||
if instance.parse == nil {
|
||||
return value, errors.New("Not parsed value")
|
||||
}
|
||||
return instance.parse(value)
|
||||
}
|
||||
|
||||
// IsValueInRange checks if a value falls within the defined range.
|
||||
// Always returns true if no range is set.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user