Documentation
¶
Index ¶
- Variables
- type Controller
- func (c *Controller) CreateRepo(ctx context.Context, session *auth.Session, repoRef string, ...) (*types.Webhook, error)
- func (c *Controller) CreateSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) (*types.Webhook, error)
- func (c *Controller) DeleteRepo(ctx context.Context, session *auth.Session, repoRef string, ...) error
- func (c *Controller) DeleteSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) error
- func (c *Controller) FindExecutionRepo(ctx context.Context, session *auth.Session, repoRef string, ...) (*types.WebhookExecution, error)
- func (c *Controller) FindExecutionSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) (*types.WebhookExecution, error)
- func (c *Controller) FindRepo(ctx context.Context, session *auth.Session, repoRef string, ...) (*types.Webhook, error)
- func (c *Controller) FindSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) (*types.Webhook, error)
- func (c *Controller) ListExecutionsRepo(ctx context.Context, session *auth.Session, repoRef string, ...) ([]*types.WebhookExecution, int64, error)
- func (c *Controller) ListExecutionsSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) ([]*types.WebhookExecution, int64, error)
- func (c *Controller) ListRepo(ctx context.Context, session *auth.Session, repoRef string, inherited bool, ...) ([]*types.Webhook, int64, error)
- func (c *Controller) ListSpace(ctx context.Context, session *auth.Session, spaceRef string, inherited bool, ...) ([]*types.Webhook, int64, error)
- func (c *Controller) RetriggerExecutionRepo(ctx context.Context, session *auth.Session, repoRef string, ...) (*types.WebhookExecution, error)
- func (c *Controller) RetriggerExecutionSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) (*types.WebhookExecution, error)
- func (c *Controller) UpdateRepo(ctx context.Context, session *auth.Session, repoRef string, ...) (*types.Webhook, error)
- func (c *Controller) UpdateSpace(ctx context.Context, session *auth.Session, spaceRef string, ...) (*types.Webhook, error)
- type NoopPreprocessor
- func (p NoopPreprocessor) IsInternalCall(enum.PrincipalType) bool
- func (p NoopPreprocessor) PreprocessCreateInput(enum.PrincipalType, *types.WebhookCreateInput) (bool, error)
- func (p NoopPreprocessor) PreprocessFilter(_ enum.PrincipalType, filter *types.WebhookFilter)
- func (p NoopPreprocessor) PreprocessUpdateInput(enum.PrincipalType, *types.WebhookUpdateInput) (bool, error)
- type Preprocessor
Constants ¶
This section is empty.
Variables ¶
var WireSet = wire.NewSet( ProvideController, )
WireSet provides a wire set for this package.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( authorizer authz.Authorizer, spaceStore store.SpaceStore, repoStore store.RepoStore, webhookService *webhook.Service, encrypter encrypt.Encrypter, preprocessor Preprocessor, ) *Controller
func ProvideController ¶
func ProvideController(authorizer authz.Authorizer, spaceStore store.SpaceStore, repoStore store.RepoStore, webhookService *webhook.Service, encrypter encrypt.Encrypter, preprocessor Preprocessor, ) *Controller
func (*Controller) CreateRepo ¶
func (c *Controller) CreateRepo( ctx context.Context, session *auth.Session, repoRef string, in *types.WebhookCreateInput, ) (*types.Webhook, error)
CreateRepo creates a new repo webhook.
func (*Controller) CreateSpace ¶
func (c *Controller) CreateSpace( ctx context.Context, session *auth.Session, spaceRef string, in *types.WebhookCreateInput, ) (*types.Webhook, error)
CreateSpace creates a new webhook.
func (*Controller) DeleteRepo ¶
func (c *Controller) DeleteRepo( ctx context.Context, session *auth.Session, repoRef string, webhookIdentifier string, ) error
DeleteRepo deletes an existing webhook.
func (*Controller) DeleteSpace ¶
func (c *Controller) DeleteSpace( ctx context.Context, session *auth.Session, spaceRef string, webhookIdentifier string, ) error
DeleteSpace deletes an existing webhook.
func (*Controller) FindExecutionRepo ¶
func (c *Controller) FindExecutionRepo( ctx context.Context, session *auth.Session, repoRef string, webhookIdentifier string, webhookExecutionID int64, ) (*types.WebhookExecution, error)
FindExecutionRepo finds a webhook execution.
func (*Controller) FindExecutionSpace ¶
func (c *Controller) FindExecutionSpace( ctx context.Context, session *auth.Session, spaceRef string, webhookIdentifier string, webhookExecutionID int64, ) (*types.WebhookExecution, error)
FindExecutionSpace finds a webhook execution.
func (*Controller) FindRepo ¶
func (c *Controller) FindRepo( ctx context.Context, session *auth.Session, repoRef string, webhookIdentifier string, ) (*types.Webhook, error)
FindRepo finds a webhook from the provided repository.
func (*Controller) FindSpace ¶
func (c *Controller) FindSpace( ctx context.Context, session *auth.Session, spaceRef string, webhookIdentifier string, ) (*types.Webhook, error)
FindSpace finds a webhook from the provided repository.
func (*Controller) ListExecutionsRepo ¶
func (c *Controller) ListExecutionsRepo( ctx context.Context, session *auth.Session, repoRef string, webhookIdentifier string, filter *types.WebhookExecutionFilter, ) ([]*types.WebhookExecution, int64, error)
ListExecutionsRepo returns the executions of the webhook.
func (*Controller) ListExecutionsSpace ¶
func (c *Controller) ListExecutionsSpace( ctx context.Context, session *auth.Session, spaceRef string, webhookIdentifier string, filter *types.WebhookExecutionFilter, ) ([]*types.WebhookExecution, int64, error)
ListExecutionsSpace returns the executions of the webhook.
func (*Controller) ListRepo ¶
func (c *Controller) ListRepo( ctx context.Context, session *auth.Session, repoRef string, inherited bool, filter *types.WebhookFilter, ) ([]*types.Webhook, int64, error)
ListRepo returns the webhooks from the provided repository.
func (*Controller) ListSpace ¶
func (c *Controller) ListSpace( ctx context.Context, session *auth.Session, spaceRef string, inherited bool, filter *types.WebhookFilter, ) ([]*types.Webhook, int64, error)
ListSpace returns the webhooks from the provided space.
func (*Controller) RetriggerExecutionRepo ¶
func (c *Controller) RetriggerExecutionRepo( ctx context.Context, session *auth.Session, repoRef string, webhookIdentifier string, webhookExecutionID int64, ) (*types.WebhookExecution, error)
RetriggerExecutionRepo retriggers an existing webhook execution.
func (*Controller) RetriggerExecutionSpace ¶
func (c *Controller) RetriggerExecutionSpace( ctx context.Context, session *auth.Session, spaceRef string, webhookIdentifier string, webhookExecutionID int64, ) (*types.WebhookExecution, error)
RetriggerExecutionSpace retriggers an existing webhook execution.
func (*Controller) UpdateRepo ¶
func (c *Controller) UpdateRepo( ctx context.Context, session *auth.Session, repoRef string, webhookIdentifier string, in *types.WebhookUpdateInput, ) (*types.Webhook, error)
UpdateRepo updates an existing webhook.
func (*Controller) UpdateSpace ¶
func (c *Controller) UpdateSpace( ctx context.Context, session *auth.Session, spaceRef string, webhookIdentifier string, in *types.WebhookUpdateInput, ) (*types.Webhook, error)
UpdateSpace updates an existing webhook.
type NoopPreprocessor ¶
type NoopPreprocessor struct { }
func (NoopPreprocessor) IsInternalCall ¶
func (p NoopPreprocessor) IsInternalCall(enum.PrincipalType) bool
func (NoopPreprocessor) PreprocessCreateInput ¶
func (p NoopPreprocessor) PreprocessCreateInput( enum.PrincipalType, *types.WebhookCreateInput, ) (bool, error)
PreprocessCreateInput always return false for internal.
func (NoopPreprocessor) PreprocessFilter ¶
func (p NoopPreprocessor) PreprocessFilter(_ enum.PrincipalType, filter *types.WebhookFilter)
func (NoopPreprocessor) PreprocessUpdateInput ¶
func (p NoopPreprocessor) PreprocessUpdateInput( enum.PrincipalType, *types.WebhookUpdateInput, ) (bool, error)
PreprocessUpdateInput always return false for internal.
type Preprocessor ¶
type Preprocessor interface { PreprocessCreateInput(enum.PrincipalType, *types.WebhookCreateInput) (bool, error) PreprocessUpdateInput(enum.PrincipalType, *types.WebhookUpdateInput) (bool, error) PreprocessFilter(enum.PrincipalType, *types.WebhookFilter) IsInternalCall(enum.PrincipalType) bool }
func ProvidePreprocessor ¶
func ProvidePreprocessor() Preprocessor
Source Files
¶
- controller.go
- preprocessor.go
- repo_create.go
- repo_delete.go
- repo_find.go
- repo_find_execution.go
- repo_list.go
- repo_list_executions.go
- repo_retrigger_execution.go
- repo_update.go
- space_create.go
- space_delete.go
- space_find.go
- space_find_execution.go
- space_list.go
- space_list_executions.go
- space_retrigger_execution.go
- space_update.go
- wire.go