Documentation ¶
Overview ¶
Package rbac is a generated GoMock package.
Index ¶
- Variables
- type Handler
- func (h *Handler) BatchUpdateClients(c *gin.Context)
- func (h *Handler) BatchUpdateGroups(c *gin.Context)
- func (h *Handler) BatchUpdateOrganizations(c *gin.Context)
- func (h *Handler) BatchUpdatePipelines(c *gin.Context)
- func (h *Handler) BatchUpdateUsers(c *gin.Context)
- func (h *Handler) CreateClient(c *gin.Context)
- func (h *Handler) CreateGroup(c *gin.Context)
- func (h *Handler) CreateOrganization(c *gin.Context)
- func (h *Handler) CreateUser(c *gin.Context)
- func (h *Handler) DeleteClient(c *gin.Context)
- func (h *Handler) DeleteGroup(c *gin.Context)
- func (h *Handler) DeleteOrganization(c *gin.Context)
- func (h *Handler) DeleteUser(c *gin.Context)
- func (h *Handler) GetClient(c *gin.Context)
- func (h *Handler) GetClients(c *gin.Context)
- func (h *Handler) GetGroup(c *gin.Context)
- func (h *Handler) GetGroups(c *gin.Context)
- func (h *Handler) GetIntegrations(c *gin.Context)
- func (h *Handler) GetLoggedInUser(c *gin.Context)
- func (h *Handler) GetOrganization(c *gin.Context)
- func (h *Handler) GetOrganizations(c *gin.Context)
- func (h *Handler) GetPipeline(c *gin.Context)
- func (h *Handler) GetPipelines(c *gin.Context)
- func (h *Handler) GetProviders(c *gin.Context)
- func (h *Handler) GetRoles(c *gin.Context)
- func (h *Handler) GetUser(c *gin.Context)
- func (h *Handler) GetUsers(c *gin.Context)
- func (h *Handler) HandleClientLoginProviderAuthenticator() func(c *gin.Context) (interface{}, error)
- func (h *Handler) HandleImpersonateAuthenticator() func(c *gin.Context) (interface{}, error)
- func (h *Handler) HandleOAuthLoginProviderAuthenticator() func(c *gin.Context) (interface{}, error)
- func (h *Handler) LoginProvider(c *gin.Context)
- func (h *Handler) UpdateBitbucketInstallation(c *gin.Context)
- func (h *Handler) UpdateClient(c *gin.Context)
- func (h *Handler) UpdateGithubInstallation(c *gin.Context)
- func (h *Handler) UpdateGroup(c *gin.Context)
- func (h *Handler) UpdateOrganization(c *gin.Context)
- func (h *Handler) UpdatePipeline(c *gin.Context)
- func (h *Handler) UpdateUser(c *gin.Context)
- type MockService
- func (m *MockService) CreateClient(ctx context.Context, client contracts.Client) (*contracts.Client, error)
- func (m *MockService) CreateGroup(ctx context.Context, group contracts.Group) (*contracts.Group, error)
- func (m *MockService) CreateOrganization(ctx context.Context, organization contracts.Organization) (*contracts.Organization, error)
- func (m *MockService) CreateUser(ctx context.Context, user contracts.User) (*contracts.User, error)
- func (m *MockService) CreateUserFromIdentity(ctx context.Context, identity contracts.UserIdentity) (*contracts.User, error)
- func (m *MockService) DeleteClient(ctx context.Context, id string) error
- func (m *MockService) DeleteGroup(ctx context.Context, id string) error
- func (m *MockService) DeleteOrganization(ctx context.Context, id string) error
- func (m *MockService) DeleteUser(ctx context.Context, id string) error
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) GetInheritedOrganizationsForUser(ctx context.Context, user contracts.User) ([]*contracts.Organization, error)
- func (m *MockService) GetInheritedRolesForUser(ctx context.Context, user contracts.User) ([]*string, error)
- func (m *MockService) GetProviderByName(ctx context.Context, organization, name string) (*api.OAuthProvider, error)
- func (m *MockService) GetProviders(ctx context.Context) ([]*api.OAuthProvider, error)
- func (m *MockService) GetRoles(ctx context.Context) ([]string, error)
- func (m *MockService) GetUserByIdentity(ctx context.Context, identity contracts.UserIdentity) (*contracts.User, error)
- func (m *MockService) UpdateClient(ctx context.Context, client contracts.Client) error
- func (m *MockService) UpdateGroup(ctx context.Context, group contracts.Group) error
- func (m *MockService) UpdateOrganization(ctx context.Context, organization contracts.Organization) error
- func (m *MockService) UpdatePipeline(ctx context.Context, pipeline contracts.Pipeline) error
- func (m *MockService) UpdateUser(ctx context.Context, user contracts.User) error
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) CreateClient(ctx, client interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) CreateGroup(ctx, group interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) CreateOrganization(ctx, organization interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) CreateUser(ctx, user interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) CreateUserFromIdentity(ctx, identity interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) DeleteClient(ctx, id interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) DeleteGroup(ctx, id interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) DeleteOrganization(ctx, id interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) DeleteUser(ctx, id interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetInheritedOrganizationsForUser(ctx, user interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetInheritedRolesForUser(ctx, user interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetProviderByName(ctx, organization, name interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetProviders(ctx interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetRoles(ctx interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetUserByIdentity(ctx, identity interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) UpdateClient(ctx, client interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) UpdateGroup(ctx, group interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) UpdateOrganization(ctx, organization interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) UpdatePipeline(ctx, pipeline interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) UpdateUser(ctx, user interface{}) *gomock.Call
- type Service
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUserNotFound indicates that a user cannot be found in the database ErrUserNotFound = errors.New("The user can't be found") )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(config *api.APIConfig, service Service, databaseClient database.Client, bitbucketapiClient bitbucketapi.Client, githubapiClient githubapi.Client) Handler
NewHandler returns a new rbac.Handler
func (*Handler) BatchUpdateClients ¶
func (*Handler) BatchUpdateGroups ¶
func (*Handler) BatchUpdateOrganizations ¶
func (*Handler) BatchUpdatePipelines ¶
func (*Handler) BatchUpdateUsers ¶
func (*Handler) CreateClient ¶
func (*Handler) CreateGroup ¶
func (*Handler) CreateOrganization ¶
func (*Handler) CreateUser ¶
func (*Handler) DeleteClient ¶
func (*Handler) DeleteGroup ¶
func (*Handler) DeleteOrganization ¶
func (*Handler) DeleteUser ¶
func (*Handler) GetClients ¶
func (*Handler) GetIntegrations ¶ added in v1.0.5
func (*Handler) GetLoggedInUser ¶
func (*Handler) GetOrganization ¶
func (*Handler) GetOrganizations ¶
func (*Handler) GetPipeline ¶
func (*Handler) GetPipelines ¶
func (*Handler) GetProviders ¶
func (*Handler) HandleClientLoginProviderAuthenticator ¶
func (*Handler) HandleImpersonateAuthenticator ¶
func (*Handler) HandleOAuthLoginProviderAuthenticator ¶
func (*Handler) LoginProvider ¶
func (*Handler) UpdateBitbucketInstallation ¶ added in v1.0.6
func (*Handler) UpdateClient ¶
func (*Handler) UpdateGithubInstallation ¶ added in v1.0.6
func (*Handler) UpdateGroup ¶
func (*Handler) UpdateOrganization ¶
func (*Handler) UpdatePipeline ¶
func (*Handler) UpdateUser ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) CreateClient ¶
func (m *MockService) CreateClient(ctx context.Context, client contracts.Client) (*contracts.Client, error)
CreateClient mocks base method.
func (*MockService) CreateGroup ¶
func (m *MockService) CreateGroup(ctx context.Context, group contracts.Group) (*contracts.Group, error)
CreateGroup mocks base method.
func (*MockService) CreateOrganization ¶
func (m *MockService) CreateOrganization(ctx context.Context, organization contracts.Organization) (*contracts.Organization, error)
CreateOrganization mocks base method.
func (*MockService) CreateUser ¶
CreateUser mocks base method.
func (*MockService) CreateUserFromIdentity ¶
func (m *MockService) CreateUserFromIdentity(ctx context.Context, identity contracts.UserIdentity) (*contracts.User, error)
CreateUserFromIdentity mocks base method.
func (*MockService) DeleteClient ¶
func (m *MockService) DeleteClient(ctx context.Context, id string) error
DeleteClient mocks base method.
func (*MockService) DeleteGroup ¶
func (m *MockService) DeleteGroup(ctx context.Context, id string) error
DeleteGroup mocks base method.
func (*MockService) DeleteOrganization ¶
func (m *MockService) DeleteOrganization(ctx context.Context, id string) error
DeleteOrganization mocks base method.
func (*MockService) DeleteUser ¶
func (m *MockService) DeleteUser(ctx context.Context, id string) error
DeleteUser mocks base method.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) GetInheritedOrganizationsForUser ¶
func (m *MockService) GetInheritedOrganizationsForUser(ctx context.Context, user contracts.User) ([]*contracts.Organization, error)
GetInheritedOrganizationsForUser mocks base method.
func (*MockService) GetInheritedRolesForUser ¶
func (m *MockService) GetInheritedRolesForUser(ctx context.Context, user contracts.User) ([]*string, error)
GetInheritedRolesForUser mocks base method.
func (*MockService) GetProviderByName ¶
func (m *MockService) GetProviderByName(ctx context.Context, organization, name string) (*api.OAuthProvider, error)
GetProviderByName mocks base method.
func (*MockService) GetProviders ¶
func (m *MockService) GetProviders(ctx context.Context) ([]*api.OAuthProvider, error)
GetProviders mocks base method.
func (*MockService) GetRoles ¶
func (m *MockService) GetRoles(ctx context.Context) ([]string, error)
GetRoles mocks base method.
func (*MockService) GetUserByIdentity ¶
func (m *MockService) GetUserByIdentity(ctx context.Context, identity contracts.UserIdentity) (*contracts.User, error)
GetUserByIdentity mocks base method.
func (*MockService) UpdateClient ¶
UpdateClient mocks base method.
func (*MockService) UpdateGroup ¶
UpdateGroup mocks base method.
func (*MockService) UpdateOrganization ¶
func (m *MockService) UpdateOrganization(ctx context.Context, organization contracts.Organization) error
UpdateOrganization mocks base method.
func (*MockService) UpdatePipeline ¶
UpdatePipeline mocks base method.
func (*MockService) UpdateUser ¶
UpdateUser mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) CreateClient ¶
func (mr *MockServiceMockRecorder) CreateClient(ctx, client interface{}) *gomock.Call
CreateClient indicates an expected call of CreateClient.
func (*MockServiceMockRecorder) CreateGroup ¶
func (mr *MockServiceMockRecorder) CreateGroup(ctx, group interface{}) *gomock.Call
CreateGroup indicates an expected call of CreateGroup.
func (*MockServiceMockRecorder) CreateOrganization ¶
func (mr *MockServiceMockRecorder) CreateOrganization(ctx, organization interface{}) *gomock.Call
CreateOrganization indicates an expected call of CreateOrganization.
func (*MockServiceMockRecorder) CreateUser ¶
func (mr *MockServiceMockRecorder) CreateUser(ctx, user interface{}) *gomock.Call
CreateUser indicates an expected call of CreateUser.
func (*MockServiceMockRecorder) CreateUserFromIdentity ¶
func (mr *MockServiceMockRecorder) CreateUserFromIdentity(ctx, identity interface{}) *gomock.Call
CreateUserFromIdentity indicates an expected call of CreateUserFromIdentity.
func (*MockServiceMockRecorder) DeleteClient ¶
func (mr *MockServiceMockRecorder) DeleteClient(ctx, id interface{}) *gomock.Call
DeleteClient indicates an expected call of DeleteClient.
func (*MockServiceMockRecorder) DeleteGroup ¶
func (mr *MockServiceMockRecorder) DeleteGroup(ctx, id interface{}) *gomock.Call
DeleteGroup indicates an expected call of DeleteGroup.
func (*MockServiceMockRecorder) DeleteOrganization ¶
func (mr *MockServiceMockRecorder) DeleteOrganization(ctx, id interface{}) *gomock.Call
DeleteOrganization indicates an expected call of DeleteOrganization.
func (*MockServiceMockRecorder) DeleteUser ¶
func (mr *MockServiceMockRecorder) DeleteUser(ctx, id interface{}) *gomock.Call
DeleteUser indicates an expected call of DeleteUser.
func (*MockServiceMockRecorder) GetInheritedOrganizationsForUser ¶
func (mr *MockServiceMockRecorder) GetInheritedOrganizationsForUser(ctx, user interface{}) *gomock.Call
GetInheritedOrganizationsForUser indicates an expected call of GetInheritedOrganizationsForUser.
func (*MockServiceMockRecorder) GetInheritedRolesForUser ¶
func (mr *MockServiceMockRecorder) GetInheritedRolesForUser(ctx, user interface{}) *gomock.Call
GetInheritedRolesForUser indicates an expected call of GetInheritedRolesForUser.
func (*MockServiceMockRecorder) GetProviderByName ¶
func (mr *MockServiceMockRecorder) GetProviderByName(ctx, organization, name interface{}) *gomock.Call
GetProviderByName indicates an expected call of GetProviderByName.
func (*MockServiceMockRecorder) GetProviders ¶
func (mr *MockServiceMockRecorder) GetProviders(ctx interface{}) *gomock.Call
GetProviders indicates an expected call of GetProviders.
func (*MockServiceMockRecorder) GetRoles ¶
func (mr *MockServiceMockRecorder) GetRoles(ctx interface{}) *gomock.Call
GetRoles indicates an expected call of GetRoles.
func (*MockServiceMockRecorder) GetUserByIdentity ¶
func (mr *MockServiceMockRecorder) GetUserByIdentity(ctx, identity interface{}) *gomock.Call
GetUserByIdentity indicates an expected call of GetUserByIdentity.
func (*MockServiceMockRecorder) UpdateClient ¶
func (mr *MockServiceMockRecorder) UpdateClient(ctx, client interface{}) *gomock.Call
UpdateClient indicates an expected call of UpdateClient.
func (*MockServiceMockRecorder) UpdateGroup ¶
func (mr *MockServiceMockRecorder) UpdateGroup(ctx, group interface{}) *gomock.Call
UpdateGroup indicates an expected call of UpdateGroup.
func (*MockServiceMockRecorder) UpdateOrganization ¶
func (mr *MockServiceMockRecorder) UpdateOrganization(ctx, organization interface{}) *gomock.Call
UpdateOrganization indicates an expected call of UpdateOrganization.
func (*MockServiceMockRecorder) UpdatePipeline ¶
func (mr *MockServiceMockRecorder) UpdatePipeline(ctx, pipeline interface{}) *gomock.Call
UpdatePipeline indicates an expected call of UpdatePipeline.
func (*MockServiceMockRecorder) UpdateUser ¶
func (mr *MockServiceMockRecorder) UpdateUser(ctx, user interface{}) *gomock.Call
UpdateUser indicates an expected call of UpdateUser.
type Service ¶
type Service interface { GetRoles(ctx context.Context) (roles []string, err error) GetProviders(ctx context.Context) (providers []*api.OAuthProvider, err error) GetProviderByName(ctx context.Context, organization, name string) (provider *api.OAuthProvider, err error) GetUserByIdentity(ctx context.Context, identity contracts.UserIdentity) (user *contracts.User, err error) CreateUserFromIdentity(ctx context.Context, identity contracts.UserIdentity) (user *contracts.User, err error) CreateUser(ctx context.Context, user contracts.User) (insertedUser *contracts.User, err error) UpdateUser(ctx context.Context, user contracts.User) (err error) DeleteUser(ctx context.Context, id string) (err error) CreateGroup(ctx context.Context, group contracts.Group) (insertedGroup *contracts.Group, err error) UpdateGroup(ctx context.Context, group contracts.Group) (err error) DeleteGroup(ctx context.Context, id string) (err error) CreateOrganization(ctx context.Context, organization contracts.Organization) (insertedOrganization *contracts.Organization, err error) UpdateOrganization(ctx context.Context, organization contracts.Organization) (err error) DeleteOrganization(ctx context.Context, id string) (err error) CreateClient(ctx context.Context, client contracts.Client) (insertedClient *contracts.Client, err error) UpdateClient(ctx context.Context, client contracts.Client) (err error) DeleteClient(ctx context.Context, id string) (err error) UpdatePipeline(ctx context.Context, pipeline contracts.Pipeline) (err error) GetInheritedRolesForUser(ctx context.Context, user contracts.User) (roles []*string, err error) GetInheritedOrganizationsForUser(ctx context.Context, user contracts.User) (organizations []*contracts.Organization, err error) }
Service handles http requests for role-based-access-control
func NewLoggingService ¶
NewLoggingService returns a new instance of a logging Service.
func NewMetricsService ¶
func NewMetricsService(s Service, requestCount metrics.Counter, requestLatency metrics.Histogram) Service
NewMetricsService returns a new instance of a metrics Service.
func NewService ¶
NewService returns a github.Service to handle incoming webhook events
func NewTracingService ¶
NewTracingService returns a new instance of a tracing Service.