Documentation ¶
Index ¶
- Constants
- func ConfirmMaxSliceSize[T any](t T, maxSize int) error
- func JSONMarshalIndentWithMax[T any](t T, indentSpaces int) ([]byte, error)
- func JSONMarshalWithMax[T any](t T) ([]byte, error)
- func JSONUnmarshalWithMax[T any](b []byte, t *T) error
- func YAMLMarshalWithMax[T any](t T) ([]byte, error)
- func YAMLUnmarshalWithMax[T any](b []byte, t *T) error
- type BinaryMarshaller
- type JSONMarshaller
- type KeyInt
- type KeyString
- type Marshaller
Constants ¶
View Source
const MaxNumberOfObjectsToSerialize = 1000
Arbitrarily choosing 1000 jobs to serialize - this is a pretty high
View Source
const MaxSerializedStringInput = int(10 * datasize.MB)
Variables ¶
This section is empty.
Functions ¶
func ConfirmMaxSliceSize ¶
func JSONMarshalWithMax ¶
func JSONUnmarshalWithMax ¶
func YAMLMarshalWithMax ¶
func YAMLUnmarshalWithMax ¶
Types ¶
type BinaryMarshaller ¶ added in v1.1.2
type BinaryMarshaller struct{}
BinaryMarshaller uses gob encoding for marshaling.
func NewBinaryMarshaller ¶ added in v1.1.2
func NewBinaryMarshaller() *BinaryMarshaller
NewBinaryMarshaller initializes and returns a new BinaryMarshaller.
func (BinaryMarshaller) Marshal ¶ added in v1.1.2
func (BinaryMarshaller) Marshal(obj interface{}) ([]byte, error)
Marshal converts the given object into a gob-encoded byte slice.
func (BinaryMarshaller) Unmarshal ¶ added in v1.1.2
func (BinaryMarshaller) Unmarshal(data []byte, obj interface{}) error
Unmarshal decodes gob data into the given object.
type JSONMarshaller ¶ added in v1.1.2
type JSONMarshaller struct{}
JSONMarshaller uses JSON encoding for marshaling.
func NewJSONMarshaller ¶ added in v1.1.2
func NewJSONMarshaller() *JSONMarshaller
NewJSONMarshaller initializes and returns a new JSONMarshaller.
func (JSONMarshaller) Marshal ¶ added in v1.1.2
func (JSONMarshaller) Marshal(obj interface{}) ([]byte, error)
Marshal converts the given object into a JSON byte slice.
func (JSONMarshaller) Unmarshal ¶ added in v1.1.2
func (JSONMarshaller) Unmarshal(data []byte, obj interface{}) error
Unmarshal decodes JSON data into the given object and normalizes it if applicable.
type Marshaller ¶ added in v1.1.2
type Marshaller interface { // Marshal converts the given object into a byte slice. Marshal(interface{}) ([]byte, error) // Unmarshal decodes data into the given object, and normalizes it if applicable. Unmarshal([]byte, interface{}) error }
Marshaller defines methods for marshaling and unmarshaling data, and normalizing it if applicable.
Click to show internal directories.
Click to hide internal directories.