Documentation ¶
Index ¶
- Variables
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- type AuthClient
- type AuthServer
- type CreateTokenRequest
- func (*CreateTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenRequest) GetTTL() uint64
- func (x *CreateTokenRequest) GetUserID() string
- func (*CreateTokenRequest) ProtoMessage()
- func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTokenRequest) Reset()
- func (x *CreateTokenRequest) String() string
- type CreateTokenResponse
- func (*CreateTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenResponse) GetToken() string
- func (*CreateTokenResponse) ProtoMessage()
- func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message
- func (x *CreateTokenResponse) Reset()
- func (x *CreateTokenResponse) String() string
- type UnimplementedAuthServer
- type VerifyTokenRequest
- func (*VerifyTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyTokenRequest) GetToken() string
- func (*VerifyTokenRequest) ProtoMessage()
- func (x *VerifyTokenRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyTokenRequest) Reset()
- func (x *VerifyTokenRequest) String() string
- type VerifyTokenResponse
- func (*VerifyTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyTokenResponse) GetTokenID() string
- func (x *VerifyTokenResponse) GetUserID() string
- func (*VerifyTokenResponse) ProtoMessage()
- func (x *VerifyTokenResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyTokenResponse) Reset()
- func (x *VerifyTokenResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_internal_auth_pb_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { // Creates a new Token including the request parameters CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) VerifyToken(ctx context.Context, in *VerifyTokenRequest, opts ...grpc.CallOption) (*VerifyTokenResponse, error) }
AuthClient is the client API for Auth service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { // Creates a new Token including the request parameters CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error) VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error) }
AuthServer is the server API for Auth service.
type CreateTokenRequest ¶
type CreateTokenRequest struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` // Token expiry time in seconds from now TTL uint64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` // contains filtered or unexported fields }
func (*CreateTokenRequest) Descriptor
deprecated
func (*CreateTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.
func (*CreateTokenRequest) GetTTL ¶
func (x *CreateTokenRequest) GetTTL() uint64
func (*CreateTokenRequest) GetUserID ¶
func (x *CreateTokenRequest) GetUserID() string
func (*CreateTokenRequest) ProtoMessage ¶
func (*CreateTokenRequest) ProtoMessage()
func (*CreateTokenRequest) ProtoReflect ¶
func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message
func (*CreateTokenRequest) Reset ¶
func (x *CreateTokenRequest) Reset()
func (*CreateTokenRequest) String ¶
func (x *CreateTokenRequest) String() string
type CreateTokenResponse ¶
type CreateTokenResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*CreateTokenResponse) Descriptor
deprecated
func (*CreateTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead.
func (*CreateTokenResponse) GetToken ¶
func (x *CreateTokenResponse) GetToken() string
func (*CreateTokenResponse) ProtoMessage ¶
func (*CreateTokenResponse) ProtoMessage()
func (*CreateTokenResponse) ProtoReflect ¶
func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message
func (*CreateTokenResponse) Reset ¶
func (x *CreateTokenResponse) Reset()
func (*CreateTokenResponse) String ¶
func (x *CreateTokenResponse) String() string
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServer) CreateToken ¶
func (*UnimplementedAuthServer) CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
func (*UnimplementedAuthServer) VerifyToken ¶
func (*UnimplementedAuthServer) VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
type VerifyTokenRequest ¶
type VerifyTokenRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*VerifyTokenRequest) Descriptor
deprecated
func (*VerifyTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyTokenRequest.ProtoReflect.Descriptor instead.
func (*VerifyTokenRequest) GetToken ¶
func (x *VerifyTokenRequest) GetToken() string
func (*VerifyTokenRequest) ProtoMessage ¶
func (*VerifyTokenRequest) ProtoMessage()
func (*VerifyTokenRequest) ProtoReflect ¶
func (x *VerifyTokenRequest) ProtoReflect() protoreflect.Message
func (*VerifyTokenRequest) Reset ¶
func (x *VerifyTokenRequest) Reset()
func (*VerifyTokenRequest) String ¶
func (x *VerifyTokenRequest) String() string
type VerifyTokenResponse ¶
type VerifyTokenResponse struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` TokenID string `protobuf:"bytes,2,opt,name=tokenID,proto3" json:"tokenID,omitempty"` // contains filtered or unexported fields }
func (*VerifyTokenResponse) Descriptor
deprecated
func (*VerifyTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyTokenResponse.ProtoReflect.Descriptor instead.
func (*VerifyTokenResponse) GetTokenID ¶
func (x *VerifyTokenResponse) GetTokenID() string
func (*VerifyTokenResponse) GetUserID ¶
func (x *VerifyTokenResponse) GetUserID() string
func (*VerifyTokenResponse) ProtoMessage ¶
func (*VerifyTokenResponse) ProtoMessage()
func (*VerifyTokenResponse) ProtoReflect ¶
func (x *VerifyTokenResponse) ProtoReflect() protoreflect.Message
func (*VerifyTokenResponse) Reset ¶
func (x *VerifyTokenResponse) Reset()
func (*VerifyTokenResponse) String ¶
func (x *VerifyTokenResponse) String() string
Click to show internal directories.
Click to hide internal directories.