mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-07 15:52:47 +01:00
refactor: remove pocketbase (#1138)
This commit is contained in:
37
app/database/sqlc/db.go
Normal file
37
app/database/sqlc/db.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package sqlc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
type DBTX interface {
|
||||
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
|
||||
PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
|
||||
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
|
||||
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
|
||||
}
|
||||
|
||||
type Queries struct {
|
||||
*ReadQueries
|
||||
*WriteQueries
|
||||
ReadDB *sql.DB
|
||||
WriteDB *sql.DB
|
||||
}
|
||||
|
||||
type ReadQueries struct {
|
||||
db DBTX
|
||||
}
|
||||
|
||||
type WriteQueries struct {
|
||||
db DBTX
|
||||
}
|
||||
|
||||
func New(readDB, writeDB *sql.DB) *Queries {
|
||||
return &Queries{
|
||||
ReadQueries: &ReadQueries{db: readDB},
|
||||
WriteQueries: &WriteQueries{db: writeDB},
|
||||
ReadDB: readDB,
|
||||
WriteDB: writeDB,
|
||||
}
|
||||
}
|
||||
194
app/database/sqlc/models.go
Normal file
194
app/database/sqlc/models.go
Normal file
@@ -0,0 +1,194 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
|
||||
package sqlc
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Comment struct {
|
||||
ID string `json:"id"`
|
||||
Ticket string `json:"ticket"`
|
||||
Author string `json:"author"`
|
||||
Message string `json:"message"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type DashboardCount struct {
|
||||
ID string `json:"id"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
type Feature struct {
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
type File struct {
|
||||
ID string `json:"id"`
|
||||
Ticket string `json:"ticket"`
|
||||
Name string `json:"name"`
|
||||
Blob string `json:"blob"`
|
||||
Size float64 `json:"size"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Permissions string `json:"permissions"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type GroupEffectiveGroup struct {
|
||||
ChildGroupID string `json:"child_group_id"`
|
||||
ParentGroupID string `json:"parent_group_id"`
|
||||
GroupType string `json:"group_type"`
|
||||
}
|
||||
|
||||
type GroupEffectivePermission struct {
|
||||
ParentGroupID string `json:"parent_group_id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type GroupInheritance struct {
|
||||
ParentGroupID string `json:"parent_group_id"`
|
||||
ChildGroupID string `json:"child_group_id"`
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
ID string `json:"id"`
|
||||
Ticket string `json:"ticket"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type Param struct {
|
||||
Key string `json:"key"`
|
||||
Value []byte `json:"value"`
|
||||
}
|
||||
|
||||
type Reaction struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Action string `json:"action"`
|
||||
Actiondata []byte `json:"actiondata"`
|
||||
Trigger string `json:"trigger"`
|
||||
Triggerdata []byte `json:"triggerdata"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type Sidebar struct {
|
||||
ID string `json:"id"`
|
||||
Singular string `json:"singular"`
|
||||
Plural string `json:"plural"`
|
||||
Icon *string `json:"icon"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
type Task struct {
|
||||
ID string `json:"id"`
|
||||
Ticket string `json:"ticket"`
|
||||
Owner *string `json:"owner"`
|
||||
Name string `json:"name"`
|
||||
Open bool `json:"open"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type Ticket struct {
|
||||
ID string `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Owner *string `json:"owner"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Open bool `json:"open"`
|
||||
Resolution *string `json:"resolution"`
|
||||
Schema []byte `json:"schema"`
|
||||
State []byte `json:"state"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type TicketSearch struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Created time.Time `json:"created"`
|
||||
Description string `json:"description"`
|
||||
Open bool `json:"open"`
|
||||
Type string `json:"type"`
|
||||
State []byte `json:"state"`
|
||||
OwnerName *string `json:"owner_name"`
|
||||
CommentMessages string `json:"comment_messages"`
|
||||
FileNames string `json:"file_names"`
|
||||
LinkNames string `json:"link_names"`
|
||||
LinkUrls string `json:"link_urls"`
|
||||
TaskNames string `json:"task_names"`
|
||||
TimelineMessages string `json:"timeline_messages"`
|
||||
}
|
||||
|
||||
type Timeline struct {
|
||||
ID string `json:"id"`
|
||||
Ticket string `json:"ticket"`
|
||||
Message string `json:"message"`
|
||||
Time time.Time `json:"time"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type Type struct {
|
||||
ID string `json:"id"`
|
||||
Icon *string `json:"icon"`
|
||||
Singular string `json:"singular"`
|
||||
Plural string `json:"plural"`
|
||||
Schema []byte `json:"schema"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Passwordhash string `json:"passwordhash"`
|
||||
Tokenkey string `json:"tokenkey"`
|
||||
Active bool `json:"active"`
|
||||
Name *string `json:"name"`
|
||||
Email *string `json:"email"`
|
||||
Avatar *string `json:"avatar"`
|
||||
Lastresetsentat *time.Time `json:"lastresetsentat"`
|
||||
Lastverificationsentat *time.Time `json:"lastverificationsentat"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
type UserEffectiveGroup struct {
|
||||
UserID string `json:"user_id"`
|
||||
GroupID string `json:"group_id"`
|
||||
GroupType string `json:"group_type"`
|
||||
}
|
||||
|
||||
type UserEffectivePermission struct {
|
||||
UserID string `json:"user_id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type UserGroup struct {
|
||||
UserID string `json:"user_id"`
|
||||
GroupID string `json:"group_id"`
|
||||
}
|
||||
|
||||
type Webhook struct {
|
||||
ID string `json:"id"`
|
||||
Collection string `json:"collection"`
|
||||
Destination string `json:"destination"`
|
||||
Name string `json:"name"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
1592
app/database/sqlc/read.sql.go
Normal file
1592
app/database/sqlc/read.sql.go
Normal file
File diff suppressed because it is too large
Load Diff
1479
app/database/sqlc/write.sql.go
Normal file
1479
app/database/sqlc/write.sql.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user