Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ID uuid.UUID `validate:"required"` TeamID uuid.UUID `validate:"required"` Name string `validate:"required"` Slug string `validate:"required"` Description string IsActive bool `validate:"required"` CreatedBy string `validate:"required"` CreatedAt time.Time `validate:"required"` UpdatedAt time.Time `validate:"required"` Permissions []*Permission }
func NewApplication ¶
func NewApplication(name, desc string, user User) (*Application, error)
func (*Application) Ok ¶
func (a *Application) Ok() error
type Client ¶
type Client struct { ID uuid.UUID `validate:"required"` Name string `validate:"required"` Description string Slug string `validate:"required"` IsActive bool `validate:"required"` ClientKey string `validate:"required"` HashClientSecret string `validate:"required"` RoundHashClientSecret int `validate:"min=1"` SaltHashClientSecret string `validate:"required"` LastLogin time.Time `validate:"required"` CreatedBy string `validate:"required"` CreatedAt time.Time `validate:"required"` UpdatedAt time.Time `validate:"required"` Permissions []*Permission }
type Permission ¶
type Permission struct { ID uuid.UUID `validate:"required"` ApplicationID uuid.UUID `validate:"required"` ApplicationResource string `validate:"required"` Action string `validate:"required"` CreatedBy string `validate:"required"` CreatedAt time.Time `validate:"required"` UpdatedAt time.Time `validate:"required"` }
func NewPermission ¶
func NewPermission(application Application, resource, action, createdBy string) (*Permission, error)
func (*Permission) Ok ¶
func (p *Permission) Ok() error
type Team ¶
type User ¶
type User struct { ID uuid.UUID `validate:"required"` TeamID uuid.UUID `validate:"required"` Name string `validate:"required"` Occupation string `validate:"required"` Email string `validate:"required"` HashPassword string `validate:"required"` RoundHashPassword int `validate:"required"` SaltHashPassword string `validate:"required"` LastLogin nullable.Time CreatedAt time.Time `validate:"required"` UpdatedAt time.Time `validate:"required"` }
Click to show internal directories.
Click to hide internal directories.