Documentation ¶
Overview ¶
Package iam is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterResonateIAMHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterResonateIAMHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResonateIAMClient) error
- func RegisterResonateIAMHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterResonateIAMHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ResonateIAMServer) error
- func RegisterResonateIAMServer(s grpc.ServiceRegistrar, srv ResonateIAMServer)
- type AuthReq
- func (*AuthReq) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReq) GetAuth() string
- func (x *AuthReq) GetPassword() string
- func (*AuthReq) ProtoMessage()
- func (x *AuthReq) ProtoReflect() protoreflect.Message
- func (x *AuthReq) Reset()
- func (x *AuthReq) String() string
- func (this *AuthReq) Validate() error
- type AuthResp
- func (*AuthResp) Descriptor() ([]byte, []int)deprecated
- func (x *AuthResp) GetRefreshToken() string
- func (x *AuthResp) GetToken() string
- func (*AuthResp) ProtoMessage()
- func (x *AuthResp) ProtoReflect() protoreflect.Message
- func (x *AuthResp) Reset()
- func (x *AuthResp) String() string
- func (this *AuthResp) Validate() error
- type RefreshReq
- type RefreshResp
- func (*RefreshResp) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshResp) GetToken() string
- func (*RefreshResp) ProtoMessage()
- func (x *RefreshResp) ProtoReflect() protoreflect.Message
- func (x *RefreshResp) Reset()
- func (x *RefreshResp) String() string
- func (this *RefreshResp) Validate() error
- type ResonateIAMClient
- type ResonateIAMServer
- type UnimplementedResonateIAMServer
- type UnsafeResonateIAMServer
Constants ¶
This section is empty.
Variables ¶
var File_iam_iam_proto protoreflect.FileDescriptor
Functions ¶
func RegisterResonateIAMHandler ¶
func RegisterResonateIAMHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterResonateIAMHandler registers the http handlers for service ResonateIAM to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterResonateIAMHandlerClient ¶
func RegisterResonateIAMHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResonateIAMClient) error
RegisterResonateIAMHandlerClient registers the http handlers for service ResonateIAM to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ResonateIAMClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ResonateIAMClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ResonateIAMClient" to call the correct interceptors.
func RegisterResonateIAMHandlerFromEndpoint ¶
func RegisterResonateIAMHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterResonateIAMHandlerFromEndpoint is same as RegisterResonateIAMHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterResonateIAMHandlerServer ¶
func RegisterResonateIAMHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ResonateIAMServer) error
RegisterResonateIAMHandlerServer registers the http handlers for service ResonateIAM to "mux". UnaryRPC :call ResonateIAMServer 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 RegisterResonateIAMHandlerFromEndpoint instead.
func RegisterResonateIAMServer ¶
func RegisterResonateIAMServer(s grpc.ServiceRegistrar, srv ResonateIAMServer)
Types ¶
type AuthReq ¶
type AuthReq struct { // Required Auth string `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"` // Required Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
Password authentication request
func (*AuthReq) Descriptor
deprecated
func (*AuthReq) GetPassword ¶
func (*AuthReq) ProtoMessage ¶
func (*AuthReq) ProtoMessage()
func (*AuthReq) ProtoReflect ¶
func (x *AuthReq) ProtoReflect() protoreflect.Message
type AuthResp ¶
type AuthResp struct { // Access token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // Refresh token RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
Password authentication response
func (*AuthResp) Descriptor
deprecated
func (*AuthResp) GetRefreshToken ¶
func (*AuthResp) ProtoMessage ¶
func (*AuthResp) ProtoMessage()
func (*AuthResp) ProtoReflect ¶
func (x *AuthResp) ProtoReflect() protoreflect.Message
type RefreshReq ¶
type RefreshReq struct { // Required Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
Refresh token request
func (*RefreshReq) Descriptor
deprecated
func (*RefreshReq) Descriptor() ([]byte, []int)
Deprecated: Use RefreshReq.ProtoReflect.Descriptor instead.
func (*RefreshReq) GetToken ¶
func (x *RefreshReq) GetToken() string
func (*RefreshReq) ProtoMessage ¶
func (*RefreshReq) ProtoMessage()
func (*RefreshReq) ProtoReflect ¶
func (x *RefreshReq) ProtoReflect() protoreflect.Message
func (*RefreshReq) Reset ¶
func (x *RefreshReq) Reset()
func (*RefreshReq) String ¶
func (x *RefreshReq) String() string
func (*RefreshReq) Validate ¶
func (this *RefreshReq) Validate() error
type RefreshResp ¶
type RefreshResp struct { // Access token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
Refresh token response
func (*RefreshResp) Descriptor
deprecated
func (*RefreshResp) Descriptor() ([]byte, []int)
Deprecated: Use RefreshResp.ProtoReflect.Descriptor instead.
func (*RefreshResp) GetToken ¶
func (x *RefreshResp) GetToken() string
func (*RefreshResp) ProtoMessage ¶
func (*RefreshResp) ProtoMessage()
func (*RefreshResp) ProtoReflect ¶
func (x *RefreshResp) ProtoReflect() protoreflect.Message
func (*RefreshResp) Reset ¶
func (x *RefreshResp) Reset()
func (*RefreshResp) String ¶
func (x *RefreshResp) String() string
func (*RefreshResp) Validate ¶
func (this *RefreshResp) Validate() error
type ResonateIAMClient ¶
type ResonateIAMClient interface { // Authenticate user by username or email and password Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthResp, error) // Refresh refreshes JWT token Refresh(ctx context.Context, in *RefreshReq, opts ...grpc.CallOption) (*RefreshResp, error) }
ResonateIAMClient is the client API for ResonateIAM 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 NewResonateIAMClient ¶
func NewResonateIAMClient(cc grpc.ClientConnInterface) ResonateIAMClient
type ResonateIAMServer ¶
type ResonateIAMServer interface { // Authenticate user by username or email and password Auth(context.Context, *AuthReq) (*AuthResp, error) // Refresh refreshes JWT token Refresh(context.Context, *RefreshReq) (*RefreshResp, error) }
ResonateIAMServer is the server API for ResonateIAM service. All implementations should embed UnimplementedResonateIAMServer for forward compatibility
type UnimplementedResonateIAMServer ¶
type UnimplementedResonateIAMServer struct { }
UnimplementedResonateIAMServer should be embedded to have forward compatible implementations.
func (UnimplementedResonateIAMServer) Refresh ¶
func (UnimplementedResonateIAMServer) Refresh(context.Context, *RefreshReq) (*RefreshResp, error)
type UnsafeResonateIAMServer ¶
type UnsafeResonateIAMServer interface {
// contains filtered or unexported methods
}
UnsafeResonateIAMServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResonateIAMServer will result in compilation errors.