Documentation ¶
Index ¶
- type Message
- type MessageArgument
- type MessageTranslation
- type Project
- func (p *Project) GetCategories() []string
- func (p *Project) GetClient() string
- func (p *Project) GetDate() time.Time
- func (p *Project) GetDescription() string
- func (p *Project) GetGithubLink() string
- func (p *Project) GetId() uint
- func (p *Project) GetImage() string
- func (p *Project) GetImages() []string
- func (p *Project) GetLink() string
- func (p *Project) GetName() string
- func (p *Project) GetTechStack() []string
- type Scope
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { ID uuid.UUID `json:"id" gorm:"primary_key;type:uuid;default:gen_random_uuid()"` ScopeID uuid.UUID `json:"-" gorm:"type:uuid;"` Scope Scope `json:"scope" gorm:"foreignkey:ScopeID;association_foreignkey:ID;constraint:OnUpdate:Cascade,OnDelete:Cascade;"` Key string `json:"key" validate:"required,min=3"` Description string `json:"description" validate:"required,min=3"` Arguments []*MessageArgument `json:"arguments" gorm:"foreignkey:MessageID;association_foreignkey:ID;constraint:OnUpdate:Cascade,OnDelete:Cascade;"` Translations []*MessageTranslation `json:"translations" gorm:"foreignkey:MessageID;association_foreignkey:ID;constraint:OnUpdate:Cascade,OnDelete:Cascade;"` }
type MessageArgument ¶
type MessageArgument struct { ID uuid.UUID `json:"id" gorm:"primary_key;type:uuid;default:gen_random_uuid()"` MessageID uuid.UUID `json:"-" gorm:"type:uuid;"` Message Message `json:"-" gorm:"foreignkey:MessageID;association_foreignkey:ID;constraint:OnUpdate:Cascade,OnDelete:Cascade;"` Name string `json:"name" validate:"required,min=3"` Description string `json:"description" validate:"required,min=3"` }
type MessageTranslation ¶
type MessageTranslation struct { ID uuid.UUID `json:"id" gorm:"primary_key;type:uuid;default:gen_random_uuid()"` MessageID uuid.UUID `json:"-" gorm:"type:uuid;"` Message Message `json:"-" gorm:"foreignkey:MessageID;association_foreignkey:ID;constraint:OnUpdate:Cascade,OnDelete:Cascade;"` Locale string `json:"locale" validate:"required,min=3"` Value string `json:"value" validate:"required,min=3"` }
type Project ¶
type Project struct { Id uint `json:"id" gorm:"primaryKey;autoIncrement;not null"` Name string `json:"name" gorm:"not null"` Description string `json:"description"` Image string `json:"image"` Link string `json:"link"` GithubLink string `json:"githubLink"` Date time.Time `json:"date" gorm:"not null;default:CURRENT_TIMESTAMP"` Client string `json:"client" gorm:"not null;default:'Niromash'"` Categories pq.StringArray `json:"categories" gorm:"type:text[]"` TechStack pq.StringArray `json:"techStack" gorm:"type:text[]"` Images pq.StringArray `json:"images" gorm:"type:text[]"` }
func (*Project) GetCategories ¶
func (*Project) GetDescription ¶
func (*Project) GetGithubLink ¶
func (*Project) GetTechStack ¶
type User ¶
type User struct { ID uint `json:"id" gorm:"primary_key;auto_increment;not null"` Username string `json:"username" gorm:"type:varchar(255);not null;unique"` Email string `json:"email" gorm:"type:varchar(255);not null;unique"` Password string `json:"password" gorm:"type:varchar(255);not null"` Permissions pq.StringArray `json:"permissions" gorm:"type:varchar(255)[]"` }
func (*User) GetPassword ¶
func (*User) GetPermissions ¶
func (*User) GetUsername ¶
func (*User) HasPermission ¶
HasPermission examples: permission for all actions: * permission for all messages actions: messages.* permission for create message action: messages.create permission for delete message action: messages.delete
Click to show internal directories.
Click to hide internal directories.