mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 21:45:26 +00:00
33 lines
627 B
Go
33 lines
627 B
Go
|
|
package postgres
|
||
|
|
|
||
|
|
import (
|
||
|
|
lib_postgres "github.com/projectdiscovery/nuclei/v2/pkg/js/libs/postgres"
|
||
|
|
|
||
|
|
"github.com/dop251/goja"
|
||
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/js/gojs"
|
||
|
|
)
|
||
|
|
|
||
|
|
var (
|
||
|
|
module = gojs.NewGojaModule("nuclei/postgres")
|
||
|
|
)
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
module.Set(
|
||
|
|
gojs.Objects{
|
||
|
|
// Functions
|
||
|
|
|
||
|
|
// Var and consts
|
||
|
|
|
||
|
|
// Types (value type)
|
||
|
|
"PGClient": func() lib_postgres.PGClient { return lib_postgres.PGClient{} },
|
||
|
|
|
||
|
|
// Types (pointer type)
|
||
|
|
"NewPGClient": func() *lib_postgres.PGClient { return &lib_postgres.PGClient{} },
|
||
|
|
},
|
||
|
|
).Register()
|
||
|
|
}
|
||
|
|
|
||
|
|
func Enable(runtime *goja.Runtime) {
|
||
|
|
module.Enable(runtime)
|
||
|
|
}
|