base

package
v0.0.0-...-833a7b1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package base is a generated protocol buffer package.

It is generated from these files:

push.proto

It has these top-level messages:

PushContentData

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNil               = NewError(0x00, "")
	ErrInternal          = NewError(0xff, "Internal Server Error")
	ErrParamParseFail    = NewError(0xfe, "Param Parse Fail")
	ErrParamNotAllow     = NewError(0xfd, "Param Not Allow")
	ErrBadRequest        = NewError(0xfa, "Bad Request")
	ErrUnauthorized      = NewError(0xfb, "Unauthorized ")
	ErrNotFound          = NewError(0xfc, "Not Found")
	ErrNeedLogin         = NewError(0xf9, "Need Login first")
	ErrLoginTimeOut      = NewError(0xf8, "The client's session has expired and must log in again")
	ErrServerIsDown      = NewError(0xf1, "Server Is Down")
	ErrLoginFail         = NewError(1, "UserName or Password Error")
	ErrAccountBeenTaken  = NewError(2, "Account has been taken")
	ErrNameOrPwdShort    = NewError(1, "Name or Password is too short")
	ErrVerifyCodeErr     = NewError(3, "Verify Code Error ")
	ErrVerifySendTooBusy = NewError(1, "Verify Send too busy ")
	ErrUnknown           = NewError(0xf7, "Error Unknown")
	ErrFrozen            = NewError(0xf6, "Frozen")
	ErrMethodNotAllowed  = NewError(0xf5, "Method Not Allowed")
	ErrNotAcceptable     = NewError(0xf4, "Not Acceptable")
	ErrRequestTimeout    = NewError(0xf3, "Request Timeout")
	ErrInvalidToken      = NewError(0xf2, "Invalid Token")
	ErrRequestToken      = NewError(0xef, "Token Required")
	ErrSQLERROR          = NewError(0xee, "SQL ERROR")
	ErrSMSSendFail       = NewError(0xef, "SMS Send Fail")
)
View Source
var ID_REFRESH_TOKEN_PREFIX = "URTOKEN"
View Source
var ID_SESSION_PREFIX = "USession"
View Source
var ID_TOKEN_PERFIX = "UToken"
View Source
var REFRESH_TOKEN_PERFIX = "rToken"
View Source
var SESSION_PERFIX = "session"
View Source
var TOKEN_PERFIX = "token"

Functions

func GetMd5

func GetMd5(allBytes []byte) []byte

func GetMd5T

func GetMd5T(bytes1 []byte, bytes2 []byte) []byte

Types

type BaseUser

type BaseUser struct {
	// @inject_tag: xorm:"unique index notnull"
	Name      string `xorm:"unique index notnull"`
	Phone     string `xorm:"index"`
	Password  string `xorm:"notnull"`
	UserID    string `xorm:"unique index notnull"`
	Age       int32  `xorm:"notnull"`
	Id        int64
	CreatTime int64
}

DB model

type ErrorCode

type ErrorCode struct {
	ErrorCode int32
	Desc      string
}

func NewError

func NewError(errorCode int32, text string) *ErrorCode

func (ErrorCode) Error

func (e ErrorCode) Error() string

type PushContentData

type PushContentData struct {
	// 推送内容
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
}

func (*PushContentData) Descriptor

func (*PushContentData) Descriptor() ([]byte, []int)

func (*PushContentData) GetContent

func (m *PushContentData) GetContent() []byte

func (*PushContentData) ProtoMessage

func (*PushContentData) ProtoMessage()

func (*PushContentData) Reset

func (m *PushContentData) Reset()

func (*PushContentData) String

func (m *PushContentData) String() string

type PushItem

type PushItem struct {
	Module   byte
	PushType byte
	Content  []byte
}

Jump to

Keyboard shortcuts

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