-
Notifications
You must be signed in to change notification settings - Fork 500
/
main.go
38 lines (34 loc) · 1.14 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"context"
"fmt"
"os"
"github.com/cloudquery/cloudquery/plugins/destination/snowflake/client"
internalPlugin "github.com/cloudquery/cloudquery/plugins/destination/snowflake/resources/plugin"
"github.com/cloudquery/plugin-sdk/v4/plugin"
"github.com/cloudquery/plugin-sdk/v4/serve"
)
const (
sentryDSN = "https://6640bc34f8d34a3d816f53d396fe997e@o1396617.ingest.sentry.io/4504208023224320"
)
func main() {
p := plugin.NewPlugin(
internalPlugin.Name,
internalPlugin.Version,
client.New,
plugin.WithBuildTargets([]plugin.BuildTarget{
{OS: plugin.GoOSLinux, Arch: plugin.GoArchAmd64},
{OS: plugin.GoOSLinux, Arch: plugin.GoArchArm64},
{OS: plugin.GoOSWindows, Arch: plugin.GoArchAmd64, CGO: true},
{OS: plugin.GoOSDarwin, Arch: plugin.GoArchAmd64},
{OS: plugin.GoOSDarwin, Arch: plugin.GoArchArm64},
}),
plugin.WithKind(internalPlugin.Kind),
plugin.WithTeam(internalPlugin.Team),
plugin.WithJSONSchema(client.JSONSchema),
)
if err := serve.Plugin(p, serve.WithPluginSentryDSN(sentryDSN), serve.WithDestinationV0V1Server()).Serve(context.Background()); err != nil {
fmt.Println(err)
os.Exit(1)
}
}