Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterJwtServiceServer(s grpc.ServiceRegistrar, srv JwtServiceServer)
- type DecodeResp
- func (*DecodeResp) Descriptor() ([]byte, []int)deprecated
- func (x *DecodeResp) GetBody() *TokenBody
- func (x *DecodeResp) GetToken() string
- func (x *DecodeResp) GetValid() bool
- func (*DecodeResp) ProtoMessage()
- func (x *DecodeResp) ProtoReflect() protoreflect.Message
- func (x *DecodeResp) Reset()
- func (x *DecodeResp) String() string
- type JwtServiceClient
- type JwtServiceServer
- type Token
- type TokenBody
- func (*TokenBody) Descriptor() ([]byte, []int)deprecated
- func (x *TokenBody) GetIss() string
- func (x *TokenBody) GetLanguage() string
- func (x *TokenBody) GetRole() int64
- func (x *TokenBody) GetStatus() string
- func (x *TokenBody) GetSub() string
- func (x *TokenBody) GetWeb3Address() string
- func (*TokenBody) ProtoMessage()
- func (x *TokenBody) ProtoReflect() protoreflect.Message
- func (x *TokenBody) Reset()
- func (x *TokenBody) String() string
- type UnimplementedJwtServiceServer
- type UnsafeJwtServiceServer
Constants ¶
const ( JwtService_GenerateJWT_FullMethodName = "/pp.jwt.JwtService/GenerateJWT" JwtService_DecodeJWT_FullMethodName = "/pp.jwt.JwtService/DecodeJWT" )
Variables ¶
var File_jwt_srv_jwt_proto protoreflect.FileDescriptor
var JwtService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pp.jwt.JwtService", HandlerType: (*JwtServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GenerateJWT", Handler: _JwtService_GenerateJWT_Handler, }, { MethodName: "DecodeJWT", Handler: _JwtService_DecodeJWT_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "jwt-srv/jwt.proto", }
JwtService_ServiceDesc is the grpc.ServiceDesc for JwtService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterJwtServiceServer ¶
func RegisterJwtServiceServer(s grpc.ServiceRegistrar, srv JwtServiceServer)
Types ¶
type DecodeResp ¶
type DecodeResp struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` Body *TokenBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*DecodeResp) Descriptor
deprecated
func (*DecodeResp) Descriptor() ([]byte, []int)
Deprecated: Use DecodeResp.ProtoReflect.Descriptor instead.
func (*DecodeResp) GetBody ¶
func (x *DecodeResp) GetBody() *TokenBody
func (*DecodeResp) GetToken ¶
func (x *DecodeResp) GetToken() string
func (*DecodeResp) GetValid ¶
func (x *DecodeResp) GetValid() bool
func (*DecodeResp) ProtoMessage ¶
func (*DecodeResp) ProtoMessage()
func (*DecodeResp) ProtoReflect ¶
func (x *DecodeResp) ProtoReflect() protoreflect.Message
func (*DecodeResp) Reset ¶
func (x *DecodeResp) Reset()
func (*DecodeResp) String ¶
func (x *DecodeResp) String() string
type JwtServiceClient ¶
type JwtServiceClient interface { GenerateJWT(ctx context.Context, in *TokenBody, opts ...grpc.CallOption) (*Token, error) DecodeJWT(ctx context.Context, in *Token, opts ...grpc.CallOption) (*DecodeResp, error) }
JwtServiceClient is the client API for JwtService 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 NewJwtServiceClient ¶
func NewJwtServiceClient(cc grpc.ClientConnInterface) JwtServiceClient
type JwtServiceServer ¶
type JwtServiceServer interface { GenerateJWT(context.Context, *TokenBody) (*Token, error) DecodeJWT(context.Context, *Token) (*DecodeResp, error) // contains filtered or unexported methods }
JwtServiceServer is the server API for JwtService service. All implementations must embed UnimplementedJwtServiceServer for forward compatibility
type Token ¶
type Token struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type TokenBody ¶
type TokenBody struct { Iss string `protobuf:"bytes,1,opt,name=iss,proto3" json:"iss,omitempty"` Sub string `protobuf:"bytes,2,opt,name=sub,proto3" json:"sub,omitempty"` Role int64 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` Web3Address string `protobuf:"bytes,4,opt,name=web3_address,json=web3Address,proto3" json:"web3_address,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` Language string `protobuf:"bytes,6,opt,name=language,proto3" json:"language,omitempty"` // contains filtered or unexported fields }
func (*TokenBody) Descriptor
deprecated
func (*TokenBody) GetLanguage ¶
func (*TokenBody) GetWeb3Address ¶
func (*TokenBody) ProtoMessage ¶
func (*TokenBody) ProtoMessage()
func (*TokenBody) ProtoReflect ¶
func (x *TokenBody) ProtoReflect() protoreflect.Message
type UnimplementedJwtServiceServer ¶
type UnimplementedJwtServiceServer struct { }
UnimplementedJwtServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedJwtServiceServer) DecodeJWT ¶
func (UnimplementedJwtServiceServer) DecodeJWT(context.Context, *Token) (*DecodeResp, error)
func (UnimplementedJwtServiceServer) GenerateJWT ¶
type UnsafeJwtServiceServer ¶
type UnsafeJwtServiceServer interface {
// contains filtered or unexported methods
}
UnsafeJwtServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JwtServiceServer will result in compilation errors.