@@ -4,7 +4,6 @@ package cluster
4
4
5
5
import (
6
6
"context"
7
- "database/sql"
8
7
9
8
"github.com/lxc/incus/v6/internal/server/certificate"
10
9
)
@@ -13,33 +12,33 @@ import (
13
12
type CertificateGenerated interface {
14
13
// GetCertificates returns all available certificates.
15
14
// 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 )
17
16
18
17
// GetCertificate returns the certificate with the given key.
19
18
// 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 )
21
20
22
21
// GetCertificateID return the ID of the certificate with the given key.
23
22
// 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 )
25
24
26
25
// CertificateExists checks if a certificate with the given key exists.
27
26
// 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 )
29
28
30
29
// CreateCertificate adds a new certificate to the database.
31
30
// 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 )
33
32
34
33
// DeleteCertificate deletes the certificate matching the given key parameters.
35
34
// 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
37
36
38
37
// DeleteCertificates deletes the certificate matching the given key parameters.
39
38
// 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
41
40
42
41
// UpdateCertificate updates the certificate matching the given key parameters.
43
42
// 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
45
44
}
0 commit comments