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 ¶
func EncodeBase64 ¶
Types ¶
type CustomEncoderFunc ¶
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 ¶
func WithBytesEncoding(bytesEncoding string) MarshallerOption
func WithoutUnknownFields ¶
func WithoutUnknownFields() MarshallerOption
Click to show internal directories.
Click to hide internal directories.