Documentation ¶
Index ¶
- Constants
- Variables
- func CamelCase(s string) string
- func CamelUpper(s string) string
- func PackageFromName(pkgname string) (*packages.Package, error)
- func PackageToCorpus(pkg *packages.Package, descr PkgDescription, outdir string) error
- func PackageToFuzzTarget(pkg *packages.Package, descr PkgDescription, w io.StringWriter, outdir string, ...) error
- func PackageToFuzzer(pkgname string, outdir string, exclude string, limits string) error
- func PackageToProtobuf(pkg *packages.Package, descr PkgDescription, w io.StringWriter, outdir string) error
- func TitleCase(s string) string
- type PkgDescription
- type PkgFuncArg
- type PkgFuncArgClass
- type PkgFuncResult
- type PkgFunction
- type PkgType
Constants ¶
View Source
const FNG_DSTSRC_DST = 1
View Source
const FNG_DSTSRC_SRC = 2
View Source
const FNG_TYPE_ARG uint8 = 2
View Source
const FNG_TYPE_CONST uint8 = 4
has some defined constants
View Source
const FNG_TYPE_RESULT uint8 = 1
Flags
View Source
const FNG_TYPE_STRUCTEXP uint8 = 8
struct with exported fields (which can be built without a function)
Variables ¶
View Source
var ProtoGenerated = map[string]string{
"io.RuneReader": "string",
"io.ReaderAt": "bytes",
"io.Reader": "bytes",
"io.Writer": "bytes",
"bufio.Reader": "bytes",
"big.Int": "bytes",
"net.Conn": "bytes",
"int": "int64",
"rune": "string",
"byte": "uint32",
"uint": "uint32",
"uint8": "uint32",
"uint16": "uint32",
"[]int": "repeated int64",
"[]uint16": "repeated int64",
}
View Source
var ProtoGenerators = map[string]string{
"io.RuneReader": "strings.NewReader",
"io.ReaderAt": "bytes.NewReader",
"io.Reader": "bytes.NewReader",
"io.Writer": "bytes.NewBuffer",
"bufio.Reader": "CreateBufioReader",
"big.Int": "CreateBigInt",
"net.Conn": "CreateFuzzingConn",
"int": "int",
"rune": "GetRune",
"byte": "byte",
"uint": "uint",
"uint8": "uint8",
"uint16": "uint16",
"[]int": "ConvertIntArray",
"[]uint16": "ConvertUint16Array",
}
Functions ¶
func CamelUpper ¶
func PackageToCorpus ¶
func PackageToCorpus(pkg *packages.Package, descr PkgDescription, outdir string) error
func PackageToFuzzTarget ¶
func PackageToFuzzTarget(pkg *packages.Package, descr PkgDescription, w io.StringWriter, outdir string, limits string) error
func PackageToFuzzer ¶
func PackageToProtobuf ¶
func PackageToProtobuf(pkg *packages.Package, descr PkgDescription, w io.StringWriter, outdir string) error
Types ¶
type PkgDescription ¶
type PkgDescription struct { Functions []PkgFunction Types []PkgType }
func PackageToProtobufMessagesDescription ¶
func PackageToProtobufMessagesDescription(pkg *packages.Package, exclude string) (PkgDescription, error)
type PkgFuncArg ¶
type PkgFuncArg struct { Name string FieldType string Proto PkgFuncArgClass Prefix string Suffix string }
type PkgFuncArgClass ¶
type PkgFuncArgClass uint8
const ( PkgFuncArgClassProto PkgFuncArgClass = 0 PkgFuncArgClassUnhandled PkgFuncArgClass = 1 PkgFuncArgClassPkgGen PkgFuncArgClass = 2 PkgFuncArgClassProtoGen PkgFuncArgClass = 3 PkgFuncArgClassPkgConst PkgFuncArgClass = 4 PkgFuncArgClassUnknown PkgFuncArgClass = 5 PkgFuncArgClassPkgGenA PkgFuncArgClass = 6 PkgFuncArgClassPkgStruct PkgFuncArgClass = 7 )
func GolangArgumentClassName ¶
func GolangArgumentClassName(e ast.Expr) (PkgFuncArgClass, string)
type PkgFuncResult ¶
type PkgFunction ¶
type PkgFunction struct { Name string Recv string Suffix string Args []PkgFuncArg Returns []PkgFuncResult SrcDst uint8 }
type PkgType ¶
type PkgType struct { Name string Values []string Args []PkgFuncArg }
Click to show internal directories.
Click to hide internal directories.