Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error
- func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type GeneratePasswordRequest
- func (*GeneratePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GeneratePasswordRequest) GetMeta() map[string]*anypb.Any
- func (*GeneratePasswordRequest) ProtoMessage()
- func (x *GeneratePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *GeneratePasswordRequest) Reset()
- func (x *GeneratePasswordRequest) String() string
- type GeneratePasswordResponse
- func (*GeneratePasswordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GeneratePasswordResponse) GetMeta() map[string]*anypb.Any
- func (x *GeneratePasswordResponse) GetPassword() *Password
- func (*GeneratePasswordResponse) ProtoMessage()
- func (x *GeneratePasswordResponse) ProtoReflect() protoreflect.Message
- func (x *GeneratePasswordResponse) Reset()
- func (x *GeneratePasswordResponse) String() string
- type Password
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_auth_v1_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.v1.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GeneratePassword", Handler: _Service_GeneratePassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/v1/service.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 RegisterServiceHandler ¶
func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterServiceHandler registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterServiceHandlerClient ¶
func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error
RegisterServiceHandlerClient registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServiceClient" to call the correct interceptors.
func RegisterServiceHandlerFromEndpoint ¶
func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterServiceHandlerServer ¶
func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error
RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead.
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type GeneratePasswordRequest ¶
type GeneratePasswordRequest struct { Meta map[string]*anypb.Any `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
GeneratePasswordRequest with meta.
func (*GeneratePasswordRequest) Descriptor
deprecated
func (*GeneratePasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use GeneratePasswordRequest.ProtoReflect.Descriptor instead.
func (*GeneratePasswordRequest) GetMeta ¶
func (x *GeneratePasswordRequest) GetMeta() map[string]*anypb.Any
func (*GeneratePasswordRequest) ProtoMessage ¶
func (*GeneratePasswordRequest) ProtoMessage()
func (*GeneratePasswordRequest) ProtoReflect ¶
func (x *GeneratePasswordRequest) ProtoReflect() protoreflect.Message
func (*GeneratePasswordRequest) Reset ¶
func (x *GeneratePasswordRequest) Reset()
func (*GeneratePasswordRequest) String ¶
func (x *GeneratePasswordRequest) String() string
type GeneratePasswordResponse ¶
type GeneratePasswordResponse struct { Meta map[string]*anypb.Any `` /* 149-byte string literal not displayed */ Password *Password `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
GeneratePasswordResponse with meta, password and hash.
func (*GeneratePasswordResponse) Descriptor
deprecated
func (*GeneratePasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use GeneratePasswordResponse.ProtoReflect.Descriptor instead.
func (*GeneratePasswordResponse) GetMeta ¶
func (x *GeneratePasswordResponse) GetMeta() map[string]*anypb.Any
func (*GeneratePasswordResponse) GetPassword ¶
func (x *GeneratePasswordResponse) GetPassword() *Password
func (*GeneratePasswordResponse) ProtoMessage ¶
func (*GeneratePasswordResponse) ProtoMessage()
func (*GeneratePasswordResponse) ProtoReflect ¶
func (x *GeneratePasswordResponse) ProtoReflect() protoreflect.Message
func (*GeneratePasswordResponse) Reset ¶
func (x *GeneratePasswordResponse) Reset()
func (*GeneratePasswordResponse) String ¶
func (x *GeneratePasswordResponse) String() string
type Password ¶
type Password struct { Plain string `protobuf:"bytes,1,opt,name=plain,proto3" json:"plain,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
Password with plain and hash,
func (*Password) Descriptor
deprecated
func (*Password) ProtoMessage ¶
func (*Password) ProtoMessage()
func (*Password) ProtoReflect ¶
func (x *Password) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface { // GeneratePassword from meta. GeneratePassword(ctx context.Context, in *GeneratePasswordRequest, opts ...grpc.CallOption) (*GeneratePasswordResponse, 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 { // GeneratePassword from meta. GeneratePassword(context.Context, *GeneratePasswordRequest) (*GeneratePasswordResponse, 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) GeneratePassword ¶
func (UnimplementedServiceServer) GeneratePassword(context.Context, *GeneratePasswordRequest) (*GeneratePasswordResponse, 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.