Documentation ¶
Index ¶
- func Application_Create(app *Application) error
- func Application_Delete(id int) error
- func Application_Update(app *Application) error
- func Group_Create(grp *Group) error
- func Group_Delete(id int) error
- func Group_Update(grp *Group) error
- func Operation_Create(oper *Operation) error
- func Operation_Delete(id int) error
- func Operation_Update(ope *Operation) error
- func Role_Create(rol *Role) error
- func Role_Delete(id int) error
- func Role_Update(rol *Role) error
- func User_Create(usr *User) error
- func User_Delete(id int) error
- func User_Update(app *User) error
- type Application
- type Group
- type GroupApplicationJoin
- type GroupOperation
- type NullInt64
- type NullString
- type Operation
- type OperationApplicationJoin
- type Role
- type RoleGroup
- type User
- type UserRole
- type UserRoleAssignmentVW
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Group_Create ¶
func Group_Delete ¶
func Group_Update ¶
func Operation_Create ¶
func Operation_Delete ¶
func Operation_Update ¶
func Role_Create ¶
func Role_Delete ¶
func Role_Update ¶
func User_Create ¶
func User_Delete ¶
func User_Update ¶
Types ¶
type Application ¶
type Group ¶
type Group struct { Id int `json:"id" db:"id"` Name string `json:"name" db:"name"` ApplicationId int `json:"application_id" db:"application_id"` }
func Group_List ¶
func Group_List() []Group
func Group_ListByAppId ¶
type GroupApplicationJoin ¶
type GroupApplicationJoin struct { Group ApplicationName string `json:"application_name" db:"application_name"` }
func Group_ByPk ¶
func Group_ByPk(id string) GroupApplicationJoin
type GroupOperation ¶
type NullString ¶
type NullString struct {
sql.NullString
}
func (*NullString) MarshalJSON ¶
func (s *NullString) MarshalJSON() ([]byte, error)
func (*NullString) UnmarshalJSON ¶
func (s *NullString) UnmarshalJSON(data []byte) error
type Operation ¶
type Operation struct { Id int `json:"id" db:"id"` ApplicationId int `json:"application_id" db:"application_id"` Code string `json:"code" db:"code"` Description string `json:"description" db:"description"` }
func Operation_List ¶
func Operation_List() []Operation
func Operation_ListByAppId ¶
type OperationApplicationJoin ¶
type OperationApplicationJoin struct { Operation ApplicationName string `json:"application_name" db:"application_name"` }
func Operation_ByPk ¶
func Operation_ByPk(id string) OperationApplicationJoin
type Role ¶
type Role struct { Id int `json:"id" db:"id"` ApplicationId int `json:"application_id" db:"application_id"` Name string `json:"name" db:"name"` Enabled bool `json:"enabled" db:"enabled"` }
func Role_ListByAppId ¶
type User ¶
type User struct { Id int `json:"id" db:"id"` Name string `json:"name" db:"name"` ExtCode string `json:"ext_code" db:"ext_code"` Enabled bool `json:"enabled" db:"enabled"` }
func User_List ¶
func User_List() []User
func Role_ListByUserId(userId) []UserRole { var apps []Role _, err := dbMap.Select(&apps, "select * from roles where application_id = $1 order by id", appId) checkErr(err, "sql.Query Role by appId") }
func User_ListByAppId ¶
type UserRoleAssignmentVW ¶
type UserRoleAssignmentVW struct { Assigned bool `json:"assigned" db:"assigned"` User NullInt64 `json:"user_id" db:"user_id"` Role int `json:"role_id" db:"role_id"` Name string `json:"name" db:"name"` ApplicationId int `json:"application_id" db:"application_id"` }
func Roles_ListByUserAndApp ¶
func Roles_ListByUserAndApp(appId int, userId int) []UserRoleAssignmentVW
Click to show internal directories.
Click to hide internal directories.