MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / CreateRole

Method CreateRole

internal/repository/role.go:34–36  ·  view source on GitHub ↗

CreateRole 创建角色

(ctx context.Context, role *domain.Role, menuIds []int, apiIds []int)

Source from the content-addressed store, hash-verified

32
33// CreateRole 创建角色
34func (r *roleRepository) CreateRole(ctx context.Context, role *domain.Role, menuIds []int, apiIds []int) error {
35 return r.dao.CreateRole(ctx, r.roleToDAO(role), menuIds, apiIds)
36}
37
38// GetRoleById 根据ID获取角色
39func (r *roleRepository) GetRoleById(ctx context.Context, id int) (*domain.Role, error) {

Callers

nothing calls this directly

Calls 2

roleToDAOMethod · 0.95
CreateRoleMethod · 0.65

Tested by

no test coverage detected