Documentation
¶
Index ¶
- Constants
- type BlobInfo
- type Branch
- type CodeCommitService
- func (s *CodeCommitService) Actions() []service.Action
- func (s *CodeCommitService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
- func (s *CodeCommitService) HealthCheck() error
- func (s *CodeCommitService) Name() string
- func (s *CodeCommitService) SetLocator(locator ServiceLocator)
- type Comment
- type Commit
- type Difference
- type MergeMetadata
- type PullRequest
- type Repository
- type RepositoryTrigger
- type ServiceLocator
- type Store
- func (s *Store) CreateBranch(repoName, branchName, commitID string) *service.AWSError
- func (s *Store) CreatePullRequest(repoName, title, description, sourceRef, destRef string) (*PullRequest, *service.AWSError)
- func (s *Store) CreateRepository(name, description string, tags map[string]string) (*Repository, *service.AWSError)
- func (s *Store) DeleteBranch(repoName, branchName string) (*Branch, *service.AWSError)
- func (s *Store) DeleteRepository(name string) (*Repository, *service.AWSError)
- func (s *Store) GetBranch(repoName, branchName string) (*Branch, *service.AWSError)
- func (s *Store) GetCommentsForPullRequest(prID string) ([]*Comment, *service.AWSError)
- func (s *Store) GetCommit(repoName, commitID string) (*Commit, *service.AWSError)
- func (s *Store) GetDifferences(repoName, beforeCommitSpec, afterCommitSpec string) ([]Difference, *service.AWSError)
- func (s *Store) GetPullRequest(prID string) (*PullRequest, *service.AWSError)
- func (s *Store) GetRepository(name string) (*Repository, *service.AWSError)
- func (s *Store) GetRepositoryTriggers(repoName string) ([]RepositoryTrigger, *service.AWSError)
- func (s *Store) ListBranches(repoName string) ([]string, *service.AWSError)
- func (s *Store) ListPullRequests(repoName, status string) []string
- func (s *Store) ListRepositories() []*Repository
- func (s *Store) ListTagsForResource(arn string) map[string]string
- func (s *Store) MergePullRequestByFastForward(prID, repoName string) (*PullRequest, *service.AWSError)
- func (s *Store) MergePullRequestBySquash(prID, repoName string) (*PullRequest, *service.AWSError)
- func (s *Store) PostCommentForPullRequest(prID, repoName, content, beforeCommitID, afterCommitID, filePath string) (*Comment, *service.AWSError)
- func (s *Store) PutRepositoryTriggers(repoName string, triggers []RepositoryTrigger) (string, *service.AWSError)
- func (s *Store) TagResource(arn string, tags map[string]string) *service.AWSError
- func (s *Store) UntagResource(arn string, keys []string) *service.AWSError
- func (s *Store) UpdatePullRequestStatus(prID, status string) (*PullRequest, *service.AWSError)
- func (s *Store) UpdatePullRequestTitle(prID, title string) (*PullRequest, *service.AWSError)
- func (s *Store) UpdateRepositoryDescription(name, description string) *service.AWSError
- func (s *Store) UpdateRepositoryName(oldName, newName string) *service.AWSError
- type UserInfo
Constants ¶
const ( PRStatusOpen = "OPEN" PRStatusClosed = "CLOSED" PRStatusMerged = "MERGED" )
Pull request status constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeCommitService ¶
type CodeCommitService struct {
// contains filtered or unexported fields
}
CodeCommitService is the cloudmock implementation of the AWS CodeCommit API.
func New ¶
func New(accountID, region string) *CodeCommitService
New returns a new CodeCommitService for the given AWS account ID and region.
func NewWithLocator ¶
func NewWithLocator(accountID, region string, locator ServiceLocator) *CodeCommitService
NewWithLocator returns a new CodeCommitService with a ServiceLocator.
func (*CodeCommitService) Actions ¶
func (s *CodeCommitService) Actions() []service.Action
Actions returns the list of CodeCommit API actions supported.
func (*CodeCommitService) HandleRequest ¶
func (s *CodeCommitService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming CodeCommit request to the appropriate handler.
func (*CodeCommitService) HealthCheck ¶
func (s *CodeCommitService) HealthCheck() error
HealthCheck always returns nil.
func (*CodeCommitService) Name ¶
func (s *CodeCommitService) Name() string
Name returns the AWS service name used for routing.
func (*CodeCommitService) SetLocator ¶
func (s *CodeCommitService) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service calls.
type Comment ¶
type Comment struct {
CommentID string
Content string
PullRequestID string
RepositoryName string
BeforeCommitID string
AfterCommitID string
FilePath string
AuthorARN string
CreationDate time.Time
LastModified time.Time
Deleted bool
}
Comment represents a comment on a pull request.
type Commit ¶
type Commit struct {
CommitID string
TreeID string
ParentIDs []string
Author UserInfo
Committer UserInfo
Message string
AdditionalData string
}
Commit represents a single commit.
type Difference ¶
Difference represents a file difference between two commits.
type MergeMetadata ¶
MergeMetadata holds merge state for a pull request.
type PullRequest ¶
type PullRequest struct {
ID string
Title string
Description string
Status string
AuthorARN string
CreationDate time.Time
LastActivityDate time.Time
RepositoryName string
SourceReference string
DestinationReference string
MergeMetadata *MergeMetadata
}
PullRequest represents a pull request.
type Repository ¶
type Repository struct {
ID string
Name string
ARN string
CloneURLHTTP string
CloneURLSSH string
Description string
DefaultBranch string
CreatedAt time.Time
LastModified time.Time
Tags map[string]string
}
Repository represents a CodeCommit repository.
type RepositoryTrigger ¶
type RepositoryTrigger struct {
Name string
DestinationARN string
CustomData string
Branches []string
Events []string
}
RepositoryTrigger represents a trigger on a repository.
type ServiceLocator ¶
ServiceLocator resolves other services for cross-service integration.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory store for all CodeCommit resources.
func (*Store) CreateBranch ¶
func (*Store) CreatePullRequest ¶
func (s *Store) CreatePullRequest(repoName, title, description, sourceRef, destRef string) (*PullRequest, *service.AWSError)
func (*Store) CreateRepository ¶
func (*Store) DeleteBranch ¶
func (*Store) DeleteRepository ¶
func (s *Store) DeleteRepository(name string) (*Repository, *service.AWSError)
func (*Store) GetCommentsForPullRequest ¶
func (*Store) GetDifferences ¶
func (s *Store) GetDifferences(repoName, beforeCommitSpec, afterCommitSpec string) ([]Difference, *service.AWSError)
func (*Store) GetPullRequest ¶
func (s *Store) GetPullRequest(prID string) (*PullRequest, *service.AWSError)
func (*Store) GetRepository ¶
func (s *Store) GetRepository(name string) (*Repository, *service.AWSError)
func (*Store) GetRepositoryTriggers ¶
func (s *Store) GetRepositoryTriggers(repoName string) ([]RepositoryTrigger, *service.AWSError)
func (*Store) ListBranches ¶
func (*Store) ListPullRequests ¶
func (*Store) ListRepositories ¶
func (s *Store) ListRepositories() []*Repository
func (*Store) ListTagsForResource ¶
func (*Store) MergePullRequestByFastForward ¶
func (s *Store) MergePullRequestByFastForward(prID, repoName string) (*PullRequest, *service.AWSError)
func (*Store) MergePullRequestBySquash ¶
func (s *Store) MergePullRequestBySquash(prID, repoName string) (*PullRequest, *service.AWSError)
func (*Store) PostCommentForPullRequest ¶
func (*Store) PutRepositoryTriggers ¶
func (*Store) TagResource ¶
func (*Store) UntagResource ¶
func (*Store) UpdatePullRequestStatus ¶
func (s *Store) UpdatePullRequestStatus(prID, status string) (*PullRequest, *service.AWSError)
func (*Store) UpdatePullRequestTitle ¶
func (s *Store) UpdatePullRequestTitle(prID, title string) (*PullRequest, *service.AWSError)