dbmodel

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstanceByGlobalAccountIDStatEntry

type InstanceByGlobalAccountIDStatEntry struct {
	GlobalAccountID string
	Total           int
}

type InstanceDTO

type InstanceDTO struct {
	InstanceID                  string
	RuntimeID                   string
	GlobalAccountID             string
	SubscriptionGlobalAccountID string
	SubAccountID                string
	ServiceID                   string
	ServiceName                 string
	ServicePlanID               string
	ServicePlanName             string

	DashboardURL           string
	ProvisioningParameters string
	ProviderRegion         string
	Provider               string

	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt time.Time
	ExpiredAt *time.Time

	Version int
}

type InstanceERSContextStatsEntry

type InstanceERSContextStatsEntry struct {
	LicenseType sql.NullString
	Total       int
}

type InstanceFilter

type InstanceFilter struct {
	PageSize                     int
	Page                         int
	GlobalAccountIDs             []string
	SubscriptionGlobalAccountIDs []string
	SubAccountIDs                []string
	InstanceIDs                  []string
	RuntimeIDs                   []string
	Regions                      []string
	PlanIDs                      []string
	Plans                        []string
	Shoots                       []string
	States                       []InstanceState
	Expired                      *bool
	DeletionAttempted            *bool
}

InstanceFilter holds the filters when querying Instances

type InstanceState

type InstanceState string
const (
	InstanceSucceeded        InstanceState = "succeeded"
	InstanceFailed           InstanceState = "failed"
	InstanceError            InstanceState = "error"
	InstanceProvisioning     InstanceState = "provisioning"
	InstanceDeprovisioning   InstanceState = "deprovisioning"
	InstanceUpgrading        InstanceState = "upgrading"
	InstanceUpdating         InstanceState = "updating"
	InstanceDeprovisioned    InstanceState = "deprovisioned"
	InstanceNotDeprovisioned InstanceState = "notDeprovisioned"
)

type InstanceWithOperationDTO

type InstanceWithOperationDTO struct {
	InstanceDTO

	Type               sql.NullString
	State              sql.NullString
	OperationCreatedAt sql.NullTime
	Data               sql.NullString
	Description        sql.NullString
}

type OperationDTO

type OperationDTO struct {
	ID        string
	Version   int
	CreatedAt time.Time
	UpdatedAt time.Time

	InstanceID        string
	OrchestrationID   sql.NullString
	TargetOperationID string

	Data                   string
	State                  string
	Description            string
	FinishedStages         sql.NullString
	ProvisioningParameters sql.NullString

	Type internal.OperationType
}

type OperationFilter

type OperationFilter struct {
	InstanceFilter *InstanceFilter
	Page           int
	PageSize       int
	States         []string
}

OperationFilter holds the filters when listing multiple operations

type OperationStatEntry

type OperationStatEntry struct {
	Type       string
	State      string
	PlanID     string
	InstanceID string
}

type OrchestrationDTO

type OrchestrationDTO struct {
	OrchestrationID string
	Type            string
	State           string
	Description     string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	Parameters      string
}

func NewOrchestrationDTO

func NewOrchestrationDTO(o internal.Orchestration) (OrchestrationDTO, error)

func (*OrchestrationDTO) ToOrchestration

func (o *OrchestrationDTO) ToOrchestration() (internal.Orchestration, error)

type OrchestrationFilter

type OrchestrationFilter struct {
	Page     int
	PageSize int
	Types    []string
	States   []string
}

OrchestrationFilter holds the filters when listing orchestrations

type RuntimeStateDTO

type RuntimeStateDTO struct {
	ID string `json:"id"`

	CreatedAt time.Time `json:"created_at"`

	RuntimeID   string `json:"runtimeId"`
	OperationID string `json:"operationId"`

	KymaConfig    string `json:"kymaConfig"`
	ClusterConfig string `json:"clusterConfig"`
	ClusterSetup  string `json:"clusterSetup"`

	// these fields are also available in above configs
	// they are set separately to make fetching easier
	KymaVersion string `json:"kyma_version"`
	K8SVersion  string `json:"k8s_version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL