Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthAction ¶
type AuthAction struct { Id uuid.UUID `json:"id" gorm:"primaryKey;type:char(36);"` ResourceId uuid.UUID `json:"resourceId"` Resource AuthResource `json:"-" gorm:"foreignKey:ResourceId;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` Name string `json:"name"` Description string `json:"description" gorm:"type:text"` Roles []*AuthRole `json:"-" gorm:"many2many:role_actions;"` }
func (*AuthAction) BeforeCreate ¶
func (action *AuthAction) BeforeCreate(tx *gorm.DB) error
type AuthModule ¶
type AuthModule struct { Id uuid.UUID `json:"id" gorm:"primaryKey;type:char(36);"` Name string `json:"name" gorm:"unique"` Description string `json:"description" gorm:"type:text"` }
func (*AuthModule) BeforeCreate ¶
func (module *AuthModule) BeforeCreate(tx *gorm.DB) error
type AuthResource ¶
type AuthResource struct { Id uuid.UUID `json:"id" gorm:"primaryKey;type:char(36);"` ModuleId uuid.UUID `json:"moduleId"` Module AuthModule `json:"-" gorm:"foreignKey:ModuleId;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` Name string `json:"name" gorm:"unique"` Description string `json:"description" gorm:"type:text"` }
func (*AuthResource) BeforeCreate ¶
func (resource *AuthResource) BeforeCreate(tx *gorm.DB) error
type AuthRole ¶
type AuthRole struct { Id uuid.UUID `json:"id" gorm:"primaryKey;type:char(36);"` Name string `json:"name"` Description string `json:"description" gorm:"type:text"` Actions []*AuthAction `json:"actions" gorm:"many2many:role_actions;"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *gorm.DeletedAt `json:"deletedAt" gorm:"index"` }
type OauthUser ¶
type OauthUser struct { Id uuid.UUID `json:"id" gorm:"primaryKey;type:char(36)"` FirstName *string `json:"firstName"` LastName *string `json:"lastName"` Email string `json:"email" gorm:"unique;not null;"` Language string `json:"language" gorm:"default:EN;not null;type:varchar(4)"` Password string `json:"password" gorm:"not null;"` RoleID uuid.UUID `json:"-"` Role AuthRole `json:"role" gorm:"constraint:OnUpdate:CASCADE;OnDelete:SET NULL"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `json:"deletedAt" gorm:"index"` }
Click to show internal directories.
Click to hide internal directories.