forked from goharbor/harbor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
policy.go
41 lines (34 loc) · 1022 Bytes
/
policy.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
36
37
38
39
40
41
package models
import (
"time"
)
//ReplicationPolicy defines the structure of a replication policy.
type ReplicationPolicy struct {
ID int64 //UUID of the policy
Name string
Description string
Filters []Filter
ReplicateDeletion bool
Trigger *Trigger //The trigger of the replication
ProjectIDs []int64 //Projects attached to this policy
TargetIDs []int64
Namespaces []string // The namespaces are used to set immediate trigger
CreationTime time.Time
UpdateTime time.Time
}
//QueryParameter defines the parameters used to do query selection.
type QueryParameter struct {
//Query by page, couple with pageSize
Page int64
//Size of each page, couple with page
PageSize int64
//Query by project ID
ProjectID int64
//Query by name
Name string
}
// ReplicationPolicyQueryResult is the query result of replication policy
type ReplicationPolicyQueryResult struct {
Total int64
Policies []*ReplicationPolicy
}