Documentation ¶
Overview ¶
Package iam is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterIamHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterIamHandlerClient(ctx context.Context, mux *runtime.ServeMux, client IamClient) error
- func RegisterIamHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterIamHandlerServer(ctx context.Context, mux *runtime.ServeMux, server IamServer) error
- func RegisterIamServer(s grpc.ServiceRegistrar, srv IamServer)
- type ClientOptions
- type GrpcClient
- type IamClient
- type IamServer
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetId() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- type SignUpRequest
- func (*SignUpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpRequest) GetEmail() string
- func (x *SignUpRequest) GetName() string
- func (x *SignUpRequest) GetPassword() string
- func (*SignUpRequest) ProtoMessage()
- func (x *SignUpRequest) ProtoReflect() protoreflect.Message
- func (x *SignUpRequest) Reset()
- func (x *SignUpRequest) String() string
- type SignUpResponse
- func (*SignUpResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpResponse) GetEmail() string
- func (x *SignUpResponse) GetId() string
- func (x *SignUpResponse) GetName() string
- func (x *SignUpResponse) GetPassword() string
- func (*SignUpResponse) ProtoMessage()
- func (x *SignUpResponse) ProtoReflect() protoreflect.Message
- func (x *SignUpResponse) Reset()
- func (x *SignUpResponse) String() string
- type UnimplementedIamServer
- type UnsafeIamServer
- type WhoAmIRequest
- type WhoAmIResponse
- func (*WhoAmIResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WhoAmIResponse) GetEmail() string
- func (x *WhoAmIResponse) GetId() string
- func (x *WhoAmIResponse) GetName() string
- func (*WhoAmIResponse) ProtoMessage()
- func (x *WhoAmIResponse) ProtoReflect() protoreflect.Message
- func (x *WhoAmIResponse) Reset()
- func (x *WhoAmIResponse) String() string
Constants ¶
const ( Iam_SignUp_FullMethodName = "/vortexproto.iam.v1.Iam/SignUp" Iam_Login_FullMethodName = "/vortexproto.iam.v1.Iam/Login" Iam_WhoAmI_FullMethodName = "/vortexproto.iam.v1.Iam/WhoAmI" )
Variables ¶
var File_iam_v1_iam_proto protoreflect.FileDescriptor
var Iam_ServiceDesc = grpc.ServiceDesc{ ServiceName: "vortexproto.iam.v1.Iam", HandlerType: (*IamServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SignUp", Handler: _Iam_SignUp_Handler, }, { MethodName: "Login", Handler: _Iam_Login_Handler, }, { MethodName: "WhoAmI", Handler: _Iam_WhoAmI_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "iam/v1/iam.proto", }
Iam_ServiceDesc is the grpc.ServiceDesc for Iam service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterIamHandler ¶
RegisterIamHandler registers the http handlers for service Iam to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterIamHandlerClient ¶
RegisterIamHandlerClient registers the http handlers for service Iam to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "IamClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "IamClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "IamClient" to call the correct interceptors.
func RegisterIamHandlerFromEndpoint ¶
func RegisterIamHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterIamHandlerFromEndpoint is same as RegisterIamHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterIamHandlerServer ¶
RegisterIamHandlerServer registers the http handlers for service Iam to "mux". UnaryRPC :call IamServer 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 RegisterIamHandlerFromEndpoint instead.
func RegisterIamServer ¶
func RegisterIamServer(s grpc.ServiceRegistrar, srv IamServer)
Types ¶
type ClientOptions ¶
type ClientOptions struct {
Conn *conn.GrpcClientConn
}
ClientOptions represents the optional options to NewClient.
type GrpcClient ¶
type GrpcClient struct { IamClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)
NewClient returns a client connection to the 'vortex' service.
func (*GrpcClient) Close ¶
func (c *GrpcClient) Close()
type IamClient ¶
type IamClient interface { // Create an account for the Vortex Platform. SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error) // Create an account for the Vortex Platform. Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) // Testing endpoint. WhoAmI(ctx context.Context, in *WhoAmIRequest, opts ...grpc.CallOption) (*WhoAmIResponse, error) }
IamClient is the client API for Iam 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.
Iam service definition.
func NewIamClient ¶
func NewIamClient(cc grpc.ClientConnInterface) IamClient
type IamServer ¶
type IamServer interface { // Create an account for the Vortex Platform. SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error) // Create an account for the Vortex Platform. Login(context.Context, *LoginRequest) (*LoginResponse, error) // Testing endpoint. WhoAmI(context.Context, *WhoAmIRequest) (*WhoAmIResponse, error) // contains filtered or unexported methods }
IamServer is the server API for Iam service. All implementations must embed UnimplementedIamServer for forward compatibility
Iam service definition.
type LoginRequest ¶
type LoginRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
Request message for the Login rpc.
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetId ¶
func (x *LoginRequest) GetId() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
Response message for the Login rpc.
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetToken ¶
func (x *LoginResponse) GetToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type SignUpRequest ¶
type SignUpRequest struct { // Optional. The name of the account to register. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Required. The email address of the account to register. Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Optional. A generated password will be provided if empty. Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
Request message for the SignUp rpc.
func (*SignUpRequest) Descriptor
deprecated
func (*SignUpRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
func (*SignUpRequest) GetEmail ¶
func (x *SignUpRequest) GetEmail() string
func (*SignUpRequest) GetName ¶
func (x *SignUpRequest) GetName() string
func (*SignUpRequest) GetPassword ¶
func (x *SignUpRequest) GetPassword() string
func (*SignUpRequest) ProtoMessage ¶
func (*SignUpRequest) ProtoMessage()
func (*SignUpRequest) ProtoReflect ¶
func (x *SignUpRequest) ProtoReflect() protoreflect.Message
func (*SignUpRequest) Reset ¶
func (x *SignUpRequest) Reset()
func (*SignUpRequest) String ¶
func (x *SignUpRequest) String() string
type SignUpResponse ¶
type SignUpResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
Response message for the SignUp rpc.
func (*SignUpResponse) Descriptor
deprecated
func (*SignUpResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead.
func (*SignUpResponse) GetEmail ¶
func (x *SignUpResponse) GetEmail() string
func (*SignUpResponse) GetId ¶
func (x *SignUpResponse) GetId() string
func (*SignUpResponse) GetName ¶
func (x *SignUpResponse) GetName() string
func (*SignUpResponse) GetPassword ¶
func (x *SignUpResponse) GetPassword() string
func (*SignUpResponse) ProtoMessage ¶
func (*SignUpResponse) ProtoMessage()
func (*SignUpResponse) ProtoReflect ¶
func (x *SignUpResponse) ProtoReflect() protoreflect.Message
func (*SignUpResponse) Reset ¶
func (x *SignUpResponse) Reset()
func (*SignUpResponse) String ¶
func (x *SignUpResponse) String() string
type UnimplementedIamServer ¶
type UnimplementedIamServer struct { }
UnimplementedIamServer must be embedded to have forward compatible implementations.
func (UnimplementedIamServer) Login ¶
func (UnimplementedIamServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedIamServer) SignUp ¶
func (UnimplementedIamServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
func (UnimplementedIamServer) WhoAmI ¶
func (UnimplementedIamServer) WhoAmI(context.Context, *WhoAmIRequest) (*WhoAmIResponse, error)
type UnsafeIamServer ¶
type UnsafeIamServer interface {
// contains filtered or unexported methods
}
UnsafeIamServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IamServer will result in compilation errors.
type WhoAmIRequest ¶
type WhoAmIRequest struct {
// contains filtered or unexported fields
}
Request message for the WhoAmI rpc.
func (*WhoAmIRequest) Descriptor
deprecated
func (*WhoAmIRequest) Descriptor() ([]byte, []int)
Deprecated: Use WhoAmIRequest.ProtoReflect.Descriptor instead.
func (*WhoAmIRequest) ProtoMessage ¶
func (*WhoAmIRequest) ProtoMessage()
func (*WhoAmIRequest) ProtoReflect ¶
func (x *WhoAmIRequest) ProtoReflect() protoreflect.Message
func (*WhoAmIRequest) Reset ¶
func (x *WhoAmIRequest) Reset()
func (*WhoAmIRequest) String ¶
func (x *WhoAmIRequest) String() string
type WhoAmIResponse ¶
type WhoAmIResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
Request message for the WhoAmI rpc.
func (*WhoAmIResponse) Descriptor
deprecated
func (*WhoAmIResponse) Descriptor() ([]byte, []int)
Deprecated: Use WhoAmIResponse.ProtoReflect.Descriptor instead.
func (*WhoAmIResponse) GetEmail ¶
func (x *WhoAmIResponse) GetEmail() string
func (*WhoAmIResponse) GetId ¶
func (x *WhoAmIResponse) GetId() string
func (*WhoAmIResponse) GetName ¶
func (x *WhoAmIResponse) GetName() string
func (*WhoAmIResponse) ProtoMessage ¶
func (*WhoAmIResponse) ProtoMessage()
func (*WhoAmIResponse) ProtoReflect ¶
func (x *WhoAmIResponse) ProtoReflect() protoreflect.Message
func (*WhoAmIResponse) Reset ¶
func (x *WhoAmIResponse) Reset()
func (*WhoAmIResponse) String ¶
func (x *WhoAmIResponse) String() string