Documentation ¶
Index ¶
- Variables
- func Delete(_ context.Context, db gorpmapper.SqlExecutorWithTx, rb sdk.RBAC) error
- func HasGlobalRole(ctx context.Context, db gorp.SqlExecutor, role string, userID string) (bool, error)
- func HasRoleOnProjectAndUserID(ctx context.Context, db gorp.SqlExecutor, role string, userID string, ...) (bool, error)
- func HasRoleOnWorkflowAndUserID(ctx context.Context, db gorp.SqlExecutor, role string, userID string, ...) (bool, error)
- func Insert(ctx context.Context, db gorpmapper.SqlExecutorWithTx, rb *sdk.RBAC) error
- func IsValidRBAC(ctx context.Context, db gorp.SqlExecutor, rbac *sdk.RBAC) error
- func LoadAllProjectKeysAllowed(ctx context.Context, db gorp.SqlExecutor, role string, userID string) (sdk.StringSlice, error)
- func LoadAllWorkflowsAllowed(ctx context.Context, db gorp.SqlExecutor, role string, projectKey string, ...) (sdk.StringSlice, bool, error)
- func LoadRBACByHatcheryID(ctx context.Context, db gorp.SqlExecutor, hatcheryID string) (*sdk.RBAC, error)
- func LoadRBACByID(ctx context.Context, db gorp.SqlExecutor, id string, opts ...LoadOptionFunc) (*sdk.RBAC, error)
- func LoadRBACByIDs(ctx context.Context, db gorp.SqlExecutor, IDs sdk.StringSlice, ...) ([]sdk.RBAC, error)
- func LoadRBACByName(ctx context.Context, db gorp.SqlExecutor, name string, opts ...LoadOptionFunc) (*sdk.RBAC, error)
- func LoadRBACByRegionID(ctx context.Context, db gorp.SqlExecutor, regionID string) ([]sdk.RBAC, error)
- func LoadRBACHatcheryByHatcheryID(ctx context.Context, db gorp.SqlExecutor, hatcheryID string) (*sdk.RBACHatchery, error)
- func LoadRBACRegionOrganizations(ctx context.Context, db gorp.SqlExecutor, rbacRegion *sdk.RBACRegion) error
- func LoadRegionIDsByRoleAndUserID(ctx context.Context, db gorp.SqlExecutor, role string, userID string) ([]sdk.RBACRegion, error)
- func Update(ctx context.Context, db gorpmapper.SqlExecutorWithTx, rb *sdk.RBAC) error
- type LoadOptionFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var LoadOptions = struct { Default LoadOptionFunc LoadRBACGlobal LoadOptionFunc LoadRBACProject LoadOptionFunc LoadRBACHatchery LoadOptionFunc LoadRBACRegion LoadOptionFunc LoadRBACWorkflow LoadOptionFunc All LoadOptionFunc }{ Default: loadDefault, LoadRBACGlobal: loadRBACGlobal, LoadRBACProject: loadRBACProject, LoadRBACHatchery: loadRBACHatchery, LoadRBACRegion: loadRBACRegion, LoadRBACWorkflow: loadRBACWorkflow, All: loadAll, }
LoadOptions provides all options on rbac loads functions
Functions ¶
func Delete ¶
func Delete(_ context.Context, db gorpmapper.SqlExecutorWithTx, rb sdk.RBAC) error
func HasGlobalRole ¶
func HasRoleOnWorkflowAndUserID ¶ added in v0.53.0
func Insert ¶
func Insert(ctx context.Context, db gorpmapper.SqlExecutorWithTx, rb *sdk.RBAC) error
Insert a RBAC permission in database
func IsValidRBAC ¶ added in v0.53.0
func LoadAllProjectKeysAllowed ¶ added in v0.53.0
func LoadAllProjectKeysAllowed(ctx context.Context, db gorp.SqlExecutor, role string, userID string) (sdk.StringSlice, error)
func LoadAllWorkflowsAllowed ¶ added in v0.53.0
func LoadRBACByHatcheryID ¶ added in v0.53.0
func LoadRBACByID ¶ added in v0.53.0
func LoadRBACByID(ctx context.Context, db gorp.SqlExecutor, id string, opts ...LoadOptionFunc) (*sdk.RBAC, error)
func LoadRBACByIDs ¶ added in v0.53.0
func LoadRBACByIDs(ctx context.Context, db gorp.SqlExecutor, IDs sdk.StringSlice, opts ...LoadOptionFunc) ([]sdk.RBAC, error)
func LoadRBACByName ¶
func LoadRBACByName(ctx context.Context, db gorp.SqlExecutor, name string, opts ...LoadOptionFunc) (*sdk.RBAC, error)
func LoadRBACByRegionID ¶ added in v0.53.0
func LoadRBACHatcheryByHatcheryID ¶ added in v0.53.0
func LoadRBACHatcheryByHatcheryID(ctx context.Context, db gorp.SqlExecutor, hatcheryID string) (*sdk.RBACHatchery, error)
func LoadRBACRegionOrganizations ¶ added in v0.53.0
func LoadRBACRegionOrganizations(ctx context.Context, db gorp.SqlExecutor, rbacRegion *sdk.RBACRegion) error
func LoadRegionIDsByRoleAndUserID ¶ added in v0.53.0
func LoadRegionIDsByRoleAndUserID(ctx context.Context, db gorp.SqlExecutor, role string, userID string) ([]sdk.RBACRegion, error)
func Update ¶
func Update(ctx context.Context, db gorpmapper.SqlExecutorWithTx, rb *sdk.RBAC) error
Types ¶
type LoadOptionFunc ¶
type LoadOptionFunc func(context.Context, gorp.SqlExecutor, *rbac) error
LoadOptionFunc is used as options to loadProject functions
Source Files ¶
- dao_rbac.go
- dao_rbac_global.go
- dao_rbac_global_group.go
- dao_rbac_global_user.go
- dao_rbac_hatchery.go
- dao_rbac_project.go
- dao_rbac_project_group.go
- dao_rbac_project_key.go
- dao_rbac_project_user.go
- dao_rbac_region.go
- dao_rbac_region_group.go
- dao_rbac_region_organization.go
- dao_rbac_region_user.go
- dao_rbac_workflow.go
- dao_rbac_workflow_group.go
- dao_rbac_workflow_user.go
- gorp_model.go
- loader.go
- rbac_validation.go
Click to show internal directories.
Click to hide internal directories.