File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ package api
2+
3+ import (
4+ "bytes"
5+ "context"
6+ "fmt"
7+ "path/filepath"
8+ "regexp"
9+ "strconv"
10+ "strings"
11+ "time"
12+
13+ "github.com/sqlc-dev/sqlc/internal/cmd"
14+ )
15+
16+ type Options struct {
17+ Dir string // working directory for relative paths
18+ Filename string
19+ Options * cmd.Options
20+ }
21+
22+ type Diagnostic struct {
23+ File string
24+ Line int
25+ Column int
26+ Severity string // "error" | "warning" | "info"
27+ Message string
28+ Raw string
29+ }
30+
31+ type Report struct {
32+ Stdout string
33+ Stderr string
34+ Diagnostics []Diagnostic
35+ }
36+
37+ func Generate (ctx context.Context , opt Options ) (map [string ]string , error ) {
38+ return cmd .Generate (ctx , opt .Dir , opt .Filename , opt .Options )
39+ }
40+
41+ func Verify (ctx context.Context , opt Options ) error {
42+ return cmd .Verify (ctx , opt .Dir , opt .Filename , opt .Options )
43+ }
You can’t perform that action at this time.
0 commit comments