Documentation ¶
Index ¶
- type GRPC
- func (g *GRPC) Auth(ctx context.Context, req *pb.AuthReq) (*pb.Token, error)
- func (g *GRPC) Exist(ctx context.Context, req *wrapperspb.StringValue) (*wrapperspb.BoolValue, error)
- func (g *GRPC) Get(ctx context.Context, req *wrapperspb.StringValue) (*pb.User, error)
- func (g *GRPC) Lock(ctx context.Context, req *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (g *GRPC) ModifyPassword(ctx context.Context, req *pb.ModifyPasswordReq) (*emptypb.Empty, error)
- func (g *GRPC) Register(ctx context.Context, req *pb.RegisterReq) (*wrapperspb.StringValue, error)
- func (g *GRPC) Remove(ctx context.Context, req *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (g *GRPC) RenewToken(ctx context.Context, req *pb.Token) (*pb.Token, error)
- func (g *GRPC) RevokeToken(ctx context.Context, req *pb.Token) (*emptypb.Empty, error)
- func (g *GRPC) Startup() error
- func (g *GRPC) Stop() error
- func (g *GRPC) Unlock(ctx context.Context, req *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (g *GRPC) VerifyToken(ctx context.Context, req *pb.Token) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPC ¶
type GRPC struct { EtcdClient *clientv3.Client Host string Port int AppName string pb.UnimplementedPassportServer // contains filtered or unexported fields }
func (*GRPC) Exist ¶
func (g *GRPC) Exist(ctx context.Context, req *wrapperspb.StringValue) (*wrapperspb.BoolValue, error)
func (*GRPC) Get ¶
func (g *GRPC) Get(ctx context.Context, req *wrapperspb.StringValue) (*pb.User, error)
func (*GRPC) Lock ¶
func (g *GRPC) Lock(ctx context.Context, req *wrapperspb.StringValue) (*emptypb.Empty, error)
func (*GRPC) ModifyPassword ¶
func (*GRPC) Register ¶
func (g *GRPC) Register(ctx context.Context, req *pb.RegisterReq) (*wrapperspb.StringValue, error)
func (*GRPC) Remove ¶
func (g *GRPC) Remove(ctx context.Context, req *wrapperspb.StringValue) (*emptypb.Empty, error)
func (*GRPC) RenewToken ¶
func (*GRPC) RevokeToken ¶
func (*GRPC) Unlock ¶
func (g *GRPC) Unlock(ctx context.Context, req *wrapperspb.StringValue) (*emptypb.Empty, error)
Click to show internal directories.
Click to hide internal directories.