1 Star 0 Fork 0

LiuFuDan / devcloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
resource.pb.go 44.11 KB
一键复制 编辑 原始数据 按行查看 历史
LiuFuDan 提交于 2022-12-25 17:38 . 添加host、云商provider
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.9
// source: apps/resource/pb/resource.proto
package resource
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type VENDOR int32
const (
VENDOR_ALIYUN VENDOR = 0
VENDOR_TENCENT VENDOR = 1
VENDOR_HUAWEI VENDOR = 2
VENDOR_VSPHERE VENDOR = 3
VENDOR_AMAZON VENDOR = 4
)
// Enum value maps for VENDOR.
var (
VENDOR_name = map[int32]string{
0: "ALIYUN",
1: "TENCENT",
2: "HUAWEI",
3: "VSPHERE",
4: "AMAZON",
}
VENDOR_value = map[string]int32{
"ALIYUN": 0,
"TENCENT": 1,
"HUAWEI": 2,
"VSPHERE": 3,
"AMAZON": 4,
}
)
func (x VENDOR) Enum() *VENDOR {
p := new(VENDOR)
*p = x
return p
}
func (x VENDOR) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (VENDOR) Descriptor() protoreflect.EnumDescriptor {
return file_apps_resource_pb_resource_proto_enumTypes[0].Descriptor()
}
func (VENDOR) Type() protoreflect.EnumType {
return &file_apps_resource_pb_resource_proto_enumTypes[0]
}
func (x VENDOR) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use VENDOR.Descriptor instead.
func (VENDOR) EnumDescriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{0}
}
type TYPE int32
const (
// 业务资源
TYPE_HOST TYPE = 0
TYPE_RDS TYPE = 1
TYPE_REDIS TYPE = 2
TYPE_BUCKET TYPE = 3
TYPE_DISK TYPE = 4
TYPE_LB TYPE = 5
TYPE_DOMAIN TYPE = 6
TYPE_EIP TYPE = 7
TYPE_MONGODB TYPE = 8
// 子资源
TYPE_DATABASE TYPE = 100
TYPE_ACCOUNT TYPE = 101
// 未知资源
TYPE_OTHER TYPE = 199
// 辅助资源
TYPE_BILL TYPE = 200
TYPE_ORDER TYPE = 201
)
// Enum value maps for TYPE.
var (
TYPE_name = map[int32]string{
0: "HOST",
1: "RDS",
2: "REDIS",
3: "BUCKET",
4: "DISK",
5: "LB",
6: "DOMAIN",
7: "EIP",
8: "MONGODB",
100: "DATABASE",
101: "ACCOUNT",
199: "OTHER",
200: "BILL",
201: "ORDER",
}
TYPE_value = map[string]int32{
"HOST": 0,
"RDS": 1,
"REDIS": 2,
"BUCKET": 3,
"DISK": 4,
"LB": 5,
"DOMAIN": 6,
"EIP": 7,
"MONGODB": 8,
"DATABASE": 100,
"ACCOUNT": 101,
"OTHER": 199,
"BILL": 200,
"ORDER": 201,
}
)
func (x TYPE) Enum() *TYPE {
p := new(TYPE)
*p = x
return p
}
func (x TYPE) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TYPE) Descriptor() protoreflect.EnumDescriptor {
return file_apps_resource_pb_resource_proto_enumTypes[1].Descriptor()
}
func (TYPE) Type() protoreflect.EnumType {
return &file_apps_resource_pb_resource_proto_enumTypes[1]
}
func (x TYPE) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TYPE.Descriptor instead.
func (TYPE) EnumDescriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{1}
}
type PayMode int32
const (
// 预付费, 包年包月
PayMode_PRE_PAY PayMode = 0
// 按需
PayMode_POST_PAY PayMode = 1
// 预定
PayMode_RESERVED_PAY PayMode = 2
)
// Enum value maps for PayMode.
var (
PayMode_name = map[int32]string{
0: "PRE_PAY",
1: "POST_PAY",
2: "RESERVED_PAY",
}
PayMode_value = map[string]int32{
"PRE_PAY": 0,
"POST_PAY": 1,
"RESERVED_PAY": 2,
}
)
func (x PayMode) Enum() *PayMode {
p := new(PayMode)
*p = x
return p
}
func (x PayMode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PayMode) Descriptor() protoreflect.EnumDescriptor {
return file_apps_resource_pb_resource_proto_enumTypes[2].Descriptor()
}
func (PayMode) Type() protoreflect.EnumType {
return &file_apps_resource_pb_resource_proto_enumTypes[2]
}
func (x PayMode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PayMode.Descriptor instead.
func (PayMode) EnumDescriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{2}
}
// 标签用途
type TAG_PURPOSE int32
const (
// 用于资源分组
TAG_PURPOSE_GROUP TAG_PURPOSE = 0
// 系统使用标签, 表示被其他系统引用, 比如应用关联标签
TAG_PURPOSE_SYSTEM TAG_PURPOSE = 1
// 用于资源监控
TAG_PURPOSE_MONITOR TAG_PURPOSE = 2
)
// Enum value maps for TAG_PURPOSE.
var (
TAG_PURPOSE_name = map[int32]string{
0: "GROUP",
1: "SYSTEM",
2: "MONITOR",
}
TAG_PURPOSE_value = map[string]int32{
"GROUP": 0,
"SYSTEM": 1,
"MONITOR": 2,
}
)
func (x TAG_PURPOSE) Enum() *TAG_PURPOSE {
p := new(TAG_PURPOSE)
*p = x
return p
}
func (x TAG_PURPOSE) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TAG_PURPOSE) Descriptor() protoreflect.EnumDescriptor {
return file_apps_resource_pb_resource_proto_enumTypes[3].Descriptor()
}
func (TAG_PURPOSE) Type() protoreflect.EnumType {
return &file_apps_resource_pb_resource_proto_enumTypes[3]
}
func (x TAG_PURPOSE) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TAG_PURPOSE.Descriptor instead.
func (TAG_PURPOSE) EnumDescriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{3}
}
type ResourceSet struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// @gotags: json:"total"
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
// @gotags: json:"items"
Items []*Resource `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
}
func (x *ResourceSet) Reset() {
*x = ResourceSet{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResourceSet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceSet) ProtoMessage() {}
func (x *ResourceSet) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResourceSet.ProtoReflect.Descriptor instead.
func (*ResourceSet) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{0}
}
func (x *ResourceSet) GetTotal() int64 {
if x != nil {
return x.Total
}
return 0
}
func (x *ResourceSet) GetItems() []*Resource {
if x != nil {
return x.Items
}
return nil
}
type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 资源元数据信息
// @gotags: json:"meta"
Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
// 资源规格信息
// @gotags: json:"spec"
Spec *Spec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
// 资源费用
// @gotags: json:"cost"
Cost *Cost `protobuf:"bytes,3,opt,name=cost,proto3" json:"cost,omitempty"`
// 资源状态
// @gotags: json:"status"
Status *Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
// 资源标签
// @gotags: json:"tags"
Tags []*Tag `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"`
// 关联资源
// @gotags: json:"related_resources"
RelatedResources []*Resource `protobuf:"bytes,6,rep,name=related_resources,json=relatedResources,proto3" json:"related_resources,omitempty"`
}
func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{1}
}
func (x *Resource) GetMeta() *Meta {
if x != nil {
return x.Meta
}
return nil
}
func (x *Resource) GetSpec() *Spec {
if x != nil {
return x.Spec
}
return nil
}
func (x *Resource) GetCost() *Cost {
if x != nil {
return x.Cost
}
return nil
}
func (x *Resource) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
func (x *Resource) GetTags() []*Tag {
if x != nil {
return x.Tags
}
return nil
}
func (x *Resource) GetRelatedResources() []*Resource {
if x != nil {
return x.RelatedResources
}
return nil
}
// 资源元数据信息, 静态数据
type Meta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 全局唯一Id, 直接使用个云商自己的Id
// @gotags: json:"resource_id" validate:"required"
ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
// 资源所属域
// @gotags: json:"domain" validate:"required"
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
// 资源所属空间
// @gotags: json:"namespace" validate:"required"
Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 资源所属环境
// @gotags: json:"env"
Env string `protobuf:"bytes,4,opt,name=env,proto3" json:"env,omitempty"`
// 同步时间
// @gotags: json:"sync_at" validate:"required"
SyncAt int64 `protobuf:"varint,5,opt,name=sync_at,json=syncAt,proto3" json:"sync_at,omitempty"`
// 用于同步的凭证ID, 该资源绑定的API Key, 通过该Key可以操作资源
// @gotags: json:"credential_id"
CredentialId string `protobuf:"bytes,6,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"`
// 创建时间
// @gotags: json:"create_at"
CreateAt int64 `protobuf:"varint,7,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"`
// 序列号
// @gotags: json:"serial_number"
SerialNumber string `protobuf:"bytes,9,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
}
func (x *Meta) Reset() {
*x = Meta{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Meta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Meta) ProtoMessage() {}
func (x *Meta) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Meta.ProtoReflect.Descriptor instead.
func (*Meta) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{2}
}
func (x *Meta) GetResourceId() string {
if x != nil {
return x.ResourceId
}
return ""
}
func (x *Meta) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *Meta) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Meta) GetEnv() string {
if x != nil {
return x.Env
}
return ""
}
func (x *Meta) GetSyncAt() int64 {
if x != nil {
return x.SyncAt
}
return 0
}
func (x *Meta) GetCredentialId() string {
if x != nil {
return x.CredentialId
}
return ""
}
func (x *Meta) GetCreateAt() int64 {
if x != nil {
return x.CreateAt
}
return 0
}
func (x *Meta) GetSerialNumber() string {
if x != nil {
return x.SerialNumber
}
return ""
}
// 资源规格信息, 动态数据, 申请资源的规格信息
type Spec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 厂商
// @gotags: json:"vendor"
Vendor VENDOR `protobuf:"varint,1,opt,name=vendor,proto3,enum=devcloud.cmdb.resource.VENDOR" json:"vendor,omitempty"`
// 资源类型
// @gotags: json:"resource_type"
ResourceType TYPE `protobuf:"varint,2,opt,name=resource_type,json=resourceType,proto3,enum=devcloud.cmdb.resource.TYPE" json:"resource_type,omitempty"`
// 地域
// @gotags: json:"region"
Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"`
// 区域
// @gotags: json:"zone"
Zone string `protobuf:"bytes,4,opt,name=zone,proto3" json:"zone,omitempty"`
// 资源所属账号
// @gotags: json:"owner"
Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"`
// 名称
// @gotags: json:"name"
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
// 种类
// @gotags: json:"category"
Category string `protobuf:"bytes,7,opt,name=category,proto3" json:"category,omitempty"`
// 规格
// @gotags: json:"type"
Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"`
// 描述
// @gotags: json:"description"
Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`
// 过期时间
// @gotags: json:"expire_at"
ExpireAt int64 `protobuf:"varint,10,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"`
// 更新时间
// @gotags: json:"update_at"
UpdateAt int64 `protobuf:"varint,11,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"`
// 是否开启实例释放保护
// @gotags: json:"release_protection"
ReleaseProtection *bool `protobuf:"varint,12,opt,name=release_protection,json=releaseProtection,proto3,oneof" json:"release_protection,omitempty"`
// 资源占用Cpu数量
// @gotags: json:"cpu"
Cpu int32 `protobuf:"varint,15,opt,name=cpu,proto3" json:"cpu,omitempty"`
// GPU数量
// @gotags: json:"gpu"
Gpu int32 `protobuf:"varint,16,opt,name=gpu,proto3" json:"gpu,omitempty"`
// 资源使用的内存
// @gotags: json:"memory"
Memory int32 `protobuf:"varint,17,opt,name=memory,proto3" json:"memory,omitempty"`
// 资源使用的存储
// @gotags: json:"storage"
Storage int32 `protobuf:"varint,18,opt,name=storage,proto3" json:"storage,omitempty"`
// 公网IP带宽, 单位M
// @gotags: json:"band_width"
BandWidth int32 `protobuf:"varint,19,opt,name=band_width,json=bandWidth,proto3" json:"band_width,omitempty"`
}
func (x *Spec) Reset() {
*x = Spec{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Spec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Spec) ProtoMessage() {}
func (x *Spec) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Spec.ProtoReflect.Descriptor instead.
func (*Spec) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{3}
}
func (x *Spec) GetVendor() VENDOR {
if x != nil {
return x.Vendor
}
return VENDOR_ALIYUN
}
func (x *Spec) GetResourceType() TYPE {
if x != nil {
return x.ResourceType
}
return TYPE_HOST
}
func (x *Spec) GetRegion() string {
if x != nil {
return x.Region
}
return ""
}
func (x *Spec) GetZone() string {
if x != nil {
return x.Zone
}
return ""
}
func (x *Spec) GetOwner() string {
if x != nil {
return x.Owner
}
return ""
}
func (x *Spec) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Spec) GetCategory() string {
if x != nil {
return x.Category
}
return ""
}
func (x *Spec) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Spec) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Spec) GetExpireAt() int64 {
if x != nil {
return x.ExpireAt
}
return 0
}
func (x *Spec) GetUpdateAt() int64 {
if x != nil {
return x.UpdateAt
}
return 0
}
func (x *Spec) GetReleaseProtection() bool {
if x != nil && x.ReleaseProtection != nil {
return *x.ReleaseProtection
}
return false
}
func (x *Spec) GetCpu() int32 {
if x != nil {
return x.Cpu
}
return 0
}
func (x *Spec) GetGpu() int32 {
if x != nil {
return x.Gpu
}
return 0
}
func (x *Spec) GetMemory() int32 {
if x != nil {
return x.Memory
}
return 0
}
func (x *Spec) GetStorage() int32 {
if x != nil {
return x.Storage
}
return 0
}
func (x *Spec) GetBandWidth() int32 {
if x != nil {
return x.BandWidth
}
return 0
}
// 资源价格,动态数据
type Cost struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 实例付费方式
// @gotags: json:"pay_mode"
PayMode *PayMode `protobuf:"varint,1,opt,name=pay_mode,json=payMode,proto3,enum=devcloud.cmdb.resource.PayMode,oneof" json:"pay_mode,omitempty"`
// 付费方式详情
// @gotags: json:"pay_mode_detail"
PayModeDetail string `protobuf:"bytes,2,opt,name=pay_mode_detail,json=payModeDetail,proto3" json:"pay_mode_detail,omitempty"`
// 官网价,原价(分)
// @gotags: json:"sale_price"
SalePrice float64 `protobuf:"fixed64,3,opt,name=sale_price,json=salePrice,proto3" json:"sale_price,omitempty"`
// 实际支付金额(分)
// @gotags: json:"real_cost"
RealCost float64 `protobuf:"fixed64,4,opt,name=real_cost,json=realCost,proto3" json:"real_cost,omitempty"`
// 折扣率
// @gotags: json:"policy"
Policy float64 `protobuf:"fixed64,5,opt,name=policy,proto3" json:"policy,omitempty"`
// 单价(分)
// @gotags: json:"unit_price"
UnitPrice float64 `protobuf:"fixed64,6,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"`
}
func (x *Cost) Reset() {
*x = Cost{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Cost) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Cost) ProtoMessage() {}
func (x *Cost) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Cost.ProtoReflect.Descriptor instead.
func (*Cost) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{4}
}
func (x *Cost) GetPayMode() PayMode {
if x != nil && x.PayMode != nil {
return *x.PayMode
}
return PayMode_PRE_PAY
}
func (x *Cost) GetPayModeDetail() string {
if x != nil {
return x.PayModeDetail
}
return ""
}
func (x *Cost) GetSalePrice() float64 {
if x != nil {
return x.SalePrice
}
return 0
}
func (x *Cost) GetRealCost() float64 {
if x != nil {
return x.RealCost
}
return 0
}
func (x *Cost) GetPolicy() float64 {
if x != nil {
return x.Policy
}
return 0
}
func (x *Cost) GetUnitPrice() float64 {
if x != nil {
return x.UnitPrice
}
return 0
}
// 资源价格,动态数据
type Status struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 资源当前状态
// @gotags: json:"phase"
Phase string `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"`
// 实例锁定模式; Unlock:正常;ManualLock:手动触发锁定;LockByExpiration:实例过期自动锁定;LockByRestoration:实例回滚前的自动锁定;LockByDiskQuota:实例空间满自动锁定
// @gotags: json:"lock_mode"
LockMode string `protobuf:"bytes,2,opt,name=lock_mode,json=lockMode,proto3" json:"lock_mode,omitempty"`
// 锁定原因
// @gotags: json:"lock_reason"
LockReason string `protobuf:"bytes,3,opt,name=lock_reason,json=lockReason,proto3" json:"lock_reason,omitempty"`
// 资源访问地址
// 公网IP, 或者域名
// @gotags: json:"public_ip"
PublicIp string `protobuf:"bytes,4,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"`
// 内网IP, 或者域名
// @gotags: json:"private_ip"
PrivateIp string `protobuf:"bytes,5,opt,name=private_ip,json=privateIp,proto3" json:"private_ip,omitempty"`
}
func (x *Status) Reset() {
*x = Status{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Status) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Status) ProtoMessage() {}
func (x *Status) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Status.ProtoReflect.Descriptor instead.
func (*Status) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{5}
}
func (x *Status) GetPhase() string {
if x != nil {
return x.Phase
}
return ""
}
func (x *Status) GetLockMode() string {
if x != nil {
return x.LockMode
}
return ""
}
func (x *Status) GetLockReason() string {
if x != nil {
return x.LockReason
}
return ""
}
func (x *Status) GetPublicIp() string {
if x != nil {
return x.PublicIp
}
return ""
}
func (x *Status) GetPrivateIp() string {
if x != nil {
return x.PrivateIp
}
return ""
}
// 资源价格,动态数据
type Tag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 标签的类型
// @gotags: json:"purpose"
Purpose TAG_PURPOSE `protobuf:"varint,1,opt,name=purpose,proto3,enum=devcloud.cmdb.resource.TAG_PURPOSE" json:"purpose,omitempty"`
// 标签的Key
// @gotags: json:"key" validate:"lte=255,required"
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// 标签的值
// @gotags: json:"value" validate:"lte=255,required"
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
// 标签的值的描述, 通常用于展示
// @gotags: json:"describe"
Describe string `protobuf:"bytes,4,opt,name=describe,proto3" json:"describe,omitempty"`
// 标签权重, 针对同一个key, 多个value场景, 默认值1
// @gotags: json:"weight"
Weight int64 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"`
// 是否是只读标签
// @gotags: json:"read_only"
ReadOnly bool `protobuf:"varint,6,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
// 标签是否隐藏, 用于控制是否在前端展示
// @gotags: json:"hidden"
Hidden bool `protobuf:"varint,7,opt,name=hidden,proto3" json:"hidden,omitempty"`
}
func (x *Tag) Reset() {
*x = Tag{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_resource_pb_resource_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Tag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tag) ProtoMessage() {}
func (x *Tag) ProtoReflect() protoreflect.Message {
mi := &file_apps_resource_pb_resource_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Tag.ProtoReflect.Descriptor instead.
func (*Tag) Descriptor() ([]byte, []int) {
return file_apps_resource_pb_resource_proto_rawDescGZIP(), []int{6}
}
func (x *Tag) GetPurpose() TAG_PURPOSE {
if x != nil {
return x.Purpose
}
return TAG_PURPOSE_GROUP
}
func (x *Tag) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Tag) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (x *Tag) GetDescribe() string {
if x != nil {
return x.Describe
}
return ""
}
func (x *Tag) GetWeight() int64 {
if x != nil {
return x.Weight
}
return 0
}
func (x *Tag) GetReadOnly() bool {
if x != nil {
return x.ReadOnly
}
return false
}
func (x *Tag) GetHidden() bool {
if x != nil {
return x.Hidden
}
return false
}
var File_apps_resource_pb_resource_proto protoreflect.FileDescriptor
var file_apps_resource_pb_resource_proto_rawDesc = []byte{
0x0a, 0x1f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f,
0x70, 0x62, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x16, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62,
0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x5b, 0x0a, 0x0b, 0x52, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x36,
0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e,
0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xd8, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64,
0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52,
0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63,
0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x53, 0x70, 0x65,
0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x30, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64,
0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43,
0x6f, 0x73, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x65, 0x76, 0x63,
0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1b, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61,
0x67, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e,
0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
0x10, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x73, 0x22, 0xef, 0x01, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x65, 0x6e, 0x76, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d,
0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49,
0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x07,
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x23,
0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x22, 0xa3, 0x04, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x06,
0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x64,
0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x56, 0x45, 0x4e, 0x44, 0x4f, 0x52, 0x52, 0x06, 0x76, 0x65,
0x6e, 0x64, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x64, 0x65,
0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x59, 0x50, 0x45, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12,
0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a,
0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x1b, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x12, 0x72, 0x65, 0x6c,
0x65, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x10, 0x0a,
0x03, 0x63, 0x70, 0x75, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12,
0x10, 0x0a, 0x03, 0x67, 0x70, 0x75, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x70,
0x75, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x64, 0x74,
0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x57, 0x69, 0x64,
0x74, 0x68, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x70,
0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xef, 0x01, 0x0a, 0x04, 0x43, 0x6f,
0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e,
0x63, 0x6d, 0x64, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x61,
0x79, 0x4d, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65,
0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f,
0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61,
0x79, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
0x61, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
0x09, 0x73, 0x61, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65,
0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x72,
0x65, 0x61, 0x6c, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
0x1d, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20,
0x01, 0x28, 0x01, 0x52, 0x09, 0x75, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x06,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09,
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61,
0x74, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69,
0x76, 0x61, 0x74, 0x65, 0x49, 0x70, 0x22, 0xd5, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x3d,
0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6d, 0x64, 0x62, 0x2e,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x41, 0x47, 0x5f, 0x50, 0x55, 0x52,
0x50, 0x4f, 0x53, 0x45, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61,
0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65,
0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e,
0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x2a, 0x46,
0x0a, 0x06, 0x56, 0x45, 0x4e, 0x44, 0x4f, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4c, 0x49, 0x59,
0x55, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x45, 0x4e, 0x43, 0x45, 0x4e, 0x54, 0x10,
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x55, 0x41, 0x57, 0x45, 0x49, 0x10, 0x02, 0x12, 0x0b, 0x0a,
0x07, 0x56, 0x53, 0x50, 0x48, 0x45, 0x52, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4d,
0x41, 0x5a, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0xa2, 0x01, 0x0a, 0x04, 0x54, 0x59, 0x50, 0x45, 0x12,
0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x44, 0x53,
0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a,
0x06, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x53,
0x4b, 0x10, 0x04, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x42, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x44,
0x4f, 0x4d, 0x41, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x49, 0x50, 0x10, 0x07,
0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x08, 0x12, 0x0c, 0x0a,
0x08, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x41,
0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x65, 0x12, 0x0a, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45,
0x52, 0x10, 0xc7, 0x01, 0x12, 0x09, 0x0a, 0x04, 0x42, 0x49, 0x4c, 0x4c, 0x10, 0xc8, 0x01, 0x12,
0x0a, 0x0a, 0x05, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0xc9, 0x01, 0x2a, 0x36, 0x0a, 0x07, 0x50,
0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x5f, 0x50, 0x41,
0x59, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x10,
0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x5f, 0x50, 0x41,
0x59, 0x10, 0x02, 0x2a, 0x31, 0x0a, 0x0b, 0x54, 0x41, 0x47, 0x5f, 0x50, 0x55, 0x52, 0x50, 0x4f,
0x53, 0x45, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x00, 0x12, 0x0a, 0x0a,
0x06, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x4e,
0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x65, 0x65, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x75, 0x2d, 0x66, 0x75, 0x64, 0x61, 0x6e, 0x2f, 0x64, 0x65,
0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x63, 0x6d, 0x64, 0x62, 0x2f, 0x61, 0x70, 0x70, 0x73,
0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_apps_resource_pb_resource_proto_rawDescOnce sync.Once
file_apps_resource_pb_resource_proto_rawDescData = file_apps_resource_pb_resource_proto_rawDesc
)
func file_apps_resource_pb_resource_proto_rawDescGZIP() []byte {
file_apps_resource_pb_resource_proto_rawDescOnce.Do(func() {
file_apps_resource_pb_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_apps_resource_pb_resource_proto_rawDescData)
})
return file_apps_resource_pb_resource_proto_rawDescData
}
var file_apps_resource_pb_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_apps_resource_pb_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_apps_resource_pb_resource_proto_goTypes = []interface{}{
(VENDOR)(0), // 0: devcloud.cmdb.resource.VENDOR
(TYPE)(0), // 1: devcloud.cmdb.resource.TYPE
(PayMode)(0), // 2: devcloud.cmdb.resource.PayMode
(TAG_PURPOSE)(0), // 3: devcloud.cmdb.resource.TAG_PURPOSE
(*ResourceSet)(nil), // 4: devcloud.cmdb.resource.ResourceSet
(*Resource)(nil), // 5: devcloud.cmdb.resource.Resource
(*Meta)(nil), // 6: devcloud.cmdb.resource.Meta
(*Spec)(nil), // 7: devcloud.cmdb.resource.Spec
(*Cost)(nil), // 8: devcloud.cmdb.resource.Cost
(*Status)(nil), // 9: devcloud.cmdb.resource.Status
(*Tag)(nil), // 10: devcloud.cmdb.resource.Tag
}
var file_apps_resource_pb_resource_proto_depIdxs = []int32{
5, // 0: devcloud.cmdb.resource.ResourceSet.items:type_name -> devcloud.cmdb.resource.Resource
6, // 1: devcloud.cmdb.resource.Resource.meta:type_name -> devcloud.cmdb.resource.Meta
7, // 2: devcloud.cmdb.resource.Resource.spec:type_name -> devcloud.cmdb.resource.Spec
8, // 3: devcloud.cmdb.resource.Resource.cost:type_name -> devcloud.cmdb.resource.Cost
9, // 4: devcloud.cmdb.resource.Resource.status:type_name -> devcloud.cmdb.resource.Status
10, // 5: devcloud.cmdb.resource.Resource.tags:type_name -> devcloud.cmdb.resource.Tag
5, // 6: devcloud.cmdb.resource.Resource.related_resources:type_name -> devcloud.cmdb.resource.Resource
0, // 7: devcloud.cmdb.resource.Spec.vendor:type_name -> devcloud.cmdb.resource.VENDOR
1, // 8: devcloud.cmdb.resource.Spec.resource_type:type_name -> devcloud.cmdb.resource.TYPE
2, // 9: devcloud.cmdb.resource.Cost.pay_mode:type_name -> devcloud.cmdb.resource.PayMode
3, // 10: devcloud.cmdb.resource.Tag.purpose:type_name -> devcloud.cmdb.resource.TAG_PURPOSE
11, // [11:11] is the sub-list for method output_type
11, // [11:11] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_apps_resource_pb_resource_proto_init() }
func file_apps_resource_pb_resource_proto_init() {
if File_apps_resource_pb_resource_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_apps_resource_pb_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_resource_pb_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resource); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_resource_pb_resource_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Meta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_resource_pb_resource_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Spec); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_resource_pb_resource_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Cost); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_resource_pb_resource_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Status); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_resource_pb_resource_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Tag); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_apps_resource_pb_resource_proto_msgTypes[3].OneofWrappers = []interface{}{}
file_apps_resource_pb_resource_proto_msgTypes[4].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_apps_resource_pb_resource_proto_rawDesc,
NumEnums: 4,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_apps_resource_pb_resource_proto_goTypes,
DependencyIndexes: file_apps_resource_pb_resource_proto_depIdxs,
EnumInfos: file_apps_resource_pb_resource_proto_enumTypes,
MessageInfos: file_apps_resource_pb_resource_proto_msgTypes,
}.Build()
File_apps_resource_pb_resource_proto = out.File
file_apps_resource_pb_resource_proto_rawDesc = nil
file_apps_resource_pb_resource_proto_goTypes = nil
file_apps_resource_pb_resource_proto_depIdxs = nil
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liu-fudan/devcloud.git
git@gitee.com:liu-fudan/devcloud.git
liu-fudan
devcloud
devcloud
055c0a611b21

搜索帮助

344bd9b3 5694891 D2dac590 5694891