Versions in this module Expand all Collapse all v0 v0.1.6 Oct 19, 2024 Changes in this version type User + OTPEnabled bool + OTPSecret string v0.1.5 Aug 23, 2023 Changes in this version type User + NotifiersConfig map[string]string v0.1.4 Jun 23, 2023 Changes in this version type User + CreatedAt time.Time + DeletedAt gorm.DeletedAt + ID uint + UpdatedAt time.Time v0.1.3 Jun 5, 2023 Changes in this version + func ConnectMysql(dsn string) (database *gorm.DB, err error) + func ConnectPostgres(dsn string) (database *gorm.DB, err error) + func ConnectSqlServer(dsn string) (database *gorm.DB, err error) + func ConnectSqlite(dsn string) (database *gorm.DB, err error) + type Base struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + ID uint + UpdatedAt time.Time v0.1.2 Jun 2, 2023 v0.1.1 Jun 2, 2023 v0.1.0 Jun 2, 2023 Changes in this version + var DB *gorm.DB + func ConnectDatabase() + func HandleIsFree(path string, domain string) (bool, string) + func Paginate(value interface{}, pagination *Pagination, db *gorm.DB) func(db *gorm.DB) *gorm.DB + type CollectedPage struct + Content []byte + Path string + XssHitID uint + type Handler struct + CollectedPages []string + Dom bool + Domain string + Members []HandlerRbac + Owner User + OwnerID int + Path string + Screenshot bool + func GetHandlerById(id interface{}) (handler Handler) + func GetViewableHandlers(userId int) (handlers []Handler) + func (h *Handler) CanDelete(user_id int) bool + func (h *Handler) CanUpdate(user_id int) bool + func (h *Handler) CanView(user_id int) bool + func (h *Handler) Delete() + func (h *Handler) GetRoleForUser(user_id int) string + func (h *Handler) Save() + type HandlerRbac struct + Handler Handler + HandlerID int + Permission PermisionType + User User + UserID int + func GetHandleRbacForUser(userId int) (rbacs []HandlerRbac) + type Pagination struct + Limit int + Page int + Rows interface{} + TotalPages int + TotalRows int + func (p *Pagination) GetLimit() int + func (p *Pagination) GetOffset() int + func (p *Pagination) GetPage() int + type PermisionType string + const OWNER + const READ + const WRITE + func (t *PermisionType) Scan(value interface{}) error + func (t PermisionType) Value() (driver.Value, error) + type User struct + Email string + HandlersRbac []HandlerRbac + IsAdmin bool + Password string + Username string + func GetUserByEmail(email string) (user User) + func GetUserById(user_id int) User + func GetUsersByEmail(search string) (users []User) + func (u *User) CheckPassword(pass string) bool + func (u *User) HandlerRbacs() []HandlerRbac + func (u *User) SetPassword(pass string) error + type XssHit struct + CollectedPages []CollectedPage + Cookies string + CorrelationKey string + Dom string + Handler Handler + HandlerID int + Ip string + LocalStorage string + Origin string + Owner User + OwnerID int + PublicId string + Referer string + Screenshot string + SessionStorage string + Url string + UserAgent string + func GetHitByCorrelationKey(key string) XssHit + func GetHitBySharingKey(key string) XssHit + func GetViewableHitPaginated(user_id int, pagination *Pagination) (hits []XssHit) + func (hit *XssHit) CanDelete(user_id int) bool + func (hit *XssHit) CanUpdate(user_id int) bool + func (hit *XssHit) CanView(user_id int) bool + func (hit *XssHit) Delete() + func (hit *XssHit) DisableSharing() + func (hit *XssHit) EnableSharing()