events

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BranchCreatedEvent events.EventType = "branch-created"
View Source
const BranchDeletedEvent events.EventType = "branch-deleted"
View Source
const BranchUpdatedEvent events.EventType = "branch-updated"
View Source
const TagCreatedEvent events.EventType = "tag-created"
View Source
const TagDeletedEvent events.EventType = "tag-deleted"
View Source
const TagUpdatedEvent events.EventType = "tag-updated"

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 BranchCreatedPayload

type BranchCreatedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	Ref         string `json:"ref"`
	SHA         string `json:"sha"`
}

type BranchDeletedPayload

type BranchDeletedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	Ref         string `json:"ref"`
	SHA         string `json:"sha"`
}

type BranchUpdatedPayload

type BranchUpdatedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	Ref         string `json:"ref"`
	OldSHA      string `json:"old_sha"`
	NewSHA      string `json:"new_sha"`
	Forced      bool   `json:"forced"`
}

type Reader

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

Reader is the event reader for this package. It exposes typesafe event registration methods for all events by this package. NOTE: Event registration methods are in the event's dedicated file.

func (*Reader) Configure

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

func (*Reader) RegisterBranchCreated

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

func (*Reader) RegisterBranchDeleted

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

func (*Reader) RegisterBranchUpdated

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

func (*Reader) RegisterTagCreated

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

func (*Reader) RegisterTagDeleted

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

func (*Reader) RegisterTagUpdated

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

type Reporter

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

Reporter is the event reporter for this package. It exposes typesafe send methods for all events of this package. NOTE: Event send methods are in the event's dedicated file.

func NewReporter

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

func ProvideReporter

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

func (*Reporter) BranchCreated

func (r *Reporter) BranchCreated(ctx context.Context, payload *BranchCreatedPayload)

func (*Reporter) BranchDeleted

func (r *Reporter) BranchDeleted(ctx context.Context, payload *BranchDeletedPayload)

func (*Reporter) BranchUpdated

func (r *Reporter) BranchUpdated(ctx context.Context, payload *BranchUpdatedPayload)

func (*Reporter) TagCreated

func (r *Reporter) TagCreated(ctx context.Context, payload *TagCreatedPayload)

func (*Reporter) TagDeleted

func (r *Reporter) TagDeleted(ctx context.Context, payload *TagDeletedPayload)

func (*Reporter) TagUpdated

func (r *Reporter) TagUpdated(ctx context.Context, payload *TagUpdatedPayload)

type TagCreatedPayload

type TagCreatedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	Ref         string `json:"ref"`
	SHA         string `json:"sha"`
}

type TagDeletedPayload

type TagDeletedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	Ref         string `json:"ref"`
	SHA         string `json:"sha"`
}

type TagUpdatedPayload

type TagUpdatedPayload struct {
	RepoID      int64  `json:"repo_id"`
	PrincipalID int64  `json:"principal_id"`
	Ref         string `json:"ref"`
	OldSHA      string `json:"old_sha"`
	NewSHA      string `json:"new_sha"`
	Forced      bool   `json:"forced"`
}

Jump to

Keyboard shortcuts

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