restapi

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2016 License: GPL-2.0 Imports: 23 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 : model
  • author : jarryliu
  • date : 2015-10-31 00:35
  • description :
  • history :

*

  • Copyright 2015 @ z3q.net.
  • name : partner_c.go
  • author : jarryliu
  • date : -- :
  • 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(ctx *echo.Context) error

func CheckApiPermission

func CheckApiPermission(apiId string, secret string) (ok bool, partnerId int)

检查是否有权限

func GetMemberId

func GetMemberId(ctx *echo.Context) int

获取会员编号

func GetServe

func GetServe() *echo.Echo

获取服务实例

func GetStorage

func GetStorage() gof.Storage

获取存储

func Run

func Run(app gof.App, port int)

Types

type AsyncResult

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

type MemberC

type MemberC struct {
}

会员登陆后才能调用接口

func (*MemberC) Account

func (this *MemberC) Account(ctx *echo.Context) error

获取最新的会员账户信息

func (*MemberC) Async

func (this *MemberC) Async(ctx *echo.Context) error

同步

func (*MemberC) Disconnect

func (this *MemberC) Disconnect(ctx *echox.Context) error

断开

func (*MemberC) Get

func (this *MemberC) Get(ctx *echo.Context) error

获取最新的会员信息

func (*MemberC) Login

func (this *MemberC) Login(ctx *echo.Context) error

登陆

func (*MemberC) Ping

func (this *MemberC) Ping(ctx *echo.Context) error

func (*MemberC) Register

func (this *MemberC) Register(ctx *echo.Context) error

注册

func (*MemberC) Summary

func (this *MemberC) Summary(ctx *echo.Context) error

汇总信息

Jump to

Keyboard shortcuts

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