restapi

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: GPL-2.0 Imports: 23 Imported by: 0

Documentation

Overview

*

  • Copyright 2015 @ 56x.net.
  • name : get_c
  • author : jarryliu
  • date : -- :
  • description :
  • history :

*

  • Copyright 2015 @ 56x.net.
  • name : partner_c.go
  • author : jarryliu
  • date : -- :
  • description :
  • history :

*

  • Copyright 2015 @ 56x.net.
  • name : partner_c.go
  • author : jarryliu
  • date : -- :
  • description :
  • history :

*

  • Copyright 2015 @ 56x.net.
  • name : model
  • author : jarryliu
  • date : 2015-10-31 00:35
  • description :
  • history :

*

  • Copyright 2015 @ 56x.net.
  • name : base_c
  • author : jarryliu
  • date : -- :
  • description :
  • history :

*

  • Copyright 2015 @ 56x.net.
  • name : rest_server.go
  • author : jarryliu
  • date : -- :
  • description :
  • history :

Index

Constants

This section is empty.

Variables

View Source
var (
	API_DOMAIN   string
	API_HOST_CHK = false // 必须匹配Host
	PathPrefix   = "/go2o_api_v1"
)

Functions

func ApiTest

func ApiTest(c echo.Context) error

func CheckApiPermission

func CheckApiPermission(apiId string, secret string) (bool, int64)

检查是否有权限

func DelMerchantCache

func DelMerchantCache(mchId int)

func GetMemberId

func GetMemberId(c echo.Context) int64

获取会员编号

func GetMerchantApiInfo

func GetMerchantApiInfo(mchId int64) *proto.SMerchantApiInfo

获取API 信息

func GetMerchantIdByApiId

func GetMerchantIdByApiId(apiId string) int64

根据API ID获取商户ID

func GetMerchantIdByHost

func GetMerchantIdByHost(host string) int

根据主机头识别会员编号

func Run

func Run(ch chan bool, app gof.App, port int)

Types

type AsyncResult

type AsyncResult struct {
	MemberId       int64 // 会员编号
	MemberUpdated  bool  //会员已经更新
	AccountUpdated bool  //会员账户已经更新
}

type MemberC

type MemberC struct {
}

会员登录后才能调用接口

func (*MemberC) Account

func (mc *MemberC) Account(c echo.Context) error

获取最新的会员账户信息

func (*MemberC) Async

func (mc *MemberC) Async(c echo.Context) error

同步 todo: 过时

func (*MemberC) Disconnect

func (mc *MemberC) Disconnect(c echo.Context) error

断开 todo: token不允许删除,只能自动过期

func (*MemberC) Get

func (mc *MemberC) Get(c echo.Context) error

获取最新的会员信息

func (*MemberC) Login

func (mc *MemberC) Login(c echo.Context) error

登录

func (*MemberC) Ping

func (mc *MemberC) Ping(c echo.Context) error

func (*MemberC) Summary

func (mc *MemberC) Summary(c echo.Context) error

汇总信息

Jump to

Keyboard shortcuts

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