payload

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderByte

func RenderByte(in byte) string

func RenderBytes

func RenderBytes(in []byte) string

RenderBytes displays an array of bytes in hex with spaces between each byte

func RenderBytesSpan

func RenderBytesSpan(target io.StringWriter, in []byte, class string) io.StringWriter

RenderBytesSpan writes a byte array formatted as hex with a surrounding span. This is useful for highlighting sections of the data.

func RenderTemplate

func RenderTemplate(t string, data interface{}, funcMap template.FuncMap) (string, error)

Types

type General

type General struct {
	Start   int64
	End     int64
	Id      string
	TheData template.HTML
	Text    template.HTML
}

General represents a normal section of the file

func (*General) Class

func (g *General) Class() string

func (*General) Data

func (g *General) Data() template.HTML

func (*General) Description

func (g *General) Description() template.HTML

func (*General) ID

func (g *General) ID() string

func (*General) Offset

func (g *General) Offset() string

type Payload

type Payload struct {
	Title    string
	FileName string
	Sections []Section
}

type Section

type Section interface {
	ID() string
	Class() string
	Offset() string
	Data() template.HTML
	Description() template.HTML
}

Jump to

Keyboard shortcuts

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