-
Notifications
You must be signed in to change notification settings - Fork 907
/
warnings.interface.mapper.go
35 lines (27 loc) · 1.26 KB
/
warnings.interface.mapper.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
//go:build linux && cgo && !agent
package cluster
import (
"context"
"database/sql"
)
// WarningGenerated is an interface of generated methods for Warning.
type WarningGenerated interface {
// GetWarnings returns all available warnings.
// generator: warning GetMany
GetWarnings(ctx context.Context, tx *sql.Tx, filters ...WarningFilter) ([]Warning, error)
// GetWarning returns the warning with the given key.
// generator: warning GetOne-by-UUID
GetWarning(ctx context.Context, tx *sql.Tx, uuid string) (*Warning, error)
// DeleteWarning deletes the warning matching the given key parameters.
// generator: warning DeleteOne-by-UUID
DeleteWarning(ctx context.Context, tx *sql.Tx, uuid string) error
// DeleteWarnings deletes the warning matching the given key parameters.
// generator: warning DeleteMany-by-EntityType-and-EntityID
DeleteWarnings(ctx context.Context, tx *sql.Tx, entityType EntityType, entityID int) error
// GetWarningID return the ID of the warning with the given key.
// generator: warning ID
GetWarningID(ctx context.Context, tx *sql.Tx, uuid string) (int64, error)
// WarningExists checks if a warning with the given key exists.
// generator: warning Exists
WarningExists(ctx context.Context, tx *sql.Tx, uuid string) (bool, error)
}