Documentation ¶
Index ¶
- Variables
- func ConnectDatabase()
- type AuthorizedMethods
- type ErrorMessage
- type Group
- type GroupUpdate
- type Language
- type LanguageUpdate
- type Policy
- type PolicyUpdate
- type Project
- type ProjectUpdate
- type Role
- type RoleUpdate
- type SuccessFindGroup
- type SuccessFindGroups
- type SuccessFindLanguage
- type SuccessFindLanguages
- type SuccessFindPolicies
- type SuccessFindProject
- type SuccessFindProjects
- type SuccessFindRoles
- type SuccessFindUser
- type SuccessFindUsers
- type SuccessGroupCreation
- type SuccessGroupDelete
- type SuccessGroupUpdate
- type SuccessLanguageCreation
- type SuccessLanguageDelete
- type SuccessLanguageUpdate
- type SuccessMessages
- type SuccessPolicyCreation
- type SuccessPolicyDelete
- type SuccessPolicyUpdate
- type SuccessProjectCreation
- type SuccessProjectDelete
- type SuccessProjectUpdate
- type SuccessRoleCreation
- type SuccessRoleDelete
- type SuccessRoleUpdate
- type SuccessUserCreation
- type SuccessUserDelete
- type SuccessUserUpdate
- type TokenRefresh
- type TokenRequest
- type TokenResponse
- type User
- type UserCreate
- type UserUpdate
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func ConnectDatabase ¶
func ConnectDatabase()
Types ¶
type AuthorizedMethods ¶
type AuthorizedMethods struct {
Data []string
}
type ErrorMessage ¶
type ErrorMessage struct {
Error string `json:"error"`
}
type GroupUpdate ¶
type LanguageUpdate ¶
type PolicyUpdate ¶
type Project ¶
type Project struct { ID uint `json:"id" gorm:"primary_key; not null"` Name string `json:"name" gorm:"not null" binding:"required"` Created_by string `json:"created_by" gorm:"not null" binding:"required"` Language string `json:"language" gorm:"not null" binding:"required"` CreatedAt time.Time `gorm:"not null"` UpdatedAt time.Time `gorm:"not null"` }
type ProjectUpdate ¶
type RoleUpdate ¶
type SuccessFindGroup ¶
type SuccessFindGroup struct {
Data Project `json:"data"`
}
type SuccessFindGroups ¶
type SuccessFindGroups struct {
Data []Project `json:"data"`
}
type SuccessFindLanguage ¶
type SuccessFindLanguage struct {
Data Project `json:"data"`
}
type SuccessFindLanguages ¶
type SuccessFindLanguages struct {
Data []Project `json:"data"`
}
type SuccessFindPolicies ¶
type SuccessFindPolicies struct {
Data []Policy `json:"data"`
}
type SuccessFindProject ¶
type SuccessFindProject struct {
Data Project `json:"data"`
}
type SuccessFindProjects ¶
type SuccessFindProjects struct {
Data []Project `json:"data"`
}
type SuccessFindRoles ¶
type SuccessFindRoles struct {
Data []Role `json:"data"`
}
type SuccessFindUser ¶
type SuccessFindUser struct {
Data User `json:"data"`
}
type SuccessFindUsers ¶
type SuccessFindUsers struct {
Data []User `json:"data"`
}
type SuccessGroupCreation ¶
type SuccessGroupCreation struct {
Data Project `json:"data"`
}
type SuccessGroupDelete ¶
type SuccessGroupDelete struct {
Data bool `json:"data"`
}
type SuccessGroupUpdate ¶
type SuccessGroupUpdate struct {
Data Project `json:"data"`
}
type SuccessLanguageCreation ¶
type SuccessLanguageCreation struct {
Data Project `json:"data"`
}
type SuccessLanguageDelete ¶
type SuccessLanguageDelete struct {
Data bool `json:"data"`
}
type SuccessLanguageUpdate ¶
type SuccessLanguageUpdate struct {
Data Project `json:"data"`
}
type SuccessMessages ¶
type SuccessMessages struct {
Message string `json:"message"`
}
type SuccessPolicyCreation ¶
type SuccessPolicyCreation struct {
Data Policy `json:"data"`
}
type SuccessPolicyDelete ¶
type SuccessPolicyDelete struct {
Data bool `json:"data"`
}
type SuccessPolicyUpdate ¶
type SuccessPolicyUpdate struct {
Data Policy `json:"data"`
}
type SuccessProjectCreation ¶
type SuccessProjectCreation struct {
Data Project `json:"data"`
}
type SuccessProjectDelete ¶
type SuccessProjectDelete struct {
Data bool `json:"data"`
}
type SuccessProjectUpdate ¶
type SuccessProjectUpdate struct {
Data Project `json:"data"`
}
type SuccessRoleCreation ¶
type SuccessRoleCreation struct {
Data Role `json:"data"`
}
type SuccessRoleDelete ¶
type SuccessRoleDelete struct {
Data bool `json:"data"`
}
type SuccessRoleUpdate ¶
type SuccessRoleUpdate struct {
Data Role `json:"data"`
}
type SuccessUserCreation ¶
type SuccessUserCreation struct {
Data User `json:"data"`
}
type SuccessUserDelete ¶
type SuccessUserDelete struct {
Data bool `json:"data"`
}
type SuccessUserUpdate ¶
type SuccessUserUpdate struct {
Data User `json:"data"`
}
type TokenRefresh ¶
type TokenRefresh struct {
Token string `json:"token"`
}
type TokenRequest ¶
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
}
type User ¶
type User struct { ID uint `json:"id" gorm:"primary_key; not null"` Name string `json:"name" binding:"required"` Lastname string `json:"lastname" binding:"required"` Username string `json:"username" gorm:"not null; unique" binding:"required"` Mail string `json:"mail" gorm:"not null; unique" binding:"required"` Password string `json:"-" binding:"required"` Role string `json:"role" binding:"required"` Group int `json:"group" binding:"required"` State bool `json:"state" binding:"required"` CreatedAt time.Time `gorm:"not null"` UpdatedAt time.Time `gorm:"not null"` }
func (*User) CheckPassword ¶
type UserCreate ¶ added in v0.0.3
type UserCreate struct { ID uint `json:"id" gorm:"primary_key; not null"` Name string `json:"name" binding:"required"` Lastname string `json:"lastname" binding:"required"` Username string `json:"username" gorm:"not null; unique" binding:"required"` Mail string `json:"mail" gorm:"not null; unique" binding:"required"` Password string `json:"password" binding:"required"` Role string `json:"role" binding:"required"` Group int `json:"group" binding:"required"` State bool `json:"state" binding:"required"` CreatedAt time.Time `gorm:"not null"` UpdatedAt time.Time `gorm:"not null"` }
func (*UserCreate) HashPassword ¶ added in v0.0.3
func (user *UserCreate) HashPassword(password string) error
type UserUpdate ¶
type UserUpdate struct { ID uint `json:"id,omitempty"` Name string `json:"name,omitempty"` Lastname string `json:"lastname,omitempty"` Username string `json:"username,omitempty"` Mail string `json:"mail,omitempty"` Password string `json:"password,omitempty"` Role string `json:"role,omitempty"` Group int `json:"group,omitempty"` State bool `json:"state,omitempty"` }
Click to show internal directories.
Click to hide internal directories.