micro-codec-jsonpb/options.go
Vasiliy Tolstov 04d65d16e5 change import paths
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-10-25 20:21:10 +03:00

19 lines
419 B
Go

package jsonpb
import (
codec "go.unistack.org/micro/v3/codec"
jsonpb "google.golang.org/protobuf/encoding/protojson"
)
type unmarshalOptionsKey struct{}
func UnmarshalOptions(o jsonpb.UnmarshalOptions) codec.Option {
return codec.SetOption(unmarshalOptionsKey{}, o)
}
type marshalOptionsKey struct{}
func MarshalOptions(o jsonpb.MarshalOptions) codec.Option {
return codec.SetOption(marshalOptionsKey{}, o)
}