biz

package
v0.0.0-...-5b5d069 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterQueueKey QueueKey = "cluster-queue-key"
	AppQueueKey     QueueKey = "app-queue-key"
	ServiceQueueKey QueueKey = "service-queue-key"

	TokenKey     UserKey = "token"
	SignType     UserKey = "sign_type"
	UserEmailKey UserKey = "user_email"
)
View Source
const (
	ClusterPoolNumber = 10

	AppPoolNumber = 100
)
View Source
const (
	DefaultNodeGroupCpu        = 4
	DefaultNodeGroupMemory     = 8
	DefaultNodeGroupGpu        = 0
	DefaultNodeGroupMinSize    = 1
	DefaultNodeGroupMaxSize    = 5
	DefaultNodeGroupTargetSize = 3
	DefaultSSHPort             = 22

	ClusterLevel_BASIC_MaxSize    = 50
	ClusterLevel_ADVANCED_MaxSize = 100
	ClusterLevel_STANDARD_MaxSize = 200
)

Variables

View Source
var (
	AppReleaseSatus_name = map[int32]string{
		0: "APP_RELEASE_PENDING",
		1: "APP_RELEASE_RUNNING",
		2: "APP_RELEASE_FAILED",
	}
	AppReleaseSatus_value = map[string]int32{
		"APP_RELEASE_PENDING": 0,
		"APP_RELEASE_RUNNING": 1,
		"APP_RELEASE_FAILED":  2,
	}
)

Enum value maps for AppReleaseSatus.

View Source
var (
	ClusterStatus_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "RUNNING",
		2: "DELETED",
		3: "STARTING",
		4: "STOPPING",
		5: "STOPPED",
	}
	ClusterStatus_value = map[string]int32{
		"UNSPECIFIED": 0,
		"RUNNING":     1,
		"DELETED":     2,
		"STARTING":    3,
		"STOPPING":    4,
		"STOPPED":     5,
	}
)

Enum value maps for ClusterStatus.

View Source
var (
	ClusterType_name = map[int32]string{
		0: "ClusterType_UNSPECIFIED",
		1: "LOCAL",
		2: "AWS_EC2",
		3: "AWS_EKS",
		4: "ALICLOUD_ECS",
		5: "ALICLOUD_AKS",
		6: "GCP_GKE",
		7: "KUBERNETES",
	}
	ClusterType_value = map[string]int32{
		"ClusterType_UNSPECIFIED": 0,
		"LOCAL":                   1,
		"AWS_EC2":                 2,
		"AWS_EKS":                 3,
		"ALICLOUD_ECS":            4,
		"ALICLOUD_AKS":            5,
		"GCP_GKE":                 6,
		"KUBERNETES":              7,
	}
)

Enum value maps for ClusterType.

View Source
var (
	ClusterLevel_name = map[int32]string{
		0: "ClusterLevel_UNSPECIFIED",
		1: "BASIC",
		2: "STANDARD",
		3: "ADVANCED",
	}
	ClusterLevel_value = map[string]int32{
		"ClusterLevel_UNSPECIFIED": 0,
		"BASIC":                    1,
		"STANDARD":                 2,
		"ADVANCED":                 3,
	}
)

Enum value maps for ClusterLevel.

View Source
var (
	NodeRole_name = map[int32]string{
		0: "NodeRole_UNSPECIFIED",
		1: "MASTER",
		2: "WORKER",
		3: "EDGE",
	}
	NodeRole_value = map[string]int32{
		"NodeRole_UNSPECIFIED": 0,
		"MASTER":               1,
		"WORKER":               2,
		"EDGE":                 3,
	}
)

Enum value maps for NodeRole.

View Source
var (
	NodeStatus_name = map[int32]string{
		0: "NodeStatus_UNSPECIFIED",
		1: "NODE_UNSPECIFIED",
		2: "NODE_RUNNING",
		3: "NODE_CREATING",
		4: "NODE_DELETING",
		5: "NODE_DELETED",
		6: "NODE_ERROR",
		7: "NODE_PENDING",
	}
	NodeStatus_value = map[string]int32{
		"NodeStatus_UNSPECIFIED": 0,
		"NODE_UNSPECIFIED":       1,
		"NODE_RUNNING":           2,
		"NODE_CREATING":          3,
		"NODE_DELETING":          4,
		"NODE_DELETED":           5,
		"NODE_ERROR":             6,
		"NODE_PENDING":           7,
	}
)

Enum value maps for NodeStatus.

View Source
var (
	NodeGroupType_name = map[int32]string{
		0: "NodeGroupType_UNSPECIFIED",
		1: "NORMAL",
		2: "HIGH_COMPUTATION",
		3: "GPU_ACCELERATERD",
		4: "HIGH_MEMORY",
		5: "LARGE_HARD_DISK",
	}
	NodeGroupType_value = map[string]int32{
		"NodeGroupType_UNSPECIFIED": 0,
		"NORMAL":                    1,
		"HIGH_COMPUTATION":          2,
		"GPU_ACCELERATERD":          3,
		"HIGH_MEMORY":               4,
		"LARGE_HARD_DISK":           5,
	}
)

Enum value maps for NodeGroupType.

View Source
var (
	NodeArchType_name = map[int32]string{
		0: "NodeArchType_UNSPECIFIED",
		1: "AMD64",
		2: "ARM64",
	}
	NodeArchType_value = map[string]int32{
		"NodeArchType_UNSPECIFIED": 0,
		"AMD64":                    1,
		"ARM64":                    2,
	}
)

Enum value maps for NodeArchType.

View Source
var (
	NodeGPUSpec_name = map[int32]string{
		0: "NodeGPUSpec_UNSPECIFIED",
		1: "NVIDIA_A10",
		2: "NVIDIA_V100",
		3: "NVIDIA_T4",
		4: "NVIDIA_P100",
		5: "NVIDIA_P4",
	}
	NodeGPUSpec_value = map[string]int32{
		"NodeGPUSpec_UNSPECIFIED": 0,
		"NVIDIA_A10":              1,
		"NVIDIA_V100":             2,
		"NVIDIA_T4":               3,
		"NVIDIA_P100":             4,
		"NVIDIA_P4":               5,
	}
)

Enum value maps for NodeGPUSpec.

View Source
var (
	ResourceType_name = map[int32]string{
		0:  "RESOURCE_TYPE_UNSPECIFIED",
		1:  "VPC",
		2:  "SUBNET",
		3:  "INTERNET_GATEWAY",
		4:  "NAT_GATEWAY",
		5:  "ROUTE_TABLE",
		6:  "SECURITY_GROUP",
		7:  "LOAD_BALANCER",
		8:  "ELASTIC_IP",
		9:  "AVAILABILITY_ZONES",
		10: "KEY_PAIR",
		11: "VPC_ENDPOINT_S3",
		12: "DATA_DEVICE",
		13: "INSTANCE_TYPE",
	}
	ResourceType_value = map[string]int32{
		"RESOURCE_TYPE_UNSPECIFIED": 0,
		"VPC":                       1,
		"SUBNET":                    2,
		"INTERNET_GATEWAY":          3,
		"NAT_GATEWAY":               4,
		"ROUTE_TABLE":               5,
		"SECURITY_GROUP":            6,
		"LOAD_BALANCER":             7,
		"ELASTIC_IP":                8,
		"AVAILABILITY_ZONES":        9,
		"KEY_PAIR":                  10,
		"VPC_ENDPOINT_S3":           11,
		"DATA_DEVICE":               12,
		"INSTANCE_TYPE":             13,
	}
)

Enum value maps for ResourceType.

View Source
var (
	ResourceTypeKeyValue_name = map[int32]string{
		0: "ResourceTypeKeyValue_UNSPECIFIED",
		1: "NAME",
		2: "ACCESS",
		3: "ZONE",
		4: "SECURITY_GROUP_TYPE",
		5: "VPC_REFID",
		6: "ACCESS_PRIVATE",
		7: "ACCESS_PUBLIC",
		8: "SECURITY_GROUP_TYPE_CLUSTER",
		9: "SECURITY_GROUP_TYPE_BOSTION",
	}
	ResourceTypeKeyValue_value = map[string]int32{
		"ResourceTypeKeyValue_UNSPECIFIED": 0,
		"NAME":                             1,
		"ACCESS":                           2,
		"ZONE":                             3,
		"SECURITY_GROUP_TYPE":              4,
		"VPC_REFID":                        5,
		"ACCESS_PRIVATE":                   6,
		"ACCESS_PUBLIC":                    7,
		"SECURITY_GROUP_TYPE_CLUSTER":      8,
		"SECURITY_GROUP_TYPE_BOSTION":      9,
	}
)

Enum value maps for ResourceTypeKeyValue.

View Source
var (
	ProjectStatus_name = map[int32]string{
		0: "PROJECT_INIT",
		1: "PROJECT_RUNNING",
		2: "PROJECT_STOPPED",
	}
	ProjectStatus_value = map[string]int32{
		"PROJECT_INIT":    0,
		"PROJECT_RUNNING": 1,
		"PROJECT_STOPPED": 2,
	}
)

Enum value maps for ProjectStatus.

View Source
var (
	WorkflowType_name = map[int32]string{
		0: "ContinuousIntegration",
		1: "ContinuousDeployment",
	}
	WorkflowType_value = map[string]int32{
		"ContinuousIntegration": 0,
		"ContinuousDeployment":  1,
	}
)

Enum value maps for WorkflowType.

View Source
var (
	CIStatus_name = map[int32]string{
		0: "Pending",
		1: "Success",
		2: "Failure",
	}
	CIStatus_value = map[string]int32{
		"Pending": 0,
		"Success": 1,
		"Failure": 2,
	}
)

Enum value maps for CIStatus.

View Source
var (
	UserStatus_name = map[int32]string{
		0: "USER_INIT",
		1: "USER_ENABLE",
		2: "USER_DISABLE",
		3: "USER_DELETED",
	}
	UserStatus_value = map[string]int32{
		"USER_INIT":    0,
		"USER_ENABLE":  1,
		"USER_DISABLE": 2,
		"USER_DELETED": 3,
	}
)

Enum value maps for UserStatus.

View Source
var (
	UserSignType_name = map[int32]string{
		0: "CREDENTIALS",
		1: "GITHUB",
	}
	UserSignType_value = map[string]int32{
		"CREDENTIALS": 0,
		"GITHUB":      1,
	}
)

Enum value maps for UserSignType.

View Source
var ErrClusterNotFound error = errors.New("cluster not found")
View Source
var File_internal_biz_agenet_proto protoreflect.FileDescriptor
View Source
var File_internal_biz_app_proto protoreflect.FileDescriptor
View Source
var File_internal_biz_cluster_proto protoreflect.FileDescriptor
View Source
var File_internal_biz_project_proto protoreflect.FileDescriptor
View Source
var File_internal_biz_service_proto protoreflect.FileDescriptor
View Source
var File_internal_biz_user_proto protoreflect.FileDescriptor
View Source
var File_internal_biz_workspace_proto protoreflect.FileDescriptor

ProviderSet is biz providers.

Functions

This section is empty.

Types

type App

type App struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id        int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`         // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL; index"` // @gotags: gorm:"column:name; default:”; NOT NULL; index"
	Icon      string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty" gorm:"column:icon; default:''; NOT NULL"`        // @gotags: gorm:"column:icon; default:”; NOT NULL"
	AppTypeId int64  ``                                                                                                              // @gotags: gorm:"column:app_type_id; default:0; NOT NULL"
	/* 138-byte string literal not displayed */
	AppRepoId int64 `` // @gotags: gorm:"column:app_repo_id; default:0; NOT NULL"
	/* 138-byte string literal not displayed */
	Description string        `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty" gorm:"column:description; default:''; NOT NULL"` // @gotags: gorm:"column:description; default:”; NOT NULL"
	Versions    []*AppVersion `protobuf:"bytes,7,rep,name=versions,proto3" json:"versions,omitempty" gorm:"-"`                                              // @gotags: gorm:"-"
	Readme      string        `protobuf:"bytes,8,opt,name=readme,proto3" json:"readme,omitempty" gorm:"-"`                                                  // @gotags: gorm:"-"
	Metadata    []byte        `json:"metadata,omitempty" gorm:"-" protobuf:"bytes,9,opt,name=metadata,proto3"`
	gorm.Model                // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*App) AddVersion

func (a *App) AddVersion(version *AppVersion)

func (*App) DeleteVersion

func (a *App) DeleteVersion(version string)

func (*App) Descriptor deprecated

func (*App) Descriptor() ([]byte, []int)

Deprecated: Use App.ProtoReflect.Descriptor instead.

func (*App) GetAppRepoId

func (x *App) GetAppRepoId() int64

func (*App) GetAppTypeId

func (x *App) GetAppTypeId() int64

func (*App) GetDescription

func (x *App) GetDescription() string

func (*App) GetIcon

func (x *App) GetIcon() string

func (*App) GetId

func (x *App) GetId() int64

func (*App) GetMetadata

func (x *App) GetMetadata() []byte

func (*App) GetName

func (x *App) GetName() string

func (*App) GetReadme

func (x *App) GetReadme() string

func (*App) GetVersionById

func (a *App) GetVersionById(id int64) *AppVersion

func (*App) GetVersions

func (x *App) GetVersions() []*AppVersion

func (*App) ProtoMessage

func (*App) ProtoMessage()

func (*App) ProtoReflect

func (x *App) ProtoReflect() protoreflect.Message

func (*App) Reset

func (x *App) Reset()

func (*App) String

func (x *App) String() string

type AppData

type AppData interface {
	Save(context.Context, *App) error
	List(context.Context, *App, int32, int32) ([]*App, int32, error)
	Get(ctx context.Context, appID int64) (*App, error)
	Delete(ctx context.Context, appID int64) error
	GetByName(context.Context, string) (*App, error)
	CreateAppType(context.Context, *AppType) error
	ListAppType(ctx context.Context) ([]*AppType, error)
	DeleteAppType(context.Context, int64) error
	SaveAppRelease(context.Context, *AppRelease) error
	DeleteAppRelease(context.Context, int64) error
	AppReleaseList(context.Context, map[string]string, int32, int32) ([]*AppRelease, int32, error)
	GetAppRelease(ctx context.Context, id int64) (*AppRelease, error)
	SaveRepo(context.Context, *AppRepo) error
	ListRepo(context.Context) ([]*AppRepo, error)
	GetRepo(context.Context, int64) (*AppRepo, error)
	GetRepoByName(context.Context, string) (*AppRepo, error)
	DeleteRepo(context.Context, int64) error
}

type AppRelease

type AppRelease struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"` // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	ReleaseName string ``                                                                                                      // @gotags: gorm:"column:release_name; default:”; NOT NULL"
	/* 143-byte string literal not displayed */
	AppId int64 `` // @gotags: gorm:"column:app_id; default:0; NOT NULL; index"
	/* 126-byte string literal not displayed */
	VersionId int64 `` // @gotags: gorm:"column:version_id; default:0; NOT NULL; index"
	/* 142-byte string literal not displayed */
	ClusterId int64 `` // @gotags: gorm:"column:cluster_id; default:0; NOT NULL; index"
	/* 142-byte string literal not displayed */
	ProjectId int64 `` // @gotags: gorm:"column:project_id; default:0; NOT NULL; index"
	/* 142-byte string literal not displayed */
	UserId int64 `` // @gotags: gorm:"column:user_id; default:0; NOT NULL; index"
	/* 130-byte string literal not displayed */
	Namespace string          `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty" gorm:"column:namespace; default:''; NOT NULL"` // @gotags: gorm:"column:namespace; default:”; NOT NULL"
	Config    string          `protobuf:"bytes,9,opt,name=config,proto3" json:"config,omitempty" gorm:"column:config; default:''; NOT NULL"`          // @gotags: gorm:"column:config; default:”; NOT NULL"
	Status    AppReleaseSatus ``                                                                                                                      // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 138-byte string literal not displayed */
	Manifest   string                `protobuf:"bytes,11,opt,name=manifest,proto3" json:"manifest,omitempty" gorm:"column:manifest; default:''; NOT NULL"` // @gotags: gorm:"column:manifest; default:”; NOT NULL"
	Notes      string                `json:"notes,omitempty" gorm:"column:notes; default:''; NOT NULL" protobuf:"bytes,12,opt,name=notes,proto3"`          // @gotags: gorm:"column:notes; default:”; NOT NULL"
	Logs       string                `protobuf:"bytes,13,opt,name=logs,proto3" json:"logs,omitempty" gorm:"column:logs; default:''; NOT NULL"`             // @gotags: gorm:"column:logs; default:”; NOT NULL"
	Dryrun     bool                  `protobuf:"varint,14,opt,name=dryrun,proto3" json:"dryrun,omitempty" gorm:"column:dryrun; default:false; NOT NULL"`   // @gotags: gorm:"column:dryrun; default:false; NOT NULL"
	Atomic     bool                  `gorm:"column:atomic; default:false; NOT NULL" protobuf:"varint,15,opt,name=atomic,proto3" json:"atomic,omitempty"`   // @gotags: gorm:"column:atomic; default:false; NOT NULL"
	Wait       bool                  `gorm:"column:wait; default:false; NOT NULL" protobuf:"varint,16,opt,name=wait,proto3" json:"wait,omitempty"`         // @gotags: gorm:"column:wait; default:false; NOT NULL"
	Resources  []*AppReleaseResource `protobuf:"bytes,17,rep,name=resources,proto3" json:"resources,omitempty" gorm:"-"`
	gorm.Model                       // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*AppRelease) Descriptor deprecated

func (*AppRelease) Descriptor() ([]byte, []int)

Deprecated: Use AppRelease.ProtoReflect.Descriptor instead.

func (*AppRelease) GetAppId

func (x *AppRelease) GetAppId() int64

func (*AppRelease) GetAtomic

func (x *AppRelease) GetAtomic() bool

func (*AppRelease) GetClusterId

func (x *AppRelease) GetClusterId() int64

func (*AppRelease) GetConfig

func (x *AppRelease) GetConfig() string

func (*AppRelease) GetDryrun

func (x *AppRelease) GetDryrun() bool

func (*AppRelease) GetId

func (x *AppRelease) GetId() int64

func (*AppRelease) GetLogs

func (x *AppRelease) GetLogs() string

func (*AppRelease) GetManifest

func (x *AppRelease) GetManifest() string

func (*AppRelease) GetNamespace

func (x *AppRelease) GetNamespace() string

func (*AppRelease) GetNotes

func (x *AppRelease) GetNotes() string

func (*AppRelease) GetProjectId

func (x *AppRelease) GetProjectId() int64

func (*AppRelease) GetReleaseName

func (x *AppRelease) GetReleaseName() string

func (*AppRelease) GetResources

func (x *AppRelease) GetResources() []*AppReleaseResource

func (*AppRelease) GetStatus

func (x *AppRelease) GetStatus() AppReleaseSatus

func (*AppRelease) GetUserId

func (x *AppRelease) GetUserId() int64

func (*AppRelease) GetVersionId

func (x *AppRelease) GetVersionId() int64

func (*AppRelease) GetWait

func (x *AppRelease) GetWait() bool

func (*AppRelease) ProtoMessage

func (*AppRelease) ProtoMessage()

func (*AppRelease) ProtoReflect

func (x *AppRelease) ProtoReflect() protoreflect.Message

func (*AppRelease) Reset

func (x *AppRelease) Reset()

func (*AppRelease) String

func (x *AppRelease) String() string

type AppReleaseResource

type AppReleaseResource struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id        int64 `json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT" protobuf:"varint,1,opt,name=id,proto3"` // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	ReleaseId int64 ``                                                                                                      // @gotags: gorm:"column:release_id; default:0; NOT NULL; index"
	/* 142-byte string literal not displayed */
	Name      string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`             // @gotags: gorm:"column:name; default:”; NOT NULL"
	Kind      string `protobuf:"bytes,4,opt,name=kind,proto3" json:"kind,omitempty" gorm:"column:kind; default:''; NOT NULL"`             // @gotags: gorm:"column:kind; default:”; NOT NULL"
	Manifest  string `json:"manifest,omitempty" gorm:"column:manifest; default:''; NOT NULL" protobuf:"bytes,5,opt,name=manifest,proto3"` // @gotags: gorm:"column:manifest; default:”; NOT NULL"
	StartedAt string ``                                                                                                                   // @gotags: gorm:"column:started_at; default:”; NOT NULL"
	/* 135-byte string literal not displayed */
	Events     []string `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty" gorm:"-"` // @gotags: gorm:"-"
	Status     []string `json:"status,omitempty" gorm:"-" protobuf:"bytes,8,rep,name=status,proto3"`
	gorm.Model          // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*AppReleaseResource) Descriptor deprecated

func (*AppReleaseResource) Descriptor() ([]byte, []int)

Deprecated: Use AppReleaseResource.ProtoReflect.Descriptor instead.

func (*AppReleaseResource) GetEvents

func (x *AppReleaseResource) GetEvents() []string

func (*AppReleaseResource) GetId

func (x *AppReleaseResource) GetId() int64

func (*AppReleaseResource) GetKind

func (x *AppReleaseResource) GetKind() string

func (*AppReleaseResource) GetManifest

func (x *AppReleaseResource) GetManifest() string

func (*AppReleaseResource) GetName

func (x *AppReleaseResource) GetName() string

func (*AppReleaseResource) GetReleaseId

func (x *AppReleaseResource) GetReleaseId() int64

func (*AppReleaseResource) GetStartedAt

func (x *AppReleaseResource) GetStartedAt() string

func (*AppReleaseResource) GetStatus

func (x *AppReleaseResource) GetStatus() []string

func (*AppReleaseResource) ProtoMessage

func (*AppReleaseResource) ProtoMessage()

func (*AppReleaseResource) ProtoReflect

func (x *AppReleaseResource) ProtoReflect() protoreflect.Message

func (*AppReleaseResource) Reset

func (x *AppReleaseResource) Reset()

func (*AppReleaseResource) String

func (x *AppReleaseResource) String() string

type AppReleaseSatus

type AppReleaseSatus int32
const (
	AppReleaseSatus_APP_RELEASE_PENDING AppReleaseSatus = 0
	AppReleaseSatus_APP_RELEASE_RUNNING AppReleaseSatus = 1
	AppReleaseSatus_APP_RELEASE_FAILED  AppReleaseSatus = 2
)

func (AppReleaseSatus) Descriptor

func (AppReleaseSatus) Enum

func (x AppReleaseSatus) Enum() *AppReleaseSatus

func (AppReleaseSatus) EnumDescriptor deprecated

func (AppReleaseSatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use AppReleaseSatus.Descriptor instead.

func (AppReleaseSatus) Number

func (AppReleaseSatus) String

func (x AppReleaseSatus) String() string

func (AppReleaseSatus) Type

type AppRepo

type AppRepo struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id        int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`  // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"` // @gotags: gorm:"column:name; default:”; NOT NULL"
	Url       string `json:"url,omitempty" gorm:"column:url; default:''; NOT NULL" protobuf:"bytes,3,opt,name=url,proto3"`    // @gotags: gorm:"column:url; default:”; NOT NULL"
	IndexPath string ``                                                                                                       // @gotags: gorm:"column:index_path; default:”; NOT NULL"
	/* 135-byte string literal not displayed */
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty" gorm:"column:description; default:''; NOT NULL"` // @gotags: gorm:"column:description; default:”; NOT NULL"
	gorm.Model
	// contains filtered or unexported fields
}

func (*AppRepo) Descriptor deprecated

func (*AppRepo) Descriptor() ([]byte, []int)

Deprecated: Use AppRepo.ProtoReflect.Descriptor instead.

func (*AppRepo) GetDescription

func (x *AppRepo) GetDescription() string

func (*AppRepo) GetId

func (x *AppRepo) GetId() int64

func (*AppRepo) GetIndexPath

func (x *AppRepo) GetIndexPath() string

func (*AppRepo) GetName

func (x *AppRepo) GetName() string

func (*AppRepo) GetUrl

func (x *AppRepo) GetUrl() string

func (*AppRepo) ProtoMessage

func (*AppRepo) ProtoMessage()

func (*AppRepo) ProtoReflect

func (x *AppRepo) ProtoReflect() protoreflect.Message

func (*AppRepo) Reset

func (x *AppRepo) Reset()

func (*AppRepo) String

func (x *AppRepo) String() string

type AppRuntime

type AppRuntime interface {
	CheckCluster(context.Context) bool
	Init(context.Context) ([]*App, []*AppRelease, error)
	GetClusterResources(context.Context, *AppRelease) ([]*AppReleaseResource, error)
	DeleteApp(ctx context.Context, app *App) error
	DeleteAppVersion(ctx context.Context, app *App, appVersion *AppVersion) error
	GetAppAndVersionInfo(context.Context, *App, *AppVersion) error
	AppRelease(context.Context, *App, *AppVersion, *AppRelease, *AppRepo) error
	DeleteAppRelease(context.Context, *AppRelease) error
	AddAppRepo(context.Context, *AppRepo) error
	GetAppsByRepo(context.Context, *AppRepo) ([]*App, error)
	GetAppDetailByRepo(ctx context.Context, apprepo *AppRepo, appName, version string) (*App, error)
}

type AppType

type AppType struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`                       // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`                      // @gotags: gorm:"column:name; default:”; NOT NULL"
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" gorm:"column:description; default:''; NOT NULL"` // @gotags: gorm:"column:description; default:”; NOT NULL"
	gorm.Model
	// contains filtered or unexported fields
}

func (*AppType) Descriptor deprecated

func (*AppType) Descriptor() ([]byte, []int)

Deprecated: Use AppType.ProtoReflect.Descriptor instead.

func (*AppType) GetDescription

func (x *AppType) GetDescription() string

func (*AppType) GetId

func (x *AppType) GetId() int64

func (*AppType) GetName

func (x *AppType) GetName() string

func (*AppType) ProtoMessage

func (*AppType) ProtoMessage()

func (*AppType) ProtoReflect

func (x *AppType) ProtoReflect() protoreflect.Message

func (*AppType) Reset

func (x *AppType) Reset()

func (*AppType) String

func (x *AppType) String() string

type AppUsecase

type AppUsecase struct {
	// contains filtered or unexported fields
}

func NewAppUsecase

func NewAppUsecase(appData AppData, appRuntime AppRuntime, logger log.Logger, conf *conf.Bootstrap) *AppUsecase

func (*AppUsecase) AppReleaseList

func (uc *AppUsecase) AppReleaseList(ctx context.Context, appReleaseReq map[string]string, page, pageSize int32) ([]*AppRelease, int32, error)

func (*AppUsecase) CreateAppRelease

func (uc *AppUsecase) CreateAppRelease(ctx context.Context, appRelease *AppRelease) error

func (*AppUsecase) CreateAppType

func (uc *AppUsecase) CreateAppType(ctx context.Context, appType *AppType) error

func (*AppUsecase) Delete

func (uc *AppUsecase) Delete(ctx context.Context, id int64) error

func (*AppUsecase) DeleteAppRelease

func (uc *AppUsecase) DeleteAppRelease(ctx context.Context, id int64) error

func (*AppUsecase) DeleteAppType

func (uc *AppUsecase) DeleteAppType(ctx context.Context, appTypeID int64) error

func (*AppUsecase) DeleteAppVersion

func (uc *AppUsecase) DeleteAppVersion(ctx context.Context, app *App, appVersion *AppVersion) error

func (*AppUsecase) DeleteRepo

func (uc *AppUsecase) DeleteRepo(ctx context.Context, repoID int64) error

func (*AppUsecase) Get

func (uc *AppUsecase) Get(ctx context.Context, id int64) (*App, error)

func (*AppUsecase) GetAppByName

func (uc *AppUsecase) GetAppByName(ctx context.Context, name string) (app *App, err error)

func (*AppUsecase) GetAppDetailByRepo

func (uc *AppUsecase) GetAppDetailByRepo(ctx context.Context, repoID int64, appName, version string) (*App, error)

func (*AppUsecase) GetAppRelease

func (uc *AppUsecase) GetAppRelease(ctx context.Context, id int64) (*AppRelease, error)

func (*AppUsecase) GetAppReleaseResourcesInCluster

func (uc *AppUsecase) GetAppReleaseResourcesInCluster(ctx context.Context, appReleaseID int64) ([]*AppReleaseResource, error)

func (*AppUsecase) GetAppVersion

func (uc *AppUsecase) GetAppVersion(ctx context.Context, appID, versionID int64) (*AppVersion, error)

func (*AppUsecase) GetAppVersionInfoByLocalFile

func (uc *AppUsecase) GetAppVersionInfoByLocalFile(ctx context.Context, app *App, appVersion *AppVersion) error

func (*AppUsecase) GetAppsByRepo

func (uc *AppUsecase) GetAppsByRepo(ctx context.Context, repoID int64) ([]*App, error)

func (*AppUsecase) Init

func (uc *AppUsecase) Init(ctx context.Context) error

func (*AppUsecase) List

func (uc *AppUsecase) List(ctx context.Context, appReq *App, page, pageSize int32) ([]*App, int32, error)

func (*AppUsecase) ListAppType

func (uc *AppUsecase) ListAppType(ctx context.Context) ([]*AppType, error)

func (*AppUsecase) ListRepo

func (uc *AppUsecase) ListRepo(ctx context.Context) ([]*AppRepo, error)

func (*AppUsecase) Save

func (uc *AppUsecase) Save(ctx context.Context, app *App) error

func (*AppUsecase) SaveRepo

func (uc *AppUsecase) SaveRepo(ctx context.Context, repo *AppRepo) error

func (*AppUsecase) Start

func (uc *AppUsecase) Start(ctx context.Context) error

func (*AppUsecase) Stop

func (uc *AppUsecase) Stop(ctx context.Context) error

type AppVersion

type AppVersion struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id    int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"` // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	AppId int64 ``                                                                                                      // @gotags: gorm:"column:app_id; default:0; NOT NULL; index"
	/* 126-byte string literal not displayed */
	Name          string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`                 // @gotags: gorm:"column:name; default:”; NOT NULL"
	Chart         string `protobuf:"bytes,4,opt,name=chart,proto3" json:"chart,omitempty" gorm:"column:chart; default:''; NOT NULL"`              // @gotags: gorm:"column:chart; default:”; NOT NULL" // as file path
	Version       string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty" gorm:"column:version; default:''; NOT NULL; index"` // @gotags: gorm:"column:version; default:”; NOT NULL; index"
	DefaultConfig string ``                                                                                                                       // @gotags: gorm:"column:default_config; default:”; NOT NULL"
	/* 151-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*AppVersion) Descriptor deprecated

func (*AppVersion) Descriptor() ([]byte, []int)

Deprecated: Use AppVersion.ProtoReflect.Descriptor instead.

func (*AppVersion) GetAppId

func (x *AppVersion) GetAppId() int64

func (*AppVersion) GetChart

func (x *AppVersion) GetChart() string

func (*AppVersion) GetDefaultConfig

func (x *AppVersion) GetDefaultConfig() string

func (*AppVersion) GetId

func (x *AppVersion) GetId() int64

func (*AppVersion) GetName

func (x *AppVersion) GetName() string

func (*AppVersion) GetVersion

func (x *AppVersion) GetVersion() string

func (*AppVersion) ProtoMessage

func (*AppVersion) ProtoMessage()

func (*AppVersion) ProtoReflect

func (x *AppVersion) ProtoReflect() protoreflect.Message

func (*AppVersion) Reset

func (x *AppVersion) Reset()

func (*AppVersion) String

func (x *AppVersion) String() string

type Biz

type Biz struct {
	// contains filtered or unexported fields
}

func NewBiz

func NewBiz(clusterUc *ClusterUsecase, appUc *AppUsecase, servicesUc *ServicesUseCase, userUc *UserUseCase, projectUc *ProjectUsecase, conf *conf.Bootstrap, logger log.Logger) *Biz

func (*Biz) BizRunners

func (b *Biz) BizRunners() []transport.Server

func (*Biz) Initialize

func (b *Biz) Initialize(ctx context.Context) error

type BostionHost

type BostionHost struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id               string `gorm:"column:id;primaryKey; NOT NULL" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`           // @gotags: gorm:"column:id;primaryKey; NOT NULL"
	User             string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty" gorm:"column:user; default:''; NOT NULL"`    // @gotags: gorm:"column:user; default:”; NOT NULL"
	Image            string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty" gorm:"column:image; default:''; NOT NULL"` // @gotags: gorm:"column:image; default:”; NOT NULL"
	ImageDescription string ``                                                                                                          // @gotags: gorm:"column:image_description; default:”; NOT NULL"
	/* 163-byte string literal not displayed */
	Os   string       `protobuf:"bytes,5,opt,name=os,proto3" json:"os,omitempty" gorm:"column:os; default:''; NOT NULL"` // @gotags: gorm:"column:os; default:”; NOT NULL"
	Arch NodeArchType ``                                                                                                 // @gotags: gorm:"column:arch; default:0; NOT NULL"
	/* 132-byte string literal not displayed */
	Cpu        int32  `protobuf:"varint,7,opt,name=cpu,proto3" json:"cpu,omitempty" gorm:"column:cpu; default:0; NOT NULL"`                // @gotags: gorm:"column:cpu; default:0; NOT NULL"
	Memory     int32  `protobuf:"varint,8,opt,name=memory,proto3" json:"memory,omitempty" gorm:"column:memory; default:0; NOT NULL"`       // @gotags: gorm:"column:memory; default:0; NOT NULL"
	Hostname   string `protobuf:"bytes,9,opt,name=hostname,proto3" json:"hostname,omitempty" gorm:"column:hostname; default:''; NOT NULL"` // @gotags: gorm:"column:hostname; default:”; NOT NULL"
	ExternalIp string ``                                                                                                                   // @gotags: gorm:"column:external_ip; default:”; NOT NULL"
	/* 140-byte string literal not displayed */
	InternalIp string `` // @gotags: gorm:"column:internal_ip; default:”; NOT NULL"
	/* 140-byte string literal not displayed */
	SshPort int32 `` // @gotags: gorm:"column:ssh_port; default:0; NOT NULL"
	/* 128-byte string literal not displayed */
	Status NodeStatus `` // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 137-byte string literal not displayed */
	InstanceId string `` // @gotags: gorm:"column:instance_id; default:”; NOT NULL"
	/* 140-byte string literal not displayed */
	ClusterId int64 `` // @gotags: gorm:"column:cluster_id; default:0; NOT NULL"
	/* 136-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*BostionHost) Descriptor deprecated

func (*BostionHost) Descriptor() ([]byte, []int)

Deprecated: Use BostionHost.ProtoReflect.Descriptor instead.

func (*BostionHost) GetArch

func (x *BostionHost) GetArch() NodeArchType

func (*BostionHost) GetClusterId

func (x *BostionHost) GetClusterId() int64

func (*BostionHost) GetCpu

func (x *BostionHost) GetCpu() int32

func (*BostionHost) GetExternalIp

func (x *BostionHost) GetExternalIp() string

func (*BostionHost) GetHostname

func (x *BostionHost) GetHostname() string

func (*BostionHost) GetId

func (x *BostionHost) GetId() string

func (*BostionHost) GetImage

func (x *BostionHost) GetImage() string

func (*BostionHost) GetImageDescription

func (x *BostionHost) GetImageDescription() string

func (*BostionHost) GetInstanceId

func (x *BostionHost) GetInstanceId() string

func (*BostionHost) GetInternalIp

func (x *BostionHost) GetInternalIp() string

func (*BostionHost) GetMemory

func (x *BostionHost) GetMemory() int32

func (*BostionHost) GetOs

func (x *BostionHost) GetOs() string

func (*BostionHost) GetSshPort

func (x *BostionHost) GetSshPort() int32

func (*BostionHost) GetStatus

func (x *BostionHost) GetStatus() NodeStatus

func (*BostionHost) GetUser

func (x *BostionHost) GetUser() string

func (*BostionHost) ProtoMessage

func (*BostionHost) ProtoMessage()

func (*BostionHost) ProtoReflect

func (x *BostionHost) ProtoReflect() protoreflect.Message

func (*BostionHost) Reset

func (x *BostionHost) Reset()

func (*BostionHost) String

func (x *BostionHost) String() string

type Business

type Business struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id        int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`  // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"` // @gotags: gorm:"column:name; default:”; NOT NULL"
	ProjectId int64  ``                                                                                                       // @gotags: gorm:"column:project_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	Technologys []*Technology `protobuf:"bytes,4,rep,name=technologys,proto3" json:"technologys,omitempty" gorm:"-"`
	gorm.Model                // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*Business) Descriptor deprecated

func (*Business) Descriptor() ([]byte, []int)

Deprecated: Use Business.ProtoReflect.Descriptor instead.

func (*Business) GetId

func (x *Business) GetId() int64

func (*Business) GetName

func (x *Business) GetName() string

func (*Business) GetProjectId

func (x *Business) GetProjectId() int64

func (*Business) GetTechnologys

func (x *Business) GetTechnologys() []*Technology

func (*Business) ProtoMessage

func (*Business) ProtoMessage()

func (*Business) ProtoReflect

func (x *Business) ProtoReflect() protoreflect.Message

func (*Business) Reset

func (x *Business) Reset()

func (*Business) String

func (x *Business) String() string

type CD

type CD struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id        int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`               // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	CiId      int64 `json:"ci_id,omitempty" gorm:"column:ci_id; default:0; NOT NULL" protobuf:"varint,2,opt,name=ci_id,json=ciId,proto3"` // @gotags: gorm:"column:ci_id; default:0; NOT NULL"
	ServiceId int64 ``                                                                                                                    // @gotags: gorm:"column:service_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	UserId     int64  `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" gorm:"column:user_id; default:0; NOT NULL"` // @gotags: gorm:"column:user_id; default:0; NOT NULL"
	Logs       string `protobuf:"bytes,5,opt,name=logs,proto3" json:"logs,omitempty" gorm:"-"`
	gorm.Model        // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*CD) Descriptor deprecated

func (*CD) Descriptor() ([]byte, []int)

Deprecated: Use CD.ProtoReflect.Descriptor instead.

func (*CD) GetCiId

func (x *CD) GetCiId() int64

func (*CD) GetId

func (x *CD) GetId() int64

func (*CD) GetLogs

func (x *CD) GetLogs() string

func (*CD) GetServiceId

func (x *CD) GetServiceId() int64

func (*CD) GetUserId

func (x *CD) GetUserId() int64

func (*CD) ProtoMessage

func (*CD) ProtoMessage()

func (*CD) ProtoReflect

func (x *CD) ProtoReflect() protoreflect.Message

func (*CD) Reset

func (x *CD) Reset()

func (*CD) String

func (x *CD) String() string

type CI

type CI struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id      int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`           // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Version string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty" gorm:"column:version; default:''; NOT NULL"` // @gotags: gorm:"column:version; default:”; NOT NULL"
	Branch  string   `gorm:"column:branch; default:''; NOT NULL" protobuf:"bytes,3,opt,name=branch,proto3" json:"branch,omitempty"`    // @gotags: gorm:"column:branch; default:”; NOT NULL"
	Tag     string   `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty" gorm:"column:tag; default:''; NOT NULL"`             // @gotags: gorm:"column:tag; default:”; NOT NULL"
	Status  CIStatus ``                                                                                                                // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 134-byte string literal not displayed */
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty" gorm:"column:description; default:''; NOT NULL"` // @gotags: gorm:"column:description; default:”; NOT NULL"
	ServiceId   int64  ``                                                                                                                            // @gotags: gorm:"column:service_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	UserId     int64  `protobuf:"varint,8,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" gorm:"column:user_id; default:0; NOT NULL"` // @gotags: gorm:"column:user_id; default:0; NOT NULL"
	Logs       string `gorm:"-" protobuf:"bytes,9,opt,name=logs,proto3" json:"logs,omitempty"`
	gorm.Model        // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*CI) Descriptor deprecated

func (*CI) Descriptor() ([]byte, []int)

Deprecated: Use CI.ProtoReflect.Descriptor instead.

func (*CI) GetBranch

func (x *CI) GetBranch() string

func (*CI) GetDescription

func (x *CI) GetDescription() string

func (*CI) GetId

func (x *CI) GetId() int64

func (*CI) GetLogs

func (x *CI) GetLogs() string

func (*CI) GetServiceId

func (x *CI) GetServiceId() int64

func (*CI) GetStatus

func (x *CI) GetStatus() CIStatus

func (*CI) GetTag

func (x *CI) GetTag() string

func (*CI) GetUserId

func (x *CI) GetUserId() int64

func (*CI) GetVersion

func (x *CI) GetVersion() string

func (*CI) ProtoMessage

func (*CI) ProtoMessage()

func (*CI) ProtoReflect

func (x *CI) ProtoReflect() protoreflect.Message

func (*CI) Reset

func (x *CI) Reset()

func (*CI) String

func (x *CI) String() string

type CIStatus

type CIStatus int32
const (
	CIStatus_Pending CIStatus = 0
	CIStatus_Success CIStatus = 1
	CIStatus_Failure CIStatus = 2
)

func (CIStatus) Descriptor

func (CIStatus) Descriptor() protoreflect.EnumDescriptor

func (CIStatus) Enum

func (x CIStatus) Enum() *CIStatus

func (CIStatus) EnumDescriptor deprecated

func (CIStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use CIStatus.Descriptor instead.

func (CIStatus) Number

func (x CIStatus) Number() protoreflect.EnumNumber

func (CIStatus) String

func (x CIStatus) String() string

func (CIStatus) Type

type CloudResource

type CloudResource struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id           string `json:"id,omitempty" gorm:"column:id;primaryKey; NOT NULL" protobuf:"bytes,1,opt,name=id,proto3"`                         // @gotags: gorm:"column:id;primaryKey; NOT NULL"
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`                  // @gotags: gorm:"column:name; default:”; NOT NULL"
	RefId        string `json:"ref_id,omitempty" gorm:"column:ref_id; default:''; NOT NULL" protobuf:"bytes,3,opt,name=ref_id,json=refId,proto3"` // @gotags: gorm:"column:ref_id; default:”; NOT NULL"
	AssociatedId string ``                                                                                                                        // @gotags: gorm:"column:associated_id; default:”; NOT NULL"
	/* 147-byte string literal not displayed */
	Type ResourceType `` // @gotags: gorm:"column:type; default:0; NOT NULL"
	/* 132-byte string literal not displayed */
	Tags         string           `protobuf:"bytes,6,opt,name=tags,proto3" json:"tags,omitempty" gorm:"column:tags; default:''; NOT NULL"`     // @gotags: gorm:"column:tags; default:”; NOT NULL"
	Value        string           `gorm:"column:value; default:''; NOT NULL" protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`  // @gotags: gorm:"column:value; default:”; NOT NULL"
	SubResources []*CloudResource `protobuf:"bytes,8,rep,name=sub_resources,json=subResources,proto3" json:"sub_resources,omitempty" gorm:"-"` // @gotags: gorm:"-"
	ClusterId    int64            ``                                                                                                           // @gotags: gorm:"column:cluster_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	ParentId string `` // @gotags: gorm:"column:parent_id; default:”; NOT NULL"
	/* 132-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*CloudResource) Descriptor deprecated

func (*CloudResource) Descriptor() ([]byte, []int)

Deprecated: Use CloudResource.ProtoReflect.Descriptor instead.

func (*CloudResource) GetAssociatedId

func (x *CloudResource) GetAssociatedId() string

func (*CloudResource) GetClusterId

func (x *CloudResource) GetClusterId() int64

func (*CloudResource) GetId

func (x *CloudResource) GetId() string

func (*CloudResource) GetName

func (x *CloudResource) GetName() string

func (*CloudResource) GetParentId

func (x *CloudResource) GetParentId() string

func (*CloudResource) GetRefId

func (x *CloudResource) GetRefId() string

func (*CloudResource) GetSubResources

func (x *CloudResource) GetSubResources() []*CloudResource

func (*CloudResource) GetTags

func (x *CloudResource) GetTags() string

func (*CloudResource) GetType

func (x *CloudResource) GetType() ResourceType

func (*CloudResource) GetValue

func (x *CloudResource) GetValue() string

func (*CloudResource) ProtoMessage

func (*CloudResource) ProtoMessage()

func (*CloudResource) ProtoReflect

func (x *CloudResource) ProtoReflect() protoreflect.Message

func (*CloudResource) Reset

func (x *CloudResource) Reset()

func (*CloudResource) String

func (x *CloudResource) String() string

type Cluster

type Cluster struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id               int64  `gorm:"column:id;primaryKey;AUTO_INCREMENT" protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`           // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name             string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`          // @gotags: gorm:"column:name; default:”; NOT NULL"
	Version          string `gorm:"column:version; default:''; NOT NULL" protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // @gotags: gorm:"column:version; default:”; NOT NULL"
	ApiServerAddress string ``                                                                                                                // @gotags: gorm:"column:api_server_address; default:”; NOT NULL"
	/* 166-byte string literal not displayed */
	Config       string `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty" gorm:"column:config; default:''; NOT NULL"` // @gotags: gorm:"column:config; default:”; NOT NULL"
	Addons       string `json:"addons,omitempty" gorm:"column:addons; default:''; NOT NULL" protobuf:"bytes,6,opt,name=addons,proto3"` // @gotags: gorm:"column:addons; default:”; NOT NULL"
	AddonsConfig string ``                                                                                                             // @gotags: gorm:"column:addons_config; default:”; NOT NULL"
	/* 147-byte string literal not displayed */
	Status ClusterStatus `` // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 139-byte string literal not displayed */
	Type ClusterType `` // @gotags: gorm:"column:type; default:0; NOT NULL"
	/* 131-byte string literal not displayed */
	Level ClusterLevel `` // @gotags: gorm:"column:level; default:0; NOT NULL"
	/* 136-byte string literal not displayed */
	PublicKey string `` // @gotags: gorm:"column:public_key; default:”; NOT NULL"
	/* 136-byte string literal not displayed */
	PrivateKey string `` // @gotags: gorm:"column:private_key; default:”; NOT NULL"
	/* 140-byte string literal not displayed */
	Connections          string `protobuf:"bytes,13,opt,name=connections,proto3" json:"connections,omitempty" gorm:"column:connections; default:''; NOT NULL"` // @gotags: gorm:"column:connections; default:”; NOT NULL"
	CertificateAuthority string ``                                                                                                                             // @gotags: gorm:"column:certificate_authority; default:”; NOT NULL"
	/* 180-byte string literal not displayed */
	Region   string `protobuf:"bytes,15,opt,name=region,proto3" json:"region,omitempty" gorm:"column:region; default:''; NOT NULL"`                // @gotags: gorm:"column:region; default:”; NOT NULL"
	UserId   int64  `json:"user_id,omitempty" gorm:"column:user_id; default:0; NOT NULL" protobuf:"varint,16,opt,name=user_id,json=userId,proto3"` // @gotags: gorm:"column:user_id; default:0; NOT NULL"
	AccessId string ``                                                                                                                             // @gotags: gorm:"column:access_id; default:”; NOT NULL"
	/* 132-byte string literal not displayed */
	AccessKey string `` // @gotags: gorm:"column:access_key; default:”; NOT NULL"
	/* 136-byte string literal not displayed */
	MasterIp string `` // @gotags: gorm:"column:master_ip; default:”; NOT NULL"
	/* 132-byte string literal not displayed */
	MasterUser string `` // @gotags: gorm:"column:master_user; default:”; NOT NULL"
	/* 140-byte string literal not displayed */
	Token    string `protobuf:"bytes,21,opt,name=token,proto3" json:"token,omitempty" gorm:"column:token; default:''; NOT NULL"`                   // @gotags: gorm:"column:token; default:”; NOT NULL"
	CaData   string `protobuf:"bytes,22,opt,name=ca_data,json=caData,proto3" json:"ca_data,omitempty" gorm:"column:ca_data; default:''; NOT NULL"` // @gotags: gorm:"column:ca_data; default:”; NOT NULL"
	CertData string ``                                                                                                                             // @gotags: gorm:"column:cert_data; default:”; NOT NULL"
	/* 132-byte string literal not displayed */
	KeyData string `` // @gotags: gorm:"column:key_data; default:”; NOT NULL"
	/* 128-byte string literal not displayed */
	CloudClusterId string `` // @gotags: gorm:"column:cloud_cluster_id; default:”; NOT NULL"
	/* 159-byte string literal not displayed */
	BostionHost    *BostionHost     `gorm:"-" protobuf:"bytes,26,opt,name=bostion_host,json=bostionHost,proto3" json:"bostion_host,omitempty"`          // @gotags: gorm:"-"
	Nodes          []*Node          `protobuf:"bytes,27,rep,name=nodes,proto3" json:"nodes,omitempty" gorm:"-"`                                         // @gotags: gorm:"-"
	NodeGroups     []*NodeGroup     `protobuf:"bytes,28,rep,name=node_groups,json=nodeGroups,proto3" json:"node_groups,omitempty" gorm:"-"`             // @gotags: gorm:"-"
	CloudResources []*CloudResource `protobuf:"bytes,29,rep,name=cloud_resources,json=cloudResources,proto3" json:"cloud_resources,omitempty" gorm:"-"` // @gotags: gorm:"-"
	SecurityGroups []*SecurityGroup `protobuf:"bytes,30,rep,name=security_groups,json=securityGroups,proto3" json:"security_groups,omitempty" gorm:"-"`
	gorm.Model                      // @gotags: gorm:"-"
	// contains filtered or unexported fields
}

func (*Cluster) AddCloudResource

func (c *Cluster) AddCloudResource(resource *CloudResource)

func (*Cluster) DeleteCloudResource

func (c *Cluster) DeleteCloudResource(resourceType ResourceType)

func (*Cluster) Descriptor deprecated

func (*Cluster) Descriptor() ([]byte, []int)

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetAccessId

func (x *Cluster) GetAccessId() string

func (*Cluster) GetAccessKey

func (x *Cluster) GetAccessKey() string

func (*Cluster) GetAddons

func (x *Cluster) GetAddons() string

func (*Cluster) GetAddonsConfig

func (x *Cluster) GetAddonsConfig() string

func (*Cluster) GetApiServerAddress

func (x *Cluster) GetApiServerAddress() string

func (*Cluster) GetBostionHost

func (x *Cluster) GetBostionHost() *BostionHost

func (*Cluster) GetCaData

func (x *Cluster) GetCaData() string

func (*Cluster) GetCertData

func (x *Cluster) GetCertData() string

func (*Cluster) GetCertificateAuthority

func (x *Cluster) GetCertificateAuthority() string

func (*Cluster) GetCloudClusterId

func (x *Cluster) GetCloudClusterId() string

func (*Cluster) GetCloudResource

func (c *Cluster) GetCloudResource(resourceType ResourceType) []*CloudResource

func (*Cluster) GetCloudResources

func (x *Cluster) GetCloudResources() []*CloudResource

func (*Cluster) GetConfig

func (x *Cluster) GetConfig() string

func (*Cluster) GetConnections

func (x *Cluster) GetConnections() string

func (*Cluster) GetId

func (x *Cluster) GetId() int64

func (*Cluster) GetKeyData

func (x *Cluster) GetKeyData() string

func (*Cluster) GetLevel

func (x *Cluster) GetLevel() ClusterLevel

func (*Cluster) GetMasterIp

func (x *Cluster) GetMasterIp() string

func (*Cluster) GetMasterUser

func (x *Cluster) GetMasterUser() string

func (*Cluster) GetName

func (x *Cluster) GetName() string

func (*Cluster) GetNodeGroup

func (c *Cluster) GetNodeGroup(nodeGroupId string) *NodeGroup

func (*Cluster) GetNodeGroups

func (x *Cluster) GetNodeGroups() []*NodeGroup

func (*Cluster) GetNodes

func (x *Cluster) GetNodes() []*Node

func (*Cluster) GetPrivateKey

func (x *Cluster) GetPrivateKey() string

func (*Cluster) GetPublicKey

func (x *Cluster) GetPublicKey() string

func (*Cluster) GetRegion

func (x *Cluster) GetRegion() string

func (*Cluster) GetSecurityGroups

func (x *Cluster) GetSecurityGroups() []*SecurityGroup

func (*Cluster) GetStatus

func (x *Cluster) GetStatus() ClusterStatus

func (*Cluster) GetToken

func (x *Cluster) GetToken() string

func (*Cluster) GetType

func (x *Cluster) GetType() ClusterType

func (*Cluster) GetUserId

func (x *Cluster) GetUserId() int64

func (*Cluster) GetVersion

func (x *Cluster) GetVersion() string

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) ProtoReflect

func (x *Cluster) ProtoReflect() protoreflect.Message

func (*Cluster) Reset

func (x *Cluster) Reset()

func (*Cluster) SettingCloudClusterInit

func (c *Cluster) SettingCloudClusterInit()

func (*Cluster) SettingClusterAvailability

func (c *Cluster) SettingClusterAvailability()

func (*Cluster) String

func (x *Cluster) String() string

type ClusterData

type ClusterData interface {
	Save(context.Context, *Cluster) error
	Get(context.Context, int64) (*Cluster, error)
	GetByName(context.Context, string) (*Cluster, error)
	List(context.Context, *Cluster) ([]*Cluster, error)
	Delete(context.Context, int64) error
}

type ClusterInfrastructure

type ClusterInfrastructure interface {
	Start(context.Context, *Cluster) error
	Stop(context.Context, *Cluster) error
	GetRegions(context.Context, *Cluster) error
	MigrateToBostionHost(context.Context, *Cluster) error
	GetNodesSystemInfo(context.Context, *Cluster) error
	Install(context.Context, *Cluster) error
	UnInstall(context.Context, *Cluster) error
	HandlerNodes(context.Context, *Cluster) error
}

type ClusterLevel

type ClusterLevel int32
const (
	ClusterLevel_ClusterLevel_UNSPECIFIED ClusterLevel = 0
	ClusterLevel_BASIC                    ClusterLevel = 1
	ClusterLevel_STANDARD                 ClusterLevel = 2
	ClusterLevel_ADVANCED                 ClusterLevel = 3
)

func (ClusterLevel) Descriptor

func (ClusterLevel) Enum

func (x ClusterLevel) Enum() *ClusterLevel

func (ClusterLevel) EnumDescriptor deprecated

func (ClusterLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use ClusterLevel.Descriptor instead.

func (ClusterLevel) Number

func (ClusterLevel) String

func (x ClusterLevel) String() string

func (ClusterLevel) Type

type ClusterRuntime

type ClusterRuntime interface {
	CurrentCluster(context.Context, *Cluster) error
	HandlerNodes(context.Context, *Cluster) error
	MigrateToCluster(context.Context, *Cluster) error
}

type ClusterStatus

type ClusterStatus int32
const (
	ClusterStatus_UNSPECIFIED ClusterStatus = 0
	ClusterStatus_RUNNING     ClusterStatus = 1
	ClusterStatus_DELETED     ClusterStatus = 2
	ClusterStatus_STARTING    ClusterStatus = 3
	ClusterStatus_STOPPING    ClusterStatus = 4
	ClusterStatus_STOPPED     ClusterStatus = 5
)

func (ClusterStatus) Descriptor

func (ClusterStatus) Enum

func (x ClusterStatus) Enum() *ClusterStatus

func (ClusterStatus) EnumDescriptor deprecated

func (ClusterStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ClusterStatus.Descriptor instead.

func (ClusterStatus) Number

func (ClusterStatus) String

func (x ClusterStatus) String() string

func (ClusterStatus) Type

type ClusterType

type ClusterType int32
const (
	ClusterType_ClusterType_UNSPECIFIED ClusterType = 0
	ClusterType_LOCAL                   ClusterType = 1
	ClusterType_AWS_EC2                 ClusterType = 2
	ClusterType_AWS_EKS                 ClusterType = 3
	ClusterType_ALICLOUD_ECS            ClusterType = 4
	ClusterType_ALICLOUD_AKS            ClusterType = 5
	ClusterType_GCP_GKE                 ClusterType = 6
	ClusterType_KUBERNETES              ClusterType = 7
)

func (ClusterType) Descriptor

func (ClusterType) Enum

func (x ClusterType) Enum() *ClusterType

func (ClusterType) EnumDescriptor deprecated

func (ClusterType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ClusterType.Descriptor instead.

func (ClusterType) IsCloud

func (c ClusterType) IsCloud() bool

func (ClusterType) IsIntegratedCloud

func (c ClusterType) IsIntegratedCloud() bool

func (ClusterType) Number

func (x ClusterType) Number() protoreflect.EnumNumber

func (ClusterType) String

func (x ClusterType) String() string

func (ClusterType) Type

type ClusterUsecase

type ClusterUsecase struct {
	// contains filtered or unexported fields
}

func NewClusterUseCase

func NewClusterUseCase(conf *conf.Bootstrap, clusterData ClusterData, clusterInfrastructure ClusterInfrastructure, clusterRuntime ClusterRuntime, logger log.Logger) *ClusterUsecase

func (*ClusterUsecase) Apply

func (uc *ClusterUsecase) Apply(cluster *Cluster) error

func (*ClusterUsecase) Cleanup

func (uc *ClusterUsecase) Cleanup(ctx context.Context) error

func (*ClusterUsecase) Delete

func (uc *ClusterUsecase) Delete(ctx context.Context, clusterID int64) error

func (*ClusterUsecase) DeleteNodes

func (uc *ClusterUsecase) DeleteNodes(ctx context.Context, cluster *Cluster, nodes []*Node) error

func (*ClusterUsecase) Get

func (uc *ClusterUsecase) Get(ctx context.Context, id int64) (*Cluster, error)

func (*ClusterUsecase) GetByName

func (uc *ClusterUsecase) GetByName(ctx context.Context, name string) (*Cluster, error)

func (*ClusterUsecase) GetClusterLevels

func (uc *ClusterUsecase) GetClusterLevels() []ClusterLevel

func (*ClusterUsecase) GetClusterStatus

func (uc *ClusterUsecase) GetClusterStatus() []ClusterStatus

func (*ClusterUsecase) GetClusterTypes

func (uc *ClusterUsecase) GetClusterTypes() []ClusterType

func (*ClusterUsecase) GetCurrentCluster

func (uc *ClusterUsecase) GetCurrentCluster(ctx context.Context) (*Cluster, error)

func (*ClusterUsecase) GetNodeGroupTypes

func (uc *ClusterUsecase) GetNodeGroupTypes() []NodeGroupType

func (*ClusterUsecase) GetNodeRoles

func (uc *ClusterUsecase) GetNodeRoles() []NodeRole

func (*ClusterUsecase) GetNodeStatuses

func (uc *ClusterUsecase) GetNodeStatuses() []NodeStatus

func (*ClusterUsecase) GetRegions

func (uc *ClusterUsecase) GetRegions(ctx context.Context, cluster *Cluster) ([]*CloudResource, error)

func (*ClusterUsecase) GetResourceTypes

func (uc *ClusterUsecase) GetResourceTypes() []ResourceType

func (*ClusterUsecase) List

func (uc *ClusterUsecase) List(ctx context.Context) ([]*Cluster, error)

func (*ClusterUsecase) NodeGroupIncreaseSize

func (uc *ClusterUsecase) NodeGroupIncreaseSize(ctx context.Context, cluster *Cluster, nodeGroup *NodeGroup, size int32) error

func (*ClusterUsecase) NodeGroupTemplateNodeInfo

func (uc *ClusterUsecase) NodeGroupTemplateNodeInfo(ctx context.Context, cluster *Cluster, nodeGroup *NodeGroup) (*Node, error)

func (*ClusterUsecase) Refresh

func (uc *ClusterUsecase) Refresh(ctx context.Context) error

func (*ClusterUsecase) Save

func (uc *ClusterUsecase) Save(ctx context.Context, cluster *Cluster) error

func (*ClusterUsecase) Start

func (uc *ClusterUsecase) Start(ctx context.Context) error

func (*ClusterUsecase) Stop

func (uc *ClusterUsecase) Stop(ctx context.Context) error

type Node

type Node struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`        // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name       string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`       // @gotags: gorm:"column:name; default:”; NOT NULL"
	Labels     string `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty" gorm:"column:labels; default:''; NOT NULL"` // @gotags: gorm:"column:labels; default:”; NOT NULL"
	InternalIp string ``                                                                                                             // @gotags: gorm:"column:internal_ip; default:”; NOT NULL"
	/* 139-byte string literal not displayed */
	ExternalIp string `` // @gotags: gorm:"column:external_ip; default:”; NOT NULL"
	/* 139-byte string literal not displayed */
	User string   `json:"user,omitempty" gorm:"column:user; default:''; NOT NULL" protobuf:"bytes,6,opt,name=user,proto3"` // @gotags: gorm:"column:user; default:”; NOT NULL"
	Role NodeRole ``                                                                                                       // @gotags: gorm:"column:role; default:0; NOT NULL"
	/* 128-byte string literal not displayed */
	Status NodeStatus `` // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 136-byte string literal not displayed */
	ClusterId int64 `` // @gotags: gorm:"column:cluster_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	NodeGroupId string `` // @gotags: gorm:"column:node_group_id; default:”; NOT NULL"
	/* 147-byte string literal not displayed */
	InstanceId string `` // @gotags: gorm:"column:instance_id; default:”; NOT NULL"
	/* 140-byte string literal not displayed */
	ErrorInfo string `` // @gotags: gorm:"column:error_info; default:”; NOT NULL"
	/* 136-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetClusterId

func (x *Node) GetClusterId() int64

func (*Node) GetErrorInfo

func (x *Node) GetErrorInfo() string

func (*Node) GetExternalIp

func (x *Node) GetExternalIp() string

func (*Node) GetId

func (x *Node) GetId() int64

func (*Node) GetInstanceId

func (x *Node) GetInstanceId() string

func (*Node) GetInternalIp

func (x *Node) GetInternalIp() string

func (*Node) GetLabels

func (x *Node) GetLabels() string

func (*Node) GetName

func (x *Node) GetName() string

func (*Node) GetNodeGroupId

func (x *Node) GetNodeGroupId() string

func (*Node) GetRole

func (x *Node) GetRole() NodeRole

func (*Node) GetStatus

func (x *Node) GetStatus() NodeStatus

func (*Node) GetUser

func (x *Node) GetUser() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type NodeArchType

type NodeArchType int32
const (
	NodeArchType_NodeArchType_UNSPECIFIED NodeArchType = 0
	NodeArchType_AMD64                    NodeArchType = 1
	NodeArchType_ARM64                    NodeArchType = 2
)

func (NodeArchType) Descriptor

func (NodeArchType) Enum

func (x NodeArchType) Enum() *NodeArchType

func (NodeArchType) EnumDescriptor deprecated

func (NodeArchType) EnumDescriptor() ([]byte, []int)

Deprecated: Use NodeArchType.Descriptor instead.

func (NodeArchType) Number

func (NodeArchType) String

func (x NodeArchType) String() string

func (NodeArchType) Type

type NodeGPUSpec

type NodeGPUSpec int32
const (
	NodeGPUSpec_NodeGPUSpec_UNSPECIFIED NodeGPUSpec = 0
	NodeGPUSpec_NVIDIA_A10              NodeGPUSpec = 1
	NodeGPUSpec_NVIDIA_V100             NodeGPUSpec = 2
	NodeGPUSpec_NVIDIA_T4               NodeGPUSpec = 3
	NodeGPUSpec_NVIDIA_P100             NodeGPUSpec = 4
	NodeGPUSpec_NVIDIA_P4               NodeGPUSpec = 5
)

func (NodeGPUSpec) Descriptor

func (NodeGPUSpec) Enum

func (x NodeGPUSpec) Enum() *NodeGPUSpec

func (NodeGPUSpec) EnumDescriptor deprecated

func (NodeGPUSpec) EnumDescriptor() ([]byte, []int)

Deprecated: Use NodeGPUSpec.Descriptor instead.

func (NodeGPUSpec) Number

func (x NodeGPUSpec) Number() protoreflect.EnumNumber

func (NodeGPUSpec) String

func (x NodeGPUSpec) String() string

func (NodeGPUSpec) Type

type NodeGroup

type NodeGroup struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id   string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey; NOT NULL"`        // @gotags: gorm:"column:id;primaryKey; NOT NULL"
	Name string        `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"` // @gotags: gorm:"column:name; default:”; NOT NULL"
	Type NodeGroupType ``                                                                                                       // @gotags: gorm:"column:type; default:0; NOT NULL"
	/* 133-byte string literal not displayed */
	Image            string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty" gorm:"column:image; default:''; NOT NULL"` // @gotags: gorm:"column:image; default:”; NOT NULL"
	ImageDescription string ``                                                                                                          // @gotags: gorm:"column:image_description; default:”; NOT NULL"
	/* 163-byte string literal not displayed */
	Os   string       `json:"os,omitempty" gorm:"column:os; default:''; NOT NULL" protobuf:"bytes,6,opt,name=os,proto3"` // @gotags: gorm:"column:os; default:”; NOT NULL"
	Arch NodeArchType ``                                                                                                 // @gotags: gorm:"column:arch; default:0; NOT NULL"
	/* 132-byte string literal not displayed */
	Cpu     int32       `protobuf:"varint,8,opt,name=cpu,proto3" json:"cpu,omitempty" gorm:"column:cpu; default:0; NOT NULL"`          // @gotags: gorm:"column:cpu; default:0; NOT NULL"
	Memory  int32       `protobuf:"varint,9,opt,name=memory,proto3" json:"memory,omitempty" gorm:"column:memory; default:0; NOT NULL"` // @gotags: gorm:"column:memory; default:0; NOT NULL"
	Gpu     int32       `protobuf:"varint,10,opt,name=gpu,proto3" json:"gpu,omitempty" gorm:"column:gpu; default:0; NOT NULL"`         // @gotags: gorm:"column:gpu; default:0; NOT NULL"
	GpuSpec NodeGPUSpec ``                                                                                                             // @gotags: gorm:"column:gpu_spec; default:0; NOT NULL"
	/* 157-byte string literal not displayed */
	SystemDiskSize int32 `` // @gotags: gorm:"column:system_disk_size; default:0; NOT NULL"
	/* 159-byte string literal not displayed */
	DataDiskSize int32 `` // @gotags: gorm:"column:data_disk_size; default:0; NOT NULL"
	/* 151-byte string literal not displayed */
	RootDeviceName string `` // @gotags: gorm:"column:root_device_name; default:”; NOT NULL"
	/* 159-byte string literal not displayed */
	DataDeviceName string `` // @gotags: gorm:"column:data_device_name; default:”; NOT NULL"
	/* 159-byte string literal not displayed */
	MinSize int32 `` // @gotags: gorm:"column:min_size; default:0; NOT NULL"
	/* 128-byte string literal not displayed */
	MaxSize int32 `` // @gotags: gorm:"column:max_size; default:0; NOT NULL"
	/* 128-byte string literal not displayed */
	TargetSize int32 `` // @gotags: gorm:"column:target_size; default:0; NOT NULL"
	/* 140-byte string literal not displayed */
	InstanceType string `` // @gotags: gorm:"column:instance_type; default:”; NOT NULL"
	/* 148-byte string literal not displayed */
	DefaultUsername string `` // @gotags: gorm:"column:default_username; default:”; NOT NULL"
	/* 160-byte string literal not displayed */
	NodePrice float32 `` // @gotags: gorm:"column:node_price; default:0; NOT NULL"
	/* 137-byte string literal not displayed */
	PodPrice float32 `` // @gotags: gorm:"column:pod_price; default:0; NOT NULL"
	/* 133-byte string literal not displayed */
	Zone         string `protobuf:"bytes,23,opt,name=zone,proto3" json:"zone,omitempty" gorm:"column:zone; default:''; NOT NULL"` // @gotags: gorm:"column:zone; default:”; NOT NULL"
	SubnetIpCidr string ``                                                                                                        // @gotags: gorm:"column:subnet_ip_cidr; default:”; NOT NULL"
	/* 151-byte string literal not displayed */
	NodeInitScript string `` // @gotags: gorm:"column:cloud_init_script; default:”; NOT NULL"
	/* 160-byte string literal not displayed */
	ClusterId int64 `` // @gotags: gorm:"column:cluster_id; default:0; NOT NULL"
	/* 136-byte string literal not displayed */
	CloudNodeGroupId string `` // @gotags: gorm:"column:cloud_node_group_id; default:”; NOT NULL"
	/* 170-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*NodeGroup) Descriptor deprecated

func (*NodeGroup) Descriptor() ([]byte, []int)

Deprecated: Use NodeGroup.ProtoReflect.Descriptor instead.

func (*NodeGroup) GetArch

func (x *NodeGroup) GetArch() NodeArchType

func (*NodeGroup) GetCloudNodeGroupId

func (x *NodeGroup) GetCloudNodeGroupId() string

func (*NodeGroup) GetClusterId

func (x *NodeGroup) GetClusterId() int64

func (*NodeGroup) GetCpu

func (x *NodeGroup) GetCpu() int32

func (*NodeGroup) GetDataDeviceName

func (x *NodeGroup) GetDataDeviceName() string

func (*NodeGroup) GetDataDiskSize

func (x *NodeGroup) GetDataDiskSize() int32

func (*NodeGroup) GetDefaultUsername

func (x *NodeGroup) GetDefaultUsername() string

func (*NodeGroup) GetGpu

func (x *NodeGroup) GetGpu() int32

func (*NodeGroup) GetGpuSpec

func (x *NodeGroup) GetGpuSpec() NodeGPUSpec

func (*NodeGroup) GetId

func (x *NodeGroup) GetId() string

func (*NodeGroup) GetImage

func (x *NodeGroup) GetImage() string

func (*NodeGroup) GetImageDescription

func (x *NodeGroup) GetImageDescription() string

func (*NodeGroup) GetInstanceType

func (x *NodeGroup) GetInstanceType() string

func (*NodeGroup) GetMaxSize

func (x *NodeGroup) GetMaxSize() int32

func (*NodeGroup) GetMemory

func (x *NodeGroup) GetMemory() int32

func (*NodeGroup) GetMinSize

func (x *NodeGroup) GetMinSize() int32

func (*NodeGroup) GetName

func (x *NodeGroup) GetName() string

func (*NodeGroup) GetNodeInitScript

func (x *NodeGroup) GetNodeInitScript() string

func (*NodeGroup) GetNodePrice

func (x *NodeGroup) GetNodePrice() float32

func (*NodeGroup) GetOs

func (x *NodeGroup) GetOs() string

func (*NodeGroup) GetPodPrice

func (x *NodeGroup) GetPodPrice() float32

func (*NodeGroup) GetRootDeviceName

func (x *NodeGroup) GetRootDeviceName() string

func (*NodeGroup) GetSubnetIpCidr

func (x *NodeGroup) GetSubnetIpCidr() string

func (*NodeGroup) GetSystemDiskSize

func (x *NodeGroup) GetSystemDiskSize() int32

func (*NodeGroup) GetTargetSize

func (x *NodeGroup) GetTargetSize() int32

func (*NodeGroup) GetType

func (x *NodeGroup) GetType() NodeGroupType

func (*NodeGroup) GetZone

func (x *NodeGroup) GetZone() string

func (*NodeGroup) ProtoMessage

func (*NodeGroup) ProtoMessage()

func (*NodeGroup) ProtoReflect

func (x *NodeGroup) ProtoReflect() protoreflect.Message

func (*NodeGroup) Reset

func (x *NodeGroup) Reset()

func (*NodeGroup) SetTargetSize

func (ng *NodeGroup) SetTargetSize(size int32)

func (*NodeGroup) String

func (x *NodeGroup) String() string

type NodeGroupType

type NodeGroupType int32
const (
	NodeGroupType_NodeGroupType_UNSPECIFIED NodeGroupType = 0
	NodeGroupType_NORMAL                    NodeGroupType = 1
	NodeGroupType_HIGH_COMPUTATION          NodeGroupType = 2
	NodeGroupType_GPU_ACCELERATERD          NodeGroupType = 3
	NodeGroupType_HIGH_MEMORY               NodeGroupType = 4
	NodeGroupType_LARGE_HARD_DISK           NodeGroupType = 5
)

func (NodeGroupType) Descriptor

func (NodeGroupType) Enum

func (x NodeGroupType) Enum() *NodeGroupType

func (NodeGroupType) EnumDescriptor deprecated

func (NodeGroupType) EnumDescriptor() ([]byte, []int)

Deprecated: Use NodeGroupType.Descriptor instead.

func (NodeGroupType) Number

func (NodeGroupType) String

func (x NodeGroupType) String() string

func (NodeGroupType) Type

type NodeRole

type NodeRole int32
const (
	NodeRole_NodeRole_UNSPECIFIED NodeRole = 0
	NodeRole_MASTER               NodeRole = 1
	NodeRole_WORKER               NodeRole = 2
	NodeRole_EDGE                 NodeRole = 3
)

func (NodeRole) Descriptor

func (NodeRole) Descriptor() protoreflect.EnumDescriptor

func (NodeRole) Enum

func (x NodeRole) Enum() *NodeRole

func (NodeRole) EnumDescriptor deprecated

func (NodeRole) EnumDescriptor() ([]byte, []int)

Deprecated: Use NodeRole.Descriptor instead.

func (NodeRole) Number

func (x NodeRole) Number() protoreflect.EnumNumber

func (NodeRole) String

func (x NodeRole) String() string

func (NodeRole) Type

type NodeStatus

type NodeStatus int32
const (
	NodeStatus_NodeStatus_UNSPECIFIED NodeStatus = 0
	NodeStatus_NODE_UNSPECIFIED       NodeStatus = 1
	NodeStatus_NODE_RUNNING           NodeStatus = 2
	NodeStatus_NODE_CREATING          NodeStatus = 3
	NodeStatus_NODE_DELETING          NodeStatus = 4
	NodeStatus_NODE_DELETED           NodeStatus = 5
	NodeStatus_NODE_ERROR             NodeStatus = 6
	NodeStatus_NODE_PENDING           NodeStatus = 7
)

func (NodeStatus) Descriptor

func (NodeStatus) Descriptor() protoreflect.EnumDescriptor

func (NodeStatus) Enum

func (x NodeStatus) Enum() *NodeStatus

func (NodeStatus) EnumDescriptor deprecated

func (NodeStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use NodeStatus.Descriptor instead.

func (NodeStatus) Number

func (x NodeStatus) Number() protoreflect.EnumNumber

func (NodeStatus) String

func (x NodeStatus) String() string

func (NodeStatus) Type

type Port

type Port struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"` // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	IngressPath string ``                                                                                                      // @gotags: gorm:"column:ingress_path; default:”; NOT NULL"
	/* 143-byte string literal not displayed */
	Protocol      string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty" gorm:"column:protocol; default:''; NOT NULL"` // @gotags: gorm:"column:protocol; default:”; NOT NULL"
	ContainerPort int32  ``                                                                                                                   // @gotags: gorm:"column:container_port; default:0; NOT NULL"
	/* 151-byte string literal not displayed */
	ServiceId int64 `` // @gotags: gorm:"column:service_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*Port) Descriptor deprecated

func (*Port) Descriptor() ([]byte, []int)

Deprecated: Use Port.ProtoReflect.Descriptor instead.

func (*Port) GetContainerPort

func (x *Port) GetContainerPort() int32

func (*Port) GetId

func (x *Port) GetId() int64

func (*Port) GetIngressPath

func (x *Port) GetIngressPath() string

func (*Port) GetProtocol

func (x *Port) GetProtocol() string

func (*Port) GetServiceId

func (x *Port) GetServiceId() int64

func (*Port) ProtoMessage

func (*Port) ProtoMessage()

func (*Port) ProtoReflect

func (x *Port) ProtoReflect() protoreflect.Message

func (*Port) Reset

func (x *Port) Reset()

func (*Port) String

func (x *Port) String() string

type Project

type Project struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`                     // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`                    // @gotags: gorm:"column:name; default:”; NOT NULL"
	Description string `gorm:"column:namespace; default:''; NOT NULL" protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // @gotags: gorm:"column:namespace; default:”; NOT NULL"
	ClusterId   int64  ``                                                                                                                          // @gotags: gorm:"column:cluster_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	Namespace string        `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty" gorm:"column:namespace; default:''; NOT NULL"` // @gotags: gorm:"column:namespace; default:”; NOT NULL"
	Status    ProjectStatus ``                                                                                                                      // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 139-byte string literal not displayed */
	Business           []*Business `protobuf:"bytes,7,rep,name=business,proto3" json:"business,omitempty" gorm:"-"` // @gotags: gorm:"-"
	BusinessTechnology string      ``                                                                               // @gotags: gorm:"column:business_technology; default:”; NOT NULL"
	/* 171-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*Project) Descriptor deprecated

func (*Project) Descriptor() ([]byte, []int)

Deprecated: Use Project.ProtoReflect.Descriptor instead.

func (*Project) GetBusiness

func (x *Project) GetBusiness() []*Business

func (*Project) GetBusinessTechnology

func (x *Project) GetBusinessTechnology() string

func (*Project) GetClusterId

func (x *Project) GetClusterId() int64

func (*Project) GetDescription

func (x *Project) GetDescription() string

func (*Project) GetId

func (x *Project) GetId() int64

func (*Project) GetName

func (x *Project) GetName() string

func (*Project) GetNamespace

func (x *Project) GetNamespace() string

func (*Project) GetStatus

func (x *Project) GetStatus() ProjectStatus

func (*Project) ProtoMessage

func (*Project) ProtoMessage()

func (*Project) ProtoReflect

func (x *Project) ProtoReflect() protoreflect.Message

func (*Project) Reset

func (x *Project) Reset()

func (*Project) String

func (x *Project) String() string

type ProjectData

type ProjectData interface {
	Save(context.Context, *Project) error
	Get(context.Context, int64) (*Project, error)
	GetByName(context.Context, string) (*Project, error)
	List(context.Context, int64) ([]*Project, error)
	ListByIds(context.Context, []int64) ([]*Project, error)
	Delete(context.Context, int64) error
}

type ProjectRuntime

type ProjectRuntime interface {
	CreateNamespace(context.Context, string) error
	GetNamespaces(context.Context) (namespaces []string, err error)
}

type ProjectStatus

type ProjectStatus int32
const (
	ProjectStatus_PROJECT_INIT    ProjectStatus = 0
	ProjectStatus_PROJECT_RUNNING ProjectStatus = 1
	ProjectStatus_PROJECT_STOPPED ProjectStatus = 2
)

func (ProjectStatus) Descriptor

func (ProjectStatus) Enum

func (x ProjectStatus) Enum() *ProjectStatus

func (ProjectStatus) EnumDescriptor deprecated

func (ProjectStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProjectStatus.Descriptor instead.

func (ProjectStatus) Number

func (ProjectStatus) String

func (x ProjectStatus) String() string

func (ProjectStatus) Type

type ProjectUsecase

type ProjectUsecase struct {
	ProjectRuntime ProjectRuntime
	// contains filtered or unexported fields
}

func NewProjectUseCase

func NewProjectUseCase(projectData ProjectData, ProjectTime ProjectRuntime, logger log.Logger, conf *conf.Bootstrap) *ProjectUsecase

func (*ProjectUsecase) Delete

func (uc *ProjectUsecase) Delete(ctx context.Context, id int64) error

func (*ProjectUsecase) Get

func (uc *ProjectUsecase) Get(ctx context.Context, id int64) (*Project, error)

func (*ProjectUsecase) Init

func (uc *ProjectUsecase) Init(ctx context.Context) error

project init

func (*ProjectUsecase) List

func (uc *ProjectUsecase) List(ctx context.Context, clusterID int64) ([]*Project, error)

func (*ProjectUsecase) ListByIds

func (uc *ProjectUsecase) ListByIds(ctx context.Context, ids []int64) ([]*Project, error)

func (*ProjectUsecase) Save

func (uc *ProjectUsecase) Save(ctx context.Context, project *Project) error

type QueueKey

type QueueKey string

func (QueueKey) String

func (k QueueKey) String() string

type ResourceType

type ResourceType int32
const (
	ResourceType_RESOURCE_TYPE_UNSPECIFIED ResourceType = 0
	ResourceType_VPC                       ResourceType = 1
	ResourceType_SUBNET                    ResourceType = 2
	ResourceType_INTERNET_GATEWAY          ResourceType = 3
	ResourceType_NAT_GATEWAY               ResourceType = 4
	ResourceType_ROUTE_TABLE               ResourceType = 5
	ResourceType_SECURITY_GROUP            ResourceType = 6
	ResourceType_LOAD_BALANCER             ResourceType = 7
	ResourceType_ELASTIC_IP                ResourceType = 8
	ResourceType_AVAILABILITY_ZONES        ResourceType = 9
	ResourceType_KEY_PAIR                  ResourceType = 10
	ResourceType_VPC_ENDPOINT_S3           ResourceType = 11
	ResourceType_DATA_DEVICE               ResourceType = 12
	ResourceType_INSTANCE_TYPE             ResourceType = 13
)

func (ResourceType) Descriptor

func (ResourceType) Enum

func (x ResourceType) Enum() *ResourceType

func (ResourceType) EnumDescriptor deprecated

func (ResourceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResourceType.Descriptor instead.

func (ResourceType) Number

func (ResourceType) String

func (x ResourceType) String() string

func (ResourceType) Type

type ResourceTypeKeyValue

type ResourceTypeKeyValue int32
const (
	ResourceTypeKeyValue_ResourceTypeKeyValue_UNSPECIFIED ResourceTypeKeyValue = 0
	ResourceTypeKeyValue_NAME                             ResourceTypeKeyValue = 1
	ResourceTypeKeyValue_ACCESS                           ResourceTypeKeyValue = 2
	ResourceTypeKeyValue_ZONE                             ResourceTypeKeyValue = 3
	ResourceTypeKeyValue_SECURITY_GROUP_TYPE              ResourceTypeKeyValue = 4
	ResourceTypeKeyValue_VPC_REFID                        ResourceTypeKeyValue = 5
	ResourceTypeKeyValue_ACCESS_PRIVATE                   ResourceTypeKeyValue = 6
	ResourceTypeKeyValue_ACCESS_PUBLIC                    ResourceTypeKeyValue = 7
	ResourceTypeKeyValue_SECURITY_GROUP_TYPE_CLUSTER      ResourceTypeKeyValue = 8
	ResourceTypeKeyValue_SECURITY_GROUP_TYPE_BOSTION      ResourceTypeKeyValue = 9
)

func (ResourceTypeKeyValue) Descriptor

func (ResourceTypeKeyValue) Enum

func (ResourceTypeKeyValue) EnumDescriptor deprecated

func (ResourceTypeKeyValue) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResourceTypeKeyValue.Descriptor instead.

func (ResourceTypeKeyValue) Number

func (ResourceTypeKeyValue) String

func (x ResourceTypeKeyValue) String() string

func (ResourceTypeKeyValue) Type

type SecurityGroup

type SecurityGroup struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey; NOT NULL"`                             // @gotags: gorm:"column:id;primaryKey; NOT NULL"
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`                      // @gotags: gorm:"column:name; default:”; NOT NULL"
	Description string `json:"description,omitempty" gorm:"column:description; default:''; NOT NULL" protobuf:"bytes,3,opt,name=description,proto3"` // @gotags: gorm:"column:description; default:”; NOT NULL"
	VpcId       string `protobuf:"bytes,4,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty" gorm:"column:vpc_id; default:''; NOT NULL"`     // @gotags: gorm:"column:vpc_id; default:”; NOT NULL"
	StartPort   int32  ``                                                                                                                            // @gotags: gorm:"column:start_port; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	EndPort int32 `` // @gotags: gorm:"column:end_port; default:0; NOT NULL"
	/* 127-byte string literal not displayed */
	Protocol  string `protobuf:"bytes,7,opt,name=protocol,proto3" json:"protocol,omitempty" gorm:"column:protocol; default:''; NOT NULL"`          // @gotags: gorm:"column:protocol; default:”; NOT NULL"
	IpCidr    string `protobuf:"bytes,8,opt,name=ip_cidr,json=ipCidr,proto3" json:"ip_cidr,omitempty" gorm:"column:ip_cidr; default:''; NOT NULL"` // @gotags: gorm:"column:ip_cidr; default:”; NOT NULL"
	ClusterId int64  ``                                                                                                                            // @gotags: gorm:"column:cluster_id; default:0; NOT NULL"
	/* 135-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*SecurityGroup) Descriptor deprecated

func (*SecurityGroup) Descriptor() ([]byte, []int)

Deprecated: Use SecurityGroup.ProtoReflect.Descriptor instead.

func (*SecurityGroup) GetClusterId

func (x *SecurityGroup) GetClusterId() int64

func (*SecurityGroup) GetDescription

func (x *SecurityGroup) GetDescription() string

func (*SecurityGroup) GetEndPort

func (x *SecurityGroup) GetEndPort() int32

func (*SecurityGroup) GetId

func (x *SecurityGroup) GetId() string

func (*SecurityGroup) GetIpCidr

func (x *SecurityGroup) GetIpCidr() string

func (*SecurityGroup) GetName

func (x *SecurityGroup) GetName() string

func (*SecurityGroup) GetProtocol

func (x *SecurityGroup) GetProtocol() string

func (*SecurityGroup) GetStartPort

func (x *SecurityGroup) GetStartPort() int32

func (*SecurityGroup) GetVpcId

func (x *SecurityGroup) GetVpcId() string

func (*SecurityGroup) ProtoMessage

func (*SecurityGroup) ProtoMessage()

func (*SecurityGroup) ProtoReflect

func (x *SecurityGroup) ProtoReflect() protoreflect.Message

func (*SecurityGroup) Reset

func (x *SecurityGroup) Reset()

func (*SecurityGroup) String

func (x *SecurityGroup) String() string

type Service

type Service struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id       int64  `gorm:"column:id;primaryKey;AUTO_INCREMENT" protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`  // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"` // @gotags: gorm:"column:name; default:”; NOT NULL"
	CodeRepo string ``                                                                                                       // @gotags: gorm:"column:code_repo; default:”; NOT NULL"
	/* 131-byte string literal not displayed */
	Replicas int32   `protobuf:"varint,4,opt,name=replicas,proto3" json:"replicas,omitempty" gorm:"column:replicas; default:0; NOT NULL"` // @gotags: gorm:"column:replicas; default:0; NOT NULL"
	Cpu      float32 `protobuf:"fixed32,5,opt,name=cpu,proto3" json:"cpu,omitempty" gorm:"column:cpu; default:0; NOT NULL"`               // @gotags: gorm:"column:cpu; default:0; NOT NULL"
	LimitCpu float32 ``                                                                                                                   // @gotags: gorm:"column:limit_cpu; default:0; NOT NULL"
	/* 132-byte string literal not displayed */
	Gpu      float32 `protobuf:"fixed32,7,opt,name=gpu,proto3" json:"gpu,omitempty" gorm:"column:gpu; default:0; NOT NULL"` // @gotags: gorm:"column:gpu; default:0; NOT NULL"
	LimitGpu float32 ``                                                                                                     // @gotags: gorm:"column:limit_gpu; default:0; NOT NULL"
	/* 132-byte string literal not displayed */
	Memory      float32 `protobuf:"fixed32,9,opt,name=memory,proto3" json:"memory,omitempty" gorm:"column:memory; default:0; NOT NULL"` // @gotags: gorm:"column:memory; default:0; NOT NULL"
	LimitMemory float32 ``                                                                                                              // @gotags: gorm:"column:limit_memory; default:0; NOT NULL"
	/* 145-byte string literal not displayed */
	Disk      float32 `protobuf:"fixed32,11,opt,name=disk,proto3" json:"disk,omitempty" gorm:"column:disk; default:0; NOT NULL"` // @gotags: gorm:"column:disk; default:0; NOT NULL"
	LimitDisk float32 ``                                                                                                         // @gotags: gorm:"column:limit_disk; default:0; NOT NULL"
	/* 137-byte string literal not displayed */
	Business   string  `protobuf:"bytes,13,opt,name=business,proto3" json:"business,omitempty" gorm:"column:business; default:''; NOT NULL"`       // @gotags: gorm:"column:business; default:”; NOT NULL"
	Technology string  `json:"technology,omitempty" gorm:"column:technology; default:''; NOT NULL" protobuf:"bytes,14,opt,name=technology,proto3"` // @gotags: gorm:"column:technology; default:”; NOT NULL"
	Ports      []*Port `protobuf:"bytes,15,rep,name=ports,proto3" json:"ports,omitempty" gorm:"-"`                                                 // @gotags: gorm:"-"
	ProjectId  int64   ``                                                                                                                          // @gotags: gorm:"column:project_id; default:0; NOT NULL"
	/* 136-byte string literal not displayed */
	CiWorkflowId int64 `` // @gotags: gorm:"column:ci_workflow_id; default:0; NOT NULL"
	/* 151-byte string literal not displayed */
	CdWorkflowId int64 `` // @gotags: gorm:"column:cd_workflow_id; default:0; NOT NULL"
	/* 151-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetBusiness

func (x *Service) GetBusiness() string

func (*Service) GetCdWorkflowId

func (x *Service) GetCdWorkflowId() int64

func (*Service) GetCiWorkflowId

func (x *Service) GetCiWorkflowId() int64

func (*Service) GetCodeRepo

func (x *Service) GetCodeRepo() string

func (*Service) GetCpu

func (x *Service) GetCpu() float32

func (*Service) GetDisk

func (x *Service) GetDisk() float32

func (*Service) GetGpu

func (x *Service) GetGpu() float32

func (*Service) GetId

func (x *Service) GetId() int64

func (*Service) GetLimitCpu

func (x *Service) GetLimitCpu() float32

func (*Service) GetLimitDisk

func (x *Service) GetLimitDisk() float32

func (*Service) GetLimitGpu

func (x *Service) GetLimitGpu() float32

func (*Service) GetLimitMemory

func (x *Service) GetLimitMemory() float32

func (*Service) GetMemory

func (x *Service) GetMemory() float32

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetPorts

func (x *Service) GetPorts() []*Port

func (*Service) GetProjectId

func (x *Service) GetProjectId() int64

func (*Service) GetReplicas

func (x *Service) GetReplicas() int32

func (*Service) GetTechnology

func (x *Service) GetTechnology() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type ServicesData

type ServicesData interface {
	List(ctx context.Context, serviceParam *Service, page, pageSize int) ([]*Service, int64, error)
	Save(ctx context.Context, service *Service) error
	Get(ctx context.Context, id int64) (*Service, error)
	Delete(ctx context.Context, id int64) error
	GetWorkflow(ctx context.Context, id int64) (*Workflow, error)
	SaveWrkflow(ctx context.Context, workflow *Workflow) error
	DeleteWrkflow(ctx context.Context, id int64) error
	GetServiceCis(ctx context.Context, serviceId int64, page, pageSize int32) ([]*CI, int64, error)
}

type ServicesUseCase

type ServicesUseCase struct {
	// contains filtered or unexported fields
}

func NewServicesUseCase

func NewServicesUseCase(serviceData ServicesData, wfRuntime WorkflowRuntime, logger log.Logger) *ServicesUseCase

func (*ServicesUseCase) CommitWorklfow

func (uc *ServicesUseCase) CommitWorklfow(ctx context.Context, project *Project, service *Service, wfType WorkflowType, workflowsId int64) error

func (*ServicesUseCase) Delete

func (uc *ServicesUseCase) Delete(ctx context.Context, id int64) error

func (*ServicesUseCase) Get

func (uc *ServicesUseCase) Get(ctx context.Context, id int64) (*Service, error)

func (*ServicesUseCase) GetServiceCis

func (uc *ServicesUseCase) GetServiceCis(ctx context.Context, serviceId int64, page, pageSize int32) ([]*CI, int64, error)

func (*ServicesUseCase) GetWorkflow

func (uc *ServicesUseCase) GetWorkflow(ctx context.Context, id int64, wfType WorkflowType) (*Workflow, error)

func (*ServicesUseCase) Init

func (uc *ServicesUseCase) Init(ctx context.Context) error

func (*ServicesUseCase) List

func (uc *ServicesUseCase) List(ctx context.Context, serviceParam *Service, page, pageSize int) ([]*Service, int64, error)

func (*ServicesUseCase) Save

func (uc *ServicesUseCase) Save(ctx context.Context, service *Service) error

func (*ServicesUseCase) SaveWorkflow

func (uc *ServicesUseCase) SaveWorkflow(ctx context.Context, serviceId int64, wfType WorkflowType, wf *Workflow) error

type Technology

type Technology struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`  // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name       string `gorm:"column:name; default:''; NOT NULL" protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // @gotags: gorm:"column:name; default:”; NOT NULL"
	BusinessId int64  ``                                                                                                       // @gotags: gorm:"column:business_id; default:0; NOT NULL"
	/* 139-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*Technology) Descriptor deprecated

func (*Technology) Descriptor() ([]byte, []int)

Deprecated: Use Technology.ProtoReflect.Descriptor instead.

func (*Technology) GetBusinessId

func (x *Technology) GetBusinessId() int64

func (*Technology) GetId

func (x *Technology) GetId() int64

func (*Technology) GetName

func (x *Technology) GetName() string

func (*Technology) ProtoMessage

func (*Technology) ProtoMessage()

func (*Technology) ProtoReflect

func (x *Technology) ProtoReflect() protoreflect.Message

func (*Technology) Reset

func (x *Technology) Reset()

func (*Technology) String

func (x *Technology) String() string

type Thirdparty

type Thirdparty interface {
	GetUserEmail(ctx context.Context, token string) (string, error)
}

type User

type User struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id       int64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT"`              // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name     string     `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"column:name; default:''; NOT NULL"`             // @gotags: gorm:"column:name; default:”; NOT NULL"
	Email    string     `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty" gorm:"column:email; default:''; NOT NULL"`          // @gotags: gorm:"column:email; default:”; NOT NULL"
	Password string     `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty" gorm:"column:password; default:''; NOT NULL"` // @gotags: gorm:"column:password; default:”; NOT NULL"
	Status   UserStatus ``                                                                                                                   // @gotags: gorm:"column:status; default:0; NOT NULL"
	/* 133-byte string literal not displayed */
	AccessToken string       `protobuf:"bytes,6,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty" gorm:"-"` // @gotags: gorm:"-"`
	SignType    UserSignType ``                                                                                                        // @gotags: gorm:"column:sign_type; default:0; NOT NULL"
	/* 158-byte string literal not displayed */
	gorm.Model
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAccessToken

func (x *User) GetAccessToken() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetSignType

func (x *User) GetSignType() UserSignType

func (*User) GetStatus

func (x *User) GetStatus() UserStatus

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserData

type UserData interface {
	GetUserInfoByEmail(ctx context.Context, email string) (*User, error)
	GetUserByID(ctx context.Context, id int64) (*User, error)
	Save(ctx context.Context, user *User) error
	GetUserByBatchID(ctx context.Context, ids []int64) ([]*User, error)
	GetUsers(ctx context.Context, username, email string, pageNum, pageSize int) (users []*User, total int64, err error)
	DeleteUser(ctx context.Context, id int64) error
	SignIn(context.Context, *User) error
	GetUserEmail(ctx context.Context, token string) (string, error)
}

type UserKey

type UserKey string

func (UserKey) String

func (u UserKey) String() string

type UserSignType

type UserSignType int32
const (
	UserSignType_CREDENTIALS UserSignType = 0
	UserSignType_GITHUB      UserSignType = 1
)

func (UserSignType) Descriptor

func (UserSignType) Enum

func (x UserSignType) Enum() *UserSignType

func (UserSignType) EnumDescriptor deprecated

func (UserSignType) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserSignType.Descriptor instead.

func (UserSignType) Number

func (UserSignType) String

func (x UserSignType) String() string

func (UserSignType) Type

type UserStatus

type UserStatus int32
const (
	UserStatus_USER_INIT    UserStatus = 0
	UserStatus_USER_ENABLE  UserStatus = 1
	UserStatus_USER_DISABLE UserStatus = 2
	UserStatus_USER_DELETED UserStatus = 3
)

func (UserStatus) Descriptor

func (UserStatus) Descriptor() protoreflect.EnumDescriptor

func (UserStatus) Enum

func (x UserStatus) Enum() *UserStatus

func (UserStatus) EnumDescriptor deprecated

func (UserStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserStatus.Descriptor instead.

func (UserStatus) Number

func (x UserStatus) Number() protoreflect.EnumNumber

func (UserStatus) String

func (x UserStatus) String() string

func (UserStatus) Type

type UserUseCase

type UserUseCase struct {
	// contains filtered or unexported fields
}

func NewUseUser

func NewUseUser(userData UserData, thirdparty Thirdparty, logger log.Logger, conf *conf.Bootstrap) *UserUseCase

func (*UserUseCase) DeleteUser

func (u *UserUseCase) DeleteUser(ctx context.Context, id int64) error

func (*UserUseCase) GetUserByBatchID

func (u *UserUseCase) GetUserByBatchID(ctx context.Context, ids []int64) ([]*User, error)

func (*UserUseCase) GetUserByID

func (u *UserUseCase) GetUserByID(ctx context.Context, id int64) (*User, error)

func (*UserUseCase) GetUserInfo

func (u *UserUseCase) GetUserInfo(ctx context.Context) (*User, error)

func (*UserUseCase) GetUsers

func (u *UserUseCase) GetUsers(ctx context.Context, name, email string, pageNum, pageSize int) (users []*User, total int64, err error)

func (*UserUseCase) InitAdminUser

func (u *UserUseCase) InitAdminUser(ctx context.Context) error

func (*UserUseCase) Save

func (u *UserUseCase) Save(ctx context.Context, user *User) error

func (*UserUseCase) SignIn

func (u *UserUseCase) SignIn(ctx context.Context, user *User) error

type Workflow

type Workflow struct {

	// @goimport: "gorm.io/gorm"
	// @gofield: gorm.Model
	Id          int64  `json:"id,omitempty" gorm:"column:id;primaryKey;AUTO_INCREMENT" protobuf:"varint,1,opt,name=id,proto3"`                       // @gotags: gorm:"column:id;primaryKey;AUTO_INCREMENT"
	Name        string `json:"name,omitempty" gorm:"column:name; default:''; NOT NULL" protobuf:"bytes,2,opt,name=name,proto3"`                      // @gotags: gorm:"column:name; default:”; NOT NULL"
	Workflow    string `protobuf:"bytes,3,opt,name=workflow,proto3" json:"workflow,omitempty" gorm:"column:workflow; default:''; NOT NULL"`          // @gotags: gorm:"column:workflow; default:”; NOT NULL"
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" gorm:"column:description; default:''; NOT NULL"` // @gotags: gorm:"column:description; default:”; NOT NULL"
	gorm.Model
	// contains filtered or unexported fields
}

func (*Workflow) Descriptor deprecated

func (*Workflow) Descriptor() ([]byte, []int)

Deprecated: Use Workflow.ProtoReflect.Descriptor instead.

func (*Workflow) GetDescription

func (x *Workflow) GetDescription() string

func (*Workflow) GetId

func (x *Workflow) GetId() int64

func (*Workflow) GetName

func (x *Workflow) GetName() string

func (*Workflow) GetWorkflow

func (x *Workflow) GetWorkflow() string

func (*Workflow) ProtoMessage

func (*Workflow) ProtoMessage()

func (*Workflow) ProtoReflect

func (x *Workflow) ProtoReflect() protoreflect.Message

func (*Workflow) Reset

func (x *Workflow) Reset()

func (*Workflow) String

func (x *Workflow) String() string

type WorkflowRuntime

type WorkflowRuntime interface {
	GenerateCIWorkflow(context.Context, *Service) (ciWf *Workflow, cdwf *Workflow, err error)
	Create(ctx context.Context, namespace string, workflow *Workflow) error
}

type WorkflowType

type WorkflowType int32
const (
	WorkflowType_ContinuousIntegration WorkflowType = 0
	WorkflowType_ContinuousDeployment  WorkflowType = 1
)

func (WorkflowType) Descriptor

func (WorkflowType) Enum

func (x WorkflowType) Enum() *WorkflowType

func (WorkflowType) EnumDescriptor deprecated

func (WorkflowType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WorkflowType.Descriptor instead.

func (WorkflowType) Number

func (WorkflowType) String

func (x WorkflowType) String() string

func (WorkflowType) Type

Jump to

Keyboard shortcuts

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