service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCode

type AuthCode struct {
	// contains filtered or unexported fields
}

func (*AuthCode) CreateCodeOpenId

func (a *AuthCode) CreateCodeOpenId(ctx context.Context, req dto.AuthCodeReq) (string, error)

type AuthService

type AuthService struct {
	*AuthCode
	*AuthToken
	*Merchant
}

type AuthSrv

type AuthSrv interface {
	CreateCodeOpenId(ctx context.Context, req dto.AuthCodeReq) (string, error)

	CreateToken(ctx context.Context, data dto.ProduceAuthTokenReq) (authTokenSimple dto.AuthTokenSimple, err error)
	RefreshAccessToken(ctx context.Context, data dto.RefreshAccessTokenReq) (authTokenSimple dto.AuthTokenSimple, err error)
	GetUserInfo(ctx context.Context, data dto.OpenIdTokenReq) (user dto.UserSimple, err error)
	CheckToken(ctx context.Context, data dto.OpenIdTokenReq) (err error)
}

func NewService

func NewService(r *repository.Repository, a *aggregate.Factory) AuthSrv

type AuthToken

type AuthToken struct {
	// contains filtered or unexported fields
}

func (*AuthToken) CheckToken

func (a *AuthToken) CheckToken(ctx context.Context, data dto.OpenIdTokenReq) (err error)

func (*AuthToken) CreateToken

func (a *AuthToken) CreateToken(ctx context.Context, data dto.ProduceAuthTokenReq) (authTokenSimple dto.AuthTokenSimple, err error)

func (*AuthToken) GetUserInfo

func (a *AuthToken) GetUserInfo(ctx context.Context, data dto.OpenIdTokenReq) (user dto.UserSimple, err error)

func (*AuthToken) RefreshAccessToken

func (a *AuthToken) RefreshAccessToken(ctx context.Context, data dto.RefreshAccessTokenReq) (authTokenSimple dto.AuthTokenSimple, err error)

type Merchant

type Merchant struct {
	// contains filtered or unexported fields
}

func (*Merchant) CreateMerChant

func (m *Merchant) CreateMerChant(ctx context.Context, data *entity.Merchant) error

func (*Merchant) QueryMerChant

func (m *Merchant) QueryMerChant(ctx context.Context, repo repo.MerChantSpecificationRepo) (data *entity.Merchant, err error)

Jump to

Keyboard shortcuts

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