Documentation ¶
Index ¶
- Constants
- Variables
- func ProposeChanges[A Resource](opts ProposalOption) containers.Option[Phase[A]]
- type Branched
- type Phase
- func (p *Phase[R]) Branches() []string
- func (p *Phase[A]) Descriptor() core.Descriptor
- func (p *Phase[R]) Get(ctx context.Context) (core.Resource, error)
- func (p *Phase[R]) GetResource(ctx context.Context) (R, error)
- func (p *Phase[R]) History(ctx context.Context) ([]core.State, error)
- func (p *Phase[R]) Notify(ctx context.Context, refs map[string]string) error
- func (p *Phase[R]) Update(ctx context.Context, to R) (map[string]string, error)
- type Proposal
- type ProposalOption
- type Proposer
- type RefLog
- type Resource
Constants ¶
View Source
const ( AnnotationGitBaseRefKey = "dev.getglu.git.base_ref" AnnotationGitHeadSHAKey = "dev.getglu.git.head_sha" AnnotationProposalNumberKey = "dev.getglu.git.proposal.number" AnnotationProposalURLKey = "dev.getglu.git.proposal.url" )
Variables ¶
View Source
var ( // ErrProposalNotFound is returned when a proposal cannot be located ErrProposalNotFound = errors.New("proposal not found") )
Functions ¶
func ProposeChanges ¶
func ProposeChanges[A Resource](opts ProposalOption) containers.Option[Phase[A]]
ProposeChanges configures the phase to propose the change (via PR or MR) as opposed to directly integrating it into the target trunk branch.
Types ¶
type Branched ¶
type Branched interface {
Branch(phase core.Descriptor) string
}
type Phase ¶
type Phase[R Resource] struct { // contains filtered or unexported fields }
func (*Phase[A]) Descriptor ¶
func (p *Phase[A]) Descriptor() core.Descriptor
type Proposal ¶
type Proposal struct { BaseRevision string BaseBranch string Branch string HeadRevision string Digest string Title string Body string Annotations map[string]string }
Proposal contains the fields necessary to propose a resource update to a Repository.
type ProposalOption ¶
type ProposalOption struct {
Labels []string
}
type Resource ¶
type Resource interface { core.Resource ReadFrom(context.Context, core.Descriptor, fs.Filesystem) error WriteTo(context.Context, core.Descriptor, fs.Filesystem) error }
Click to show internal directories.
Click to hide internal directories.