client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExponentialBackoff

func ExponentialBackoff(init, limit time.Duration) func()

func GetProfileConfig

func GetProfileConfig(profile string) (aws.Config, error)

func NullableString

func NullableString(str string) *string

Types

type CloudWatchClient

type CloudWatchClient struct {
	Client *cloudwatchlogs.Client
}

func NewCloudWatchClient

func NewCloudWatchClient(profile string) (*CloudWatchClient, error)

type CodeCommitClient

type CodeCommitClient struct {
	Client *codecommit.Client
}

func NewCodeCommitClient

func NewCodeCommitClient(profile string) (*CodeCommitClient, error)

func (*CodeCommitClient) ApprovePRs

func (c *CodeCommitClient) ApprovePRs(prMap PRMap, prSelections []string) []Result[string]

ApprovePRs ...

func (*CodeCommitClient) ApprovePRsConcurrently

func (c *CodeCommitClient) ApprovePRsConcurrently(ctx context.Context, prMap PRMap, prs []string) <-chan Result[string]

func (*CodeCommitClient) ClosePRs

func (c *CodeCommitClient) ClosePRs(prMap PRMap, prSelections []string) []Result[string]

ClosePRs ...

func (*CodeCommitClient) ClosePRsConcurrently

func (c *CodeCommitClient) ClosePRsConcurrently(ctx context.Context, prMap PRMap, prs []string) <-chan Result[string]

func (*CodeCommitClient) CreatePR

func (c *CodeCommitClient) CreatePR(targets []types.Target, title, desc string) (*codecommit.CreatePullRequestOutput, error)

func (*CodeCommitClient) DeleteBranch

func (c *CodeCommitClient) DeleteBranch(repo string, branch string) (*codecommit.DeleteBranchOutput, error)

DeleteBranch deletes a branch from a given repository.

func (*CodeCommitClient) DeleteBranches

func (c *CodeCommitClient) DeleteBranches(repo string, branches []string) []Result[string]

DeleteBranches attempts to delete all given branches for a given repository synchronously.

func (*CodeCommitClient) DeleteBranchesConcurrently

func (c *CodeCommitClient) DeleteBranchesConcurrently(repo string, branches []string) <-chan Result[string]

DeleteBranchesConcurrently deletes all given branches from a given repository concurrently.

func (*CodeCommitClient) GenerateDiffs

func (c *CodeCommitClient) GenerateDiffs(repo string, diffOut []*codecommit.GetDifferencesOutput) []Result[[]byte]

GenerateDiffs ...

func (*CodeCommitClient) GenerateDiffsConcurrently

func (c *CodeCommitClient) GenerateDiffsConcurrently(ctx context.Context, repo string, diffOut []*codecommit.GetDifferencesOutput) <-chan Result[[]byte]

func (*CodeCommitClient) GetBranches

func (c *CodeCommitClient) GetBranches(repoName string) ([]string, error)

GetBranches returns a list of branch names for a given repository.

func (*CodeCommitClient) GetDifferences

func (c *CodeCommitClient) GetDifferences(repositoryName, beforeCommitSpecifier, afterCommitSpecifier *string) ([]*codecommit.GetDifferencesOutput, error)

func (*CodeCommitClient) GetPRInfo

GetPRInfo is a wrapper around the AWS SDKv2 GetPullRequest API.

func (*CodeCommitClient) GetPullRequestIDs

func (c *CodeCommitClient) GetPullRequestIDs(input PullRequestInput) ([][]string, error)

GetPullRequestIDs ...

func (*CodeCommitClient) GetPullRequestIDsConcurrently

func (c *CodeCommitClient) GetPullRequestIDsConcurrently(input PullRequestInput) <-chan Result[[]string]

func (*CodeCommitClient) GetPullRequestInfoFromIDs

func (c *CodeCommitClient) GetPullRequestInfoFromIDs(input [][]string) ([]*codecommit.GetPullRequestOutput, error)

GetPullRequestInfoFromIDs ...

func (*CodeCommitClient) GetPullRequestInfoFromIDsConcurrently

func (c *CodeCommitClient) GetPullRequestInfoFromIDsConcurrently(input [][]string) <-chan Result[*codecommit.GetPullRequestOutput]

func (*CodeCommitClient) GetPullRequests

func (c *CodeCommitClient) GetPullRequests(input PullRequestInput) ([]*codecommit.GetPullRequestOutput, error)

GetPullRequests combines GetPullRequestIDs & GetPullRequestInfoFromIDs into one call

func (*CodeCommitClient) ListPRs

func (c *CodeCommitClient) ListPRs(repositoryName, authorArn string, status types.PullRequestStatusEnum) ([]string, error)

ListPRs returns a list of CodeCommit PR IDs

type IAMClient

type IAMClient struct {
	Client *iam.Client
}

func NewIAMClient

func NewIAMClient(profile string) (*IAMClient, error)

func (*IAMClient) ListRoles

func (i *IAMClient) ListRoles() ([]types.Role, error)

type PRMap

PRMap ...

type PullRequestInput

type PullRequestInput struct {
	AuthorARN    string
	Repositories []string
	Status       types.PullRequestStatusEnum
}

PullRequestInput ...

type Result

type Result[T any] struct {
	Result T
	Err    error
}

type ResultMap

type ResultMap[T any, K comparable, V any] struct {
	Result T
	Err    error
	Map    map[K]V
}

type STSClient

type STSClient struct {
	Client *sts.Client
}

func NewSTSClient

func NewSTSClient(profile string) (*STSClient, error)

NewSTSClient returns a convenient wrapper around the actual AWS STS SDK client

func (*STSClient) AssumeRole

func (s *STSClient) AssumeRole(params *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)

func (*STSClient) GetCallerIdentity

func (s *STSClient) GetCallerIdentity() (*sts.GetCallerIdentityOutput, error)

GetCallerIdentity returns the caller identity of the profile the associated client was created with. i.e. from `NewSTSClient`

Jump to

Keyboard shortcuts

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