Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DoubleStringScalarConfig = actograph.ScalarConfig{ Name: "DoubleString", Description: "Just double the original string", Serialize: func(value interface{}) interface{} { strVal, ok := value.(string) if !ok { panic("value should be string") } return fmt.Sprintf("%s%s", strVal, strVal) }, ParseValue: func(value interface{}) interface{} { stringValue, ok := value.(string) if !ok { panic("value should be in string") } return fmt.Sprintf("%s%s", stringValue, stringValue) }, ParseLiteral: func(valueAST ast.Value) interface{} { if valueAST.GetKind() != "StringValue" { panic("only strings as literal allowed") } val := valueAST.GetValue().(string) return fmt.Sprintf("%s%s", val, val) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.