codegurureviewer – github.com/aws/aws-sdk-go-v2/service/codegurureviewer Index | Files | Directories

package codegurureviewer

import "github.com/aws/aws-sdk-go-v2/service/codegurureviewer"

Package codegurureviewer provides the API client, operations, and parameter types for Amazon CodeGuru Reviewer.

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends fixes in your Java code. By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the Amazon CodeGuru Reviewer User Guide (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/welcome.html).

Index

Constants

const ServiceAPIVersion = "2019-09-19"
const ServiceID = "CodeGuru Reviewer"

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

Types

type AssociateRepositoryInput

type AssociateRepositoryInput struct {

	// The repository to associate.
	//
	// This member is required.
	Repository *types.Repository

	// Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of
	// duplicate repository associations if there are failures and retries.
	ClientRequestToken *string
}

type AssociateRepositoryOutput

type AssociateRepositoryOutput struct {

	// Information about the repository association.
	RepositoryAssociation *types.RepositoryAssociation

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for Amazon CodeGuru Reviewer.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) AssociateRepository

func (c *Client) AssociateRepository(ctx context.Context, params *AssociateRepositoryInput, optFns ...func(*Options)) (*AssociateRepositoryOutput, error)

Use to associate an AWS CodeCommit repository or a repostory managed by AWS CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon CodeGuru Reviewer (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/recommendations.html) in the Amazon CodeGuru Reviewer User Guide. If you associate a CodeCommit repository, it must be in the same AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured. Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Connect to a repository source provider (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/reviewer-ug/step-one.html#select-repository-source-provider) in the Amazon CodeGuru Reviewer User Guide. You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started with CodeGuru Reviewer (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-with-guru.html) in the CodeGuru Reviewer User Guide.

func (*Client) CreateCodeReview

func (c *Client) CreateCodeReview(ctx context.Context, params *CreateCodeReviewInput, optFns ...func(*Options)) (*CreateCodeReviewOutput, error)

Use to create a code review for a repository analysis.

func (*Client) DescribeCodeReview

func (c *Client) DescribeCodeReview(ctx context.Context, params *DescribeCodeReviewInput, optFns ...func(*Options)) (*DescribeCodeReviewOutput, error)

Returns the metadata associated with the code review along with its status.

func (*Client) DescribeRecommendationFeedback

func (c *Client) DescribeRecommendationFeedback(ctx context.Context, params *DescribeRecommendationFeedbackInput, optFns ...func(*Options)) (*DescribeRecommendationFeedbackOutput, error)

Describes the customer feedback for a CodeGuru Reviewer recommendation.

func (*Client) DescribeRepositoryAssociation

func (c *Client) DescribeRepositoryAssociation(ctx context.Context, params *DescribeRepositoryAssociationInput, optFns ...func(*Options)) (*DescribeRepositoryAssociationOutput, error)

Returns a RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) object that contains information about the requested repository association.

func (*Client) DisassociateRepository

func (c *Client) DisassociateRepository(ctx context.Context, params *DisassociateRepositoryInput, optFns ...func(*Options)) (*DisassociateRepositoryOutput, error)

Removes the association between Amazon CodeGuru Reviewer and a repository.

func (*Client) ListCodeReviews

func (c *Client) ListCodeReviews(ctx context.Context, params *ListCodeReviewsInput, optFns ...func(*Options)) (*ListCodeReviewsOutput, error)

Lists all the code reviews that the customer has created in the past 90 days.

func (*Client) ListRecommendationFeedback

func (c *Client) ListRecommendationFeedback(ctx context.Context, params *ListRecommendationFeedbackInput, optFns ...func(*Options)) (*ListRecommendationFeedbackOutput, error)

Returns a list of RecommendationFeedbackSummary (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RecommendationFeedbackSummary.html) objects that contain customer recommendation feedback for all CodeGuru Reviewer users.

func (*Client) ListRecommendations

func (c *Client) ListRecommendations(ctx context.Context, params *ListRecommendationsInput, optFns ...func(*Options)) (*ListRecommendationsOutput, error)

Returns the list of all recommendations for a completed code review.

func (*Client) ListRepositoryAssociations

func (c *Client) ListRepositoryAssociations(ctx context.Context, params *ListRepositoryAssociationsInput, optFns ...func(*Options)) (*ListRepositoryAssociationsOutput, error)

Returns a list of RepositoryAssociationSummary (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html) objects that contain summary information about a repository association. You can filter the returned list by ProviderType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-ProviderType), Name (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Name), State (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-State), and Owner (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Owner).

func (*Client) PutRecommendationFeedback

func (c *Client) PutRecommendationFeedback(ctx context.Context, params *PutRecommendationFeedbackInput, optFns ...func(*Options)) (*PutRecommendationFeedbackOutput, error)

Stores customer feedback for a CodeGuru Reviewer recommendation. When this API is called again with different reactions the previous feedback is overwritten.

type CreateCodeReviewInput

type CreateCodeReviewInput struct {

	// The name of the code review. Each code review of the same code review type must
	// have a unique name in your AWS account.
	//
	// This member is required.
	Name *string

	// The Amazon Resource Name (ARN) of the RepositoryAssociation
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html)
	// object. You can retrieve this ARN by calling ListRepositories. A code review can
	// only be created on an associated repository. This is the ARN of the associated
	// repository.
	//
	// This member is required.
	RepositoryAssociationArn *string

	// The type of code review to create. This is specified using a CodeReviewType
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html)
	// object.
	//
	// This member is required.
	Type *types.CodeReviewType

	// Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of
	// duplicate code reviews if there are failures and retries.
	ClientRequestToken *string
}

type CreateCodeReviewOutput

type CreateCodeReviewOutput struct {

	// Information about a code review.
	CodeReview *types.CodeReview

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeCodeReviewInput

type DescribeCodeReviewInput struct {

	// The Amazon Resource Name (ARN) of the CodeReview
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html)
	// object.
	//
	// This member is required.
	CodeReviewArn *string
}

type DescribeCodeReviewOutput

type DescribeCodeReviewOutput struct {

	// Information about the code review.
	CodeReview *types.CodeReview

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeRecommendationFeedbackInput

type DescribeRecommendationFeedbackInput struct {

	// The Amazon Resource Name (ARN) of the CodeReview
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html)
	// object.
	//
	// This member is required.
	CodeReviewArn *string

	// The recommendation ID that can be used to track the provided recommendations and
	// then to collect the feedback.
	//
	// This member is required.
	RecommendationId *string

	// Optional parameter to describe the feedback for a given user. If this is not
	// supplied, it defaults to the user making the request. The UserId is an IAM
	// principal that can be specified as an AWS account ID or an Amazon Resource Name
	// (ARN). For more information, see  Specifying a Principal
	// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying)
	// in the AWS Identity and Access Management User Guide.
	UserId *string
}

type DescribeRecommendationFeedbackOutput

type DescribeRecommendationFeedbackOutput struct {

	// The recommendation feedback given by the user.
	RecommendationFeedback *types.RecommendationFeedback

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeRepositoryAssociationInput

type DescribeRepositoryAssociationInput struct {

	// The Amazon Resource Name (ARN) of the RepositoryAssociation
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html)
	// object. You can retrieve this ARN by calling ListRepositories.
	//
	// This member is required.
	AssociationArn *string
}

type DescribeRepositoryAssociationOutput

type DescribeRepositoryAssociationOutput struct {

	// Information about the repository association.
	RepositoryAssociation *types.RepositoryAssociation

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DisassociateRepositoryInput

type DisassociateRepositoryInput struct {

	// The Amazon Resource Name (ARN) of the RepositoryAssociation
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html)
	// object. You can retrieve this ARN by calling ListRepositories.
	//
	// This member is required.
	AssociationArn *string
}

type DisassociateRepositoryOutput

type DisassociateRepositoryOutput struct {

	// Information about the disassociated repository.
	RepositoryAssociation *types.RepositoryAssociation

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func WithEndpointResolver

func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver

WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time) error
}

type IdempotencyTokenProvider

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type ListCodeReviewsInput

type ListCodeReviewsInput struct {

	// The type of code reviews to list in the response.
	//
	// This member is required.
	Type types.Type

	// The maximum number of results that are returned per call. The default is 100.
	MaxResults *int32

	// If nextToken is returned, there are more results available. The value of
	// nextToken is a unique pagination token for each page. Make the call again using
	// the returned token to retrieve the next page. Keep all other arguments
	// unchanged.
	NextToken *string

	// List of provider types for filtering that needs to be applied before displaying
	// the result. For example, providerTypes=[GitHub] lists code reviews from GitHub.
	ProviderTypes []types.ProviderType

	// List of repository names for filtering that needs to be applied before
	// displaying the result.
	RepositoryNames []*string

	// List of states for filtering that needs to be applied before displaying the
	// result. For example, states=[Pending] lists code reviews in the Pending state.
	// The valid code review states are:
	//
	// * Completed: The code review is complete.
	//
	// *
	// Pending: The code review started and has not completed or failed.
	//
	// * Failed: The
	// code review failed.
	//
	// * Deleting: The code review is being deleted.
	States []types.JobState
}

type ListCodeReviewsOutput

type ListCodeReviewsOutput struct {

	// A list of code reviews that meet the criteria of the request.
	CodeReviewSummaries []*types.CodeReviewSummary

	// Pagination token.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListRecommendationFeedbackInput

type ListRecommendationFeedbackInput struct {

	// The Amazon Resource Name (ARN) of the CodeReview
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html)
	// object.
	//
	// This member is required.
	CodeReviewArn *string

	// The maximum number of results that are returned per call. The default is 100.
	MaxResults *int32

	// If nextToken is returned, there are more results available. The value of
	// nextToken is a unique pagination token for each page. Make the call again using
	// the returned token to retrieve the next page. Keep all other arguments
	// unchanged.
	NextToken *string

	// Used to query the recommendation feedback for a given recommendation.
	RecommendationIds []*string

	// An AWS user's account ID or Amazon Resource Name (ARN). Use this ID to query the
	// recommendation feedback for a code review from that user. The UserId is an IAM
	// principal that can be specified as an AWS account ID or an Amazon Resource Name
	// (ARN). For more information, see  Specifying a Principal
	// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying)
	// in the AWS Identity and Access Management User Guide.
	UserIds []*string
}

type ListRecommendationFeedbackOutput

type ListRecommendationFeedbackOutput struct {

	// If nextToken is returned, there are more results available. The value of
	// nextToken is a unique pagination token for each page. Make the call again using
	// the returned token to retrieve the next page. Keep all other arguments
	// unchanged.
	NextToken *string

	// Recommendation feedback summaries corresponding to the code review ARN.
	RecommendationFeedbackSummaries []*types.RecommendationFeedbackSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListRecommendationsInput

type ListRecommendationsInput struct {

	// The Amazon Resource Name (ARN) of the CodeReview
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html)
	// object.
	//
	// This member is required.
	CodeReviewArn *string

	// The maximum number of results that are returned per call. The default is 100.
	MaxResults *int32

	// Pagination token.
	NextToken *string
}

type ListRecommendationsOutput

type ListRecommendationsOutput struct {

	// Pagination token.
	NextToken *string

	// List of recommendations for the requested code review.
	RecommendationSummaries []*types.RecommendationSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListRepositoryAssociationsInput

type ListRepositoryAssociationsInput struct {

	// The maximum number of repository association results returned by
	// ListRepositoryAssociations in paginated output. When this parameter is used,
	// ListRepositoryAssociations only returns maxResults results in a single page with
	// a nextToken response element. The remaining results of the initial request can
	// be seen by sending another ListRepositoryAssociations request with the returned
	// nextToken value. This value can be between 1 and 100. If this parameter is not
	// used, ListRepositoryAssociations returns up to 100 results and a nextToken value
	// if applicable.
	MaxResults *int32

	// List of repository names to use as a filter.
	Names []*string

	// The nextToken value returned from a previous paginated
	// ListRepositoryAssociations request where maxResults was used and the results
	// exceeded the value of that parameter. Pagination continues from the end of the
	// previous results that returned the nextToken value. Treat this token as an
	// opaque identifier that is only used to retrieve the next items in a list and not
	// for other programmatic purposes.
	NextToken *string

	// List of owners to use as a filter. For AWS CodeCommit, it is the name of the
	// CodeCommit account that was used to associate the repository. For other
	// repository source providers, such as Bitbucket and GitHub Enterprise Server,
	// this is name of the account that was used to associate the repository.
	Owners []*string

	// List of provider types to use as a filter.
	ProviderTypes []types.ProviderType

	// List of repository association states to use as a filter. The valid repository
	// association states are:
	//
	// * Associated: The repository association is
	// complete.
	//
	// * Associating: CodeGuru Reviewer is:
	//
	// * Setting up pull request
	// notifications. This is required for pull requests to trigger a CodeGuru Reviewer
	// review. If your repository ProviderType is GitHub, GitHub Enterprise Server, or
	// Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger
	// CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your
	// repository cannot be triggered.
	//
	// * Setting up source code access. This is
	// required for CodeGuru Reviewer to securely clone code in your repository.
	//
	// *
	// Failed: The repository failed to associate or disassociate.
	//
	// * Disassociating:
	// CodeGuru Reviewer is removing the repository's pull request notifications and
	// source code access.
	States []types.RepositoryAssociationState
}

type ListRepositoryAssociationsOutput

type ListRepositoryAssociationsOutput struct {

	// The nextToken value to include in a future ListRecommendations request. When the
	// results of a ListRecommendations request exceed maxResults, this value can be
	// used to retrieve the next page of results. This value is null when there are no
	// more results to return.
	NextToken *string

	// A list of repository associations that meet the criteria of the request.
	RepositoryAssociationSummaries []*types.RepositoryAssociationSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer retry.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

type PutRecommendationFeedbackInput

type PutRecommendationFeedbackInput struct {

	// The Amazon Resource Name (ARN) of the CodeReview
	// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html)
	// object.
	//
	// This member is required.
	CodeReviewArn *string

	// List for storing reactions. Reactions are utf-8 text code for emojis. If you
	// send an empty list it clears all your feedback.
	//
	// This member is required.
	Reactions []types.Reaction

	// The recommendation ID that can be used to track the provided recommendations and
	// then to collect the feedback.
	//
	// This member is required.
	RecommendationId *string
}

type PutRecommendationFeedbackOutput

type PutRecommendationFeedbackOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

Source Files

api_client.go api_op_AssociateRepository.go api_op_CreateCodeReview.go api_op_DescribeCodeReview.go api_op_DescribeRecommendationFeedback.go api_op_DescribeRepositoryAssociation.go api_op_DisassociateRepository.go api_op_ListCodeReviews.go api_op_ListRecommendationFeedback.go api_op_ListRecommendations.go api_op_ListRepositoryAssociations.go api_op_PutRecommendationFeedback.go deserializers.go doc.go endpoints.go serializers.go validators.go

Directories

PathSynopsis
internal
types
Version
v0.29.0
Published
Oct 31, 2020
Platform
windows/amd64
Imports
28 packages
Last checked
now

Tools for package owners.