entity

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APILogStatusNew       = "new"
	APILogStatusCompleted = "completed"
	APILogStatusFailed    = "failed"

	APILogTypeApple = "Apple"
)

Variables

View Source
var APILogStatusAll = &apiLogStatus{
	New:       APILogStatusNew,
	Completed: APILogStatusCompleted,
	Failed:    APILogStatusFailed,
}
View Source
var APILogTypeAll = &apiLogType{
	Apple: APILogTypeApple,
}

Functions

func Init

func Init(registry *orm.Registry)

Types

type APILogEntity added in v0.1.1

type APILogEntity struct {
	orm.ORM   `orm:"table=api_log;redisCache"`
	ID        uint64
	Type      string `orm:"enum=entity.APILogTypeAll;required"`
	Status    string `orm:"enum=entity.APILogStatusAll;required"`
	Request   interface{}
	Response  interface{}
	Message   string
	CreatedAt time.Time `orm:"time=true"`
}

func (*APILogEntity) SetCreatedAt added in v0.1.1

func (e *APILogEntity) SetCreatedAt(value time.Time)

func (*APILogEntity) SetID added in v0.1.1

func (e *APILogEntity) SetID(value uint64)

func (*APILogEntity) SetMessage added in v0.1.1

func (e *APILogEntity) SetMessage(value string)

func (*APILogEntity) SetRequest added in v0.1.1

func (e *APILogEntity) SetRequest(value interface{})

func (*APILogEntity) SetResponse added in v0.1.1

func (e *APILogEntity) SetResponse(value interface{})

func (*APILogEntity) SetStatus added in v0.1.1

func (e *APILogEntity) SetStatus(value string)

func (*APILogEntity) SetType added in v0.1.1

func (e *APILogEntity) SetType(value string)

type AdminUserEntity

type AdminUserEntity struct {
	orm.ORM  `orm:"table=admin_users;redisCache;redisSearch=search"`
	ID       uint64
	Email    string `orm:"unique=Email;searchable"`
	Password string
}

func (*AdminUserEntity) GetPassword

func (e *AdminUserEntity) GetPassword() string

func (*AdminUserEntity) GetUniqueFieldName added in v0.3.1

func (e *AdminUserEntity) GetUniqueFieldName() string

func (*AdminUserEntity) GetUsername

func (e *AdminUserEntity) GetUsername() string

Jump to

Keyboard shortcuts

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