Documentation
¶
Index ¶
- Variables
- func GetRepo(ctx context.Context, repoStore store.RepoStore, repoRef string, ...) (*types.Repository, error)
- func GetRepoCheckAccess(ctx context.Context, repoStore store.RepoStore, authorizer authz.Authorizer, ...) (*types.Repository, error)
- type Branch
- type Check
- type CommitDivergence
- type CommitDivergenceRequest
- type CommitFileAction
- type CommitFilesOptions
- type CommitTag
- type CompareInfo
- type Content
- type ContentInfo
- type ContentType
- type Controller
- func (c *Controller) Archive(ctx context.Context, session *auth.Session, repoRef string, ...) error
- func (c *Controller) Blame(ctx context.Context, session *auth.Session, repoRef, gitRef, path string, ...) (types.Stream[*git.BlamePart], error)
- func (c *Controller) CodeOwnersValidate(ctx context.Context, session *auth.Session, repoRef string, ref string) (*types.CodeOwnersValidation, error)
- func (c *Controller) CommitDiff(ctx context.Context, session *auth.Session, repoRef string, rev string, ...) error
- func (c *Controller) CommitFiles(ctx context.Context, session *auth.Session, repoRef string, ...) (types.CommitFilesResponse, []types.RuleViolations, error)
- func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*RepositoryOutput, error)
- func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session, repoRef string, ...) (*Branch, []types.RuleViolations, error)
- func (c *Controller) CreateCommitTag(ctx context.Context, session *auth.Session, repoRef string, ...) (*CommitTag, []types.RuleViolations, error)
- func (c *Controller) DeleteBranch(ctx context.Context, session *auth.Session, repoRef string, branchName string, ...) ([]types.RuleViolations, error)
- func (c *Controller) DeleteGitRepository(ctx context.Context, session *auth.Session, gitUID string) error
- func (c *Controller) DeleteTag(ctx context.Context, session *auth.Session, repoRef, tagName string, ...) ([]types.RuleViolations, error)
- func (c *Controller) Diff(ctx context.Context, session *auth.Session, repoRef string, path string, ...) (types.Stream[*git.FileDiff], error)
- func (c *Controller) DiffStats(ctx context.Context, session *auth.Session, repoRef string, path string) (types.DiffStats, error)
- func (c *Controller) Find(ctx context.Context, session *auth.Session, repoRef string) (*RepositoryOutput, error)
- func (c *Controller) GetBranch(ctx context.Context, session *auth.Session, repoRef string, branchName string) (*Branch, error)
- func (c *Controller) GetCommit(ctx context.Context, session *auth.Session, repoRef string, sha string) (*types.Commit, error)
- func (c *Controller) GetCommitDivergences(ctx context.Context, session *auth.Session, repoRef string, ...) ([]CommitDivergence, error)
- func (c *Controller) GetContent(ctx context.Context, session *auth.Session, repoRef string, gitRef string, ...) (*GetContentOutput, error)
- func (c *Controller) GitInfoRefs(ctx context.Context, session *auth.Session, repoRef string, ...) error
- func (c *Controller) GitServicePack(ctx context.Context, session *auth.Session, repoRef string, ...) error
- func (c *Controller) Import(ctx context.Context, session *auth.Session, in *ImportInput) (*RepositoryOutput, error)
- func (c *Controller) ImportProgress(ctx context.Context, session *auth.Session, repoRef string) (job.Progress, error)
- func (c *Controller) ListBranches(ctx context.Context, session *auth.Session, repoRef string, includeCommit bool, ...) ([]Branch, error)
- func (c *Controller) ListCommitTags(ctx context.Context, session *auth.Session, repoRef string, includeCommit bool, ...) ([]CommitTag, error)
- func (c *Controller) ListCommits(ctx context.Context, session *auth.Session, repoRef string, gitRef string, ...) (types.ListCommitResponse, error)
- func (c *Controller) ListPaths(ctx context.Context, session *auth.Session, repoRef string, gitRef string, ...) (ListPathsOutput, error)
- func (c *Controller) ListPipelines(ctx context.Context, session *auth.Session, repoRef string, latest bool, ...) ([]*types.Pipeline, int64, error)
- func (c *Controller) ListServiceAccounts(ctx context.Context, session *auth.Session, repoRef string) ([]*types.ServiceAccount, error)
- func (c *Controller) MergeCheck(ctx context.Context, session *auth.Session, repoRef string, diffPath string) (MergeCheck, error)
- func (c *Controller) Move(ctx context.Context, session *auth.Session, repoRef string, in *MoveInput) (*RepositoryOutput, error)
- func (c *Controller) PathsDetails(ctx context.Context, session *auth.Session, repoRef string, gitRef string, ...) (PathsDetailsOutput, error)
- func (c *Controller) PipelineGenerate(ctx context.Context, session *auth.Session, repoRef string) ([]byte, error)
- func (c *Controller) Purge(ctx context.Context, session *auth.Session, repoRef string, deletedAt int64) error
- func (c *Controller) PurgeNoAuth(ctx context.Context, session *auth.Session, repo *types.Repository) error
- func (c *Controller) Raw(ctx context.Context, session *auth.Session, repoRef string, gitRef string, ...) (io.ReadCloser, int64, sha.SHA, error)
- func (c *Controller) RawDiff(ctx context.Context, w io.Writer, session *auth.Session, repoRef string, ...) error
- func (c *Controller) Restore(ctx context.Context, session *auth.Session, repoRef string, deletedAt int64, ...) (*RepositoryOutput, error)
- func (c *Controller) RestoreNoAuth(ctx context.Context, repo *types.Repository, newIdentifier *string, ...) (*RepositoryOutput, error)
- func (c *Controller) RuleCreate(ctx context.Context, session *auth.Session, repoRef string, ...) (*types.Rule, error)
- func (c *Controller) RuleDelete(ctx context.Context, session *auth.Session, repoRef string, identifier string) error
- func (c *Controller) RuleFind(ctx context.Context, session *auth.Session, repoRef string, identifier string) (*types.Rule, error)
- func (c *Controller) RuleList(ctx context.Context, session *auth.Session, repoRef string, ...) ([]types.Rule, int64, error)
- func (c *Controller) RuleUpdate(ctx context.Context, session *auth.Session, repoRef string, identifier string, ...) (*types.Rule, error)
- func (c *Controller) SoftDelete(ctx context.Context, session *auth.Session, repoRef string) (*SoftDeleteResponse, error)
- func (c *Controller) SoftDeleteNoAuth(ctx context.Context, session *auth.Session, repo *types.Repository, ...) error
- func (c *Controller) Summary(ctx context.Context, session *auth.Session, repoRef string) (*types.RepositorySummary, error)
- func (c *Controller) Update(ctx context.Context, session *auth.Session, repoRef string, in *UpdateInput) (*RepositoryOutput, error)
- func (c *Controller) UpdateDefaultBranch(ctx context.Context, session *auth.Session, repoRef string, ...) (*RepositoryOutput, error)
- func (c *Controller) UpdatePublicAccess(ctx context.Context, session *auth.Session, repoRef string, ...) (*RepositoryOutput, error)
- type CreateBranchInput
- type CreateCommitTagInput
- type CreateInput
- type DirContent
- type FileContent
- type GetCommitDivergencesInput
- type GetContentOutput
- type ImportInput
- type ListPathsOutput
- type MergeCheck
- type MoveInput
- type NoOpRepoChecks
- type PathsDetailsInput
- type PathsDetailsOutput
- type RepositoryOutput
- type RestoreInput
- type RuleCreateInput
- type RuleUpdateInput
- type SoftDeleteResponse
- type SubmoduleContent
- type SymlinkContent
- type UpdateDefaultBranchInput
- type UpdateInput
- type UpdatePublicAccessInput
Constants ¶
This section is empty.
Variables ¶
var ActiveRepoStates = []enum.RepoState{enum.RepoStateActive}
var WireSet = wire.NewSet( ProvideController, )
WireSet provides a wire set for this package.
Functions ¶
func GetRepo ¶
func GetRepo( ctx context.Context, repoStore store.RepoStore, repoRef string, allowedStates []enum.RepoState, ) (*types.Repository, error)
GetRepo fetches an repository.
func GetRepoCheckAccess ¶
func GetRepoCheckAccess( ctx context.Context, repoStore store.RepoStore, authorizer authz.Authorizer, session *auth.Session, repoRef string, reqPermission enum.Permission, allowedStates []enum.RepoState, ) (*types.Repository, error)
GetRepoCheckAccess fetches an active repo (not one that is currently being imported) and checks if the current user has permission to access it.
Types ¶
type Check ¶
type Check interface { // Create allows adding extra check during create repo operations Create(ctx context.Context, session *auth.Session, in *CreateInput) error }
Check defines the interface for adding extra checks during repository operations.
func ProvideRepoCheck ¶
func ProvideRepoCheck() Check
type CommitDivergence ¶
type CommitDivergence struct { // Ahead is the count of commits the 'From' ref is ahead of the 'To' ref. Ahead int32 `json:"ahead"` // Behind is the count of commits the 'From' ref is behind the 'To' ref. Behind int32 `json:"behind"` }
CommitDivergence contains the information of the count of converging commits between two refs.
type CommitDivergenceRequest ¶
type CommitDivergenceRequest struct { // From is the ref from which the counting of the diverging commits starts. From string `json:"from"` // To is the ref at which the counting of the diverging commits ends. // If the value is empty the divergence is calculated to the default branch of the repo. To string `json:"to"` }
CommitDivergenceRequest contains the refs for which the converging commits should be counted.
type CommitFileAction ¶
type CommitFileAction struct { Action git.FileAction `json:"action"` Path string `json:"path"` Payload string `json:"payload"` Encoding enum.ContentEncodingType `json:"encoding"` // SHA can be used for optimistic locking of an update action (Optional). // The provided value is compared against the latest sha of the file that's being updated. // If the SHA doesn't match, the update fails. // WARNING: If no SHA is provided, the update action will blindly overwrite the file's content. SHA sha.SHA `json:"sha"` }
CommitFileAction holds file operation data.
type CommitFilesOptions ¶
type CommitFilesOptions struct { Title string `json:"title"` Message string `json:"message"` Branch string `json:"branch"` NewBranch string `json:"new_branch"` Actions []CommitFileAction `json:"actions"` DryRunRules bool `json:"dry_run_rules"` BypassRules bool `json:"bypass_rules"` }
CommitFilesOptions holds the data for file operations.
type CompareInfo ¶
type Content ¶
type Content interface {
// contains filtered or unexported methods
}
Content restricts the possible types of content returned by the api.
type ContentInfo ¶
type ContentType ¶
type ContentType string
const ( ContentTypeFile ContentType = "file" ContentTypeDir ContentType = "dir" ContentTypeSymlink ContentType = "symlink" ContentTypeSubmodule ContentType = "submodule" )
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( config *types.Config, tx dbtx.Transactor, urlProvider url.Provider, authorizer authz.Authorizer, repoStore store.RepoStore, spaceStore store.SpaceStore, pipelineStore store.PipelineStore, principalStore store.PrincipalStore, ruleStore store.RuleStore, settings *settings.Service, principalInfoCache store.PrincipalInfoCache, protectionManager *protection.Manager, git git.Interface, importer *importer.Repository, codeOwners *codeowners.Service, eventReporter *repoevents.Reporter, indexer keywordsearch.Indexer, limiter limiter.ResourceLimiter, locker *locker.Locker, auditService audit.Service, mtxManager lock.MutexManager, identifierCheck check.RepoIdentifier, repoCheck Check, publicAccess publicaccess.Service, ) *Controller
func ProvideController ¶
func ProvideController( config *types.Config, tx dbtx.Transactor, urlProvider url.Provider, authorizer authz.Authorizer, repoStore store.RepoStore, spaceStore store.SpaceStore, pipelineStore store.PipelineStore, principalStore store.PrincipalStore, ruleStore store.RuleStore, settings *settings.Service, principalInfoCache store.PrincipalInfoCache, protectionManager *protection.Manager, rpcClient git.Interface, importer *importer.Repository, codeOwners *codeowners.Service, reporeporter *repoevents.Reporter, indexer keywordsearch.Indexer, limiter limiter.ResourceLimiter, locker *locker.Locker, auditService audit.Service, mtxManager lock.MutexManager, identifierCheck check.RepoIdentifier, repoChecks Check, publicAccess publicaccess.Service, ) *Controller
func (*Controller) CodeOwnersValidate ¶
func (c *Controller) CodeOwnersValidate( ctx context.Context, session *auth.Session, repoRef string, ref string, ) (*types.CodeOwnersValidation, error)
func (*Controller) CommitDiff ¶
func (*Controller) CommitFiles ¶
func (c *Controller) CommitFiles(ctx context.Context, session *auth.Session, repoRef string, in *CommitFilesOptions, ) (types.CommitFilesResponse, []types.RuleViolations, error)
func (*Controller) Create ¶
func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*RepositoryOutput, error)
Create creates a new repository.
func (*Controller) CreateBranch ¶
func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session, repoRef string, in *CreateBranchInput, ) (*Branch, []types.RuleViolations, error)
CreateBranch creates a new branch for a repo.
func (*Controller) CreateCommitTag ¶
func (c *Controller) CreateCommitTag(ctx context.Context, session *auth.Session, repoRef string, in *CreateCommitTagInput, ) (*CommitTag, []types.RuleViolations, error)
CreateCommitTag creates a new tag for a repo.
func (*Controller) DeleteBranch ¶
func (c *Controller) DeleteBranch(ctx context.Context, session *auth.Session, repoRef string, branchName string, bypassRules bool, ) ([]types.RuleViolations, error)
DeleteBranch deletes a repo branch.
func (*Controller) DeleteGitRepository ¶
func (*Controller) DeleteTag ¶
func (c *Controller) DeleteTag(ctx context.Context, session *auth.Session, repoRef, tagName string, bypassRules bool, ) ([]types.RuleViolations, error)
DeleteTag deletes a tag from the repo.
func (*Controller) Find ¶
func (c *Controller) Find(ctx context.Context, session *auth.Session, repoRef string) (*RepositoryOutput, error)
Find finds a repo.
func (*Controller) GetBranch ¶
func (c *Controller) GetBranch(ctx context.Context, session *auth.Session, repoRef string, branchName string, ) (*Branch, error)
GetBranch gets a repo branch.
func (*Controller) GetCommit ¶
func (c *Controller) GetCommit(ctx context.Context, session *auth.Session, repoRef string, sha string, ) (*types.Commit, error)
GetCommit gets a repo commit.
func (*Controller) GetCommitDivergences ¶
func (c *Controller) GetCommitDivergences(ctx context.Context, session *auth.Session, repoRef string, in *GetCommitDivergencesInput, ) ([]CommitDivergence, error)
GetCommitDivergences returns the commit divergences between reference pairs.
func (*Controller) GetContent ¶
func (c *Controller) GetContent(ctx context.Context, session *auth.Session, repoRef string, gitRef string, repoPath string, includeLatestCommit bool, ) (*GetContentOutput, error)
GetContent finds the content of the repo at the given path. If no gitRef is provided, the content is retrieved from the default branch.
func (*Controller) GitInfoRefs ¶
func (c *Controller) GitInfoRefs( ctx context.Context, session *auth.Session, repoRef string, service enum.GitServiceType, gitProtocol string, w io.Writer, ) error
GitInfoRefs executes the info refs part of git's smart http protocol.
func (*Controller) GitServicePack ¶
func (c *Controller) GitServicePack( ctx context.Context, session *auth.Session, repoRef string, options api.ServicePackOptions, ) error
GitServicePack executes the service pack part of git's smart http protocol (receive-/upload-pack).
func (*Controller) Import ¶
func (c *Controller) Import(ctx context.Context, session *auth.Session, in *ImportInput) (*RepositoryOutput, error)
Import creates a new empty repository and starts git import to it from a remote repository.
func (*Controller) ImportProgress ¶
func (c *Controller) ImportProgress(ctx context.Context, session *auth.Session, repoRef string, ) (job.Progress, error)
ImportProgress returns progress of the import job.
func (*Controller) ListBranches ¶
func (c *Controller) ListBranches(ctx context.Context, session *auth.Session, repoRef string, includeCommit bool, filter *types.BranchFilter, ) ([]Branch, error)
ListBranches lists the branches of a repo.
func (*Controller) ListCommitTags ¶
func (c *Controller) ListCommitTags(ctx context.Context, session *auth.Session, repoRef string, includeCommit bool, filter *types.TagFilter, ) ([]CommitTag, error)
ListCommitTags lists the commit tags of a repo.
func (*Controller) ListCommits ¶
func (c *Controller) ListCommits(ctx context.Context, session *auth.Session, repoRef string, gitRef string, filter *types.CommitFilter, ) (types.ListCommitResponse, error)
ListCommits lists the commits of a repo.
func (*Controller) ListPaths ¶
func (c *Controller) ListPaths(ctx context.Context, session *auth.Session, repoRef string, gitRef string, includeDirectories bool, ) (ListPathsOutput, error)
ListPaths lists the paths in the repo for a specific revision.
func (*Controller) ListPipelines ¶
func (c *Controller) ListPipelines( ctx context.Context, session *auth.Session, repoRef string, latest bool, filter types.ListQueryFilter, ) ([]*types.Pipeline, int64, error)
ListPipelines lists the pipelines under a repository.
func (*Controller) ListServiceAccounts ¶
func (c *Controller) ListServiceAccounts( ctx context.Context, session *auth.Session, repoRef string, ) ([]*types.ServiceAccount, error)
ListServiceAccounts lists the service accounts of a repo.
func (*Controller) MergeCheck ¶
func (c *Controller) MergeCheck( ctx context.Context, session *auth.Session, repoRef string, diffPath string, ) (MergeCheck, error)
func (*Controller) Move ¶
func (c *Controller) Move(ctx context.Context, session *auth.Session, repoRef string, in *MoveInput, ) (*RepositoryOutput, error)
Move moves a repository to a new identifier. TODO: Add support for moving to other parents and aliases.
func (*Controller) PathsDetails ¶
func (c *Controller) PathsDetails(ctx context.Context, session *auth.Session, repoRef string, gitRef string, input PathsDetailsInput, ) (PathsDetailsOutput, error)
PathsDetails finds the additional info about the provided paths of the repo. If no gitRef is provided, the content is retrieved from the default branch.
func (*Controller) PipelineGenerate ¶
func (c *Controller) PipelineGenerate( ctx context.Context, session *auth.Session, repoRef string, ) ([]byte, error)
PipelineGenerate returns automatically generate pipeline YAML for a repository.
func (*Controller) Purge ¶
func (c *Controller) Purge( ctx context.Context, session *auth.Session, repoRef string, deletedAt int64, ) error
Purge removes a repo permanently.
func (*Controller) PurgeNoAuth ¶
func (c *Controller) PurgeNoAuth( ctx context.Context, session *auth.Session, repo *types.Repository, ) error
func (*Controller) Raw ¶
func (c *Controller) Raw(ctx context.Context, session *auth.Session, repoRef string, gitRef string, path string, ) (io.ReadCloser, int64, sha.SHA, error)
Raw finds the file of the repo at the given path and returns its raw content. If no gitRef is provided, the content is retrieved from the default branch.
func (*Controller) Restore ¶
func (c *Controller) Restore( ctx context.Context, session *auth.Session, repoRef string, deletedAt int64, in *RestoreInput, ) (*RepositoryOutput, error)
func (*Controller) RestoreNoAuth ¶
func (c *Controller) RestoreNoAuth( ctx context.Context, repo *types.Repository, newIdentifier *string, newParentID int64, ) (*RepositoryOutput, error)
func (*Controller) RuleCreate ¶
func (c *Controller) RuleCreate(ctx context.Context, session *auth.Session, repoRef string, in *RuleCreateInput, ) (*types.Rule, error)
RuleCreate creates a new protection rule for a repo.
func (*Controller) RuleDelete ¶
func (c *Controller) RuleDelete(ctx context.Context, session *auth.Session, repoRef string, identifier string, ) error
RuleDelete deletes a protection rule by identifier.
func (*Controller) RuleFind ¶
func (c *Controller) RuleFind(ctx context.Context, session *auth.Session, repoRef string, identifier string, ) (*types.Rule, error)
RuleFind returns the protection rule by identifier.
func (*Controller) RuleList ¶
func (c *Controller) RuleList(ctx context.Context, session *auth.Session, repoRef string, filter *types.RuleFilter, ) ([]types.Rule, int64, error)
RuleList returns protection rules for a repository.
func (*Controller) RuleUpdate ¶
func (c *Controller) RuleUpdate(ctx context.Context, session *auth.Session, repoRef string, identifier string, in *RuleUpdateInput, ) (*types.Rule, error)
RuleUpdate updates an existing protection rule for a repository.
func (*Controller) SoftDelete ¶
func (c *Controller) SoftDelete( ctx context.Context, session *auth.Session, repoRef string, ) (*SoftDeleteResponse, error)
SoftDelete soft deletes a repo and returns the deletedAt timestamp in epoch format.
func (*Controller) SoftDeleteNoAuth ¶
func (c *Controller) SoftDeleteNoAuth( ctx context.Context, session *auth.Session, repo *types.Repository, deletedAt int64, ) error
func (*Controller) Summary ¶
func (c *Controller) Summary( ctx context.Context, session *auth.Session, repoRef string, ) (*types.RepositorySummary, error)
Summary returns commit, branch, tag and pull req count for a repo.
func (*Controller) Update ¶
func (c *Controller) Update(ctx context.Context, session *auth.Session, repoRef string, in *UpdateInput, ) (*RepositoryOutput, error)
Update updates a repository.
func (*Controller) UpdateDefaultBranch ¶
func (c *Controller) UpdateDefaultBranch( ctx context.Context, session *auth.Session, repoRef string, in *UpdateDefaultBranchInput, ) (*RepositoryOutput, error)
TODO: handle the racing condition between update/delete default branch requests for a repo.
func (*Controller) UpdatePublicAccess ¶
func (c *Controller) UpdatePublicAccess(ctx context.Context, session *auth.Session, repoRef string, in *UpdatePublicAccessInput, ) (*RepositoryOutput, error)
type CreateBranchInput ¶
type CreateBranchInput struct { Name string `json:"name"` // Target is the commit (or points to the commit) the new branch will be pointing to. // If no target is provided, the branch points to the same commit as the default branch of the repo. Target string `json:"target"` BypassRules bool `json:"bypass_rules"` }
CreateBranchInput used for branch creation apis.
type CreateCommitTagInput ¶
type CreateCommitTagInput struct { Name string `json:"name"` // Target is the commit (or points to the commit) the new tag will be pointing to. // If no target is provided, the tag points to the same commit as the default branch of the repo. Target string `json:"target"` // Message is the optional message the tag will be created with - if the message is empty // the tag will be lightweight, otherwise it'll be annotated. Message string `json:"message"` BypassRules bool `json:"bypass_rules"` }
CreateCommitTagInput used for tag creation apis.
type CreateInput ¶
type CreateInput struct { ParentRef string `json:"parent_ref"` // TODO [CODE-1363]: remove after identifier migration. UID string `json:"uid" deprecated:"true"` Identifier string `json:"identifier"` DefaultBranch string `json:"default_branch"` Description string `json:"description"` IsPublic bool `json:"is_public"` ForkID int64 `json:"fork_id"` Readme bool `json:"readme"` License string `json:"license"` GitIgnore string `json:"git_ignore"` }
type DirContent ¶
type DirContent struct {
Entries []ContentInfo `json:"entries"`
}
type FileContent ¶
type FileContent struct { Encoding enum.ContentEncodingType `json:"encoding"` Data string `json:"data"` Size int64 `json:"size"` DataSize int64 `json:"data_size"` }
type GetCommitDivergencesInput ¶
type GetCommitDivergencesInput struct { // MaxCount restricts the maximum number of diverging commits that are counted. // IMPORTANT: This restricts the total commit count, so a (5, 18) restricted to 10 will return (0, 10) MaxCount int32 `json:"max_count"` Requests []CommitDivergenceRequest `json:"requests"` }
type GetContentOutput ¶
type GetContentOutput struct { ContentInfo Content Content `json:"content"` }
type ImportInput ¶
type ImportInput struct { ParentRef string `json:"parent_ref"` // TODO [CODE-1363]: remove after identifier migration. UID string `json:"uid" deprecated:"true"` Identifier string `json:"identifier"` Description string `json:"description"` Provider importer.Provider `json:"provider"` ProviderRepo string `json:"provider_repo"` Pipelines importer.PipelineOption `json:"pipelines"` }
type ListPathsOutput ¶
type MergeCheck ¶
type MoveInput ¶
type MoveInput struct { // TODO [CODE-1363]: remove after identifier migration. UID *string `json:"uid" deprecated:"true"` Identifier *string `json:"identifier"` }
MoveInput is used for moving a repo.
type NoOpRepoChecks ¶
type NoOpRepoChecks struct { }
func NewNoOpRepoChecks ¶
func NewNoOpRepoChecks() *NoOpRepoChecks
func (*NoOpRepoChecks) Create ¶
func (c *NoOpRepoChecks) Create(_ context.Context, _ *auth.Session, _ *CreateInput) error
type PathsDetailsInput ¶
type PathsDetailsInput struct {
Paths []string `json:"paths"`
}
type PathsDetailsOutput ¶
type PathsDetailsOutput struct {
Details []git.PathDetails `json:"details"`
}
type RepositoryOutput ¶
type RepositoryOutput struct { types.Repository IsPublic bool `json:"is_public" yaml:"is_public"` Importing bool `json:"importing" yaml:"-"` }
func GetRepoOutput ¶
func GetRepoOutput( ctx context.Context, publicAccess publicaccess.Service, repo *types.Repository, ) (*RepositoryOutput, error)
func GetRepoOutputWithAccess ¶
func GetRepoOutputWithAccess( _ context.Context, isPublic bool, repo *types.Repository, ) *RepositoryOutput
func (RepositoryOutput) MarshalJSON ¶
func (r RepositoryOutput) MarshalJSON() ([]byte, error)
TODO [CODE-1363]: remove after identifier migration.
type RestoreInput ¶
type RuleCreateInput ¶
type RuleCreateInput struct { Type types.RuleType `json:"type"` State enum.RuleState `json:"state"` // TODO [CODE-1363]: remove after identifier migration. UID string `json:"uid" deprecated:"true"` Identifier string `json:"identifier"` Description string `json:"description"` Pattern protection.Pattern `json:"pattern"` Definition json.RawMessage `json:"definition"` }
type RuleUpdateInput ¶
type RuleUpdateInput struct { // TODO [CODE-1363]: remove after identifier migration. UID *string `json:"uid" deprecated:"true"` Identifier *string `json:"identifier"` State *enum.RuleState `json:"state"` Description *string `json:"description"` Pattern *protection.Pattern `json:"pattern"` Definition *json.RawMessage `json:"definition"` }
type SoftDeleteResponse ¶
type SoftDeleteResponse struct {
DeletedAt int64 `json:"deleted_at"`
}
type SubmoduleContent ¶
type SymlinkContent ¶
type UpdateDefaultBranchInput ¶
type UpdateDefaultBranchInput struct {
Name string `json:"name"`
}
type UpdateInput ¶
type UpdateInput struct {
Description *string `json:"description"`
}
UpdateInput is used for updating a repo.
type UpdatePublicAccessInput ¶
type UpdatePublicAccessInput struct {
IsPublic bool `json:"is_public"`
}
Source Files
¶
- archive.go
- blame.go
- check.go
- codeowner_validate.go
- commit.go
- content_get.go
- content_paths_details.go
- controller.go
- create.go
- create_branch.go
- create_commit_tag.go
- default_branch.go
- delete_branch.go
- delete_tag.go
- diff.go
- find.go
- get_branch.go
- get_commit.go
- get_commit_divergences.go
- git_info_refs.go
- git_service_pack.go
- helper.go
- import.go
- import_progress.go
- list_branches.go
- list_commit_tags.go
- list_commits.go
- list_paths.go
- list_pipelines.go
- list_service_accounts.go
- merge_check.go
- move.go
- no_op_checks.go
- pipeline_generate.go
- purge.go
- raw.go
- restore.go
- rule_create.go
- rule_delete.go
- rule_find.go
- rule_list.go
- rule_update.go
- soft_delete.go
- summary.go
- update.go
- update_public_access.go
- wire.go