codegurureviewer

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Overview

Package codegurureviewer provides the client and types for making API requests to CodeGuruReviewer.

This section provides documentation for the Amazon CodeGuru Reviewer API operations.

See https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19 for more information on this service.

See codegurureviewer package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/codegurureviewer/

Using the Client

To use CodeGuruReviewer with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the CodeGuruReviewer client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/codegurureviewer/#New

Index

Constants

View Source
const (
	ServiceName = "CodeGuruReviewer"  // Service's name
	ServiceID   = "CodeGuruReviewer"  // Service's identifier
	EndpointsID = "codeguru-reviewer" // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeAccessDeniedException for service response error code
	// "AccessDeniedException".
	//
	// You do not have sufficient access to perform this action.
	ErrCodeAccessDeniedException = "AccessDeniedException"

	// ErrCodeConflictException for service response error code
	// "ConflictException".
	//
	// The requested operation would cause a conflict with the current state of
	// a service resource associated with the request. Resolve the conflict before
	// retrying this request.
	ErrCodeConflictException = "ConflictException"

	// ErrCodeInternalServerException for service response error code
	// "InternalServerException".
	//
	// The server encountered an internal error and is unable to complete the request.
	ErrCodeInternalServerException = "InternalServerException"

	// ErrCodeNotFoundException for service response error code
	// "NotFoundException".
	//
	// The resource specified in the request was not found.
	ErrCodeNotFoundException = "NotFoundException"

	// ErrCodeThrottlingException for service response error code
	// "ThrottlingException".
	//
	// The request was denied due to request throttling.
	ErrCodeThrottlingException = "ThrottlingException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// The input fails to satisfy the specified constraints.
	ErrCodeValidationException = "ValidationException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociateRepositoryInput

type AssociateRepositoryInput struct {

	// Unique, case-sensitive identifier that you provide to ensure the idempotency
	// of the request.
	//
	// If you want to add a new repository association, this parameter specifies
	// a unique identifier for the new repository association that helps ensure
	// idempotency.
	//
	// If you use the AWS CLI or one of the AWS SDK to call this operation, then
	// you can leave this parameter empty. The CLI or SDK generates a random UUID
	// for you and includes that in the request. If you don't use the SDK and instead
	// generate a raw HTTP request to the Secrets Manager service endpoint, then
	// you must generate a ClientRequestToken yourself for new versions and include
	// that value in the request.
	//
	// You typically only need to interact with this value if you implement your
	// own retry logic and want to ensure that a given repository association is
	// not created twice. We recommend that you generate a UUID-type value to ensure
	// uniqueness within the specified repository association.
	//
	// Amazon CodeGuru Reviewer uses this value to prevent the accidental creation
	// of duplicate repository associations if there are failures and retries.
	ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`

	// The repository to associate.
	//
	// Repository is a required field
	Repository *Repository `type:"structure" required:"true"`
	// contains filtered or unexported fields
}

func (AssociateRepositoryInput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AssociateRepositoryInput) String

func (s AssociateRepositoryInput) String() string

String returns the string representation

func (*AssociateRepositoryInput) Validate

func (s *AssociateRepositoryInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AssociateRepositoryOutput

type AssociateRepositoryOutput struct {

	// Information about the repository association.
	RepositoryAssociation *RepositoryAssociation `type:"structure"`
	// contains filtered or unexported fields
}

func (AssociateRepositoryOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AssociateRepositoryOutput) String

func (s AssociateRepositoryOutput) String() string

String returns the string representation

type AssociateRepositoryRequest

type AssociateRepositoryRequest struct {
	*aws.Request
	Input *AssociateRepositoryInput
	Copy  func(*AssociateRepositoryInput) AssociateRepositoryRequest
}

AssociateRepositoryRequest is the request type for the AssociateRepository API operation.

func (AssociateRepositoryRequest) Send

Send marshals and sends the AssociateRepository API request.

type AssociateRepositoryResponse

type AssociateRepositoryResponse struct {
	*AssociateRepositoryOutput
	// contains filtered or unexported fields
}

AssociateRepositoryResponse is the response type for the AssociateRepository API operation.

func (*AssociateRepositoryResponse) SDKResponseMetdata

func (r *AssociateRepositoryResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the AssociateRepository request.

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to CodeGuruReviewer. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := codegurureviewer.New(myConfig)

func (*Client) AssociateRepositoryRequest

func (c *Client) AssociateRepositoryRequest(input *AssociateRepositoryInput) AssociateRepositoryRequest

AssociateRepositoryRequest returns a request value for making API operation for Amazon CodeGuru Reviewer.

Associates an AWS CodeCommit repository with Amazon CodeGuru Reviewer. When you associate an AWS CodeCommit repository with Amazon CodeGuru Reviewer, Amazon CodeGuru Reviewer will provide recommendations for each pull request. You can view recommendations in the AWS CodeCommit repository.

You can associate a GitHub repository using the Amazon CodeGuru Reviewer console.

// Example sending a request using AssociateRepositoryRequest.
req := client.AssociateRepositoryRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/AssociateRepository

func (*Client) DescribeRepositoryAssociationRequest

func (c *Client) DescribeRepositoryAssociationRequest(input *DescribeRepositoryAssociationInput) DescribeRepositoryAssociationRequest

DescribeRepositoryAssociationRequest returns a request value for making API operation for Amazon CodeGuru Reviewer.

Describes a repository association.

// Example sending a request using DescribeRepositoryAssociationRequest.
req := client.DescribeRepositoryAssociationRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeRepositoryAssociation

func (*Client) DisassociateRepositoryRequest

func (c *Client) DisassociateRepositoryRequest(input *DisassociateRepositoryInput) DisassociateRepositoryRequest

DisassociateRepositoryRequest returns a request value for making API operation for Amazon CodeGuru Reviewer.

Removes the association between Amazon CodeGuru Reviewer and a repository.

// Example sending a request using DisassociateRepositoryRequest.
req := client.DisassociateRepositoryRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DisassociateRepository

func (*Client) ListRepositoryAssociationsRequest

func (c *Client) ListRepositoryAssociationsRequest(input *ListRepositoryAssociationsInput) ListRepositoryAssociationsRequest

ListRepositoryAssociationsRequest returns a request value for making API operation for Amazon CodeGuru Reviewer.

Lists repository associations. You can optionally filter on one or more of the following recommendation properties: provider types, states, names, and owners.

// Example sending a request using ListRepositoryAssociationsRequest.
req := client.ListRepositoryAssociationsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRepositoryAssociations

type CodeCommitRepository

type CodeCommitRepository struct {

	// The name of the AWS CodeCommit repository.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

Information about an AWS CodeCommit repository.

func (CodeCommitRepository) MarshalFields

func (s CodeCommitRepository) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CodeCommitRepository) String

func (s CodeCommitRepository) String() string

String returns the string representation

func (*CodeCommitRepository) Validate

func (s *CodeCommitRepository) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeRepositoryAssociationInput

type DescribeRepositoryAssociationInput struct {

	// The Amazon Resource Name (ARN) identifying the association.
	//
	// AssociationArn is a required field
	AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DescribeRepositoryAssociationInput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeRepositoryAssociationInput) String

String returns the string representation

func (*DescribeRepositoryAssociationInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type DescribeRepositoryAssociationOutput

type DescribeRepositoryAssociationOutput struct {

	// Information about the repository association.
	RepositoryAssociation *RepositoryAssociation `type:"structure"`
	// contains filtered or unexported fields
}

func (DescribeRepositoryAssociationOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeRepositoryAssociationOutput) String

String returns the string representation

type DescribeRepositoryAssociationRequest

type DescribeRepositoryAssociationRequest struct {
	*aws.Request
	Input *DescribeRepositoryAssociationInput
	Copy  func(*DescribeRepositoryAssociationInput) DescribeRepositoryAssociationRequest
}

DescribeRepositoryAssociationRequest is the request type for the DescribeRepositoryAssociation API operation.

func (DescribeRepositoryAssociationRequest) Send

Send marshals and sends the DescribeRepositoryAssociation API request.

type DescribeRepositoryAssociationResponse

type DescribeRepositoryAssociationResponse struct {
	*DescribeRepositoryAssociationOutput
	// contains filtered or unexported fields
}

DescribeRepositoryAssociationResponse is the response type for the DescribeRepositoryAssociation API operation.

func (*DescribeRepositoryAssociationResponse) SDKResponseMetdata

func (r *DescribeRepositoryAssociationResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeRepositoryAssociation request.

type DisassociateRepositoryInput

type DisassociateRepositoryInput struct {

	// The Amazon Resource Name (ARN) identifying the association.
	//
	// AssociationArn is a required field
	AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DisassociateRepositoryInput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DisassociateRepositoryInput) String

String returns the string representation

func (*DisassociateRepositoryInput) Validate

func (s *DisassociateRepositoryInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DisassociateRepositoryOutput

type DisassociateRepositoryOutput struct {

	// Information about the disassociated repository.
	RepositoryAssociation *RepositoryAssociation `type:"structure"`
	// contains filtered or unexported fields
}

func (DisassociateRepositoryOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DisassociateRepositoryOutput) String

String returns the string representation

type DisassociateRepositoryRequest

type DisassociateRepositoryRequest struct {
	*aws.Request
	Input *DisassociateRepositoryInput
	Copy  func(*DisassociateRepositoryInput) DisassociateRepositoryRequest
}

DisassociateRepositoryRequest is the request type for the DisassociateRepository API operation.

func (DisassociateRepositoryRequest) Send

Send marshals and sends the DisassociateRepository API request.

type DisassociateRepositoryResponse

type DisassociateRepositoryResponse struct {
	*DisassociateRepositoryOutput
	// contains filtered or unexported fields
}

DisassociateRepositoryResponse is the response type for the DisassociateRepository API operation.

func (*DisassociateRepositoryResponse) SDKResponseMetdata

func (r *DisassociateRepositoryResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DisassociateRepository request.

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 along 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, then
	// ListRepositoryAssociations returns up to 100 results and a nextToken value
	// if applicable.
	MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"`

	// List of names to use as a filter.
	Names []string `location:"querystring" locationName:"Name" min:"1" type:"list"`

	// 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.
	//
	// This token should be treated as an opaque identifier that is only used to
	// retrieve the next items in a list and not for other programmatic purposes.
	NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"`

	// List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS
	// account id. For GitHub, it is the GitHub account name.
	Owners []string `location:"querystring" locationName:"Owner" min:"1" type:"list"`

	// List of provider types to use as a filter.
	ProviderTypes []ProviderType `location:"querystring" locationName:"ProviderType" min:"1" type:"list"`

	// List of states to use as a filter.
	States []RepositoryAssociationState `location:"querystring" locationName:"State" min:"1" type:"list"`
	// contains filtered or unexported fields
}

func (ListRepositoryAssociationsInput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListRepositoryAssociationsInput) String

String returns the string representation

func (*ListRepositoryAssociationsInput) Validate

func (s *ListRepositoryAssociationsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

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 `min:"1" type:"string"`

	// A list of repository associations that meet the criteria of the request.
	RepositoryAssociationSummaries []RepositoryAssociationSummary `type:"list"`
	// contains filtered or unexported fields
}

func (ListRepositoryAssociationsOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListRepositoryAssociationsOutput) String

String returns the string representation

type ListRepositoryAssociationsPaginator

type ListRepositoryAssociationsPaginator struct {
	aws.Pager
}

ListRepositoryAssociationsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListRepositoryAssociationsPaginator

func NewListRepositoryAssociationsPaginator(req ListRepositoryAssociationsRequest) ListRepositoryAssociationsPaginator

NewListRepositoryAssociationsRequestPaginator returns a paginator for ListRepositoryAssociations. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListRepositoryAssociationsRequest(input)
p := codegurureviewer.NewListRepositoryAssociationsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListRepositoryAssociationsPaginator) CurrentPage

type ListRepositoryAssociationsRequest

type ListRepositoryAssociationsRequest struct {
	*aws.Request
	Input *ListRepositoryAssociationsInput
	Copy  func(*ListRepositoryAssociationsInput) ListRepositoryAssociationsRequest
}

ListRepositoryAssociationsRequest is the request type for the ListRepositoryAssociations API operation.

func (ListRepositoryAssociationsRequest) Send

Send marshals and sends the ListRepositoryAssociations API request.

type ListRepositoryAssociationsResponse

type ListRepositoryAssociationsResponse struct {
	*ListRepositoryAssociationsOutput
	// contains filtered or unexported fields
}

ListRepositoryAssociationsResponse is the response type for the ListRepositoryAssociations API operation.

func (*ListRepositoryAssociationsResponse) SDKResponseMetdata

func (r *ListRepositoryAssociationsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListRepositoryAssociations request.

type ProviderType

type ProviderType string
const (
	ProviderTypeCodeCommit ProviderType = "CodeCommit"
	ProviderTypeGitHub     ProviderType = "GitHub"
)

Enum values for ProviderType

func (ProviderType) MarshalValue

func (enum ProviderType) MarshalValue() (string, error)

func (ProviderType) MarshalValueBuf

func (enum ProviderType) MarshalValueBuf(b []byte) ([]byte, error)

type Repository

type Repository struct {

	// Information about an AWS CodeCommit repository.
	CodeCommit *CodeCommitRepository `type:"structure"`
	// contains filtered or unexported fields
}

Information about a repository.

func (Repository) MarshalFields

func (s Repository) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Repository) String

func (s Repository) String() string

String returns the string representation

func (*Repository) Validate

func (s *Repository) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RepositoryAssociation

type RepositoryAssociation struct {

	// The Amazon Resource Name (ARN) identifying the repository association.
	AssociationArn *string `min:"1" type:"string"`

	// The id of the repository association.
	AssociationId *string `min:"1" type:"string"`

	// The time, in milliseconds since the epoch, when the repository association
	// was created.
	CreatedTimeStamp *time.Time `type:"timestamp"`

	// The time, in milliseconds since the epoch, when the repository association
	// was last updated.
	LastUpdatedTimeStamp *time.Time `type:"timestamp"`

	// The name of the repository.
	Name *string `min:"1" type:"string"`

	// The owner of the repository.
	Owner *string `min:"1" type:"string"`

	// The provider type of the repository association.
	ProviderType ProviderType `type:"string" enum:"true"`

	// The state of the repository association.
	State RepositoryAssociationState `type:"string" enum:"true"`

	// A description of why the repository association is in the current state.
	StateReason *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a repository association.

func (RepositoryAssociation) MarshalFields

func (s RepositoryAssociation) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RepositoryAssociation) String

func (s RepositoryAssociation) String() string

String returns the string representation

type RepositoryAssociationState

type RepositoryAssociationState string
const (
	RepositoryAssociationStateAssociated     RepositoryAssociationState = "Associated"
	RepositoryAssociationStateAssociating    RepositoryAssociationState = "Associating"
	RepositoryAssociationStateFailed         RepositoryAssociationState = "Failed"
	RepositoryAssociationStateDisassociating RepositoryAssociationState = "Disassociating"
)

Enum values for RepositoryAssociationState

func (RepositoryAssociationState) MarshalValue

func (enum RepositoryAssociationState) MarshalValue() (string, error)

func (RepositoryAssociationState) MarshalValueBuf

func (enum RepositoryAssociationState) MarshalValueBuf(b []byte) ([]byte, error)

type RepositoryAssociationSummary

type RepositoryAssociationSummary struct {

	// The Amazon Resource Name (ARN) identifying the repository association.
	AssociationArn *string `min:"1" type:"string"`

	// The repository association ID.
	AssociationId *string `min:"1" type:"string"`

	// The time, in milliseconds since the epoch, since the repository association
	// was last updated.
	LastUpdatedTimeStamp *time.Time `type:"timestamp"`

	// The name of the repository association.
	Name *string `min:"1" type:"string"`

	// The owner of the repository association.
	Owner *string `min:"1" type:"string"`

	// The provider type of the repository association.
	ProviderType ProviderType `type:"string" enum:"true"`

	// The state of the repository association.
	//
	// Associated
	//
	// Amazon CodeGuru Reviewer is associated with the repository.
	//
	// Associating
	//
	// The association is in progress.
	//
	// Failed
	//
	// The association failed. For more information about troubleshooting (or why
	// it failed), see [troubleshooting topic].
	//
	// Disassociating
	//
	// Amazon CodeGuru Reviewer is in the process of disassociating with the repository.
	State RepositoryAssociationState `type:"string" enum:"true"`
	// contains filtered or unexported fields
}

Information about a repository association.

func (RepositoryAssociationSummary) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RepositoryAssociationSummary) String

String returns the string representation

Directories

Path Synopsis
Package codegururevieweriface provides an interface to enable mocking the Amazon CodeGuru Reviewer service client for testing your code.
Package codegururevieweriface provides an interface to enable mocking the Amazon CodeGuru Reviewer service client for testing your code.

Jump to

Keyboard shortcuts

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