model

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Code generated by redis-orm. DO NOT EDIT !

Index

Constants

View Source
const (
	PAIR = "pair"
	HASH = "hash"
	SET  = "set"
	ZSET = "zset"
	GEO  = "geo"
	LIST = "list"

	ERROR_SPLIT = "#-#"
)

Variables

View Source
var BlogColumns = struct {
	Id        string
	UserId    string
	Title     string
	Content   string
	Status    string
	Readed    string
	CreatedAt string
	UpdatedAt string
}{
	"id",
	"user_id",
	"title",
	"content",
	"status",
	"readed",
	"created_at",
	"updated_at",
}
View Source
var BlogElasticFields = struct {
	Title     string
	Content   string
	CreatedAt string
}{
	"title",
	"content",
	"created_at",
}

! orm.elastic

View Source
var BlogElasticMgr = &_BlogElasticMgr{}
View Source
var BlogMgr *_BlogMgr
View Source
var IndexedBlogElasticFields = struct {
	UserId    string
	Hash      string
	Title     string
	Content   string
	Readed    string
	CreatedAt string
	UpdatedAt string
}{
	"user_id",
	"hash",
	"title",
	"content",
	"readed",
	"created_at",
	"updated_at",
}

! orm.elastic

View Source
var IndexedBlogElasticMgr = &_IndexedBlogElasticMgr{}
View Source
var IndexedBlogMgr *_IndexedBlogMgr
View Source
var OfficeColumns = struct {
	OfficeId             string
	OfficeArea           string
	OfficeName           string
	SearchOriginCode     string
	ProcessingOriginCode string
	CreateBy             string
	UpdateBy             string
	CreateDate           string
	UpdateDate           string
}{
	"office_id",
	"office_area",
	"office_name",
	"search_origin_code",
	"processing_origin_code",
	"create_by",
	"update_by",
	"create_date",
	"update_date",
}
View Source
var OfficeMgr *_OfficeMgr
View Source
var UserBlogsColumns = struct {
	UserId string
	BlogId string
}{
	"user_id",
	"blog_id",
}
View Source
var UserBlogsMgr *_UserBlogsMgr
View Source
var UserColumns = struct {
	Id          string
	SubID       string
	Name        string
	Mailbox     string
	Sex         string
	Age         string
	Longitude   string
	Latitude    string
	Description string
	Password    string
	HeadUrl     string
	Status      string
	CreatedAt   string
	UpdatedAt   string
	DeletedAt   string
}{
	"id",
	"sub_id",
	"name",
	"mailbox",
	"sex",
	"age",
	"longitude",
	"latitude",
	"description",
	"password",
	"head_url",
	"user_status",
	"created_at",
	"updated_at",
	"deleted_at",
}
View Source
var UserInfoMgr *_UserInfoMgr
View Source
var UserMgr *_UserMgr
View Source
var UserViewBaseInfoColumns = struct {
	Id       string
	Name     string
	Mailbox  string
	Password string
	Sex      string
}{
	"id",
	"name",
	"mailbox",
	"password",
	"sex",
}
View Source
var UserViewBaseInfoMgr *_UserViewBaseInfoMgr

Functions

func AgeOfUserRNGRelationRedisMgr

func AgeOfUserRNGRelationRedisMgr(stores ...*orm.RedisStore) *_AgeOfUserRNGRelationRedisMgr

func BlogDBMgr

func BlogDBMgr(db orm.DB) *_BlogDBMgr

func ConvertBlogModelToblogRPC1PB added in v1.5.0

func ConvertBlogModelToblogRPC1PB(md *Blog) *blog.RPC1

ConvertBlogModelToblogRPC1PB converts model to defined pb columns.

func ConvertBlogModelToblogRPC2PB added in v1.5.0

func ConvertBlogModelToblogRPC2PB(md *Blog) *blog.RPC2

ConvertBlogModelToblogRPC2PB converts model to defined pb columns.

func ElasticSetup

func ElasticSetup(cfg ESConfig)

func IdOfUserRNGRelationRedisMgr

func IdOfUserRNGRelationRedisMgr(stores ...*orm.RedisStore) *_IdOfUserRNGRelationRedisMgr

func MailboxPasswordOfUserUKRelationRedisMgr

func MailboxPasswordOfUserUKRelationRedisMgr(stores ...*orm.RedisStore) *_MailboxPasswordOfUserUKRelationRedisMgr

func MsSQL

func MsSQL() *orm.DBStore

func MsSQLSetup

func MsSQLSetup(cf *MsSQLConfig)

func MySQL

func MySQL() *orm.DBStore

func MySQLDSNSetup added in v1.5.0

func MySQLDSNSetup(dsn string)

func MySQLInstance added in v1.5.0

func MySQLInstance(key string) *orm.DBStore

func MySQLMultiDSNSetup added in v1.5.0

func MySQLMultiDSNSetup(key, dsn string)

func MySQLSetup

func MySQLSetup(cf *MySQLConfig)

func OfficeDBMgr

func OfficeDBMgr(db orm.DB) *_OfficeDBMgr

func Redis

func Redis() *orm.RedisStore

func RedisKeyOfPrimaryUser added in v1.5.0

func RedisKeyOfPrimaryUser(Id int32) string

get redis key of User, PrimaryKeys: id int32

func RedisSetUp

func RedisSetUp(cf *RedisConfig)

func SexOfUserIDXRelationRedisMgr

func SexOfUserIDXRelationRedisMgr(stores ...*orm.RedisStore) *_SexOfUserIDXRelationRedisMgr

func SexUserLocationDBMgr

func SexUserLocationDBMgr(db orm.DB) *_SexUserLocationDBMgr

func SexUserLocationRedisMgr

func SexUserLocationRedisMgr(stores ...*orm.RedisStore) *_SexUserLocationRedisMgr

func SplitError

func SplitError(err error) []error

处理error,把一个error变成error数组

func UserBlogsDBMgr

func UserBlogsDBMgr(db orm.DB) *_UserBlogsDBMgr

func UserDBMgr

func UserDBMgr(db orm.DB) *_UserDBMgr

func UserIdDBMgr

func UserIdDBMgr(db orm.DB) *_UserIdDBMgr

func UserIdRedisMgr

func UserIdRedisMgr(stores ...*orm.RedisStore) *_UserIdRedisMgr

func UserInfoDBMgr added in v1.0.4

func UserInfoDBMgr(db orm.DB) *_UserInfoDBMgr

func UserLocationDBMgr

func UserLocationDBMgr(db orm.DB) *_UserLocationDBMgr

func UserLocationRedisMgr

func UserLocationRedisMgr(stores ...*orm.RedisStore) *_UserLocationRedisMgr

func UserRedisMgr

func UserRedisMgr(store *orm.RedisStore) *_UserRedisMgr

func UserViewBaseInfoDBMgr added in v1.5.1

func UserViewBaseInfoDBMgr(db orm.DB) *_UserViewBaseInfoDBMgr

Types

type AgeOfUserRNG

type AgeOfUserRNG struct {
	AgeBegin int64
	AgeEnd   int64
	// contains filtered or unexported fields
}

func (*AgeOfUserRNG) Begin

func (u *AgeOfUserRNG) Begin() int64

func (*AgeOfUserRNG) End

func (u *AgeOfUserRNG) End() int64

func (*AgeOfUserRNG) IncludeBegin

func (u *AgeOfUserRNG) IncludeBegin(f bool)

func (*AgeOfUserRNG) IncludeEnd

func (u *AgeOfUserRNG) IncludeEnd(f bool)

func (*AgeOfUserRNG) Key

func (u *AgeOfUserRNG) Key() string

func (*AgeOfUserRNG) Limit

func (u *AgeOfUserRNG) Limit(n int)

func (*AgeOfUserRNG) Offset

func (u *AgeOfUserRNG) Offset(n int)

func (*AgeOfUserRNG) PositionOffsetLimit

func (u *AgeOfUserRNG) PositionOffsetLimit(len int) (int, int)

func (*AgeOfUserRNG) RNGRelation

func (u *AgeOfUserRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*AgeOfUserRNG) Revert

func (u *AgeOfUserRNG) Revert(b bool)

func (*AgeOfUserRNG) SQLFormat

func (u *AgeOfUserRNG) SQLFormat(limit bool) string

func (*AgeOfUserRNG) SQLLimit

func (u *AgeOfUserRNG) SQLLimit() int

func (*AgeOfUserRNG) SQLParams

func (u *AgeOfUserRNG) SQLParams() []interface{}

type AgeOfUserRNGRelation

type AgeOfUserRNGRelation struct {
	Key   string  `db:"key" json:"key"`
	Score float64 `db:"score" json:"score"`
	Value string  `db:"value" json:"value"`
}

! relation

func (*AgeOfUserRNGRelation) GetClassName

func (relation *AgeOfUserRNGRelation) GetClassName() string

func (*AgeOfUserRNGRelation) GetIndexes

func (relation *AgeOfUserRNGRelation) GetIndexes() []string

func (*AgeOfUserRNGRelation) GetStoreType

func (relation *AgeOfUserRNGRelation) GetStoreType() string

type Blog

type Blog struct {
	Id        int32     `db:"id" json:"id"`
	UserId    int32     `db:"user_id" json:"user_id"`
	Title     string    `db:"title" json:"title"`
	Content   string    `db:"content" json:"content"`
	Status    int32     `db:"status" json:"status"`
	Readed    int32     `db:"readed" json:"readed"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
	UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
}

func ConvertblogRPC1PBToBlogModel added in v1.5.0

func ConvertblogRPC1PBToBlogModel(pb *blog.RPC1) *Blog

ConvertblogRPC1PBToBlogModel converts defined pb columns to model.

func ConvertblogRPC2PBToBlogModel added in v1.5.0

func ConvertblogRPC2PBToBlogModel(pb *blog.RPC2) *Blog

ConvertblogRPC2PBToBlogModel converts defined pb columns to model.

func (*Blog) GetClassName

func (obj *Blog) GetClassName() string

func (*Blog) GetColumns

func (obj *Blog) GetColumns() []string

func (*Blog) GetNameSpace

func (obj *Blog) GetNameSpace() string

func (*Blog) GetNoneIncrementColumns

func (obj *Blog) GetNoneIncrementColumns() []string

func (*Blog) GetPrimaryKey

func (obj *Blog) GetPrimaryKey() PrimaryKey

func (*Blog) GetTableName

func (obj *Blog) GetTableName() string

func (*Blog) Validate

func (obj *Blog) Validate() error

type DBFetcher

type DBFetcher interface {
	FetchBySQL(sql string, args ...interface{}) ([]interface{}, error)
}

type ESClient

type ESClient struct {
	*elastic.Client
	IndexName string
}

func ElasticClient

func ElasticClient() *ESClient

func (*ESClient) IndexService

func (e *ESClient) IndexService(index string) *elastic.IndexService

func (*ESClient) PutMappingService

func (e *ESClient) PutMappingService(index string) *elastic.PutMappingService

type ESConfig

type ESConfig struct {
	Endpoints   []string
	MaxRetries  int
	EnableGzip  bool
	HTTPTimeout time.Duration
	IndexName   string
}

func (*ESConfig) NewClient

func (e *ESConfig) NewClient() (*ESClient, error)

type Finder

type Finder interface {
	FindOne(unique Unique) (PrimaryKey, error)
	Find(index Index) (int64, []PrimaryKey, error)
	Range(scope Range) (int64, []PrimaryKey, error)
	RangeRevert(scope Range) (int64, []PrimaryKey, error)
}

type IdOfIndexedBlogPK

type IdOfIndexedBlogPK struct {
	Id int32
}

func (*IdOfIndexedBlogPK) Columns

func (u *IdOfIndexedBlogPK) Columns() []string

func (*IdOfIndexedBlogPK) Key

func (u *IdOfIndexedBlogPK) Key() string

func (*IdOfIndexedBlogPK) Parse

func (u *IdOfIndexedBlogPK) Parse(key string) error

func (*IdOfIndexedBlogPK) SQLFormat

func (u *IdOfIndexedBlogPK) SQLFormat() string

func (*IdOfIndexedBlogPK) SQLParams

func (u *IdOfIndexedBlogPK) SQLParams() []interface{}

type IdOfIndexedBlogRNG

type IdOfIndexedBlogRNG struct {
	IdBegin int64
	IdEnd   int64
	// contains filtered or unexported fields
}

func (*IdOfIndexedBlogRNG) Begin

func (u *IdOfIndexedBlogRNG) Begin() int64

func (*IdOfIndexedBlogRNG) End

func (u *IdOfIndexedBlogRNG) End() int64

func (*IdOfIndexedBlogRNG) IncludeBegin

func (u *IdOfIndexedBlogRNG) IncludeBegin(f bool)

func (*IdOfIndexedBlogRNG) IncludeEnd

func (u *IdOfIndexedBlogRNG) IncludeEnd(f bool)

func (*IdOfIndexedBlogRNG) Key

func (u *IdOfIndexedBlogRNG) Key() string

func (*IdOfIndexedBlogRNG) Limit

func (u *IdOfIndexedBlogRNG) Limit(n int)

func (*IdOfIndexedBlogRNG) Offset

func (u *IdOfIndexedBlogRNG) Offset(n int)

func (*IdOfIndexedBlogRNG) PositionOffsetLimit

func (u *IdOfIndexedBlogRNG) PositionOffsetLimit(len int) (int, int)

func (*IdOfIndexedBlogRNG) RNGRelation

func (u *IdOfIndexedBlogRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*IdOfIndexedBlogRNG) Revert

func (u *IdOfIndexedBlogRNG) Revert(b bool)

func (*IdOfIndexedBlogRNG) SQLFormat

func (u *IdOfIndexedBlogRNG) SQLFormat(limit bool) string

func (*IdOfIndexedBlogRNG) SQLLimit

func (u *IdOfIndexedBlogRNG) SQLLimit() int

func (*IdOfIndexedBlogRNG) SQLParams

func (u *IdOfIndexedBlogRNG) SQLParams() []interface{}

type IdOfUserPK

type IdOfUserPK struct {
	Id int32
}

func (*IdOfUserPK) Columns

func (u *IdOfUserPK) Columns() []string

func (*IdOfUserPK) Key

func (u *IdOfUserPK) Key() string

func (*IdOfUserPK) Parse

func (u *IdOfUserPK) Parse(key string) error

func (*IdOfUserPK) SQLFormat

func (u *IdOfUserPK) SQLFormat() string

func (*IdOfUserPK) SQLParams

func (u *IdOfUserPK) SQLParams() []interface{}

type IdOfUserRNG

type IdOfUserRNG struct {
	IdBegin int64
	IdEnd   int64
	// contains filtered or unexported fields
}

func (*IdOfUserRNG) Begin

func (u *IdOfUserRNG) Begin() int64

func (*IdOfUserRNG) End

func (u *IdOfUserRNG) End() int64

func (*IdOfUserRNG) IncludeBegin

func (u *IdOfUserRNG) IncludeBegin(f bool)

func (*IdOfUserRNG) IncludeEnd

func (u *IdOfUserRNG) IncludeEnd(f bool)

func (*IdOfUserRNG) Key

func (u *IdOfUserRNG) Key() string

func (*IdOfUserRNG) Limit

func (u *IdOfUserRNG) Limit(n int)

func (*IdOfUserRNG) Offset

func (u *IdOfUserRNG) Offset(n int)

func (*IdOfUserRNG) PositionOffsetLimit

func (u *IdOfUserRNG) PositionOffsetLimit(len int) (int, int)

func (*IdOfUserRNG) RNGRelation

func (u *IdOfUserRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*IdOfUserRNG) Revert

func (u *IdOfUserRNG) Revert(b bool)

func (*IdOfUserRNG) SQLFormat

func (u *IdOfUserRNG) SQLFormat(limit bool) string

func (*IdOfUserRNG) SQLLimit

func (u *IdOfUserRNG) SQLLimit() int

func (*IdOfUserRNG) SQLParams

func (u *IdOfUserRNG) SQLParams() []interface{}

type IdOfUserRNGRelation

type IdOfUserRNGRelation struct {
	Key   string  `db:"key" json:"key"`
	Score float64 `db:"score" json:"score"`
	Value string  `db:"value" json:"value"`
}

! relation

func (*IdOfUserRNGRelation) GetClassName

func (relation *IdOfUserRNGRelation) GetClassName() string

func (*IdOfUserRNGRelation) GetIndexes

func (relation *IdOfUserRNGRelation) GetIndexes() []string

func (*IdOfUserRNGRelation) GetStoreType

func (relation *IdOfUserRNGRelation) GetStoreType() string

type IdOfUserViewBaseInfoPK added in v1.5.1

type IdOfUserViewBaseInfoPK struct {
	Id int32
}

func (*IdOfUserViewBaseInfoPK) Columns added in v1.5.1

func (u *IdOfUserViewBaseInfoPK) Columns() []string

func (*IdOfUserViewBaseInfoPK) Key added in v1.5.1

func (u *IdOfUserViewBaseInfoPK) Key() string

func (*IdOfUserViewBaseInfoPK) Parse added in v1.5.1

func (u *IdOfUserViewBaseInfoPK) Parse(key string) error

func (*IdOfUserViewBaseInfoPK) SQLFormat added in v1.5.1

func (u *IdOfUserViewBaseInfoPK) SQLFormat() string

func (*IdOfUserViewBaseInfoPK) SQLParams added in v1.5.1

func (u *IdOfUserViewBaseInfoPK) SQLParams() []interface{}

type IdOfUserViewBaseInfoRNG added in v1.5.1

type IdOfUserViewBaseInfoRNG struct {
	IdBegin int64
	IdEnd   int64
	// contains filtered or unexported fields
}

func (*IdOfUserViewBaseInfoRNG) Begin added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) Begin() int64

func (*IdOfUserViewBaseInfoRNG) End added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) End() int64

func (*IdOfUserViewBaseInfoRNG) IncludeBegin added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) IncludeBegin(f bool)

func (*IdOfUserViewBaseInfoRNG) IncludeEnd added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) IncludeEnd(f bool)

func (*IdOfUserViewBaseInfoRNG) Key added in v1.5.1

func (*IdOfUserViewBaseInfoRNG) Limit added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) Limit(n int)

func (*IdOfUserViewBaseInfoRNG) Offset added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) Offset(n int)

func (*IdOfUserViewBaseInfoRNG) PositionOffsetLimit added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) PositionOffsetLimit(len int) (int, int)

func (*IdOfUserViewBaseInfoRNG) RNGRelation added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*IdOfUserViewBaseInfoRNG) Revert added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) Revert(b bool)

func (*IdOfUserViewBaseInfoRNG) SQLFormat added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) SQLFormat(limit bool) string

func (*IdOfUserViewBaseInfoRNG) SQLLimit added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) SQLLimit() int

func (*IdOfUserViewBaseInfoRNG) SQLParams added in v1.5.1

func (u *IdOfUserViewBaseInfoRNG) SQLParams() []interface{}

type IdUserIdOfBlogPK

type IdUserIdOfBlogPK struct {
	Id     int32
	UserId int32
}

func (*IdUserIdOfBlogPK) Columns

func (u *IdUserIdOfBlogPK) Columns() []string

func (*IdUserIdOfBlogPK) Key

func (u *IdUserIdOfBlogPK) Key() string

func (*IdUserIdOfBlogPK) Parse

func (u *IdUserIdOfBlogPK) Parse(key string) error

func (*IdUserIdOfBlogPK) SQLFormat

func (u *IdUserIdOfBlogPK) SQLFormat() string

func (*IdUserIdOfBlogPK) SQLParams

func (u *IdUserIdOfBlogPK) SQLParams() []interface{}

type IdUserIdOfBlogRNG

type IdUserIdOfBlogRNG struct {
	Id          int32
	UserIdBegin int64
	UserIdEnd   int64
	// contains filtered or unexported fields
}

func (*IdUserIdOfBlogRNG) Begin

func (u *IdUserIdOfBlogRNG) Begin() int64

func (*IdUserIdOfBlogRNG) End

func (u *IdUserIdOfBlogRNG) End() int64

func (*IdUserIdOfBlogRNG) IncludeBegin

func (u *IdUserIdOfBlogRNG) IncludeBegin(f bool)

func (*IdUserIdOfBlogRNG) IncludeEnd

func (u *IdUserIdOfBlogRNG) IncludeEnd(f bool)

func (*IdUserIdOfBlogRNG) Key

func (u *IdUserIdOfBlogRNG) Key() string

func (*IdUserIdOfBlogRNG) Limit

func (u *IdUserIdOfBlogRNG) Limit(n int)

func (*IdUserIdOfBlogRNG) Offset

func (u *IdUserIdOfBlogRNG) Offset(n int)

func (*IdUserIdOfBlogRNG) PositionOffsetLimit

func (u *IdUserIdOfBlogRNG) PositionOffsetLimit(len int) (int, int)

func (*IdUserIdOfBlogRNG) RNGRelation

func (u *IdUserIdOfBlogRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*IdUserIdOfBlogRNG) Revert

func (u *IdUserIdOfBlogRNG) Revert(b bool)

func (*IdUserIdOfBlogRNG) SQLFormat

func (u *IdUserIdOfBlogRNG) SQLFormat(limit bool) string

func (*IdUserIdOfBlogRNG) SQLLimit

func (u *IdUserIdOfBlogRNG) SQLLimit() int

func (*IdUserIdOfBlogRNG) SQLParams

func (u *IdUserIdOfBlogRNG) SQLParams() []interface{}

type Index

type Index interface {
	SQL
	Key() string
	PositionOffsetLimit(len int) (int, int)
	IDXRelation(store *orm.RedisStore) IndexRelation
}

type IndexRelation

type IndexRelation interface {
	Find(key string) ([]string, error)
}

type IndexedBlog

type IndexedBlog struct {
	Id        int32     `json:"id"`
	UserId    int32     `json:"user_id"`
	Hash      string    `json:"hash"`
	Title     string    `json:"title"`
	Content   string    `json:"content"`
	Readed    int32     `json:"readed"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

func (*IndexedBlog) GetClassName

func (obj *IndexedBlog) GetClassName() string

func (*IndexedBlog) GetColumns

func (obj *IndexedBlog) GetColumns() []string

func (*IndexedBlog) GetNameSpace

func (obj *IndexedBlog) GetNameSpace() string

func (*IndexedBlog) GetNoneIncrementColumns

func (obj *IndexedBlog) GetNoneIncrementColumns() []string

func (*IndexedBlog) GetPrimaryKey

func (obj *IndexedBlog) GetPrimaryKey() PrimaryKey

func (*IndexedBlog) GetTableName

func (obj *IndexedBlog) GetTableName() string

func (*IndexedBlog) Validate

func (obj *IndexedBlog) Validate() error

type MailboxPasswordOfUserUK

type MailboxPasswordOfUserUK struct {
	Mailbox  string
	Password string
}

func (*MailboxPasswordOfUserUK) Key

func (*MailboxPasswordOfUserUK) Limit

func (u *MailboxPasswordOfUserUK) Limit(n int)

func (*MailboxPasswordOfUserUK) Offset

func (u *MailboxPasswordOfUserUK) Offset(n int)

func (*MailboxPasswordOfUserUK) SQLFormat

func (u *MailboxPasswordOfUserUK) SQLFormat(limit bool) string

func (*MailboxPasswordOfUserUK) SQLLimit

func (u *MailboxPasswordOfUserUK) SQLLimit() int

func (*MailboxPasswordOfUserUK) SQLParams

func (u *MailboxPasswordOfUserUK) SQLParams() []interface{}

func (*MailboxPasswordOfUserUK) UKRelation

func (u *MailboxPasswordOfUserUK) UKRelation(store *orm.RedisStore) UniqueRelation

type MailboxPasswordOfUserUKRelation

type MailboxPasswordOfUserUKRelation struct {
	Key   string `db:"key" json:"key"`
	Value string `db:"value" json:"value"`
}

! relation

func (*MailboxPasswordOfUserUKRelation) GetClassName

func (relation *MailboxPasswordOfUserUKRelation) GetClassName() string

func (*MailboxPasswordOfUserUKRelation) GetIndexes

func (relation *MailboxPasswordOfUserUKRelation) GetIndexes() []string

func (*MailboxPasswordOfUserUKRelation) GetStoreType

func (relation *MailboxPasswordOfUserUKRelation) GetStoreType() string

type MailboxPasswordOfUserViewBaseInfoUK added in v1.5.1

type MailboxPasswordOfUserViewBaseInfoUK struct {
	Mailbox  string
	Password string
}

func (*MailboxPasswordOfUserViewBaseInfoUK) Key added in v1.5.1

func (*MailboxPasswordOfUserViewBaseInfoUK) Limit added in v1.5.1

func (*MailboxPasswordOfUserViewBaseInfoUK) Offset added in v1.5.1

func (*MailboxPasswordOfUserViewBaseInfoUK) SQLFormat added in v1.5.1

func (u *MailboxPasswordOfUserViewBaseInfoUK) SQLFormat(limit bool) string

func (*MailboxPasswordOfUserViewBaseInfoUK) SQLLimit added in v1.5.1

func (*MailboxPasswordOfUserViewBaseInfoUK) SQLParams added in v1.5.1

func (u *MailboxPasswordOfUserViewBaseInfoUK) SQLParams() []interface{}

func (*MailboxPasswordOfUserViewBaseInfoUK) UKRelation added in v1.5.1

type MsSQLConfig

type MsSQLConfig struct {
	Host            string
	Port            int
	UserName        string
	Password        string
	Database        string
	PoolSize        int
	ConnMaxLifeTime time.Duration
}

type MySQLConfig

type MySQLConfig struct {
	Host            string
	Port            int
	UserName        string
	Password        string
	Database        string
	PoolSize        int
	ConnMaxLifeTime time.Duration
}

type NameOfUserViewBaseInfoIDX added in v1.5.1

type NameOfUserViewBaseInfoIDX struct {
	Name string
	// contains filtered or unexported fields
}

func (*NameOfUserViewBaseInfoIDX) IDXRelation added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) IDXRelation(store *orm.RedisStore) IndexRelation

func (*NameOfUserViewBaseInfoIDX) Key added in v1.5.1

func (*NameOfUserViewBaseInfoIDX) Limit added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) Limit(n int)

func (*NameOfUserViewBaseInfoIDX) Offset added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) Offset(n int)

func (*NameOfUserViewBaseInfoIDX) PositionOffsetLimit added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) PositionOffsetLimit(len int) (int, int)

func (*NameOfUserViewBaseInfoIDX) SQLFormat added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) SQLFormat(limit bool) string

func (*NameOfUserViewBaseInfoIDX) SQLLimit added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) SQLLimit() int

func (*NameOfUserViewBaseInfoIDX) SQLParams added in v1.5.1

func (u *NameOfUserViewBaseInfoIDX) SQLParams() []interface{}

type Object

type Object interface {
	GetClassName() string
	GetStoreType() string
	GetPrimaryName() string
	GetIndexes() []string
}

type Office

type Office struct {
	OfficeId             int32     `db:"office_id"`
	OfficeArea           string    `db:"office_area"`
	OfficeName           string    `db:"office_name"`
	SearchOriginCode     string    `db:"search_origin_code"`
	ProcessingOriginCode string    `db:"processing_origin_code"`
	CreateBy             string    `db:"create_by"`
	UpdateBy             string    `db:"update_by"`
	CreateDate           time.Time `db:"create_date"`
	UpdateDate           time.Time `db:"update_date"`
}

func (*Office) GetClassName

func (obj *Office) GetClassName() string

func (*Office) GetColumns

func (obj *Office) GetColumns() []string

func (*Office) GetNameSpace

func (obj *Office) GetNameSpace() string

func (*Office) GetNoneIncrementColumns

func (obj *Office) GetNoneIncrementColumns() []string

func (*Office) GetPrimaryKey

func (obj *Office) GetPrimaryKey() PrimaryKey

func (*Office) GetTableName

func (obj *Office) GetTableName() string

func (*Office) Validate

func (obj *Office) Validate() error

type OfficeIdOfOfficePK

type OfficeIdOfOfficePK struct {
	OfficeId int32
}

func (*OfficeIdOfOfficePK) Columns

func (u *OfficeIdOfOfficePK) Columns() []string

func (*OfficeIdOfOfficePK) Key

func (u *OfficeIdOfOfficePK) Key() string

func (*OfficeIdOfOfficePK) Parse

func (u *OfficeIdOfOfficePK) Parse(key string) error

func (*OfficeIdOfOfficePK) SQLFormat

func (u *OfficeIdOfOfficePK) SQLFormat() string

func (*OfficeIdOfOfficePK) SQLParams

func (u *OfficeIdOfOfficePK) SQLParams() []interface{}

type OfficeIdOfOfficeRNG

type OfficeIdOfOfficeRNG struct {
	OfficeIdBegin int64
	OfficeIdEnd   int64
	// contains filtered or unexported fields
}

func (*OfficeIdOfOfficeRNG) Begin

func (u *OfficeIdOfOfficeRNG) Begin() int64

func (*OfficeIdOfOfficeRNG) End

func (u *OfficeIdOfOfficeRNG) End() int64

func (*OfficeIdOfOfficeRNG) IncludeBegin

func (u *OfficeIdOfOfficeRNG) IncludeBegin(f bool)

func (*OfficeIdOfOfficeRNG) IncludeEnd

func (u *OfficeIdOfOfficeRNG) IncludeEnd(f bool)

func (*OfficeIdOfOfficeRNG) Key

func (u *OfficeIdOfOfficeRNG) Key() string

func (*OfficeIdOfOfficeRNG) Limit

func (u *OfficeIdOfOfficeRNG) Limit(n int)

func (*OfficeIdOfOfficeRNG) Offset

func (u *OfficeIdOfOfficeRNG) Offset(n int)

func (*OfficeIdOfOfficeRNG) PositionOffsetLimit

func (u *OfficeIdOfOfficeRNG) PositionOffsetLimit(len int) (int, int)

func (*OfficeIdOfOfficeRNG) RNGRelation

func (u *OfficeIdOfOfficeRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*OfficeIdOfOfficeRNG) Revert

func (u *OfficeIdOfOfficeRNG) Revert(b bool)

func (*OfficeIdOfOfficeRNG) SQLFormat

func (u *OfficeIdOfOfficeRNG) SQLFormat(limit bool) string

func (*OfficeIdOfOfficeRNG) SQLLimit

func (u *OfficeIdOfOfficeRNG) SQLLimit() int

func (*OfficeIdOfOfficeRNG) SQLParams

func (u *OfficeIdOfOfficeRNG) SQLParams() []interface{}

type PrimaryKey

type PrimaryKey interface {
	Key() string
	SQLFormat() string
	SQLParams() []interface{}
	Columns() []string
	Parse(key string) error
}

! conf.orm

type Range

type Range interface {
	SQL
	IncludeBegin(flag bool)
	IncludeEnd(flag bool)
	Begin() int64
	End() int64
	Revert(flag bool)
	Key() string
	PositionOffsetLimit(len int) (int, int)
	RNGRelation(store *orm.RedisStore) RangeRelation
}

type RangeRelation

type RangeRelation interface {
	Range(key string, start, end int64) ([]string, error)
	RangeRevert(key string, start, end int64) ([]string, error)
}

type RedisConfig

type RedisConfig struct {
	Host     string
	Port     int
	Password string
}

type SQL

type SQL interface {
	SQLFormat(limit bool) string
	SQLParams() []interface{}
	SQLLimit() int
	Offset(n int)
	Limit(n int)
}

type SexOfUserIDX

type SexOfUserIDX struct {
	Sex bool
	// contains filtered or unexported fields
}

func (*SexOfUserIDX) IDXRelation

func (u *SexOfUserIDX) IDXRelation(store *orm.RedisStore) IndexRelation

func (*SexOfUserIDX) Key

func (u *SexOfUserIDX) Key() string

func (*SexOfUserIDX) Limit

func (u *SexOfUserIDX) Limit(n int)

func (*SexOfUserIDX) Offset

func (u *SexOfUserIDX) Offset(n int)

func (*SexOfUserIDX) PositionOffsetLimit

func (u *SexOfUserIDX) PositionOffsetLimit(len int) (int, int)

func (*SexOfUserIDX) SQLFormat

func (u *SexOfUserIDX) SQLFormat(limit bool) string

func (*SexOfUserIDX) SQLLimit

func (u *SexOfUserIDX) SQLLimit() int

func (*SexOfUserIDX) SQLParams

func (u *SexOfUserIDX) SQLParams() []interface{}

type SexOfUserIDXRelation

type SexOfUserIDXRelation struct {
	Key   string `db:"key" json:"key"`
	Value string `db:"value" json:"value"`
}

! relation

func (*SexOfUserIDXRelation) GetClassName

func (relation *SexOfUserIDXRelation) GetClassName() string

func (*SexOfUserIDXRelation) GetIndexes

func (relation *SexOfUserIDXRelation) GetIndexes() []string

func (*SexOfUserIDXRelation) GetStoreType

func (relation *SexOfUserIDXRelation) GetStoreType() string

type SexUserLocation

type SexUserLocation struct {
	Key       string  `db:"key" json:"key"`
	Longitude float64 `db:"longitude" json:"longitude"`
	Latitude  float64 `db:"latitude" json:"latitude"`
	Value     int32   `db:"value" json:"value"`
}

! relation

func (*SexUserLocation) GetClassName

func (relation *SexUserLocation) GetClassName() string

func (*SexUserLocation) GetIndexes

func (relation *SexUserLocation) GetIndexes() []string

func (*SexUserLocation) GetStoreType

func (relation *SexUserLocation) GetStoreType() string

type StatusOfBlogIDX

type StatusOfBlogIDX struct {
	Status int32
	// contains filtered or unexported fields
}

func (*StatusOfBlogIDX) IDXRelation

func (u *StatusOfBlogIDX) IDXRelation(store *orm.RedisStore) IndexRelation

func (*StatusOfBlogIDX) Key

func (u *StatusOfBlogIDX) Key() string

func (*StatusOfBlogIDX) Limit

func (u *StatusOfBlogIDX) Limit(n int)

func (*StatusOfBlogIDX) Offset

func (u *StatusOfBlogIDX) Offset(n int)

func (*StatusOfBlogIDX) PositionOffsetLimit

func (u *StatusOfBlogIDX) PositionOffsetLimit(len int) (int, int)

func (*StatusOfBlogIDX) SQLFormat

func (u *StatusOfBlogIDX) SQLFormat(limit bool) string

func (*StatusOfBlogIDX) SQLLimit

func (u *StatusOfBlogIDX) SQLLimit() int

func (*StatusOfBlogIDX) SQLParams

func (u *StatusOfBlogIDX) SQLParams() []interface{}

type Unique

type Unique interface {
	SQL
	Key() string
	UKRelation(store *orm.RedisStore) UniqueRelation
}

type UniqueRelation

type UniqueRelation interface {
	FindOne(key string) (string, error)
}

type User

type User struct {
	Id          int32      `db:"id" json:"id"`
	SubID       int32      `db:"sub_id" json:"sub_id"`
	Name        string     `db:"name" json:"name" validate:"required"`
	Mailbox     string     `db:"mailbox" json:"mailbox" validate:"required"`
	Sex         bool       `db:"sex" json:"sex"`
	Age         int32      `db:"age" json:"age"`
	Longitude   float64    `db:"longitude" json:"longitude"`
	Latitude    float64    `db:"latitude" json:"latitude"`
	Description string     `db:"description" json:"description"`
	Password    string     `db:"password" json:"password"`
	HeadUrl     string     `db:"head_url" json:"head_url"`
	Status      int32      `db:"user_status" json:"status"`
	CreatedAt   time.Time  `db:"created_at" json:"created_at"`
	UpdatedAt   time.Time  `db:"updated_at" json:"updated_at"`
	DeletedAt   *time.Time `db:"deleted_at" json:"deleted_at"`
}

func (*User) GetClassName

func (obj *User) GetClassName() string

func (*User) GetColumns

func (obj *User) GetColumns() []string

func (*User) GetIndexes

func (obj *User) GetIndexes() []string

func (*User) GetNameSpace

func (obj *User) GetNameSpace() string

func (*User) GetNoneIncrementColumns

func (obj *User) GetNoneIncrementColumns() []string

func (*User) GetPrimaryKey

func (obj *User) GetPrimaryKey() PrimaryKey

func (*User) GetPrimaryName

func (obj *User) GetPrimaryName() string

func (*User) GetStoreType

func (obj *User) GetStoreType() string

func (*User) GetTableName

func (obj *User) GetTableName() string

func (*User) Validate

func (obj *User) Validate() error

type UserBlogs

type UserBlogs struct {
	UserId int32 `db:"user_id"`
	BlogId int32 `db:"blog_id"`
}

func (*UserBlogs) GetClassName

func (obj *UserBlogs) GetClassName() string

func (*UserBlogs) GetColumns

func (obj *UserBlogs) GetColumns() []string

func (*UserBlogs) GetNameSpace

func (obj *UserBlogs) GetNameSpace() string

func (*UserBlogs) GetNoneIncrementColumns

func (obj *UserBlogs) GetNoneIncrementColumns() []string

func (*UserBlogs) GetPrimaryKey

func (obj *UserBlogs) GetPrimaryKey() PrimaryKey

func (*UserBlogs) GetTableName

func (obj *UserBlogs) GetTableName() string

func (*UserBlogs) Validate

func (obj *UserBlogs) Validate() error

type UserId

type UserId struct {
	Key   string `db:"key" json:"key"`
	Value int32  `db:"value" json:"value"`
}

! relation

func (*UserId) GetClassName

func (relation *UserId) GetClassName() string

func (*UserId) GetIndexes

func (relation *UserId) GetIndexes() []string

func (*UserId) GetStoreType

func (relation *UserId) GetStoreType() string

type UserIdBlogIdOfUserBlogsPK

type UserIdBlogIdOfUserBlogsPK struct {
	UserId int32
	BlogId int32
}

func (*UserIdBlogIdOfUserBlogsPK) Columns

func (u *UserIdBlogIdOfUserBlogsPK) Columns() []string

func (*UserIdBlogIdOfUserBlogsPK) Key

func (*UserIdBlogIdOfUserBlogsPK) Parse

func (u *UserIdBlogIdOfUserBlogsPK) Parse(key string) error

func (*UserIdBlogIdOfUserBlogsPK) SQLFormat

func (u *UserIdBlogIdOfUserBlogsPK) SQLFormat() string

func (*UserIdBlogIdOfUserBlogsPK) SQLParams

func (u *UserIdBlogIdOfUserBlogsPK) SQLParams() []interface{}

type UserIdBlogIdOfUserBlogsRNG

type UserIdBlogIdOfUserBlogsRNG struct {
	UserId      int32
	BlogIdBegin int64
	BlogIdEnd   int64
	// contains filtered or unexported fields
}

func (*UserIdBlogIdOfUserBlogsRNG) Begin

func (u *UserIdBlogIdOfUserBlogsRNG) Begin() int64

func (*UserIdBlogIdOfUserBlogsRNG) End

func (*UserIdBlogIdOfUserBlogsRNG) IncludeBegin

func (u *UserIdBlogIdOfUserBlogsRNG) IncludeBegin(f bool)

func (*UserIdBlogIdOfUserBlogsRNG) IncludeEnd

func (u *UserIdBlogIdOfUserBlogsRNG) IncludeEnd(f bool)

func (*UserIdBlogIdOfUserBlogsRNG) Key

func (*UserIdBlogIdOfUserBlogsRNG) Limit

func (u *UserIdBlogIdOfUserBlogsRNG) Limit(n int)

func (*UserIdBlogIdOfUserBlogsRNG) Offset

func (u *UserIdBlogIdOfUserBlogsRNG) Offset(n int)

func (*UserIdBlogIdOfUserBlogsRNG) PositionOffsetLimit

func (u *UserIdBlogIdOfUserBlogsRNG) PositionOffsetLimit(len int) (int, int)

func (*UserIdBlogIdOfUserBlogsRNG) RNGRelation

func (u *UserIdBlogIdOfUserBlogsRNG) RNGRelation(store *orm.RedisStore) RangeRelation

func (*UserIdBlogIdOfUserBlogsRNG) Revert

func (u *UserIdBlogIdOfUserBlogsRNG) Revert(b bool)

func (*UserIdBlogIdOfUserBlogsRNG) SQLFormat

func (u *UserIdBlogIdOfUserBlogsRNG) SQLFormat(limit bool) string

func (*UserIdBlogIdOfUserBlogsRNG) SQLLimit

func (u *UserIdBlogIdOfUserBlogsRNG) SQLLimit() int

func (*UserIdBlogIdOfUserBlogsRNG) SQLParams

func (u *UserIdBlogIdOfUserBlogsRNG) SQLParams() []interface{}

type UserInfo added in v1.0.4

type UserInfo struct {
	Id       int32  `db:"id"`
	Name     string `db:"name"`
	Mailbox  string `db:"mailbox"`
	Password string `db:"password"`
	Sex      bool   `db:"sex"`
}

type UserLocation

type UserLocation struct {
	Key       string  `db:"key" json:"key"`
	Longitude float64 `db:"longitude" json:"longitude"`
	Latitude  float64 `db:"latitude" json:"latitude"`
	Value     int32   `db:"value" json:"value"`
}

! relation

func (*UserLocation) GetClassName

func (relation *UserLocation) GetClassName() string

func (*UserLocation) GetIndexes

func (relation *UserLocation) GetIndexes() []string

func (*UserLocation) GetStoreType

func (relation *UserLocation) GetStoreType() string

type UserViewBaseInfo added in v1.5.1

type UserViewBaseInfo struct {
	Id       int32  `db:"id"`
	Name     string `db:"name"`
	Mailbox  string `db:"mailbox"`
	Password string `db:"password"`
	Sex      bool   `db:"sex"`
}

func (*UserViewBaseInfo) GetClassName added in v1.5.1

func (obj *UserViewBaseInfo) GetClassName() string

func (*UserViewBaseInfo) GetColumns added in v1.5.1

func (obj *UserViewBaseInfo) GetColumns() []string

func (*UserViewBaseInfo) GetNameSpace added in v1.5.1

func (obj *UserViewBaseInfo) GetNameSpace() string

func (*UserViewBaseInfo) GetNoneIncrementColumns added in v1.5.1

func (obj *UserViewBaseInfo) GetNoneIncrementColumns() []string

func (*UserViewBaseInfo) GetPrimaryKey added in v1.5.1

func (obj *UserViewBaseInfo) GetPrimaryKey() PrimaryKey

func (*UserViewBaseInfo) GetTableName added in v1.5.1

func (obj *UserViewBaseInfo) GetTableName() string

func (*UserViewBaseInfo) Validate added in v1.5.1

func (obj *UserViewBaseInfo) Validate() error

Jump to

Keyboard shortcuts

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