Documentation
¶
Overview ¶
Package csvpb provides unmarshaling between protocol buffers and RFC 4180.
Package csvpb provides unmarshaling between protocol buffers and RFC 4180.
Index ¶
Constants ¶
const ( NONE = iota BOOL DOUBLE FLOAT INT32 INT64 STRING UINT32 UINT64 )
Variables ¶
This section is empty.
Functions ¶
func Unmarshal ¶
Unmarshal unmarshals a JSON object stream into a protocol buffer. This function is lenient and will decode any options permutations of the related Marshaler.
func UnmarshalNext ¶
UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. This function is lenient and will decode any options permutations of the related Marshaler.
Types ¶
type CSVPBUnmarshaler ¶
type CSVPBUnmarshaler interface {
UnmarshalJSONPB(*Unmarshaler, []byte) error
}
CSVPBUnmarshaler is implemented by protobuf messages that customize the way they are unmarshaled from CSV. Messages that implement this should also implement CSVPBMarshaler so that the custom format can be produced.
type InvalidUnmarshalError ¶
An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer.)
func (*InvalidUnmarshalError) Error ¶
func (e *InvalidUnmarshalError) Error() string
type RawMessage ¶
type RawMessage = []string
type Unmarshaler ¶
type Unmarshaler struct {
// Whether to allow messages to contain unknown fields, as opposed to
// failing to unmarshal.
AllowUnknownFields bool
Header []string
}
Unmarshaler is a configurable object for converting from a CSV representation to a protocol buffer object.
func (*Unmarshaler) Unmarshal ¶
Unmarshal unmarshals a CSV object stream into a protocol buffer. This function is lenient and will decode any options permutations of the related Marshaler.
func (*Unmarshaler) UnmarshalNext ¶
func (u *Unmarshaler) UnmarshalNext(dec *Decoder, pb proto.Message) error
UnmarshalNext unmarshals the next protocol buffer from a CSV. This function is lenient and will decode any options permutations of the related Marshaler.