events

package
v1.0.4-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBranchUpdatedEvent events.EventType = "default-branch-updated"
View Source
const DeletedEvent events.EventType = "deleted"

Variables

WireSet provides a wire set for this package.

Functions

func NewReaderFactory

func NewReaderFactory(eventsSystem *events.System) (*events.ReaderFactory[*Reader], error)

func ProvideReaderFactory

func ProvideReaderFactory(eventsSystem *events.System) (*events.ReaderFactory[*Reader], error)

Types

type DefaultBranchUpdatedPayload

type DefaultBranchUpdatedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	OldName     string `json:"old_name"`
	NewName     string `json:"new_name"`
}

type DeletedPayload

type DeletedPayload struct {
	RepoID int64 `json:"repo_id"`
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader is the event reader for this package.

func (*Reader) Configure

func (r *Reader) Configure(opts ...events.ReaderOption)

func (*Reader) RegisterDefaultBranchUpdated

func (r *Reader) RegisterDefaultBranchUpdated(fn events.HandlerFunc[*DefaultBranchUpdatedPayload],
	opts ...events.HandlerOption) error

func (*Reader) RegisterRepoDeleted

func (r *Reader) RegisterRepoDeleted(fn events.HandlerFunc[*DeletedPayload],
	opts ...events.HandlerOption) error

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter is the event reporter for this package.

func NewReporter

func NewReporter(eventsSystem *events.System) (*Reporter, error)

func ProvideReporter

func ProvideReporter(eventsSystem *events.System) (*Reporter, error)

func (*Reporter) DefaultBranchUpdated

func (r *Reporter) DefaultBranchUpdated(ctx context.Context, payload *DefaultBranchUpdatedPayload)

func (*Reporter) Deleted

func (r *Reporter) Deleted(ctx context.Context, payload *DeletedPayload)

Jump to

Keyboard shortcuts

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