Documentation ¶
Index ¶
- Variables
- func RegisterJwtServiceServer(s *grpc.Server, srv JwtServiceServer)
- type Algo
- type JwtServiceClient
- type JwtServiceServer
- type SignJSONRequest
- func (*SignJSONRequest) Descriptor() ([]byte, []int)
- func (m *SignJSONRequest) GetAlgo() Algo
- func (m *SignJSONRequest) GetAud() string
- func (m *SignJSONRequest) GetExp() int64
- func (m *SignJSONRequest) GetIss() string
- func (m *SignJSONRequest) GetPayload() []byte
- func (*SignJSONRequest) ProtoMessage()
- func (m *SignJSONRequest) Reset()
- func (m *SignJSONRequest) String() string
- func (m *SignJSONRequest) XXX_DiscardUnknown()
- func (m *SignJSONRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignJSONRequest) XXX_Merge(src proto.Message)
- func (m *SignJSONRequest) XXX_Size() int
- func (m *SignJSONRequest) XXX_Unmarshal(b []byte) error
- type SignResponse
- func (*SignResponse) Descriptor() ([]byte, []int)
- func (m *SignResponse) GetStatus() *StatusData
- func (m *SignResponse) GetToken() string
- func (*SignResponse) ProtoMessage()
- func (m *SignResponse) Reset()
- func (m *SignResponse) String() string
- func (m *SignResponse) XXX_DiscardUnknown()
- func (m *SignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignResponse) XXX_Merge(src proto.Message)
- func (m *SignResponse) XXX_Size() int
- func (m *SignResponse) XXX_Unmarshal(b []byte) error
- type StatusData
- func (*StatusData) Descriptor() ([]byte, []int)
- func (m *StatusData) GetMsg() string
- func (m *StatusData) GetStatus() StatusData_Status
- func (*StatusData) ProtoMessage()
- func (m *StatusData) Reset()
- func (m *StatusData) String() string
- func (m *StatusData) XXX_DiscardUnknown()
- func (m *StatusData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatusData) XXX_Merge(src proto.Message)
- func (m *StatusData) XXX_Size() int
- func (m *StatusData) XXX_Unmarshal(b []byte) error
- type StatusData_Status
- type UnimplementedJwtServiceServer
- type VerifyJSONResponse
- func (*VerifyJSONResponse) Descriptor() ([]byte, []int)
- func (m *VerifyJSONResponse) GetPayload() []byte
- func (m *VerifyJSONResponse) GetStatus() *StatusData
- func (*VerifyJSONResponse) ProtoMessage()
- func (m *VerifyJSONResponse) Reset()
- func (m *VerifyJSONResponse) String() string
- func (m *VerifyJSONResponse) XXX_DiscardUnknown()
- func (m *VerifyJSONResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VerifyJSONResponse) XXX_Merge(src proto.Message)
- func (m *VerifyJSONResponse) XXX_Size() int
- func (m *VerifyJSONResponse) XXX_Unmarshal(b []byte) error
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)
- func (m *VerifyRequest) GetAlgo() Algo
- func (m *VerifyRequest) GetToken() string
- func (*VerifyRequest) ProtoMessage()
- func (m *VerifyRequest) Reset()
- func (m *VerifyRequest) String() string
- func (m *VerifyRequest) XXX_DiscardUnknown()
- func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VerifyRequest) XXX_Merge(src proto.Message)
- func (m *VerifyRequest) XXX_Size() int
- func (m *VerifyRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Algo_name = map[int32]string{
0: "HS256",
1: "RS256",
}
View Source
var Algo_value = map[string]int32{
"HS256": 0,
"RS256": 1,
}
View Source
var StatusData_Status_name = map[int32]string{
0: "SUCCEED",
1: "ERROR",
}
View Source
var StatusData_Status_value = map[string]int32{
"SUCCEED": 0,
"ERROR": 1,
}
Functions ¶
func RegisterJwtServiceServer ¶
func RegisterJwtServiceServer(s *grpc.Server, srv JwtServiceServer)
Types ¶
type JwtServiceClient ¶
type JwtServiceClient interface { // SignJSON 为JSON字符串签名 SignJSON(ctx context.Context, in *SignJSONRequest, opts ...grpc.CallOption) (*SignResponse, error) // VerifyJSON 将token解析到的负载转码为JSON字符串返回 VerifyJSON(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyJSONResponse, error) }
JwtServiceClient is the client API for JwtService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewJwtServiceClient ¶
func NewJwtServiceClient(cc *grpc.ClientConn) JwtServiceClient
type JwtServiceServer ¶
type JwtServiceServer interface { // SignJSON 为JSON字符串签名 SignJSON(context.Context, *SignJSONRequest) (*SignResponse, error) // VerifyJSON 将token解析到的负载转码为JSON字符串返回 VerifyJSON(context.Context, *VerifyRequest) (*VerifyJSONResponse, error) }
JwtServiceServer is the server API for JwtService service.
type SignJSONRequest ¶
type SignJSONRequest struct { Algo Algo `protobuf:"varint,1,opt,name=algo,proto3,enum=jwtrpcdeclare.Algo" json:"algo,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Aud string `protobuf:"bytes,3,opt,name=aud,proto3" json:"aud,omitempty"` Iss string `protobuf:"bytes,4,opt,name=iss,proto3" json:"iss,omitempty"` Exp int64 `protobuf:"varint,5,opt,name=exp,proto3" json:"exp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SignJSONRequest) Descriptor ¶
func (*SignJSONRequest) Descriptor() ([]byte, []int)
func (*SignJSONRequest) GetAlgo ¶
func (m *SignJSONRequest) GetAlgo() Algo
func (*SignJSONRequest) GetAud ¶
func (m *SignJSONRequest) GetAud() string
func (*SignJSONRequest) GetExp ¶
func (m *SignJSONRequest) GetExp() int64
func (*SignJSONRequest) GetIss ¶
func (m *SignJSONRequest) GetIss() string
func (*SignJSONRequest) GetPayload ¶
func (m *SignJSONRequest) GetPayload() []byte
func (*SignJSONRequest) ProtoMessage ¶
func (*SignJSONRequest) ProtoMessage()
func (*SignJSONRequest) Reset ¶
func (m *SignJSONRequest) Reset()
func (*SignJSONRequest) String ¶
func (m *SignJSONRequest) String() string
func (*SignJSONRequest) XXX_DiscardUnknown ¶
func (m *SignJSONRequest) XXX_DiscardUnknown()
func (*SignJSONRequest) XXX_Marshal ¶
func (m *SignJSONRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignJSONRequest) XXX_Merge ¶
func (m *SignJSONRequest) XXX_Merge(src proto.Message)
func (*SignJSONRequest) XXX_Size ¶
func (m *SignJSONRequest) XXX_Size() int
func (*SignJSONRequest) XXX_Unmarshal ¶
func (m *SignJSONRequest) XXX_Unmarshal(b []byte) error
type SignResponse ¶
type SignResponse struct { Status *StatusData `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SignResponse) Descriptor ¶
func (*SignResponse) Descriptor() ([]byte, []int)
func (*SignResponse) GetStatus ¶
func (m *SignResponse) GetStatus() *StatusData
func (*SignResponse) GetToken ¶
func (m *SignResponse) GetToken() string
func (*SignResponse) ProtoMessage ¶
func (*SignResponse) ProtoMessage()
func (*SignResponse) Reset ¶
func (m *SignResponse) Reset()
func (*SignResponse) String ¶
func (m *SignResponse) String() string
func (*SignResponse) XXX_DiscardUnknown ¶
func (m *SignResponse) XXX_DiscardUnknown()
func (*SignResponse) XXX_Marshal ¶
func (m *SignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignResponse) XXX_Merge ¶
func (m *SignResponse) XXX_Merge(src proto.Message)
func (*SignResponse) XXX_Size ¶
func (m *SignResponse) XXX_Size() int
func (*SignResponse) XXX_Unmarshal ¶
func (m *SignResponse) XXX_Unmarshal(b []byte) error
type StatusData ¶
type StatusData struct { Status StatusData_Status `protobuf:"varint,1,opt,name=status,proto3,enum=jwtrpcdeclare.StatusData_Status" json:"status,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatusData) Descriptor ¶
func (*StatusData) Descriptor() ([]byte, []int)
func (*StatusData) GetMsg ¶
func (m *StatusData) GetMsg() string
func (*StatusData) GetStatus ¶
func (m *StatusData) GetStatus() StatusData_Status
func (*StatusData) ProtoMessage ¶
func (*StatusData) ProtoMessage()
func (*StatusData) Reset ¶
func (m *StatusData) Reset()
func (*StatusData) String ¶
func (m *StatusData) String() string
func (*StatusData) XXX_DiscardUnknown ¶
func (m *StatusData) XXX_DiscardUnknown()
func (*StatusData) XXX_Marshal ¶
func (m *StatusData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatusData) XXX_Merge ¶
func (m *StatusData) XXX_Merge(src proto.Message)
func (*StatusData) XXX_Size ¶
func (m *StatusData) XXX_Size() int
func (*StatusData) XXX_Unmarshal ¶
func (m *StatusData) XXX_Unmarshal(b []byte) error
type StatusData_Status ¶
type StatusData_Status int32
const ( StatusData_SUCCEED StatusData_Status = 0 StatusData_ERROR StatusData_Status = 1 )
func (StatusData_Status) EnumDescriptor ¶
func (StatusData_Status) EnumDescriptor() ([]byte, []int)
func (StatusData_Status) String ¶
func (x StatusData_Status) String() string
type UnimplementedJwtServiceServer ¶
type UnimplementedJwtServiceServer struct { }
UnimplementedJwtServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedJwtServiceServer) SignJSON ¶
func (*UnimplementedJwtServiceServer) SignJSON(ctx context.Context, req *SignJSONRequest) (*SignResponse, error)
func (*UnimplementedJwtServiceServer) VerifyJSON ¶
func (*UnimplementedJwtServiceServer) VerifyJSON(ctx context.Context, req *VerifyRequest) (*VerifyJSONResponse, error)
type VerifyJSONResponse ¶
type VerifyJSONResponse struct { Status *StatusData `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VerifyJSONResponse) Descriptor ¶
func (*VerifyJSONResponse) Descriptor() ([]byte, []int)
func (*VerifyJSONResponse) GetPayload ¶
func (m *VerifyJSONResponse) GetPayload() []byte
func (*VerifyJSONResponse) GetStatus ¶
func (m *VerifyJSONResponse) GetStatus() *StatusData
func (*VerifyJSONResponse) ProtoMessage ¶
func (*VerifyJSONResponse) ProtoMessage()
func (*VerifyJSONResponse) Reset ¶
func (m *VerifyJSONResponse) Reset()
func (*VerifyJSONResponse) String ¶
func (m *VerifyJSONResponse) String() string
func (*VerifyJSONResponse) XXX_DiscardUnknown ¶
func (m *VerifyJSONResponse) XXX_DiscardUnknown()
func (*VerifyJSONResponse) XXX_Marshal ¶
func (m *VerifyJSONResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyJSONResponse) XXX_Merge ¶
func (m *VerifyJSONResponse) XXX_Merge(src proto.Message)
func (*VerifyJSONResponse) XXX_Size ¶
func (m *VerifyJSONResponse) XXX_Size() int
func (*VerifyJSONResponse) XXX_Unmarshal ¶
func (m *VerifyJSONResponse) XXX_Unmarshal(b []byte) error
type VerifyRequest ¶
type VerifyRequest struct { Algo Algo `protobuf:"varint,1,opt,name=algo,proto3,enum=jwtrpcdeclare.Algo" json:"algo,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VerifyRequest) Descriptor ¶
func (*VerifyRequest) Descriptor() ([]byte, []int)
func (*VerifyRequest) GetAlgo ¶
func (m *VerifyRequest) GetAlgo() Algo
func (*VerifyRequest) GetToken ¶
func (m *VerifyRequest) GetToken() string
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) Reset ¶
func (m *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (m *VerifyRequest) String() string
func (*VerifyRequest) XXX_DiscardUnknown ¶
func (m *VerifyRequest) XXX_DiscardUnknown()
func (*VerifyRequest) XXX_Marshal ¶
func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyRequest) XXX_Merge ¶
func (m *VerifyRequest) XXX_Merge(src proto.Message)
func (*VerifyRequest) XXX_Size ¶
func (m *VerifyRequest) XXX_Size() int
func (*VerifyRequest) XXX_Unmarshal ¶
func (m *VerifyRequest) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.