tlsspecloader

package module
v0.0.0-...-91cb06a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

README

tlsspecloader

Load CSV TLS specs into other languages

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSV

type CSV struct {
	// contains filtered or unexported fields
}

func ReadCSV

func ReadCSV(filename string) (*CSV, error)

func (*CSV) Column

func (c *CSV) Column(i int) []string

func (*CSV) Row

func (c *CSV) Row(i int) []string

type DecFormatter

type DecFormatter struct {
}

func (*DecFormatter) ToUint16

func (*DecFormatter) ToUint16(u string) (uint16, error)

func (*DecFormatter) ToUint16Arr

func (d *DecFormatter) ToUint16Arr(in []string) []uint16

func (*DecFormatter) ToUint8

func (*DecFormatter) ToUint8(u string) (uint8, error)

func (*DecFormatter) ToUint8Arr

func (d *DecFormatter) ToUint8Arr(in []string) []uint8

type Go

type Go struct {
	HexOutput bool
}

func (*Go) EnumUint16

func (g *Go) EnumUint16(value []uint16, label []string) string

func (*Go) EnumUint8

func (g *Go) EnumUint8(value []uint8, label []string) string

func (*Go) MutualMapUint16

func (g *Go) MutualMapUint16(a []uint16, b []string) (aIndexB string, bIndexa string)

func (*Go) MutualMapUint8

func (g *Go) MutualMapUint8(a []uint8, b []string) (aIndexB string, bIndexa string)

type HexFormatter

type HexFormatter struct {
}

HexFormatter is a formatter that converts uint8/uint16 values in hex formatted string to a uint8/uint16 and vice versa.

func (*HexFormatter) DuoToUint16

func (h *HexFormatter) DuoToUint16(u string) (uint16, error)

DuoToUint16 converts a string in the format of "0x0A, 0x0B" to uint16 0x0A0B

func (*HexFormatter) DuoToUint16Arr

func (h *HexFormatter) DuoToUint16Arr(in []string) []uint16

in: ["0x01, 0x02", "0x01, 0x03", ...], a uint16 array represented in uint8 duo strings. out: [0x0102, 0x0103, ...], a uint16 array

func (*HexFormatter) ToUint16

func (*HexFormatter) ToUint16(u string) (uint16, error)

ToUint16 converts a string in the format of "0x0A0B" to uint16 0x0A0B

func (*HexFormatter) ToUint16Arr

func (h *HexFormatter) ToUint16Arr(in []string) []uint16

in: ["0x0102", "0x0103", ...], a uint16 array represented as strings out: [0x0102, 0x0103, ...], a uint16 array

func (*HexFormatter) ToUint8

func (*HexFormatter) ToUint8(u string) (uint8, error)

func (*HexFormatter) ToUint8Arr

func (h *HexFormatter) ToUint8Arr(in []string) []uint8

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL