model

package
v6.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package model is a generated protocol buffer package.

It is generated from these files:

model.proto

It has these top-level messages:

GrayMatch

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModel   = fmt.Errorf("proto: integer overflow")
)

Functions

func CountGrayMatchByWhere

func CountGrayMatchByWhere(whereCond string, args ...interface{}) (int64, error)

CountGrayMatchByWhere count GrayMatch data number from database by WHERE condition.

func DeleteGrayMatchByUri

func DeleteGrayMatchByUri(uri string, tx ...*sqlx.Tx) error

DeleteGrayMatchByUri delete a GrayMatch data in database by id.

func GetDB

func GetDB() *mysql.DB

GetDB returns the DB handler.

func GetGrayMatchDB

func GetGrayMatchDB() *mysql.CacheableDB

GetGrayMatchDB returns the GrayMatch DB handler.

func GetRedis

func GetRedis() *redis.Client

GetRedis returns the redis client.

func Init

func Init(dbConfig mysql.Config, redisConfig redis.Config) error

Init initializes the model packet.

func UpdateGrayMatchByUri

func UpdateGrayMatchByUri(_g *GrayMatch, tx ...*sqlx.Tx) error

UpdateGrayMatchByUri update the GrayMatch data in database by id.

func UpsertGrayMatch

func UpsertGrayMatch(_g *GrayMatch, tx ...*sqlx.Tx) error

UpsertGrayMatch insert a GrayMatch data into database.

Types

type GrayMatch

type GrayMatch struct {
	Uri       string `protobuf:"bytes,1,opt,name=Uri,proto3" json:"uri"`
	Regexp    string `protobuf:"bytes,2,opt,name=Regexp,proto3" json:"regexp"`
	CreatedAt int64  `protobuf:"varint,3,opt,name=CreatedAt,proto3" json:"created_at"`
	UpdatedAt int64  `protobuf:"varint,4,opt,name=UpdatedAt,proto3" json:"updated_at"`
}

GrayMatch

func GetGrayMatchByUri

func GetGrayMatchByUri(uri string) (*GrayMatch, bool, error)

GetGrayMatchByUri query a GrayMatch data from database by id. If @reply bool=false error=nil, means the data is not exist.

func GetGrayMatchByWhere

func GetGrayMatchByWhere(whereCond string, args ...interface{}) (*GrayMatch, bool, error)

GetGrayMatchByWhere query a GrayMatch data from database by WHERE condition. If @reply bool=false error=nil, means the data is not exist.

func SelectGrayMatchByWhere

func SelectGrayMatchByWhere(whereCond string, args ...interface{}) ([]*GrayMatch, error)

SelectGrayMatchByWhere query some GrayMatch data from database by WHERE condition.

func (*GrayMatch) Descriptor

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

func (*GrayMatch) GetCreatedAt

func (m *GrayMatch) GetCreatedAt() int64

func (*GrayMatch) GetRegexp

func (m *GrayMatch) GetRegexp() string

func (*GrayMatch) GetUpdatedAt

func (m *GrayMatch) GetUpdatedAt() int64

func (*GrayMatch) GetUri

func (m *GrayMatch) GetUri() string

func (*GrayMatch) Marshal

func (m *GrayMatch) Marshal() (dAtA []byte, err error)

func (*GrayMatch) MarshalTo

func (m *GrayMatch) MarshalTo(dAtA []byte) (int, error)

func (*GrayMatch) ProtoMessage

func (*GrayMatch) ProtoMessage()

func (*GrayMatch) Reset

func (m *GrayMatch) Reset()

func (*GrayMatch) Size

func (m *GrayMatch) Size() (n int)

func (*GrayMatch) String

func (m *GrayMatch) String() string

func (*GrayMatch) TableName

func (*GrayMatch) TableName() string

TableName implements 'github.com/xiaoenai/tp-micro/model'.Cacheable

func (*GrayMatch) Unmarshal

func (m *GrayMatch) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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