kitebuilder

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedFileType  = errors.New("Unsupported filetype. Only supported extensions: txt, json, kite")
	ErrSameTypeNoConversion = errors.New("input and output filetype the same. no conversion performed")
)

Functions

func Compile

func Compile(ctx context.Context, r io.Reader, outputFile string, opts ...ScanOption) error

func CompileFile

func CompileFile(ctx context.Context, input string, outputFile string, opts ...ScanOption) error

func ConvertFiles

func ConvertFiles(ctx context.Context, input string, output string) error

func DebugPrintBytes

func DebugPrintBytes(data []byte) error

func DebugPrintReader

func DebugPrintReader(ctx context.Context, r io.Reader, opts ...ScanOption) error

func PrintBytes

func PrintBytes(data []byte) error

func Replay

func Replay(ctx context.Context, kitefile string, kuid string, method string, path string, host string, proxy string) error

func ScanFile

func ScanFile(ctx context.Context, filename string, opts ...ScanOption) error

func ScanStdin

func ScanStdin(ctx context.Context, opts ...ScanOption) error

Types

type FileType

type FileType int
const (
	UNKNOWN FileType = iota
	TXT
	JSON
	KITE
)

func FileTypeFromExtension

func FileTypeFromExtension(filename string) (FileType, error)

func (FileType) String

func (i FileType) String() string

type ScanOption

type ScanOption func(o *ScanOptions)

func Debug

func Debug(enabled bool) ScanOption

type ScanOptions

type ScanOptions struct {
	Debug bool
}

func NewDefaultScanOptions

func NewDefaultScanOptions() *ScanOptions

Jump to

Keyboard shortcuts

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