MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / ToConfigStruct

Method ToConfigStruct

fs/contube/contube.go:71–81  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

69}
70
71func (c ConfigMap) ToConfigStruct(v any) error {
72 jsonData, err := json.Marshal(c)
73 if err != nil {
74 return err
75 }
76 if err := json.Unmarshal(jsonData, v); err != nil {
77 return err
78 }
79 validate := validator.New()
80 return validate.Struct(v)
81}
82
83func ToConfigMap(v any) (ConfigMap, error) {
84 jsonData, err := json.Marshal(v)

Callers 5

NewSourceTubeMethod · 0.80
NewSinkTubeMethod · 0.80
NewSourceTubeMethod · 0.80
NewSourceTubeMethod · 0.80
NewSinkTubeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected