models

package
v0.0.0-...-af16168 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const TAG = "CrudPostgres"

Variables

View Source
var AuthModel = new(authModel)

Functions

This section is empty.

Types

type Account

type Account struct {
}

func (*Account) AccountAccount

func (this *Account) AccountAccount(account_id1, account_id2 int64, status string) int64

func (*Account) CheckDetail

func (s *Account) CheckDetail(where string, value interface{}) bool

func (*Account) EditByObject

func (s *Account) EditByObject(a *entity.Account) int64

func (*Account) GetListPublic

func (this *Account) GetListPublic(sqlSelectFields, join, condition, search string, page, perPage int64, order_by string) ([]*entity.Account, int64)

func (*Account) Upsert

func (this *Account) Upsert(action byte, img string, args ...interface{}) int64

type Category

type Category struct {
}

func (*Category) UpdateAfterDeleted

func (this *Category) UpdateAfterDeleted(args ...interface{}) int64

func (*Category) Upsert

func (this *Category) Upsert(action byte, imgUrlsString string, args ...interface{}) int64

type CrudPostgres

type CrudPostgres struct {
	DB *sql.DB
}
var CrudGeneral *CrudPostgres

func (*CrudPostgres) Count

func (s *CrudPostgres) Count(malina *berry.Malina, query string, args ...interface{})

func (*CrudPostgres) Delete

func (this *CrudPostgres) Delete(querySql string, args ...interface{}) int64

func (*CrudPostgres) GetItem

func (s *CrudPostgres) GetItem(malina *berry.Malina, item entity.Scanable, query string, args ...interface{})

func (*CrudPostgres) GetItems

func (s *CrudPostgres) GetItems(malina *berry.Malina, item entity.Scanable, query string, args ...interface{})

func (*CrudPostgres) Insert

func (this *CrudPostgres) Insert(querySql string, args ...interface{}) int64

func (*CrudPostgres) Join

func (this *CrudPostgres) Join(malina *berry.Malina, pre, table, on string)

func (*CrudPostgres) Limit

func (this *CrudPostgres) Limit(malina *berry.Malina, perPage, page int64)

func (*CrudPostgres) OrderBy

func (this *CrudPostgres) OrderBy(malina *berry.Malina, key, dir string)

func (*CrudPostgres) Select

func (this *CrudPostgres) Select(malina *berry.Malina, selectSql string)

func (*CrudPostgres) SetDBConnection

func (s *CrudPostgres) SetDBConnection() error

func (*CrudPostgres) Table

func (this *CrudPostgres) Table(malina *berry.Malina, tableSql string)

func (*CrudPostgres) Update

func (this *CrudPostgres) Update(querySql string, args ...interface{}) int64

func (*CrudPostgres) WhereAnd

func (this *CrudPostgres) WhereAnd(malina *berry.Malina, key string, value string)

type News

type News struct {
	Crud CrudPostgres
	// contains filtered or unexported fields
}

func (*News) Upsert

func (this *News) Upsert(action byte, imgUrlsString string, args ...interface{}) int64

type Parameter

type Parameter struct {
}

func (*Parameter) Upsert

func (this *Parameter) Upsert(action byte, args ...interface{}) int64

type Permission

type Permission struct {
}

func (*Permission) Upsert

func (this *Permission) Upsert(action byte, imgUrlsString, parameterIds string, args ...interface{}) int64

type Product

type Product struct {
}

func (*Product) Upsert

func (this *Product) Upsert(action byte, imgUrlsString, parameterIds string, args ...interface{}) int64

type Session

type Session struct {
	SqlSelectFieldsAccount string
}

func (*Session) Add

func (s *Session) Add(r *http.Request, account *entity.Account, sessionId, ip, userAgent string) string

func (*Session) Del

func (s *Session) Del(sessionId string) int64

func (*Session) Get

func (s *Session) Get(sessionId, ip, user_agent string) (*entity.Account, bool)

return Account and bool. Bool means that session is found, false not found

func (*Session) UpdateAccount

func (s *Session) UpdateAccount(ip string, accountId int64) int64

Jump to

Keyboard shortcuts

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