Documentation ¶
Index ¶
- type Data
- type FindDataParam
- type Tag
- type User
- func BasicAuth(db *gorm.DB, name, pass string) (*User, error)
- func CreateUser(db *gorm.DB, name, password string, isAdmin bool) (*User, error)
- func DeleteUser(db *gorm.DB, userID string) (*User, error)
- func EditUser(db *gorm.DB, userID string, isAdmin bool, resetPassword string) (*User, error)
- func FindUserByName(db *gorm.DB, name string) (*User, error)
- func GetUsers(db *gorm.DB) ([]*User, error)
- func TokenAuth(db *gorm.DB, uuid string) (*User, error)
- func (u *User) AddTag(db *gorm.DB, name string) error
- func (u *User) AlreadyExist(db *gorm.DB, name string) bool
- func (u *User) FindByTagName(db *gorm.DB, name string) (*Tag, error)
- func (u *User) ReGenerateUserToken(db *gorm.DB) (*User, error)
- func (u *User) RemoveTag(db *gorm.DB, name string) error
- func (u *User) UpdatePassword(db *gorm.DB, password string) (*User, error)
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { ID uint `json:"-" gorm:"primary_key"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"-" sql:"index"` TagID uint `json:"-" gorm:"not null"` RemoteAddr string `json:"remote_addr" gorm:"not null"` Hostname string `json:"hostname" gorm:"not null"` Payload string `json:"payload" gorm:"not null" sql:"type:text;"` }
func FindDataByTagID ¶
func FindDataByTagID(db *gorm.DB, param FindDataParam) ([]Data, error)
type FindDataParam ¶
type Tag ¶
Click to show internal directories.
Click to hide internal directories.