group

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SharedInfraGroup = "shared.infra"

SharedInfraGroup is the name of the builtin group used to share infrastructure between projects

Variables

This section is empty.

Functions

func AddAdminInGlobalGroup

func AddAdminInGlobalGroup(db *sql.DB, userID int64) error

AddAdminInGlobalGroup insert into new admin into global group as group admin

func AddGlobalGroupToPipeline

func AddGlobalGroupToPipeline(tx *sql.Tx, pipID int64) error

AddGlobalGroupToPipeline add global group access to given pipeline

func AddGroup

func AddGroup(db database.QueryExecuter, group *sdk.Group) (int64, bool, error)

AddGroup creates a new group in database

func CheckGroupInApplication

func CheckGroupInApplication(db database.Querier, applicationID, groupID int64) (bool, error)

CheckGroupInApplication Check if the group is already attached to the application

func CheckGroupInPipeline

func CheckGroupInPipeline(db database.Querier, pipelineID, groupID int64) (bool, error)

CheckGroupInPipeline checks if group has access to pipeline

func CheckGroupInProject

func CheckGroupInProject(db database.Querier, projectID, groupID int64) (bool, error)

CheckGroupInProject Check if the group is already attached to the project

func CheckUserInDefaultGroup added in v0.4.0

func CheckUserInDefaultGroup(db database.QueryExecuter, userID int64) error

CheckUserInDefaultGroup insert user in default group

func CheckUserInGroup

func CheckUserInGroup(db database.Querier, groupID, userID int64) (bool, error)

CheckUserInGroup verivies that user is in given group

func CreateDefaultGlobalGroup

func CreateDefaultGlobalGroup(db *sql.DB) error

CreateDefaultGlobalGroup creates a group 'public' where every user will be

func DeleteAllGroupFromApplication

func DeleteAllGroupFromApplication(db database.Executer, applicationID int64) error

DeleteAllGroupFromApplication remove all group from the given application

func DeleteAllGroupFromEnvironment

func DeleteAllGroupFromEnvironment(db database.Executer, environmentID int64) error

DeleteAllGroupFromEnvironment remove all group from the given environment

func DeleteAllGroupFromPipeline

func DeleteAllGroupFromPipeline(db database.Executer, pipelineID int64) error

DeleteAllGroupFromPipeline Delete all groups from the given pipeline

func DeleteGroupAndDependencies

func DeleteGroupAndDependencies(db database.Executer, group *sdk.Group) error

DeleteGroupAndDependencies deletes group and all subsequent group_project, pipeline_project

func DeleteGroupFromApplication

func DeleteGroupFromApplication(db database.Executer, key, appName, groupName string) error

DeleteGroupFromApplication removes access to application to group members

func DeleteGroupFromEnvironment

func DeleteGroupFromEnvironment(db database.Executer, key, envName, groupName string) error

DeleteGroupFromEnvironment removes access to environment to group members

func DeleteGroupFromPipeline

func DeleteGroupFromPipeline(db database.Executer, pipelineID, groupID int64) error

DeleteGroupFromPipeline removes access to pipeline to group members

func DeleteGroupFromProject

func DeleteGroupFromProject(db database.Executer, projectID, groupID int64) error

DeleteGroupFromProject Delete the group from the given project

func DeleteGroupProjectByProject

func DeleteGroupProjectByProject(db database.Executer, projectID int64) error

DeleteGroupProjectByProject removes group associated with project

func DeleteGroupUserByGroup

func DeleteGroupUserByGroup(db database.Executer, group *sdk.Group) error

DeleteGroupUserByGroup Delete all user from a group

func DeleteUserFromGroup

func DeleteUserFromGroup(db *sql.DB, groupID, userID int64) error

DeleteUserFromGroup remove user from group

func Initialize

func Initialize(db *sql.DB, defaultGroupName string) error

Initialize initializes sharedInfraGroup and Default Group

func InsertGroup

func InsertGroup(db database.QueryExecuter, g *sdk.Group) error

InsertGroup insert given group into given database

func InsertGroupInApplication

func InsertGroupInApplication(db database.Executer, applicationID, groupID int64, role int) error

InsertGroupInApplication add permissions on Application to Group

func InsertGroupInEnvironment

func InsertGroupInEnvironment(db database.Executer, environmentID, groupID int64, role int) error

InsertGroupInEnvironment add permissions on Environment to Group

func InsertGroupInPipeline

func InsertGroupInPipeline(db database.Executer, pipelineID, groupID int64, role int) error

InsertGroupInPipeline add permissions on Pipeline to Group

func InsertGroupInProject

func InsertGroupInProject(db database.Executer, projectID, groupID int64, role int) error

InsertGroupInProject Attach a group to a project

func InsertGroupsInApplication

func InsertGroupsInApplication(db database.Executer, groupPermission []sdk.GroupPermission, applicationID int64) error

InsertGroupsInApplication Link the given groups and the given application

func InsertGroupsInEnvironment

func InsertGroupsInEnvironment(db database.Executer, groupPermission []sdk.GroupPermission, envID int64) error

InsertGroupsInEnvironment Link the given groups and the given environment

func InsertGroupsInPipeline

func InsertGroupsInPipeline(db database.Executer, groupPermission []sdk.GroupPermission, pipelineID int64) error

InsertGroupsInPipeline Link the given groups and the given pipeline

func InsertUserInGroup

func InsertUserInGroup(db database.QueryExecuter, groupID, userID int64, admin bool) error

InsertUserInGroup insert user in group

func IsInEnvironment

func IsInEnvironment(db database.Querier, environmentID, groupID int64) (bool, error)

IsInEnvironment checks wether groups already has permissions on environment or not

func LoadAllApplicationGroupByRole

func LoadAllApplicationGroupByRole(db database.Querier, applicationID int64, role int) ([]sdk.GroupPermission, error)

LoadAllApplicationGroupByRole load all group for the given application and role

func LoadAllEnvironmentGroupByRole

func LoadAllEnvironmentGroupByRole(db database.Querier, environmentID int64, role int) ([]sdk.GroupPermission, error)

LoadAllEnvironmentGroupByRole load all group for the given environment and role

func LoadAllPipelineGroupByRole

func LoadAllPipelineGroupByRole(db database.Querier, pipelineID int64, role int) ([]sdk.GroupPermission, error)

LoadAllPipelineGroupByRole load all group for the given pipeline and role

func LoadAllProjectGroupByRole

func LoadAllProjectGroupByRole(db database.Querier, projectID int64, role int) ([]sdk.GroupPermission, error)

LoadAllProjectGroupByRole load all group for the given project and role

func LoadGroup

func LoadGroup(db database.Querier, name string) (*sdk.Group, error)

LoadGroup retrieves group informations from database

func LoadGroupByAdmin

func LoadGroupByAdmin(db database.Querier, userID int64) ([]sdk.Group, error)

LoadGroupByAdmin return group list from database

func LoadGroupByID

func LoadGroupByID(db database.Querier, id int64) (*sdk.Group, error)

LoadGroupByID retrieves group informations from database

func LoadGroupByProject

func LoadGroupByProject(db database.Querier, project *sdk.Project) error

LoadGroupByProject retrieves all groups related to project

func LoadGroupByUser

func LoadGroupByUser(db database.Querier, userID int64) ([]sdk.Group, error)

LoadGroupByUser return group list from database

func LoadGroups

func LoadGroups(db *sql.DB) ([]sdk.Group, error)

LoadGroups load all groups from database

func LoadPublicGroups

func LoadPublicGroups(db database.Querier) ([]sdk.Group, error)

LoadPublicGroups returns public groups, actually it returns shared.infra group only because public group are not supported

func LoadUserGroup

func LoadUserGroup(db *sql.DB, group *sdk.Group) error

LoadUserGroup retrieves all group users from database

func RemoveUserGroupAdmin

func RemoveUserGroupAdmin(db *sql.DB, groupID int64, userID int64) error

RemoveUserGroupAdmin remove the privilege to perform operations on given group

func SetUserGroupAdmin

func SetUserGroupAdmin(db database.Executer, groupID int64, userID int64) error

SetUserGroupAdmin allows a user to perform operations on given group

func UpdateGroup

func UpdateGroup(db database.Executer, g *sdk.Group, oldName string) error

UpdateGroup updates group informations in database

func UpdateGroupRoleInApplication

func UpdateGroupRoleInApplication(db database.Executer, key, appName, groupName string, role int) error

UpdateGroupRoleInApplication update permission on application

func UpdateGroupRoleInEnvironment

func UpdateGroupRoleInEnvironment(db database.Executer, key, envName, groupName string, role int) error

UpdateGroupRoleInEnvironment update permission on environment

func UpdateGroupRoleInPipeline

func UpdateGroupRoleInPipeline(db database.Executer, pipelineID, groupID int64, role int) error

UpdateGroupRoleInPipeline update permission on pipeline

func UpdateGroupRoleInProject

func UpdateGroupRoleInProject(db database.Executer, projectID, groupID int64, role int) error

UpdateGroupRoleInProject Update group role for the given project

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL