restapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2018 License: GPL-2.0 Imports: 25 Imported by: 0

Documentation

Overview

*

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

*

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

*

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

*

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

*

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

*

  • Copyright 2015 @ z3q.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 bool = false // 必须匹配Host
	PathPrefix        = "/go2o_api_v1"
)

Functions

func ApiTest

func ApiTest(c echo.Context) error

func CheckApiPermission

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

检查是否有权限

func GetMemberId

func GetMemberId(c echo.Context) int64

获取会员编号

func GetServe

func GetServe() *echo.Echo

获取服务实例

func GetStorage

func GetStorage() storage.Interface

获取存储

func Run

func Run(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

同步

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) Register

func (mc *MemberC) Register(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