Documentation ¶
Overview ¶
Package domain_name_service is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterDomainNameServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDomainNameServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DomainNameServiceClient) error
- func RegisterDomainNameServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDomainNameServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DomainNameServiceServer) error
- func RegisterDomainNameServiceServer(s grpc.ServiceRegistrar, srv DomainNameServiceServer)
- type DomainNameServiceClient
- type DomainNameServiceServer
- type GetAddressRequest
- func (*GetAddressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAddressRequest) GetServiceName() string
- func (*GetAddressRequest) ProtoMessage()
- func (x *GetAddressRequest) ProtoReflect() protoreflect.Message
- func (x *GetAddressRequest) Reset()
- func (x *GetAddressRequest) String() string
- type GetAddressResponse
- func (*GetAddressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAddressResponse) GetAddress() string
- func (*GetAddressResponse) ProtoMessage()
- func (x *GetAddressResponse) ProtoReflect() protoreflect.Message
- func (x *GetAddressResponse) Reset()
- func (x *GetAddressResponse) String() string
- type UnimplementedDomainNameServiceServer
- type UnsafeDomainNameServiceServer
- type UpdateAddressRequest
- func (*UpdateAddressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateAddressRequest) GetAddress() string
- func (x *UpdateAddressRequest) GetServiceName() string
- func (*UpdateAddressRequest) ProtoMessage()
- func (x *UpdateAddressRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateAddressRequest) Reset()
- func (x *UpdateAddressRequest) String() string
- type UpdateAddressResponse
Constants ¶
const ( DomainNameService_GetAddress_FullMethodName = "/domain_name_service.DomainNameService/GetAddress" DomainNameService_UpdateAddress_FullMethodName = "/domain_name_service.DomainNameService/UpdateAddress" )
Variables ¶
var DomainNameService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "domain_name_service.DomainNameService", HandlerType: (*DomainNameServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAddress", Handler: _DomainNameService_GetAddress_Handler, }, { MethodName: "UpdateAddress", Handler: _DomainNameService_UpdateAddress_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/domain-name-service/domain-name-service.proto", }
DomainNameService_ServiceDesc is the grpc.ServiceDesc for DomainNameService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_domain_name_service_domain_name_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDomainNameServiceHandler ¶
func RegisterDomainNameServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDomainNameServiceHandler registers the http handlers for service DomainNameService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDomainNameServiceHandlerClient ¶
func RegisterDomainNameServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DomainNameServiceClient) error
RegisterDomainNameServiceHandlerClient registers the http handlers for service DomainNameService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DomainNameServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DomainNameServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DomainNameServiceClient" to call the correct interceptors.
func RegisterDomainNameServiceHandlerFromEndpoint ¶
func RegisterDomainNameServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDomainNameServiceHandlerFromEndpoint is same as RegisterDomainNameServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDomainNameServiceHandlerServer ¶
func RegisterDomainNameServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DomainNameServiceServer) error
RegisterDomainNameServiceHandlerServer registers the http handlers for service DomainNameService to "mux". UnaryRPC :call DomainNameServiceServer 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 RegisterDomainNameServiceHandlerFromEndpoint instead.
func RegisterDomainNameServiceServer ¶
func RegisterDomainNameServiceServer(s grpc.ServiceRegistrar, srv DomainNameServiceServer)
Types ¶
type DomainNameServiceClient ¶
type DomainNameServiceClient interface { GetAddress(ctx context.Context, in *GetAddressRequest, opts ...grpc.CallOption) (*GetAddressResponse, error) UpdateAddress(ctx context.Context, in *UpdateAddressRequest, opts ...grpc.CallOption) (*UpdateAddressResponse, error) }
DomainNameServiceClient is the client API for DomainNameService 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 NewDomainNameServiceClient ¶
func NewDomainNameServiceClient(cc grpc.ClientConnInterface) DomainNameServiceClient
type DomainNameServiceServer ¶
type DomainNameServiceServer interface { GetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error) UpdateAddress(context.Context, *UpdateAddressRequest) (*UpdateAddressResponse, error) // contains filtered or unexported methods }
DomainNameServiceServer is the server API for DomainNameService service. All implementations must embed UnimplementedDomainNameServiceServer for forward compatibility
type GetAddressRequest ¶
type GetAddressRequest struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // contains filtered or unexported fields }
func (*GetAddressRequest) Descriptor
deprecated
func (*GetAddressRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAddressRequest.ProtoReflect.Descriptor instead.
func (*GetAddressRequest) GetServiceName ¶
func (x *GetAddressRequest) GetServiceName() string
func (*GetAddressRequest) ProtoMessage ¶
func (*GetAddressRequest) ProtoMessage()
func (*GetAddressRequest) ProtoReflect ¶
func (x *GetAddressRequest) ProtoReflect() protoreflect.Message
func (*GetAddressRequest) Reset ¶
func (x *GetAddressRequest) Reset()
func (*GetAddressRequest) String ¶
func (x *GetAddressRequest) String() string
type GetAddressResponse ¶
type GetAddressResponse struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*GetAddressResponse) Descriptor
deprecated
func (*GetAddressResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAddressResponse.ProtoReflect.Descriptor instead.
func (*GetAddressResponse) GetAddress ¶
func (x *GetAddressResponse) GetAddress() string
func (*GetAddressResponse) ProtoMessage ¶
func (*GetAddressResponse) ProtoMessage()
func (*GetAddressResponse) ProtoReflect ¶
func (x *GetAddressResponse) ProtoReflect() protoreflect.Message
func (*GetAddressResponse) Reset ¶
func (x *GetAddressResponse) Reset()
func (*GetAddressResponse) String ¶
func (x *GetAddressResponse) String() string
type UnimplementedDomainNameServiceServer ¶
type UnimplementedDomainNameServiceServer struct { }
UnimplementedDomainNameServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDomainNameServiceServer) GetAddress ¶
func (UnimplementedDomainNameServiceServer) GetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error)
func (UnimplementedDomainNameServiceServer) UpdateAddress ¶
func (UnimplementedDomainNameServiceServer) UpdateAddress(context.Context, *UpdateAddressRequest) (*UpdateAddressResponse, error)
type UnsafeDomainNameServiceServer ¶
type UnsafeDomainNameServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDomainNameServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DomainNameServiceServer will result in compilation errors.
type UpdateAddressRequest ¶
type UpdateAddressRequest struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*UpdateAddressRequest) Descriptor
deprecated
func (*UpdateAddressRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateAddressRequest.ProtoReflect.Descriptor instead.
func (*UpdateAddressRequest) GetAddress ¶
func (x *UpdateAddressRequest) GetAddress() string
func (*UpdateAddressRequest) GetServiceName ¶
func (x *UpdateAddressRequest) GetServiceName() string
func (*UpdateAddressRequest) ProtoMessage ¶
func (*UpdateAddressRequest) ProtoMessage()
func (*UpdateAddressRequest) ProtoReflect ¶
func (x *UpdateAddressRequest) ProtoReflect() protoreflect.Message
func (*UpdateAddressRequest) Reset ¶
func (x *UpdateAddressRequest) Reset()
func (*UpdateAddressRequest) String ¶
func (x *UpdateAddressRequest) String() string
type UpdateAddressResponse ¶
type UpdateAddressResponse struct {
// contains filtered or unexported fields
}
func (*UpdateAddressResponse) Descriptor
deprecated
func (*UpdateAddressResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateAddressResponse.ProtoReflect.Descriptor instead.
func (*UpdateAddressResponse) ProtoMessage ¶
func (*UpdateAddressResponse) ProtoMessage()
func (*UpdateAddressResponse) ProtoReflect ¶
func (x *UpdateAddressResponse) ProtoReflect() protoreflect.Message
func (*UpdateAddressResponse) Reset ¶
func (x *UpdateAddressResponse) Reset()
func (*UpdateAddressResponse) String ¶
func (x *UpdateAddressResponse) String() string