Help us shape the future of Go! Take the 2026 Go Developer Survey

fake

package
v0.24.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate404Response

func Generate404Response() *github.ErrorResponse

func GenerateEmptyResponse

func GenerateEmptyResponse() *github.Response

Types

type MockActionsClient

type MockActionsClient struct {
	MockListEnabledReposInOrg           func(ctx context.Context, owner string, opts *github.ListOptions) (*github.ActionsEnabledOnOrgRepos, *github.Response, error)
	MockSetEnabledReposInOrg            func(ctx context.Context, owner string, repositoryIDs []int64) (*github.Response, error)
	MockGetOrgSecret                    func(ctx context.Context, org, name string) (*github.Secret, *github.Response, error)
	MockListSelectedReposForOrgSecret   func(ctx context.Context, org, name string, opts *github.ListOptions) (*github.SelectedReposList, *github.Response, error)
	MockSetSelectedReposForOrgSecret    func(ctx context.Context, org, name string, ids []int64) (*github.Response, error)
	MockGetOrgVariable                  func(ctx context.Context, org, name string) (*github.ActionsVariable, *github.Response, error)
	MockCreateOrgVariable               func(ctx context.Context, org string, variable github.ActionsCreateOrgVariableRequest) (*github.Response, error)
	MockUpdateOrgVariable               func(ctx context.Context, org, name string, variable github.ActionsUpdateOrgVariableRequest) (*github.Response, error)
	MockDeleteOrgVariable               func(ctx context.Context, org, name string) (*github.Response, error)
	MockListSelectedReposForOrgVariable func(ctx context.Context, org, name string, opts *github.ListOptions) (*github.SelectedReposList, *github.Response, error)
	MockListOrganizationRunnerGroups    func(ctx context.Context, org string, opts *github.ListOrgRunnerGroupOptions) (*github.RunnerGroups, *github.Response, error)
	MockCreateOrganizationRunnerGroup   func(ctx context.Context, org string, createReq github.CreateRunnerGroupRequest) (*github.RunnerGroup, *github.Response, error)
	MockUpdateOrganizationRunnerGroup   func(ctx context.Context, org string, groupID int64, updateReq github.UpdateRunnerGroupRequest) (*github.RunnerGroup, *github.Response, error)
	MockDeleteOrganizationRunnerGroup   func(ctx context.Context, org string, groupID int64) (*github.Response, error)
	MockListRepositoryAccessRunnerGroup func(ctx context.Context, org string, groupID int64, opts *github.ListOptions) (*github.ListRepositories, *github.Response, error)
	MockSetRepositoryAccessRunnerGroup  func(ctx context.Context, org string, groupID int64, ids github.SetRepoAccessRunnerGroupRequest) (*github.Response, error)
}

func (*MockActionsClient) CreateOrgVariable

func (m *MockActionsClient) CreateOrgVariable(ctx context.Context, org string, variable github.ActionsCreateOrgVariableRequest) (*github.Response, error)

func (*MockActionsClient) CreateOrganizationRunnerGroup

func (m *MockActionsClient) CreateOrganizationRunnerGroup(ctx context.Context, org string, createReq github.CreateRunnerGroupRequest) (*github.RunnerGroup, *github.Response, error)

func (*MockActionsClient) DeleteOrgVariable

func (m *MockActionsClient) DeleteOrgVariable(ctx context.Context, org, name string) (*github.Response, error)

func (*MockActionsClient) DeleteOrganizationRunnerGroup

func (m *MockActionsClient) DeleteOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*github.Response, error)

func (*MockActionsClient) GetOrgSecret

func (m *MockActionsClient) GetOrgSecret(ctx context.Context, org, name string) (*github.Secret, *github.Response, error)

func (*MockActionsClient) GetOrgVariable

func (m *MockActionsClient) GetOrgVariable(ctx context.Context, org, name string) (*github.ActionsVariable, *github.Response, error)

func (*MockActionsClient) ListEnabledReposInOrg

func (m *MockActionsClient) ListEnabledReposInOrg(ctx context.Context, owner string, opts *github.ListOptions) (*github.ActionsEnabledOnOrgRepos, *github.Response, error)

func (*MockActionsClient) ListOrganizationRunnerGroups

func (m *MockActionsClient) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *github.ListOrgRunnerGroupOptions) (*github.RunnerGroups, *github.Response, error)

func (*MockActionsClient) ListRepositoryAccessRunnerGroup

func (m *MockActionsClient) ListRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, opts *github.ListOptions) (*github.ListRepositories, *github.Response, error)

func (*MockActionsClient) ListSelectedReposForOrgSecret

func (m *MockActionsClient) ListSelectedReposForOrgSecret(ctx context.Context, org, name string, opts *github.ListOptions) (*github.SelectedReposList, *github.Response, error)

func (*MockActionsClient) ListSelectedReposForOrgVariable

func (m *MockActionsClient) ListSelectedReposForOrgVariable(ctx context.Context, org, name string, opts *github.ListOptions) (*github.SelectedReposList, *github.Response, error)

func (*MockActionsClient) SetEnabledReposInOrg

func (m *MockActionsClient) SetEnabledReposInOrg(ctx context.Context, owner string, repositoryIDs []int64) (*github.Response, error)

func (*MockActionsClient) SetRepositoryAccessRunnerGroup

func (m *MockActionsClient) SetRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, ids github.SetRepoAccessRunnerGroupRequest) (*github.Response, error)

func (*MockActionsClient) SetSelectedReposForOrgSecret

func (m *MockActionsClient) SetSelectedReposForOrgSecret(ctx context.Context, org, name string, ids []int64) (*github.Response, error)

func (*MockActionsClient) UpdateOrgVariable

func (m *MockActionsClient) UpdateOrgVariable(ctx context.Context, org, name string, variable github.ActionsUpdateOrgVariableRequest) (*github.Response, error)

func (*MockActionsClient) UpdateOrganizationRunnerGroup

func (m *MockActionsClient) UpdateOrganizationRunnerGroup(ctx context.Context, org string, groupID int64, updateReq github.UpdateRunnerGroupRequest) (*github.RunnerGroup, *github.Response, error)

type MockDependabotClient

type MockDependabotClient struct {
	MockGetOrgSecret                  func(ctx context.Context, org, name string) (*github.Secret, *github.Response, error)
	MockListSelectedReposForOrgSecret func(ctx context.Context, org, name string, opts *github.ListOptions) (*github.SelectedReposList, *github.Response, error)
	MockSetSelectedReposForOrgSecret  func(ctx context.Context, org, name string, ids []int64) (*github.Response, error)
}

func (*MockDependabotClient) GetOrgSecret

func (m *MockDependabotClient) GetOrgSecret(ctx context.Context, org, name string) (*github.Secret, *github.Response, error)

func (*MockDependabotClient) ListSelectedReposForOrgSecret

func (m *MockDependabotClient) ListSelectedReposForOrgSecret(ctx context.Context, org, name string, opts *github.ListOptions) (*github.SelectedReposList, *github.Response, error)

func (*MockDependabotClient) SetSelectedReposForOrgSecret

func (m *MockDependabotClient) SetSelectedReposForOrgSecret(ctx context.Context, org, name string, ids []int64) (*github.Response, error)

type MockOrganizationsClient

type MockOrganizationsClient struct {
	MockGet                 func(ctx context.Context, org string) (*github.Organization, *github.Response, error)
	MockEdit                func(ctx context.Context, name string, org *github.Organization) (*github.Organization, *github.Response, error)
	MockGetOrgMembership    func(ctx context.Context, user, org string) (*github.Membership, *github.Response, error)
	MockCreateOrgInvitation func(ctx context.Context, org string, opts *github.CreateOrgInvitationOptions) (*github.Invitation, *github.Response, error)
	MockEditOrgMembership   func(ctx context.Context, user, org string, membership *github.Membership) (*github.Membership, *github.Response, error)
	MockRemoveOrgMembership func(ctx context.Context, user, org string) (*github.Response, error)
	MockListHooks           func(ctx context.Context, org string, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)
	MockGetHook             func(ctx context.Context, org string, id int64) (*github.Hook, *github.Response, error)
	MockCreateHook          func(ctx context.Context, org string, hook *github.Hook) (*github.Hook, *github.Response, error)
	MockEditHook            func(ctx context.Context, org string, id int64, hook *github.Hook) (*github.Hook, *github.Response, error)
	MockDeleteHook          func(ctx context.Context, org string, id int64) (*github.Response, error)
}

func (*MockOrganizationsClient) CreateHook

func (m *MockOrganizationsClient) CreateHook(ctx context.Context, org string, hook *github.Hook) (*github.Hook, *github.Response, error)

func (*MockOrganizationsClient) CreateOrgInvitation

func (*MockOrganizationsClient) DeleteHook

func (m *MockOrganizationsClient) DeleteHook(ctx context.Context, org string, id int64) (*github.Response, error)

func (*MockOrganizationsClient) Edit

func (*MockOrganizationsClient) EditHook

func (m *MockOrganizationsClient) EditHook(ctx context.Context, org string, id int64, hook *github.Hook) (*github.Hook, *github.Response, error)

func (*MockOrganizationsClient) EditOrgMembership

func (m *MockOrganizationsClient) EditOrgMembership(ctx context.Context, user, org string, membership *github.Membership) (*github.Membership, *github.Response, error)

func (*MockOrganizationsClient) Get

func (*MockOrganizationsClient) GetHook

func (*MockOrganizationsClient) GetOrgMembership

func (m *MockOrganizationsClient) GetOrgMembership(ctx context.Context, user, org string) (*github.Membership, *github.Response, error)

func (*MockOrganizationsClient) ListHooks

func (*MockOrganizationsClient) RemoveOrgMembership

func (m *MockOrganizationsClient) RemoveOrgMembership(ctx context.Context, user, org string) (*github.Response, error)

type MockRepositoriesClient

type MockRepositoriesClient struct {
	MockGet                                 func(ctx context.Context, owner, repo string) (*github.Repository, *github.Response, error)
	MockEdit                                func(ctx context.Context, owner, repo string, repository *github.Repository) (*github.Repository, *github.Response, error)
	MockListTeams                           func(ctx context.Context, owner string, repo string, opts *github.ListOptions) ([]*github.Team, *github.Response, error)
	MockListCollaborators                   func(ctx context.Context, owner, repo string, opts *github.ListCollaboratorsOptions) ([]*github.User, *github.Response, error)
	MockListInvitations                     func(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryInvitation, *github.Response, error)
	MockCreate                              func(ctx context.Context, org string, repo *github.Repository) (*github.Repository, *github.Response, error)
	MockCreateFromTemplate                  func(ctx context.Context, templateOwner, templateRepo string, templateRepoReq github.TemplateRepoRequest) (*github.Repository, *github.Response, error)
	MockCreateFork                          func(ctx context.Context, owner, repo string, opts *github.RepositoryCreateForkOptions) (*github.Repository, *github.Response, error)
	MockAddCollaborator                     func(ctx context.Context, owner, repo, user string, opts *github.RepositoryAddCollaboratorOptions) (*github.CollaboratorInvitation, *github.Response, error)
	MockRemoveCollaborator                  func(ctx context.Context, owner, repo, user string) (*github.Response, error)
	MockGetPermissionLevel                  func(ctx context.Context, owner, repo, user string) (*github.RepositoryPermissionLevel, *github.Response, error)
	MockDelete                              func(ctx context.Context, owner, repo string) (*github.Response, error)
	MockCreateHook                          func(ctx context.Context, owner, repo string, hook *github.Hook) (*github.Hook, *github.Response, error)
	MockEditHook                            func(ctx context.Context, owner, repo string, id int64, hook *github.Hook) (*github.Hook, *github.Response, error)
	MockDeleteHook                          func(ctx context.Context, owner, repo string, id int64) (*github.Response, error)
	MockListHooks                           func(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)
	MockListBranches                        func(ctx context.Context, owner, repo string, opts *github.BranchListOptions) ([]*github.Branch, *github.Response, error)
	MockGetBranch                           func(ctx context.Context, owner, repo, branch string, maxRedirects int) (*github.Branch, *github.Response, error)
	MockGetBranchProtection                 func(ctx context.Context, owner, repo, branch string) (*github.Protection, *github.Response, error)
	MockUpdateBranchProtection              func(ctx context.Context, owner, repo, branch string, preq *github.ProtectionRequest) (*github.Protection, *github.Response, error)
	MockRemoveBranchProtection              func(ctx context.Context, owner, repo, branch string) (*github.Response, error)
	MockRequireSignaturesOnProtectedBranch  func(ctx context.Context, owner, repo, branch string) (*github.SignaturesProtectedBranch, *github.Response, error)
	MockOptionalSignaturesOnProtectedBranch func(ctx context.Context, owner, repo, branch string) (*github.Response, error)
	MockReplaceAllTopics                    func(ctx context.Context, owner, repo string, topics []string) ([]string, *github.Response, error)
}

func (*MockRepositoriesClient) AddCollaborator

func (*MockRepositoriesClient) Create

func (*MockRepositoriesClient) CreateFork

func (*MockRepositoriesClient) CreateFromTemplate

func (m *MockRepositoriesClient) CreateFromTemplate(ctx context.Context, templateOwner, templateRepo string, templateRepoReq github.TemplateRepoRequest) (*github.Repository, *github.Response, error)

func (*MockRepositoriesClient) CreateHook

func (m *MockRepositoriesClient) CreateHook(ctx context.Context, owner, repo string, hook *github.Hook) (*github.Hook, *github.Response, error)

func (*MockRepositoriesClient) Delete

func (m *MockRepositoriesClient) Delete(ctx context.Context, owner, repo string) (*github.Response, error)

func (*MockRepositoriesClient) DeleteHook

func (m *MockRepositoriesClient) DeleteHook(ctx context.Context, owner, repo string, id int64) (*github.Response, error)

func (*MockRepositoriesClient) Edit

func (m *MockRepositoriesClient) Edit(ctx context.Context, owner, repo string, repository *github.Repository) (*github.Repository, *github.Response, error)

func (*MockRepositoriesClient) EditHook

func (m *MockRepositoriesClient) EditHook(ctx context.Context, owner, repo string, id int64, hook *github.Hook) (*github.Hook, *github.Response, error)

func (*MockRepositoriesClient) Get

func (*MockRepositoriesClient) GetBranch

func (m *MockRepositoriesClient) GetBranch(ctx context.Context, owner, repo, branch string, maxRedirects int) (*github.Branch, *github.Response, error)

func (*MockRepositoriesClient) GetBranchProtection

func (m *MockRepositoriesClient) GetBranchProtection(ctx context.Context, owner, repo, branch string) (*github.Protection, *github.Response, error)

func (*MockRepositoriesClient) GetPermissionLevel

func (m *MockRepositoriesClient) GetPermissionLevel(ctx context.Context, owner, repo, user string) (*github.RepositoryPermissionLevel, *github.Response, error)

func (*MockRepositoriesClient) ListBranches

func (m *MockRepositoriesClient) ListBranches(ctx context.Context, owner, repo string, opts *github.BranchListOptions) ([]*github.Branch, *github.Response, error)

func (*MockRepositoriesClient) ListCollaborators

func (m *MockRepositoriesClient) ListCollaborators(ctx context.Context, owner, repo string, opts *github.ListCollaboratorsOptions) ([]*github.User, *github.Response, error)

func (*MockRepositoriesClient) ListHooks

func (m *MockRepositoriesClient) ListHooks(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)

func (*MockRepositoriesClient) ListInvitations

func (m *MockRepositoriesClient) ListInvitations(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryInvitation, *github.Response, error)

func (*MockRepositoriesClient) ListTeams

func (m *MockRepositoriesClient) ListTeams(ctx context.Context, owner string, repo string, opts *github.ListOptions) ([]*github.Team, *github.Response, error)

func (*MockRepositoriesClient) OptionalSignaturesOnProtectedBranch

func (m *MockRepositoriesClient) OptionalSignaturesOnProtectedBranch(ctx context.Context, owner, repo, branch string) (*github.Response, error)

func (*MockRepositoriesClient) RemoveBranchProtection

func (m *MockRepositoriesClient) RemoveBranchProtection(ctx context.Context, owner, repo, branch string) (*github.Response, error)

func (*MockRepositoriesClient) RemoveCollaborator

func (m *MockRepositoriesClient) RemoveCollaborator(ctx context.Context, owner, repo, user string) (*github.Response, error)

func (*MockRepositoriesClient) ReplaceAllTopics

func (m *MockRepositoriesClient) ReplaceAllTopics(ctx context.Context, owner, repo string, topics []string) ([]string, *github.Response, error)

func (*MockRepositoriesClient) RequireSignaturesOnProtectedBranch

func (m *MockRepositoriesClient) RequireSignaturesOnProtectedBranch(ctx context.Context, owner, repo, branch string) (*github.SignaturesProtectedBranch, *github.Response, error)

func (*MockRepositoriesClient) UpdateBranchProtection

func (m *MockRepositoriesClient) UpdateBranchProtection(ctx context.Context, owner, repo, branch string, preq *github.ProtectionRequest) (*github.Protection, *github.Response, error)

type MockRulesetsClient

type MockRulesetsClient struct {
	MockGetAllRulesets func(ctx context.Context, owner, repo string, opts *github.RepositoryListRulesetsOptions) ([]*rulesets.Ruleset, *github.Response, error)
	MockGetRuleset     func(ctx context.Context, owner, repo string, rulesetID int64, includesParents bool) (*rulesets.Ruleset, *github.Response, error)
	MockCreateRuleset  func(ctx context.Context, owner, repo string, ruleset rulesets.Ruleset) (*rulesets.Ruleset, *github.Response, error)
	MockUpdateRuleset  func(ctx context.Context, owner, repo string, rulesetID int64, ruleset rulesets.Ruleset) (*rulesets.Ruleset, *github.Response, error)
	MockDeleteRuleset  func(ctx context.Context, owner, repo string, rulesetID int64) (*github.Response, error)
}

func (*MockRulesetsClient) CreateRuleset

func (m *MockRulesetsClient) CreateRuleset(ctx context.Context, owner, repo string, ruleset rulesets.Ruleset) (*rulesets.Ruleset, *github.Response, error)

func (*MockRulesetsClient) DeleteRuleset

func (m *MockRulesetsClient) DeleteRuleset(ctx context.Context, owner, repo string, rulesetID int64) (*github.Response, error)

func (*MockRulesetsClient) GetAllRulesets

func (*MockRulesetsClient) GetRuleset

func (m *MockRulesetsClient) GetRuleset(ctx context.Context, owner, repo string, rulesetID int64, includesParents bool) (*rulesets.Ruleset, *github.Response, error)

func (*MockRulesetsClient) UpdateRuleset

func (m *MockRulesetsClient) UpdateRuleset(ctx context.Context, owner, repo string, rulesetID int64, ruleset rulesets.Ruleset) (*rulesets.Ruleset, *github.Response, error)

type MockTeamsClient

type MockTeamsClient struct {
	MockGetTeamBySlug                    func(ctx context.Context, org, slug string) (*github.Team, *github.Response, error)
	MockListTeamMembersBySlug            func(ctx context.Context, org, slug string, opts *github.TeamListTeamMembersOptions) ([]*github.User, *github.Response, error)
	MockCreateTeam                       func(ctx context.Context, org string, team github.NewTeam) (*github.Team, *github.Response, error)
	MockAddTeamMembershipBySlug          func(ctx context.Context, org, slug, user string, opts *github.TeamAddTeamMembershipOptions) (*github.Membership, *github.Response, error)
	MockRemoveTeamMembershipBySlug       func(ctx context.Context, org, slug, user string) (*github.Response, error)
	MockEditTeamBySlug                   func(ctx context.Context, org, slug string, team github.NewTeam, removeParent bool) (*github.Team, *github.Response, error)
	MockDeleteTeamBySlug                 func(ctx context.Context, org, slug string) (*github.Response, error)
	MockAddTeamRepoBySlug                func(ctx context.Context, org, slug, owner, repo string, opts *github.TeamAddTeamRepoOptions) (*github.Response, error)
	MockRemoveTeamRepoBySlug             func(ctx context.Context, org, slug, owner, repo string) (*github.Response, error)
	MockIsTeamRepoBySlug                 func(ctx context.Context, org, slug, owner, repo string) (*github.Repository, *github.Response, error)
	MockListPendingTeamInvitationsBySlug func(ctx context.Context, org, slug string, opts *github.ListOptions) ([]*github.Invitation, *github.Response, error)
	MockListChildTeamsByParentSlug       func(ctx context.Context, org, slug string, opts *github.ListOptions) ([]*github.Team, *github.Response, error)
}

func (*MockTeamsClient) AddTeamMembershipBySlug

func (m *MockTeamsClient) AddTeamMembershipBySlug(ctx context.Context, org, slug, user string, opts *github.TeamAddTeamMembershipOptions) (*github.Membership, *github.Response, error)

func (*MockTeamsClient) AddTeamRepoBySlug

func (m *MockTeamsClient) AddTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string, opts *github.TeamAddTeamRepoOptions) (*github.Response, error)

func (*MockTeamsClient) CreateTeam

func (m *MockTeamsClient) CreateTeam(ctx context.Context, org string, team github.NewTeam) (*github.Team, *github.Response, error)

func (*MockTeamsClient) DeleteTeamBySlug

func (m *MockTeamsClient) DeleteTeamBySlug(ctx context.Context, org, slug string) (*github.Response, error)

func (*MockTeamsClient) EditTeamBySlug

func (m *MockTeamsClient) EditTeamBySlug(ctx context.Context, org, slug string, team github.NewTeam, removeParent bool) (*github.Team, *github.Response, error)

func (*MockTeamsClient) GetTeamBySlug

func (m *MockTeamsClient) GetTeamBySlug(ctx context.Context, org, slug string) (*github.Team, *github.Response, error)

func (*MockTeamsClient) IsTeamRepoBySlug

func (m *MockTeamsClient) IsTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string) (*github.Repository, *github.Response, error)

func (*MockTeamsClient) ListChildTeamsByParentSlug

func (m *MockTeamsClient) ListChildTeamsByParentSlug(ctx context.Context, org, slug string, opts *github.ListOptions) ([]*github.Team, *github.Response, error)

func (*MockTeamsClient) ListPendingTeamInvitationsBySlug

func (m *MockTeamsClient) ListPendingTeamInvitationsBySlug(ctx context.Context, org, slug string, opts *github.ListOptions) ([]*github.Invitation, *github.Response, error)

func (*MockTeamsClient) ListTeamMembersBySlug

func (m *MockTeamsClient) ListTeamMembersBySlug(ctx context.Context, org, slug string, opts *github.TeamListTeamMembersOptions) ([]*github.User, *github.Response, error)

func (*MockTeamsClient) RemoveTeamMembershipBySlug

func (m *MockTeamsClient) RemoveTeamMembershipBySlug(ctx context.Context, org, slug, user string) (*github.Response, error)

func (*MockTeamsClient) RemoveTeamRepoBySlug

func (m *MockTeamsClient) RemoveTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string) (*github.Response, error)

type MockUsersClient

type MockUsersClient struct {
	MockGet func(ctx context.Context, user string) (*github.User, *github.Response, error)
}

func (*MockUsersClient) Get

Jump to

Keyboard shortcuts

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