package dataformat12type Raw struct{}34var (5_ DataFormat = &Raw{}6)78// NewRaw returns a new Raw encoder9func NewRaw() *Raw {10return &Raw{}11}1213// IsType returns true if the data is Raw encoded14func (r *Raw) IsType(data string) bool {15return false16}1718// Encode encodes the data into Raw format19func (r *Raw) Encode(data KV) (string, error) {20return data.Get("value").(string), nil21}2223// Decode decodes the data from Raw format24func (r *Raw) Decode(data string) (KV, error) {25return KVMap(map[string]interface{}{26"value": data,27}), nil28}2930// Name returns the name of the encoder31func (r *Raw) Name() string {32return RawDataFormat33}343536