Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAction ¶
func SetAction(opt AppLogOptions, diff DiffInterface) error
Types ¶
type ActionType ¶
type ActionType uint
const ( Login ActionType = iota + 1 Logout DataGet DataUpdate DataCreate DataDelete )
func GetAction ¶
func GetAction(httpMethod string) ActionType
type AppLog ¶
type AppLog struct { models.BaseModel serializers.Serializer ID uint `json:"id" serializer:"read_only" gorm:"primarykey"` CreatedAt time.Time `json:"createdAt" serializer:"read_only;title:Дата и время;"` UserID uint `json:"userId" serializer:"read_only;" gorm:"column:user_id"` Action ActionType `json:"action" serializer:"read_only;title:Действие;" gorm:"column:action"` Module string `json:"module" serializer:"read_only;title:Модуль;" gorm:"column:module"` Table string `json:"table" serializer:"read_only;title:Таблица;" gorm:"column:table"` User authentication.User `` /* 145-byte string literal not displayed */ Diff typesdb.JSONB `json:"diff" serializer:"read_only;title:Изменения;" gorm:"type:jsonb;default:'{}';not null;column:diff"` }
type AppLogDiffInterface ¶
type AppLogDiffInterface interface { SetAction(AppLogOptions, DiffInterface) error GetAction(string) ActionType }
type AppLogOptions ¶
type DiffInterface ¶
Click to show internal directories.
Click to hide internal directories.