Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Describe
- func (*Describe) Descriptor() ([]byte, []int)deprecated
- func (x *Describe) GetGrade() string
- func (x *Describe) GetId() string
- func (x *Describe) GetMinTtl() int64
- func (x *Describe) GetName() string
- func (x *Describe) GetOwner() string
- func (x *Describe) GetPunycode() string
- func (x *Describe) GetTtl() int64
- func (*Describe) ProtoMessage()
- func (x *Describe) ProtoReflect() protoreflect.Message
- func (x *Describe) Reset()
- func (x *Describe) String() string
- type Domain
- type DomainSet
- func (s *DomainSet) Add(items ...any)
- func (*DomainSet) Descriptor() ([]byte, []int)deprecated
- func (x *DomainSet) GetItems() []*Domain
- func (s *DomainSet) GetLast() *Domain
- func (x *DomainSet) GetTotal() int64
- func (s *DomainSet) Length() int64
- func (*DomainSet) ProtoMessage()
- func (x *DomainSet) ProtoReflect() protoreflect.Message
- func (x *DomainSet) Reset()
- func (s *DomainSet) ResourceIds() (ids []string)
- func (x *DomainSet) String() string
- func (s *DomainSet) ToAny() (items []any)
- func (s *DomainSet) ToJsonString() string
- type QueryDomainRequest
- func (*QueryDomainRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryDomainRequest) GetPage() *request.PageRequest
- func (*QueryDomainRequest) ProtoMessage()
- func (x *QueryDomainRequest) ProtoReflect() protoreflect.Message
- func (x *QueryDomainRequest) Reset()
- func (x *QueryDomainRequest) String() string
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetId() string
- func (x *Record) GetLine() string
- func (x *Record) GetMx() int64
- func (x *Record) GetName() string
- func (x *Record) GetRemark() string
- func (x *Record) GetStatus() string
- func (x *Record) GetTtl() int64
- func (x *Record) GetType() string
- func (x *Record) GetUpdatedOn() int64
- func (x *Record) GetValue() string
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- type RecordSet
- func (s *RecordSet) Add(items ...any)
- func (*RecordSet) Descriptor() ([]byte, []int)deprecated
- func (x *RecordSet) GetItems() []*Record
- func (s *RecordSet) GetLast() *Record
- func (x *RecordSet) GetTotal() int64
- func (s *RecordSet) Length() int64
- func (*RecordSet) ProtoMessage()
- func (x *RecordSet) ProtoReflect() protoreflect.Message
- func (x *RecordSet) Reset()
- func (s *RecordSet) ResourceIds() (ids []string)
- func (x *RecordSet) String() string
- func (s *RecordSet) ToAny() (items []any)
- func (s *RecordSet) ToJsonString() string
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
const (
AppName = "domain"
)
Variables ¶
var File_apps_dns_pb_domain_proto protoreflect.FileDescriptor
var File_apps_dns_pb_rpc_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infraboard.cmdb.domain.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncDomain", Handler: _Service_SyncDomain_Handler, }, { MethodName: "QueryDomain", Handler: _Service_QueryDomain_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "apps/dns/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 {
// 域名的等级
// @gotags: json:"grade"
Grade string `protobuf:"bytes,1,opt,name=grade,proto3" json:"grade"`
// 域名的 ID
// @gotags: json:"id"
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
// 当前域名允许的最小的 TTL
// @gotags: json:"min_ttl"
MinTtl int64 `protobuf:"varint,3,opt,name=min_ttl,json=minTtl,proto3" json:"min_ttl"`
// 域名
// @gotags: json:"name"
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
// 域名所有者的邮箱帐号
// @gotags: json:"owner"
Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner"`
// punycode编码后的域名
// @gotags: json:"punycode"
Punycode string `protobuf:"bytes,6,opt,name=punycode,proto3" json:"punycode"`
// 域名下的解析记录默认的 TTL 值
// @gotags: json:"ttl"
Ttl int64 `protobuf:"varint,7,opt,name=ttl,proto3" json:"ttl"`
// contains filtered or unexported fields
}
func (*Describe) Descriptor
deprecated
func (*Describe) GetPunycode ¶
func (*Describe) ProtoMessage ¶
func (*Describe) ProtoMessage()
func (*Describe) ProtoReflect ¶
func (x *Describe) ProtoReflect() protoreflect.Message
type Domain ¶
type Domain struct {
// @gotags: json:"resource"
Resource *resource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"`
// @gotags: json:"describe"
Records *RecordSet `protobuf:"bytes,2,opt,name=records,proto3" json:"describe"`
// contains filtered or unexported fields
}
func NewDefaultDomain ¶
func NewDefaultDomain() *Domain
func (*Domain) Descriptor
deprecated
func (*Domain) GetRecords ¶
func (*Domain) GetResource ¶
func (*Domain) ProtoMessage ¶
func (*Domain) ProtoMessage()
func (*Domain) ProtoReflect ¶
func (x *Domain) ProtoReflect() protoreflect.Message
type DomainSet ¶
type DomainSet struct {
// 总数量
// @gotags: json:"total"
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
// 列表项
// @gotags: json:"items"
Items []*Domain `protobuf:"bytes,2,rep,name=items,proto3" json:"items"`
// contains filtered or unexported fields
}
func NewDomainSet ¶
func NewDomainSet() *DomainSet
func (*DomainSet) Descriptor
deprecated
func (*DomainSet) ProtoMessage ¶
func (*DomainSet) ProtoMessage()
func (*DomainSet) ProtoReflect ¶
func (x *DomainSet) ProtoReflect() protoreflect.Message
func (*DomainSet) ResourceIds ¶
func (*DomainSet) ToJsonString ¶
type QueryDomainRequest ¶
type QueryDomainRequest struct {
// 分页参数
// @gotags: json:"page"
Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
// contains filtered or unexported fields
}
func (*QueryDomainRequest) Descriptor
deprecated
func (*QueryDomainRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryDomainRequest.ProtoReflect.Descriptor instead.
func (*QueryDomainRequest) GetPage ¶
func (x *QueryDomainRequest) GetPage() *request.PageRequest
func (*QueryDomainRequest) ProtoMessage ¶
func (*QueryDomainRequest) ProtoMessage()
func (*QueryDomainRequest) ProtoReflect ¶
func (x *QueryDomainRequest) ProtoReflect() protoreflect.Message
func (*QueryDomainRequest) Reset ¶
func (x *QueryDomainRequest) Reset()
func (*QueryDomainRequest) String ¶
func (x *QueryDomainRequest) String() string
type Record ¶
type Record struct {
// 记录的暂停、启用状态,1和0分别代表启用和暂停
// @gotags: json:"status"
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
// 解析记录的ID
// @gotags: json:"id"
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
// 解析记录的线路编号
// @gotags: json:"line"
Line string `protobuf:"bytes,3,opt,name=line,proto3" json:"line"`
// 记录的优先级,非 MX 记录的话,该值为0
// @gotags: json:"mx"
Mx int64 `protobuf:"varint,4,opt,name=mx,proto3" json:"mx"`
// 子域名
// @gotags: json:"name"
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name"`
// 解析记录的备注信息
// @gotags: json:"remark"
Remark string `protobuf:"bytes,6,opt,name=remark,proto3" json:"remark"`
// 记录的 TTL 值
// @gotags: json:"ttl"
Ttl int64 `protobuf:"varint,7,opt,name=ttl,proto3" json:"ttl"`
// 解析记录的类型
// @gotags: json:"type"
Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type"`
// 解析记录的最后修改时间
// @gotags: json:"updated_on"
UpdatedOn int64 `protobuf:"varint,9,opt,name=updated_on,json=updatedOn,proto3" json:"updated_on"`
// 记录的值
// @gotags: json:"value"
Value string `protobuf:"bytes,10,opt,name=value,proto3" json:"value"`
// contains filtered or unexported fields
}
func NewDefaultRecord ¶
func NewDefaultRecord() *Record
func (*Record) Descriptor
deprecated
func (*Record) GetUpdatedOn ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type RecordSet ¶
type RecordSet struct {
// 列表项
// @gotags: json:"items"
Items []*Record `protobuf:"bytes,1,rep,name=items,proto3" json:"items"`
// 总数量
// @gotags: json:"total"
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
// contains filtered or unexported fields
}
func NewRecordSet ¶
func NewRecordSet() *RecordSet
func (*RecordSet) Descriptor
deprecated
func (*RecordSet) ProtoMessage ¶
func (*RecordSet) ProtoMessage()
func (*RecordSet) ProtoReflect ¶
func (x *RecordSet) ProtoReflect() protoreflect.Message
func (*RecordSet) ResourceIds ¶
func (*RecordSet) ToJsonString ¶
type ServiceClient ¶
type ServiceClient interface {
SyncDomain(ctx context.Context, in *Domain, opts ...grpc.CallOption) (*Domain, error)
QueryDomain(ctx context.Context, in *QueryDomainRequest, opts ...grpc.CallOption) (*DomainSet, 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 {
SyncDomain(context.Context, *Domain) (*Domain, error)
QueryDomain(context.Context, *QueryDomainRequest) (*DomainSet, 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) QueryDomain ¶
func (UnimplementedServiceServer) QueryDomain(context.Context, *QueryDomainRequest) (*DomainSet, error)
func (UnimplementedServiceServer) SyncDomain ¶
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.