Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EventType ¶
type EventType string
EventType represents a VCS event the system can subscribe to.
type GitRepository ¶
type GitRepository struct {
Provider Provider
Repository RepositoryID
Webhooks []WebhookSpec
}
GitRepository is the domain model representing a registered source repository.
func (GitRepository) Validate ¶
func (g GitRepository) Validate() error
Validate enforces domain invariants.
type Provider ¶
type Provider string
Provider identifies a supported VCS provider.
const (
ProviderGitHub Provider = "github"
)
type RepositoryID ¶
RepositoryID is the external identity of a repository.
func (RepositoryID) IsValid ¶
func (r RepositoryID) IsValid() bool
IsValid validates the repository identity.
type State ¶
type State string
State represents the lifecycle state of a GitRepository registration.
const ( // StatePending means the repository has been declared // but has not yet been realized. StatePending State = "Pending" // StateReady means the repository and all required webhooks // are realized and match desired intent. StateReady State = "Ready" // StateError means realization failed and requires attention. StateError State = "Error" )
func (State) IsTerminal ¶
IsTerminal indicates whether the state is terminal.
type WebhookSpec ¶
type WebhookSpec struct {
Events []EventType
}
WebhookSpec declares which events the repository should emit.
func (WebhookSpec) IsValid ¶
func (w WebhookSpec) IsValid() bool
IsValid validates the webhook specification.
Click to show internal directories.
Click to hide internal directories.