Documentation ¶
Overview ¶
Package pbdomain is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterDomainServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDomainServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DomainServiceClient) error
- func RegisterDomainServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDomainServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DomainServiceServer) error
- func RegisterDomainServiceServer(s grpc.ServiceRegistrar, srv DomainServiceServer)
- type DomainInstance
- func (*DomainInstance) Descriptor() ([]byte, []int)deprecated
- func (x *DomainInstance) GetAccountName() string
- func (x *DomainInstance) GetDomainName() string
- func (x *DomainInstance) GetDomainStatus() string
- func (x *DomainInstance) GetDomainType() string
- func (x *DomainInstance) GetExpirationDate() string
- func (x *DomainInstance) GetProvider() pbtenant.CloudProvider
- func (x *DomainInstance) GetRegistrationDate() string
- func (*DomainInstance) ProtoMessage()
- func (x *DomainInstance) ProtoReflect() protoreflect.Message
- func (x *DomainInstance) Reset()
- func (x *DomainInstance) String() string
- type DomainServiceClient
- type DomainServiceServer
- type ListDetailReq
- func (*ListDetailReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListDetailReq) GetAccountName() string
- func (x *ListDetailReq) GetNextToken() string
- func (x *ListDetailReq) GetPageNumber() int32
- func (x *ListDetailReq) GetPageSize() int32
- func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider
- func (*ListDetailReq) ProtoMessage()
- func (x *ListDetailReq) ProtoReflect() protoreflect.Message
- func (x *ListDetailReq) Reset()
- func (x *ListDetailReq) String() string
- type ListDetailResp
- func (*ListDetailResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListDetailResp) GetDomains() []*DomainInstance
- func (x *ListDetailResp) GetFinished() bool
- func (x *ListDetailResp) GetNextToken() string
- func (x *ListDetailResp) GetPageNumber() int32
- func (x *ListDetailResp) GetPageSize() int32
- func (x *ListDetailResp) GetRequestId() string
- func (*ListDetailResp) ProtoMessage()
- func (x *ListDetailResp) ProtoReflect() protoreflect.Message
- func (x *ListDetailResp) Reset()
- func (x *ListDetailResp) String() string
- type ListReq
- type ListResp
- type UnimplementedDomainServiceServer
- type UnsafeDomainServiceServer
Constants ¶
This section is empty.
Variables ¶
var DomainService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbdomain.DomainService", HandlerType: (*DomainServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListDomainDetail", Handler: _DomainService_ListDomainDetail_Handler, }, { MethodName: "ListDomain", Handler: _DomainService_ListDomain_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/pbdomain/domain.proto", }
DomainService_ServiceDesc is the grpc.ServiceDesc for DomainService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_idl_pbdomain_domain_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDomainServiceHandler ¶
func RegisterDomainServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDomainServiceHandler registers the http handlers for service DomainService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDomainServiceHandlerClient ¶
func RegisterDomainServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DomainServiceClient) error
RegisterDomainServiceHandlerClient registers the http handlers for service DomainService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DomainServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DomainServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DomainServiceClient" to call the correct interceptors.
func RegisterDomainServiceHandlerFromEndpoint ¶
func RegisterDomainServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDomainServiceHandlerFromEndpoint is same as RegisterDomainServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDomainServiceHandlerServer ¶
func RegisterDomainServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DomainServiceServer) error
RegisterDomainServiceHandlerServer registers the http handlers for service DomainService to "mux". UnaryRPC :call DomainServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDomainServiceHandlerFromEndpoint instead.
func RegisterDomainServiceServer ¶
func RegisterDomainServiceServer(s grpc.ServiceRegistrar, srv DomainServiceServer)
Types ¶
type DomainInstance ¶
type DomainInstance struct { // 云类型 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账号名称 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 域名 DomainName string `protobuf:"bytes,3,opt,name=domain_name,json=domainName,proto3" json:"domain_name,omitempty"` // 域名状态 DomainStatus string `protobuf:"bytes,4,opt,name=domain_status,json=domainStatus,proto3" json:"domain_status,omitempty"` // 域名类型 DomainType string `protobuf:"bytes,5,opt,name=domain_type,json=domainType,proto3" json:"domain_type,omitempty"` // 域名到期日期 ExpirationDate string `protobuf:"bytes,6,opt,name=expiration_date,json=expirationDate,proto3" json:"expiration_date,omitempty"` // 注册时间 RegistrationDate string `protobuf:"bytes,7,opt,name=registration_date,json=registrationDate,proto3" json:"registration_date,omitempty"` // contains filtered or unexported fields }
func (*DomainInstance) Descriptor
deprecated
func (*DomainInstance) Descriptor() ([]byte, []int)
Deprecated: Use DomainInstance.ProtoReflect.Descriptor instead.
func (*DomainInstance) GetAccountName ¶
func (x *DomainInstance) GetAccountName() string
func (*DomainInstance) GetDomainName ¶
func (x *DomainInstance) GetDomainName() string
func (*DomainInstance) GetDomainStatus ¶
func (x *DomainInstance) GetDomainStatus() string
func (*DomainInstance) GetDomainType ¶
func (x *DomainInstance) GetDomainType() string
func (*DomainInstance) GetExpirationDate ¶
func (x *DomainInstance) GetExpirationDate() string
func (*DomainInstance) GetProvider ¶
func (x *DomainInstance) GetProvider() pbtenant.CloudProvider
func (*DomainInstance) GetRegistrationDate ¶
func (x *DomainInstance) GetRegistrationDate() string
func (*DomainInstance) ProtoMessage ¶
func (*DomainInstance) ProtoMessage()
func (*DomainInstance) ProtoReflect ¶
func (x *DomainInstance) ProtoReflect() protoreflect.Message
func (*DomainInstance) Reset ¶
func (x *DomainInstance) Reset()
func (*DomainInstance) String ¶
func (x *DomainInstance) String() string
type DomainServiceClient ¶
type DomainServiceClient interface { // 查询域名明细 - 支持云类型、账户、分页等过滤条件 ListDomainDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) // 查询域名全量 - 根据云类型 ListDomain(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) }
DomainServiceClient is the client API for DomainService 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 NewDomainServiceClient ¶
func NewDomainServiceClient(cc grpc.ClientConnInterface) DomainServiceClient
type DomainServiceServer ¶
type DomainServiceServer interface { // 查询域名明细 - 支持云类型、账户、分页等过滤条件 ListDomainDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) // 查询域名全量 - 根据云类型 ListDomain(context.Context, *ListReq) (*ListResp, error) // contains filtered or unexported methods }
DomainServiceServer is the server API for DomainService service. All implementations must embed UnimplementedDomainServiceServer for forward compatibility
type ListDetailReq ¶
type ListDetailReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 分页相关参数,页码 PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // 分页相关参数,每页数量 PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,5,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // contains filtered or unexported fields }
func (*ListDetailReq) Descriptor
deprecated
func (*ListDetailReq) Descriptor() ([]byte, []int)
Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead.
func (*ListDetailReq) GetAccountName ¶
func (x *ListDetailReq) GetAccountName() string
func (*ListDetailReq) GetNextToken ¶
func (x *ListDetailReq) GetNextToken() string
func (*ListDetailReq) GetPageNumber ¶
func (x *ListDetailReq) GetPageNumber() int32
func (*ListDetailReq) GetPageSize ¶
func (x *ListDetailReq) GetPageSize() int32
func (*ListDetailReq) GetProvider ¶
func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider
func (*ListDetailReq) ProtoMessage ¶
func (*ListDetailReq) ProtoMessage()
func (*ListDetailReq) ProtoReflect ¶
func (x *ListDetailReq) ProtoReflect() protoreflect.Message
func (*ListDetailReq) Reset ¶
func (x *ListDetailReq) Reset()
func (*ListDetailReq) String ¶
func (x *ListDetailReq) String() string
type ListDetailResp ¶
type ListDetailResp struct { // Domain 机器集合 Domains []*DomainInstance `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` // 分页相关参数,页码 PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // 分页相关参数,每页数量 PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,5,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // 请求id,出现问题后提供给云厂商,排查问题 RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
func (*ListDetailResp) Descriptor
deprecated
func (*ListDetailResp) Descriptor() ([]byte, []int)
Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead.
func (*ListDetailResp) GetDomains ¶
func (x *ListDetailResp) GetDomains() []*DomainInstance
func (*ListDetailResp) GetFinished ¶
func (x *ListDetailResp) GetFinished() bool
func (*ListDetailResp) GetNextToken ¶
func (x *ListDetailResp) GetNextToken() string
func (*ListDetailResp) GetPageNumber ¶
func (x *ListDetailResp) GetPageNumber() int32
func (*ListDetailResp) GetPageSize ¶
func (x *ListDetailResp) GetPageSize() int32
func (*ListDetailResp) GetRequestId ¶
func (x *ListDetailResp) GetRequestId() string
func (*ListDetailResp) ProtoMessage ¶
func (*ListDetailResp) ProtoMessage()
func (*ListDetailResp) ProtoReflect ¶
func (x *ListDetailResp) ProtoReflect() protoreflect.Message
func (*ListDetailResp) Reset ¶
func (x *ListDetailResp) Reset()
func (*ListDetailResp) String ¶
func (x *ListDetailResp) String() string
type ListReq ¶
type ListReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // contains filtered or unexported fields }
func (*ListReq) Descriptor
deprecated
func (*ListReq) GetProvider ¶
func (x *ListReq) GetProvider() pbtenant.CloudProvider
func (*ListReq) ProtoMessage ¶
func (*ListReq) ProtoMessage()
func (*ListReq) ProtoReflect ¶
func (x *ListReq) ProtoReflect() protoreflect.Message
type ListResp ¶
type ListResp struct { // Domain 机器集合 Domains []*DomainInstance `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` // contains filtered or unexported fields }
func (*ListResp) Descriptor
deprecated
func (*ListResp) GetDomains ¶
func (x *ListResp) GetDomains() []*DomainInstance
func (*ListResp) ProtoMessage ¶
func (*ListResp) ProtoMessage()
func (*ListResp) ProtoReflect ¶
func (x *ListResp) ProtoReflect() protoreflect.Message
type UnimplementedDomainServiceServer ¶
type UnimplementedDomainServiceServer struct { }
UnimplementedDomainServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDomainServiceServer) ListDomain ¶
func (UnimplementedDomainServiceServer) ListDomainDetail ¶
func (UnimplementedDomainServiceServer) ListDomainDetail(context.Context, *ListDetailReq) (*ListDetailResp, error)
type UnsafeDomainServiceServer ¶
type UnsafeDomainServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDomainServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DomainServiceServer will result in compilation errors.