Skip to content

Commit f001fdd

Browse files
committed
incusd/db: Update generated code
Signed-off-by: Lucas Bremgartner <[email protected]>
1 parent 4297b8d commit f001fdd

32 files changed

+471
-502
lines changed

internal/server/db/cluster/certificate_projects.interface.mapper.go

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,23 @@
22

33
package cluster
44

5-
import (
6-
"context"
7-
"database/sql"
8-
)
5+
import "context"
96

107
// CertificateProjectGenerated is an interface of generated methods for CertificateProject.
118
type CertificateProjectGenerated interface {
129
// GetCertificateProjects returns all available Projects for the Certificate.
1310
// generator: certificate_project GetMany
14-
GetCertificateProjects(ctx context.Context, tx *sql.Tx, certificateID int) ([]Project, error)
11+
GetCertificateProjects(ctx context.Context, db dbtx, certificateID int) ([]Project, error)
1512

1613
// DeleteCertificateProjects deletes the certificate_project matching the given key parameters.
1714
// generator: certificate_project DeleteMany
18-
DeleteCertificateProjects(ctx context.Context, tx *sql.Tx, certificateID int) error
15+
DeleteCertificateProjects(ctx context.Context, db dbtx, certificateID int) error
1916

2017
// CreateCertificateProjects adds a new certificate_project to the database.
2118
// generator: certificate_project Create
22-
CreateCertificateProjects(ctx context.Context, tx *sql.Tx, objects []CertificateProject) error
19+
CreateCertificateProjects(ctx context.Context, db dbtx, objects []CertificateProject) error
2320

2421
// UpdateCertificateProjects updates the certificate_project matching the given key parameters.
2522
// generator: certificate_project Update
26-
UpdateCertificateProjects(ctx context.Context, tx *sql.Tx, certificateID int, projectNames []string) error
23+
UpdateCertificateProjects(ctx context.Context, db dbtx, certificateID int, projectNames []string) error
2724
}

internal/server/db/cluster/certificate_projects.mapper.go

+13-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/server/db/cluster/certificates.interface.mapper.go

+8-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package cluster
44

55
import (
66
"context"
7-
"database/sql"
87

98
"github.com/lxc/incus/v6/internal/server/certificate"
109
)
@@ -13,33 +12,33 @@ import (
1312
type CertificateGenerated interface {
1413
// GetCertificates returns all available certificates.
1514
// generator: certificate GetMany
16-
GetCertificates(ctx context.Context, tx *sql.Tx, filters ...CertificateFilter) ([]Certificate, error)
15+
GetCertificates(ctx context.Context, db dbtx, filters ...CertificateFilter) ([]Certificate, error)
1716

1817
// GetCertificate returns the certificate with the given key.
1918
// generator: certificate GetOne
20-
GetCertificate(ctx context.Context, tx *sql.Tx, fingerprint string) (*Certificate, error)
19+
GetCertificate(ctx context.Context, db dbtx, fingerprint string) (*Certificate, error)
2120

2221
// GetCertificateID return the ID of the certificate with the given key.
2322
// generator: certificate ID
24-
GetCertificateID(ctx context.Context, tx *sql.Tx, fingerprint string) (int64, error)
23+
GetCertificateID(ctx context.Context, db dbtx, fingerprint string) (int64, error)
2524

2625
// CertificateExists checks if a certificate with the given key exists.
2726
// generator: certificate Exists
28-
CertificateExists(ctx context.Context, tx *sql.Tx, fingerprint string) (bool, error)
27+
CertificateExists(ctx context.Context, db dbtx, fingerprint string) (bool, error)
2928

3029
// CreateCertificate adds a new certificate to the database.
3130
// generator: certificate Create
32-
CreateCertificate(ctx context.Context, tx *sql.Tx, object Certificate) (int64, error)
31+
CreateCertificate(ctx context.Context, db dbtx, object Certificate) (int64, error)
3332

3433
// DeleteCertificate deletes the certificate matching the given key parameters.
3534
// generator: certificate DeleteOne-by-Fingerprint
36-
DeleteCertificate(ctx context.Context, tx *sql.Tx, fingerprint string) error
35+
DeleteCertificate(ctx context.Context, db dbtx, fingerprint string) error
3736

3837
// DeleteCertificates deletes the certificate matching the given key parameters.
3938
// generator: certificate DeleteMany-by-Name-and-Type
40-
DeleteCertificates(ctx context.Context, tx *sql.Tx, name string, certificateType certificate.Type) error
39+
DeleteCertificates(ctx context.Context, db dbtx, name string, certificateType certificate.Type) error
4140

4241
// UpdateCertificate updates the certificate matching the given key parameters.
4342
// generator: certificate Update
44-
UpdateCertificate(ctx context.Context, tx *sql.Tx, fingerprint string, object Certificate) error
43+
UpdateCertificate(ctx context.Context, db dbtx, fingerprint string, object Certificate) error
4544
}

internal/server/db/cluster/certificates.mapper.go

+23-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)