Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event string
Event defines the trigger of the hook, such as post-clone, post-fork, or post-create
type Hook ¶
type Hook interface {
ID() string
UUID() uuid.UUID
Name() string
RepoPattern() string
TriggerEvent() Event
OperationType() OperationType
OperationID() string
OperationUUID() uuid.UUID
Match(ref repository.Reference, event Event) (bool, error)
}
type HookService ¶
type HookService interface {
store.Content
List() iter.Seq2[Hook, error]
ListFor(reference repository.Reference, event Event) iter.Seq2[Hook, error]
Add(ctx context.Context, entry Entry) (id string, _ error)
Get(ctx context.Context, idlike string) (Hook, error)
Update(ctx context.Context, idlike string, entry Entry) error
Remove(ctx context.Context, idlike string) error
Load(iter.Seq2[Hook, error]) error
}
HookService defines the hook management interface
func NewHookService ¶
func NewHookService() HookService
NewHookService creates a new HookService with the given content store.
type OperationType ¶
type OperationType string
OperationType defines the type of operation that the hook performs
const ( OperationTypeOverlay OperationType = "overlay" OperationTypeScript OperationType = "script" )
Click to show internal directories.
Click to hide internal directories.