Documentation ¶
Index ¶
- Variables
- func IsValidLoggerType(y LoggerType) bool
- func IsValidString(typ string) bool
- type LogCreateRequest
- type LogResponse
- type LoggerType
- type Logs
- func (y *Logs) Create(u LogCreateRequest) (id int64, err error)
- func (y *Logs) FindAll(page, limit int, condition string) (res []LogResponse, err error)
- func (y *Logs) FindById(id int) (res LogResponse, err error)
- func (y *Logs) FindFirst() (res LogResponse, err error)
- func (y *Logs) FindLast() (res LogResponse, err error)
- func (y *Logs) FindType(typ string, today bool) (res []LogResponse, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var TypesNames = [...]string{
"UPDATE_PASSWORD ",
"CREATE_USER",
"MACHINE_VERIFY",
"LOGIN",
"ACCEPT_MACHINE",
"BLOCK_MACHINE",
"SUSPECT_MACHINE",
}
Functions ¶
func IsValidLoggerType ¶
func IsValidLoggerType(y LoggerType) bool
func IsValidString ¶ added in v0.1.3
Types ¶
type LogCreateRequest ¶
type LogCreateRequest struct { Type LoggerType `json:"type" db:"type"` Description string `json:"description" db:"description"` UserId int `json:"user_id" db:"userId"` }
type LogResponse ¶
type LoggerType ¶
type LoggerType int
const ( UPDATE_PASSWORD LoggerType = iota CREATE_USER MACHINE_VERIFY LOGIN ACCEPT_MACHINE BLOCK_MACHINE SUSPECT_MACHINE )
func (LoggerType) String ¶
func (y LoggerType) String() string
Click to show internal directories.
Click to hide internal directories.