kubernetes/vendor/github.com/fxamacker/cbor/v2/diagnose.go

type DiagMode

type ByteStringEncoding

const ByteStringBase16Encoding

const ByteStringBase32Encoding

const ByteStringBase32HexEncoding

const ByteStringBase64Encoding

const maxByteStringEncoding

func (bse ByteStringEncoding) valid() error {}

type DiagOptions

// DiagMode returns a DiagMode with immutable options.
func (opts DiagOptions) DiagMode() (DiagMode, error) {}

func (opts DiagOptions) diagMode() (*diagMode, error) {}

type diagMode

// DiagOptions returns user specified options used to create this DiagMode.
func (dm *diagMode) DiagOptions() DiagOptions {}

// Diagnose returns extended diagnostic notation (EDN) of CBOR data items using the DiagMode.
func (dm *diagMode) Diagnose(data []byte) (string, error) {}

// DiagnoseFirst returns extended diagnostic notation (EDN) of the first CBOR data item using the DiagMode. Any remaining bytes are returned in rest.
func (dm *diagMode) DiagnoseFirst(data []byte) (diagNotation string, rest []byte, err error) {}

var (
	defaultDiagMode
	_
)

// Diagnose returns extended diagnostic notation (EDN) of CBOR data items
// using the default diagnostic mode.
//
// Refer to https://www.rfc-editor.org/rfc/rfc8949.html#name-diagnostic-notation.
func Diagnose(data []byte) (string, error) {}

// Diagnose returns extended diagnostic notation (EDN) of the first CBOR data item using the DiagMode. Any remaining bytes are returned in rest.
func DiagnoseFirst(data []byte) (diagNotation string, rest []byte, err error) {}

type diagnose

func newDiagnose(data []byte, decm *decMode, diagm *diagMode) *diagnose {}

func (di *diagnose) diag(cborSequence bool) (string, error) {}

func (di *diagnose) diagFirst() (diagNotation string, rest []byte, err error) {}

func (di *diagnose) wellformed(allowExtraData bool) error {}

func (di *diagnose) item() error {}

// writeU16 format a rune as "\uxxxx"
func (di *diagnose) writeU16(val rune) {}

var rawBase32Encoding

var rawBase32HexEncoding

func (di *diagnose) encodeByteString(val []byte) error {}

const utf16SurrSelf

// quote should be either `'` or `"`
func (di *diagnose) encodeTextString(val string, quote byte) error {}

func (di *diagnose) encodeFloat(ai byte, val uint64) error {}