service

package
v0.0.0-...-7004f6c Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	pb.UnimplementedIdentityOpsServer
	// contains filtered or unexported fields
}

Service impl protobuf.identity.Ops .

func New

func New(kratosPublicHostname string, apiTokenTableDBDSN string) (*Service, error)

func (*Service) DeletePublicToken

func (s *Service) DeletePublicToken(ctx context.Context, req *pb.DeletePublicTokenReq) (*model.CommonResp, error)

delete public_token.

func (*Service) GeneratePublicToken

func (s *Service) GeneratePublicToken(ctx context.Context, req *pb.GeneratePublicTokenReq) (*model.CommonResp, error)

generate public_token.

func (*Service) GetPrivateToken

func (s *Service) GetPrivateToken(ctx context.Context, req *model.Identity) (*model.Token, error)

GetPrivateToken get private_token by user's email.

func (*Service) ListPublicToken

func (s *Service) ListPublicToken(ctx context.Context, req *model.Identity) (*pb.ListPublicTokenResp, error)

list user's public_tokens.

func (*Service) Login

func (s *Service) Login(ctx context.Context, req *pb.LoginReq) (*pb.LoginResp, error)

Login by email and password.

func (*Service) ReGeneratePrivateToken

func (s *Service) ReGeneratePrivateToken(ctx context.Context, req *model.Identity) (*model.CommonResp, error)

ReGeneratePrivateToken regenerate private_token.

func (*Service) Register

func (s *Service) Register(ctx context.Context, req *pb.RegisterReq) (*model.CommonResp, error)

Register by email and password.

func (*Service) Verify

func (s *Service) Verify(ctx context.Context, req *pb.VerifyReq) (*pb.VerifyResp, error)

Verify by session_token.

Jump to

Keyboard shortcuts

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