proto

package
v0.0.0-...-316f095 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JwtService_GenerateJWT_FullMethodName = "/pp.jwt.JwtService/GenerateJWT"
	JwtService_DecodeJWT_FullMethodName   = "/pp.jwt.JwtService/DecodeJWT"
)

Variables

View Source
var File_jwt_srv_jwt_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetToken

func (x *Token) GetToken() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TokenBody.ProtoReflect.Descriptor instead.

func (*TokenBody) GetIss

func (x *TokenBody) GetIss() string

func (*TokenBody) GetLanguage

func (x *TokenBody) GetLanguage() string

func (*TokenBody) GetRole

func (x *TokenBody) GetRole() int64

func (*TokenBody) GetStatus

func (x *TokenBody) GetStatus() string

func (*TokenBody) GetSub

func (x *TokenBody) GetSub() string

func (*TokenBody) GetWeb3Address

func (x *TokenBody) GetWeb3Address() string

func (*TokenBody) ProtoMessage

func (*TokenBody) ProtoMessage()

func (*TokenBody) ProtoReflect

func (x *TokenBody) ProtoReflect() protoreflect.Message

func (*TokenBody) Reset

func (x *TokenBody) Reset()

func (*TokenBody) String

func (x *TokenBody) String() string

type UnimplementedJwtServiceServer

type UnimplementedJwtServiceServer struct {
}

UnimplementedJwtServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedJwtServiceServer) DecodeJWT

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL