github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/storage/dbmodel/instance.go (about) 1 package dbmodel 2 3 import ( 4 "database/sql" 5 "time" 6 ) 7 8 type InstanceState string 9 10 const ( 11 InstanceSucceeded InstanceState = "succeeded" 12 InstanceFailed InstanceState = "failed" 13 InstanceError InstanceState = "error" 14 InstanceProvisioning InstanceState = "provisioning" 15 InstanceDeprovisioning InstanceState = "deprovisioning" 16 InstanceUpgrading InstanceState = "upgrading" 17 InstanceUpdating InstanceState = "updating" 18 InstanceDeprovisioned InstanceState = "deprovisioned" 19 InstanceNotDeprovisioned InstanceState = "notDeprovisioned" 20 ) 21 22 // InstanceFilter holds the filters when querying Instances 23 type InstanceFilter struct { 24 PageSize int 25 Page int 26 GlobalAccountIDs []string 27 SubscriptionGlobalAccountIDs []string 28 SubAccountIDs []string 29 InstanceIDs []string 30 RuntimeIDs []string 31 Regions []string 32 PlanIDs []string 33 Plans []string 34 Shoots []string 35 States []InstanceState 36 Expired *bool 37 DeletionAttempted *bool 38 } 39 40 type InstanceDTO struct { 41 InstanceID string 42 RuntimeID string 43 GlobalAccountID string 44 SubscriptionGlobalAccountID string 45 SubAccountID string 46 ServiceID string 47 ServiceName string 48 ServicePlanID string 49 ServicePlanName string 50 51 DashboardURL string 52 ProvisioningParameters string 53 ProviderRegion string 54 Provider string 55 56 CreatedAt time.Time 57 UpdatedAt time.Time 58 DeletedAt time.Time 59 ExpiredAt *time.Time 60 61 Version int 62 } 63 64 type InstanceWithOperationDTO struct { 65 InstanceDTO 66 67 Type sql.NullString 68 State sql.NullString 69 OperationCreatedAt sql.NullTime 70 Data sql.NullString 71 Description sql.NullString 72 }