Documentation
¶
Index ¶
- Variables
- func Encode(bytesEncoding string, bytes []byte) string
- func EncodeBase58(bytes []byte) string
- func EncodeBase64(bytes []byte) string
- func EncodeHex(bytes []byte) string
- func Encoder(bytesEncoding string) func([]byte) string
- func ToBase58(encoder *jsontext.Encoder, t []byte, options json.Options) error
- func ToBase64(encoder *jsontext.Encoder, t []byte, options json.Options) error
- func ToHex(encoder *jsontext.Encoder, t []byte, options json.Options) error
- type CustomEncoderFunc
- type Marshaller
- type MarshallerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var WithBytesEncoderFunc = withBytesEncoderFunc
Deprecated: Use WithBytesEncoding instead passing the encoding directly.
Functions ¶
func EncodeBase58 ¶ added in v1.6.9
func EncodeBase64 ¶ added in v1.6.9
func Encoder ¶ added in v1.6.9
Encoder returns the encoder function that will converts received bytes into a string of the specified encoding.
Types ¶
type CustomEncoderFunc ¶ added in v1.6.9
type Marshaller ¶
type Marshaller struct {
// contains filtered or unexported fields
}
func NewMarshaller ¶
func NewMarshaller(registry *proto.Registry, options ...MarshallerOption) *Marshaller
func (*Marshaller) Marshal ¶
func (m *Marshaller) Marshal(in any) error
func (*Marshaller) MarshalToString ¶
type MarshallerOption ¶
type MarshallerOption func(*Marshaller)
func WithBytesEncoding ¶ added in v1.6.9
func WithBytesEncoding(bytesEncoding string) MarshallerOption
func WithoutUnknownFields ¶
func WithoutUnknownFields() MarshallerOption
Click to show internal directories.
Click to hide internal directories.