module

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: GPL-2.0 Imports: 27 Imported by: 0

Documentation

Overview

*

  • Copyright 2015 @ at3.net.
  • name : sso.go
  • author : jarryliu
  • date : 2016-11-25 13:02
  • description :
  • history :

*

  • Copyright 2015 @ at3.net.
  • name : module.go
  • author : jarryliu
  • date : 2016-11-25 13:02
  • description :
  • history :

*

  • Copyright 2015 @ at3.net.
  • name : sso.go
  • author : jarryliu
  • date : 2016-11-25 13:02
  • description :
  • history :

Index

Constants

This section is empty.

Variables

View Source
var (
	SSO     = "sso"
	MM      = "member"
	PAY     = "payment"
	B4E     = "bank4e"
	EXPRESS = "express"
)

Functions

func Register

func Register(name string, m Module) error

注册模块

Types

type Bank4E

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

func (*Bank4E) Check

func (b *Bank4E) Check(realName, idCard, phone, bankAccount string) map[string]string

判断四要素是否一致

func (*Bank4E) GetBasicInfo

func (b *Bank4E) GetBasicInfo(memberId int64) map[string]string

获取基础信息

func (*Bank4E) Init

func (b *Bank4E) Init()

func (*Bank4E) SetApp

func (b *Bank4E) SetApp(app gof.App)

func (*Bank4E) UpdateInfo

func (b *Bank4E) UpdateInfo(memberId int64, realName, idCard, phone, bankAccount string) error

更新信息

type ExpressModule

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

func (*ExpressModule) GetLogisticFlowTrack

func (e *ExpressModule) GetLogisticFlowTrack(shipperCode string, logisticCode string, invert bool) (*shipment.ShipOrderTrack, error)

func (*ExpressModule) Init

func (e *ExpressModule) Init()

func (*ExpressModule) SetApp

func (e *ExpressModule) SetApp(app gof.App)

type MemberModule

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

func (*MemberModule) CheckToken

func (m *MemberModule) CheckToken(memberId int64, token string) bool

检查会员的会话Token是否正确,

func (*MemberModule) GetToken

func (m *MemberModule) GetToken(memberId int64) string

获取会员Token

func (*MemberModule) Init

func (m *MemberModule) Init()

初始化模块

func (*MemberModule) RemoveToken

func (m *MemberModule) RemoveToken(memberId int64)

移除会员Token

func (*MemberModule) ResetToken

func (m *MemberModule) ResetToken(memberId int64, pwd string) string

重设并返回会员的会员Token,token有效时间默认为60天

func (*MemberModule) SetApp

func (m *MemberModule) SetApp(app gof.App)

模块数据

type Module

type Module interface {
	// 模块数据
	SetApp(app gof.App)
	// 初始化模块
	Init()
}

模块实现

func Get

func Get(name string) Module

获取模块

type PaymentModule

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

func (*PaymentModule) CheckAndPayment

func (p *PaymentModule) CheckAndPayment(userId int64, data map[string]string) error

func (*PaymentModule) CreateToken

func (p *PaymentModule) CreateToken(userId int64) string

func (*PaymentModule) GetPayPlatform

func (p *PaymentModule) GetPayPlatform() []*bank.PaymentPlatform

获取支付平台

func (*PaymentModule) Init

func (p *PaymentModule) Init()

Init 初始化模块

func (*PaymentModule) SetApp

func (p *PaymentModule) SetApp(app gof.App)

SetApp 模块数据

func (*PaymentModule) Submit

func (p *PaymentModule) Submit(userId int64, data map[string]string) error

type SSOModule

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

func (*SSOModule) Array

func (s *SSOModule) Array() []string

返回同步的应用API地址

func (*SSOModule) Get

func (s *SSOModule) Get(name string) *proto.SSsoApp

获取APP的配置

func (*SSOModule) Init

func (s *SSOModule) Init()

初始化模块

func (*SSOModule) Register

func (s *SSOModule) Register(app *proto.SSsoApp) (token string, err error)

func (*SSOModule) SetApp

func (s *SSOModule) SetApp(app gof.App)

模块数据

Directories

Path Synopsis
express

Jump to

Keyboard shortcuts

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