fake

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forge

type Forge struct {
	User string

	Calls []string
	// contains filtered or unexported fields
}

func New

func New(user string) *Forge

func (*Forge) AddChange

func (f *Forge) AddChange(repoName string, ch forge.Change, files ...forge.File) forge.Change

func (*Forge) AddComment

func (f *Forge) AddComment(repoName string, n int, author, body string) forge.Comment

func (*Forge) As

func (f *Forge) As(user string) *Identity

func (*Forge) AutoMerge

func (f *Forge) AutoMerge(_ context.Context, name string, n int) error

func (*Forge) AutoMergeOn

func (f *Forge) AutoMergeOn(name string, n int) bool

func (*Forge) BeforePush

func (f *Forge) BeforePush(fn func())

func (*Forge) Change

func (f *Forge) Change(repoName string, n int) forge.Change

func (*Forge) ChangeByHead

func (f *Forge) ChangeByHead(_ context.Context, name, head string) (forge.Change, bool, error)

func (*Forge) ChangeFiles

func (f *Forge) ChangeFiles(_ context.Context, name string, n int) ([]forge.File, error)

func (*Forge) ChangedPaths

func (f *Forge) ChangedPaths(_ context.Context, name, base, head string) ([]string, error)

func (*Forge) Changes

func (f *Forge) Changes(repoName string) []forge.Change

func (*Forge) ChangesForCommit

func (f *Forge) ChangesForCommit(_ context.Context, name, sha string) ([]forge.Change, error)

func (*Forge) Checks

func (f *Forge) Checks(_ context.Context, name, sha string) ([]forge.Check, error)

func (*Forge) CloseChange

func (f *Forge) CloseChange(_ context.Context, name string, n int, deleteBranch bool) error

func (*Forge) Comments

func (f *Forge) Comments(_ context.Context, name string, n int) ([]forge.Comment, error)

func (*Forge) CommentsOf

func (f *Forge) CommentsOf(repoName string, n int) []forge.Comment

func (*Forge) Commit

func (f *Forge) Commit(repoName, branch string, files map[string][]byte) string

func (*Forge) CreateComment

func (f *Forge) CreateComment(_ context.Context, name string, n int, body string) (forge.Comment, error)

func (*Forge) CreateDeployment

func (f *Forge) CreateDeployment(_ context.Context, name, environment, sha string, payload []byte) (forge.Deployment, error)

func (*Forge) CreateTag

func (f *Forge) CreateTag(_ context.Context, name, tag, sha string) error

func (*Forge) DefaultBranch

func (f *Forge) DefaultBranch(_ context.Context, name string) (string, error)

func (*Forge) Deployed

func (f *Forge) Deployed(name, environment string) []forge.Deployment

func (*Forge) DeploymentLog

func (f *Forge) DeploymentLog(name string, id int64) string

func (*Forge) FailNext

func (f *Forge) FailNext(method string, err error)

func (*Forge) FileAt

func (f *Forge) FileAt(_ context.Context, name, path, ref string) ([]byte, error)

func (*Forge) GetChange

func (f *Forge) GetChange(_ context.Context, name string, n int) (forge.Change, error)

func (*Forge) LinkCommit

func (f *Forge) LinkCommit(repoName, sha string, n int)

func (*Forge) ListDeployments

func (f *Forge) ListDeployments(_ context.Context, name, environment string) iter.Seq2[forge.Deployment, error]

func (*Forge) Merge

func (f *Forge) Merge(name string, n int, by string, at time.Time) string

func (*Forge) OpenChanges

func (f *Forge) OpenChanges(_ context.Context, name, headPrefix string) ([]forge.Change, error)

func (*Forge) PushChange

func (f *Forge) PushChange(_ context.Context, name string, req forge.ChangeRequest) (forge.Change, error)

func (*Forge) RepoSettings

func (f *Forge) RepoSettings(_ context.Context, name string) (forge.RepoSettings, error)

func (*Forge) ResolveRef

func (f *Forge) ResolveRef(_ context.Context, name, ref string) (string, error)

func (*Forge) SetChecks

func (f *Forge) SetChecks(repoName, sha string, checks ...forge.Check)

func (*Forge) SetDeploymentState

func (f *Forge) SetDeploymentState(_ context.Context, name string, id int64, state forge.DeployState, logURL string) error

func (*Forge) SetSettings

func (f *Forge) SetSettings(name string, s forge.RepoSettings)

func (*Forge) Subtrees

func (f *Forge) Subtrees(_ context.Context, name, dir, ref string) (map[string]string, error)

func (*Forge) Tag

func (f *Forge) Tag(repoName, tag, sha string)

func (*Forge) Tags

func (f *Forge) Tags(repoName string) map[string]string

func (*Forge) UpdateComment

func (f *Forge) UpdateComment(_ context.Context, name string, id int64, body string) error

func (*Forge) Viewer

func (f *Forge) Viewer(context.Context) (string, error)

type Identity

type Identity struct {
	*Forge
	// contains filtered or unexported fields
}

func (*Identity) CreateComment

func (i *Identity) CreateComment(_ context.Context, name string, n int, body string) (forge.Comment, error)

func (*Identity) PushChange

func (i *Identity) PushChange(_ context.Context, name string, req forge.ChangeRequest) (forge.Change, error)

func (*Identity) Viewer

func (i *Identity) Viewer(context.Context) (string, error)

Jump to

Keyboard shortcuts

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