Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Describe
- func (*Describe) Descriptor() ([]byte, []int)deprecated
- func (x *Describe) GetBandWidth() int64
- func (x *Describe) GetInstanceId() string
- func (x *Describe) GetInstanceRegion() string
- func (x *Describe) GetInstanceType() string
- func (x *Describe) GetIsp() string
- func (x *Describe) GetMode() string
- func (*Describe) ProtoMessage()
- func (x *Describe) ProtoReflect() protoreflect.Message
- func (x *Describe) Reset()
- func (x *Describe) String() string
- type EIP
- type EIPSet
- func (s *EIPSet) Add(items ...any)
- func (*EIPSet) Descriptor() ([]byte, []int)deprecated
- func (x *EIPSet) GetItems() []*EIP
- func (x *EIPSet) GetTotal() int64
- func (s *EIPSet) Length() int64
- func (*EIPSet) ProtoMessage()
- func (x *EIPSet) ProtoReflect() protoreflect.Message
- func (x *EIPSet) Reset()
- func (s *EIPSet) ResourceIds() (ids []string)
- func (x *EIPSet) String() string
- func (s *EIPSet) ToAny() (items []any)
- func (s *EIPSet) ToJsonString() string
- type QueryEIPRequest
- type STATUS
- func (STATUS) Descriptor() protoreflect.EnumDescriptor
- func (x STATUS) Enum() *STATUS
- func (STATUS) EnumDescriptor() ([]byte, []int)deprecated
- func (t STATUS) Equal(target STATUS) bool
- func (t STATUS) IsIn(targets ...STATUS) bool
- func (t STATUS) MarshalJSON() ([]byte, error)
- func (x STATUS) Number() protoreflect.EnumNumber
- func (x STATUS) String() string
- func (STATUS) Type() protoreflect.EnumType
- func (t *STATUS) UnmarshalJSON(b []byte) error
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
const (
AppName = "eip"
)
Variables ¶
var ( STATUS_name = map[int32]string{ 0: "UNKNOW", 5: "PENDING", 6: "BINDING", 7: "UNBINDING", 11: "BIND", 12: "UNBIND", 50: "ERROR", 80: "OFFLINING", 90: "DESTROYED", } STATUS_value = map[string]int32{ "UNKNOW": 0, "PENDING": 5, "BINDING": 6, "UNBINDING": 7, "BIND": 11, "UNBIND": 12, "ERROR": 50, "OFFLINING": 80, "DESTROYED": 90, } )
Enum value maps for STATUS.
var File_apps_eip_pb_eip_proto protoreflect.FileDescriptor
var File_apps_eip_pb_rpc_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infraboard.cmdb.eip.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncEIP", Handler: _Service_SyncEIP_Handler, }, { MethodName: "QueryEIP", Handler: _Service_QueryEIP_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "apps/eip/pb/rpc.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Describe ¶
type Describe struct { // BGP // @gotags: json:"isp" Isp string `protobuf:"bytes,1,opt,name=isp,proto3" json:"isp"` // 带宽, 单位M // @gotags: json:"band_width" BandWidth int64 `protobuf:"varint,2,opt,name=band_width,json=bandWidth,proto3" json:"band_width"` // 关联实例ID // @gotags: json:"instance_id" InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id"` // 关联实例类型 // @gotags: json:"instance_type" InstanceType string `protobuf:"bytes,4,opt,name=instance_type,json=instanceType,proto3" json:"instance_type"` // 关联实例Region // @gotags: json:"instance_region" InstanceRegion string `protobuf:"bytes,5,opt,name=instance_region,json=instanceRegion,proto3" json:"instance_region"` // 模式(NAT) // @gotags: json:"mode" Mode string `protobuf:"bytes,6,opt,name=mode,proto3" json:"mode"` // contains filtered or unexported fields }
func (*Describe) Descriptor
deprecated
func (*Describe) GetBandWidth ¶
func (*Describe) GetInstanceId ¶
func (*Describe) GetInstanceRegion ¶
func (*Describe) GetInstanceType ¶
func (*Describe) ProtoMessage ¶
func (*Describe) ProtoMessage()
func (*Describe) ProtoReflect ¶
func (x *Describe) ProtoReflect() protoreflect.Message
type EIP ¶
type EIP struct { // @gotags: json:"resource" Resource *resource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` // @gotags: json:"describe" Describe *Describe `protobuf:"bytes,2,opt,name=describe,proto3" json:"describe"` // contains filtered or unexported fields }
func NewDefaultEip ¶
func NewDefaultEip() *EIP
func (*EIP) Descriptor
deprecated
func (*EIP) GetDescribe ¶
func (*EIP) GetResource ¶
func (*EIP) ProtoMessage ¶
func (*EIP) ProtoMessage()
func (*EIP) ProtoReflect ¶
func (x *EIP) ProtoReflect() protoreflect.Message
type EIPSet ¶
type EIPSet struct { // 总数量 // @gotags: json:"total" Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` // 列表项 // @gotags: json:"items" Items []*EIP `protobuf:"bytes,2,rep,name=items,proto3" json:"items"` // contains filtered or unexported fields }
func (*EIPSet) Descriptor
deprecated
func (*EIPSet) ProtoMessage ¶
func (*EIPSet) ProtoMessage()
func (*EIPSet) ProtoReflect ¶
func (x *EIPSet) ProtoReflect() protoreflect.Message
func (*EIPSet) ResourceIds ¶
func (*EIPSet) ToJsonString ¶
type QueryEIPRequest ¶
type QueryEIPRequest struct { // 分页参数 // @gotags: json:"page" Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"` // contains filtered or unexported fields }
func (*QueryEIPRequest) Descriptor
deprecated
func (*QueryEIPRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryEIPRequest.ProtoReflect.Descriptor instead.
func (*QueryEIPRequest) GetPage ¶
func (x *QueryEIPRequest) GetPage() *request.PageRequest
func (*QueryEIPRequest) ProtoMessage ¶
func (*QueryEIPRequest) ProtoMessage()
func (*QueryEIPRequest) ProtoReflect ¶
func (x *QueryEIPRequest) ProtoReflect() protoreflect.Message
func (*QueryEIPRequest) Reset ¶
func (x *QueryEIPRequest) Reset()
func (*QueryEIPRequest) String ¶
func (x *QueryEIPRequest) String() string
type STATUS ¶
type STATUS int32
const ( // 未知状态 STATUS_UNKNOW STATUS = 0 // 表示创建中 STATUS_PENDING STATUS = 5 // 绑定中 STATUS_BINDING STATUS = 6 // 解绑中 STATUS_UNBINDING STATUS = 7 // 已绑定 STATUS_BIND STATUS = 11 // 已解绑 STATUS_UNBIND STATUS = 12 // 状态异常 STATUS_ERROR STATUS = 50 // 释放中 STATUS_OFFLINING STATUS = 80 // 已销毁 STATUS_DESTROYED STATUS = 90 )
func ParseSTATUSFromString ¶
ParseSTATUSFromString Parse STATUS from string
func (STATUS) Descriptor ¶
func (STATUS) Descriptor() protoreflect.EnumDescriptor
func (STATUS) EnumDescriptor
deprecated
func (STATUS) Number ¶
func (x STATUS) Number() protoreflect.EnumNumber
func (STATUS) Type ¶
func (STATUS) Type() protoreflect.EnumType
type ServiceClient ¶
type ServiceClient interface { SyncEIP(ctx context.Context, in *EIP, opts ...grpc.CallOption) (*EIP, error) QueryEIP(ctx context.Context, in *QueryEIPRequest, opts ...grpc.CallOption) (*EIPSet, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { SyncEIP(context.Context, *EIP) (*EIP, error) QueryEIP(context.Context, *QueryEIPRequest) (*EIPSet, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) QueryEIP ¶
func (UnimplementedServiceServer) QueryEIP(context.Context, *QueryEIPRequest) (*EIPSet, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.