Documentation ¶
Index ¶
- func ConvertToPbCluster(cluster model.Cluster) *pb.Cluster
- type ClusterAccessor
- func (x *ClusterAccessor) CreateClusterInfo(contractId string, cspId uuid.UUID, name string, conf *pb.ClusterConf, ...) (string, error)
- func (x *ClusterAccessor) GetCluster(id string) (*pb.Cluster, error)
- func (x *ClusterAccessor) GetClustersByContractID(contractId string) ([]*pb.Cluster, error)
- func (x *ClusterAccessor) GetClustersByCspID(cspId uuid.UUID) ([]*pb.Cluster, error)
- func (x *ClusterAccessor) UpdateStatus(id string, status pb.ClusterStatus, statusDesc string, workflowId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterAccessor ¶
type ClusterAccessor struct {
// contains filtered or unexported fields
}
Accessor accesses cluster info in DB.
func New ¶
func New(db *gorm.DB) *ClusterAccessor
NewClusterAccessor returns new Accessor to access clusters.
func (*ClusterAccessor) CreateClusterInfo ¶
func (x *ClusterAccessor) CreateClusterInfo(contractId string, cspId uuid.UUID, name string, conf *pb.ClusterConf, creator uuid.UUID, description string) (string, error)
Create creates new cluster with contract ID, csp ID, name.
func (*ClusterAccessor) GetCluster ¶
func (x *ClusterAccessor) GetCluster(id string) (*pb.Cluster, error)
Get returns a Cluster if it exists.
func (*ClusterAccessor) GetClustersByContractID ¶
func (x *ClusterAccessor) GetClustersByContractID(contractId string) ([]*pb.Cluster, error)
GetClusterIDsByContractID returns a list of clusters by ContractID if it exists.
func (*ClusterAccessor) GetClustersByCspID ¶
GetClusterIDsByCspID returns a list of clusters by CspID if it exists.
func (*ClusterAccessor) UpdateStatus ¶
func (x *ClusterAccessor) UpdateStatus(id string, status pb.ClusterStatus, statusDesc string, workflowId string) error
UpdateStatus updates an status of cluster for Cluster.
Click to show internal directories.
Click to hide internal directories.