trigger

package
v1.0.1-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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,
	triggerStore store.TriggerStore,
	pipelineStore store.PipelineStore,
	repoStore store.RepoStore,
) *Controller

func ProvideController

func ProvideController(
	authorizer authz.Authorizer,
	triggerStore store.TriggerStore,
	pipelineStore store.PipelineStore,
	repoStore store.RepoStore,
) *Controller

func (*Controller) Create

func (c *Controller) Create(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	pipelineIdentifier string,
	in *CreateInput,
) (*types.Trigger, error)

func (*Controller) Delete

func (c *Controller) Delete(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	pipelineIdentifier string,
	triggerIdentifier string,
) error

func (*Controller) Find

func (c *Controller) Find(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	pipelineIdentifier string,
	triggerIdentifier string,
) (*types.Trigger, error)

func (*Controller) List

func (c *Controller) List(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	pipelineIdentifier string,
	filter types.ListQueryFilter,
) ([]*types.Trigger, int64, error)

func (*Controller) Update

func (c *Controller) Update(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	pipelineIdentifier string,
	triggerIdentifier string,
	in *UpdateInput,
) (*types.Trigger, error)

type CreateInput

type CreateInput struct {
	Description string `json:"description"`
	// TODO [CODE-1363]: remove after identifier migration.
	UID        string               `json:"uid" deprecated:"true"`
	Identifier string               `json:"identifier"`
	Secret     string               `json:"secret"`
	Disabled   bool                 `json:"disabled"`
	Actions    []enum.TriggerAction `json:"actions"`
}

TODO: Add more as needed.

type UpdateInput

type UpdateInput struct {
	Description *string `json:"description"`
	// TODO [CODE-1363]: remove after identifier migration.
	UID        *string              `json:"uid" deprecated:"true"`
	Identifier *string              `json:"identifier"`
	Actions    []enum.TriggerAction `json:"actions"`
	Secret     *string              `json:"secret"`
	Disabled   *bool                `json:"disabled"` // can be nil, so keeping it a pointer
}

UpdateInput is used for updating a trigger.

Jump to

Keyboard shortcuts

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