model

package
v0.0.0-...-3d0adf2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : canceler.go # Created : 2019/1/10 19:57 # Last Modified : 2019/1/10 19:57 # Describe : # # ====================================================

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : response.go # Created : 2019/1/11 14:07 # Last Modified : 2019/1/11 14:07 # Describe : # # ====================================================

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelReq

type CancelReq struct {
	ID string `json:"id"`
}

type Response

type Response struct {
	Errcode int         `json:"errcode"`
	Msg     string      `json:"msg"`
	Data    interface{} `json:"data"`
}

func NewResponseData

func NewResponseData(data interface{}) *Response

NewResponseData return {"errcode":0,"msg":"success","data"=data}

func NewResponseDataKey

func NewResponseDataKey(key string, data interface{}) *Response

NewResponseDataKey return {"errcode":0,"msg":"success","data":{key:data}}

func (*Response) MustMarshal

func (r *Response) MustMarshal() []byte

Jump to

Keyboard shortcuts

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