Documentation
¶
Overview ¶
Package codestarconnections provides an in-memory implementation of the AWS CodeStar Connections service.
Index ¶
- Constants
- Variables
- type Connection
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type Host
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddConnectionInternal(conn *Connection)
- func (b *InMemoryBackend) AddHostInternal(host *Host)
- func (b *InMemoryBackend) AddRepositoryLinkInternal(ctx context.Context, link *RepositoryLink)
- func (b *InMemoryBackend) CreateConnection(ctx context.Context, name, providerType, hostArn string, ...) (*Connection, error)
- func (b *InMemoryBackend) CreateHost(ctx context.Context, name, providerType, providerEndpoint string, ...) (*Host, error)
- func (b *InMemoryBackend) CreateRepositoryLink(ctx context.Context, connectionArn, ownerID, repoName, encryptionKeyArn string, ...) (*RepositoryLink, error)
- func (b *InMemoryBackend) CreateSyncBlocker(ctx context.Context, resourceName, syncType, blockerType, createdReason string) (*SyncBlocker, error)
- func (b *InMemoryBackend) CreateSyncConfiguration(ctx context.Context, ...) (*SyncConfiguration, error)
- func (b *InMemoryBackend) CreateSyncConfigurationFull(ctx context.Context, ...) (*SyncConfiguration, error)
- func (b *InMemoryBackend) DeleteConnection(_ context.Context, connectionArn string) error
- func (b *InMemoryBackend) DeleteHost(ctx context.Context, hostArn string) error
- func (b *InMemoryBackend) DeleteRepositoryLink(ctx context.Context, repositoryLinkID string) error
- func (b *InMemoryBackend) DeleteSyncConfiguration(ctx context.Context, resourceName, syncType string) error
- func (b *InMemoryBackend) GetConnection(_ context.Context, connectionArn string) (*Connection, error)
- func (b *InMemoryBackend) GetHost(_ context.Context, hostArn string) (*Host, error)
- func (b *InMemoryBackend) GetRepositoryLink(ctx context.Context, repositoryLinkID string) (*RepositoryLink, error)
- func (b *InMemoryBackend) GetRepositorySyncStatus(ctx context.Context, repositoryLinkID, branch, syncType string) (*RepositorySyncStatus, error)
- func (b *InMemoryBackend) GetResourceSyncStatus(ctx context.Context, resourceName, syncType string) (*ResourceSyncStatus, error)
- func (b *InMemoryBackend) GetSyncBlockerSummary(ctx context.Context, resourceName, syncType string) (*SyncBlockerSummary, error)
- func (b *InMemoryBackend) GetSyncConfiguration(ctx context.Context, resourceName, syncType string) (*SyncConfiguration, error)
- func (b *InMemoryBackend) ListConnections(ctx context.Context, providerTypeFilter, hostArnFilter string) []*Connection
- func (b *InMemoryBackend) ListHosts(ctx context.Context) []*Host
- func (b *InMemoryBackend) ListRepositoryLinks(ctx context.Context) []*RepositoryLink
- func (b *InMemoryBackend) ListRepositorySyncDefinitions(ctx context.Context, repositoryLinkID, syncType string) ([]RepositorySyncDefinition, error)
- func (b *InMemoryBackend) ListSyncConfigurations(ctx context.Context, repositoryLinkID, syncType string) []*SyncConfiguration
- func (b *InMemoryBackend) ListTagsForResource(_ context.Context, resourceArn string) (map[string]string, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetRepositorySyncStatus(ctx context.Context, repositoryLinkID, branch, syncType, status string, ...)
- func (b *InMemoryBackend) SetResourceSyncStatus(ctx context.Context, resourceName, syncType, status string, events []SyncEvent)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TagResource(_ context.Context, resourceArn string, tags map[string]string) error
- func (b *InMemoryBackend) UntagResource(_ context.Context, resourceArn string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateHost(_ context.Context, hostArn, providerEndpoint string, ...) error
- func (b *InMemoryBackend) UpdateRepositoryLink(ctx context.Context, repositoryLinkID, connectionArn, encryptionKeyArn string) (*RepositoryLink, error)
- func (b *InMemoryBackend) UpdateSyncBlocker(ctx context.Context, id, resolvedReason string) (*SyncBlockerSummary, error)
- func (b *InMemoryBackend) UpdateSyncConfiguration(ctx context.Context, ...) (*SyncConfiguration, error)
- func (b *InMemoryBackend) UpdateSyncConfigurationFull(ctx context.Context, ...) (*SyncConfiguration, error)
- type Provider
- type RepositoryLink
- type RepositorySyncDefinition
- type RepositorySyncStatus
- type ResourceSyncStatus
- type SyncBlocker
- type SyncBlockerSummary
- type SyncConfiguration
- type SyncEvent
- type VpcConfiguration
Constants ¶
const ( ConnectionStatusAvailable = "AVAILABLE" ConnectionStatusPending = "PENDING" ConnectionStatusError = "ERROR" )
Connection status values.
const ( HostStatusAvailable = "AVAILABLE" HostStatusPending = "PENDING" HostStatusVPCConfigDeleting = "VPC_CONFIG_DELETING" HostStatusVPCConfigFailed = "VPC_CONFIG_FAILED" HostStatusVPCConfigInProgress = "VPC_CONFIG_IN_PROGRESS" )
Host status values.
const ( SyncStatusSucceeded = "SUCCEEDED" SyncStatusFailed = "FAILED" SyncStatusInProgress = "IN_PROGRESS" SyncStatusQueued = "QUEUED" )
Sync status values.
const ( SyncBlockerStatusActive = "ACTIVE" SyncBlockerStatusResolved = "RESOLVED" )
SyncBlocker status values.
const ( SyncBlockerTypeAutomated = "AUTOMATED" SyncBlockerTypeManual = "MANUAL" )
SyncBlocker type values.
Variables ¶
var ( // ErrNotFound is returned when a requested resource does not exist. ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrAlreadyExists is returned when a connection or host with the same name // already exists. The real CreateConnection/CreateHost operations do not // document a dedicated typed exception for this, so it maps to the generic // InvalidInputException (see handler.go's error switch). ErrAlreadyExists = awserr.New("InvalidInputException", awserr.ErrAlreadyExists) // ErrResourceAlreadyExists is returned when a repository link or sync // configuration with the same identity already exists. Unlike // ErrAlreadyExists above, the real CreateRepositoryLink/CreateSyncConfiguration // operations both register a dedicated ResourceAlreadyExistsException for // this case (confirmed against aws-sdk-go-v2's per-op error deserializers). ErrResourceAlreadyExists = awserr.New("ResourceAlreadyExistsException", awserr.ErrAlreadyExists) // ErrValidation is returned when input validation fails. The real // aws-sdk-go-v2/service/codestarconnections@v1.35.15 types/errors.go has // no ValidationException type at all (its modeled exception set is // AccessDeniedException/ConcurrentModificationException/ // ConditionalCheckFailedException/ConflictException/ // InternalServerException/InvalidInputException/LimitExceededException/ // ResourceAlreadyExistsException/ResourceNotFoundException/ // ResourceUnavailableException/RetryLatestCommitFailedException/ // SyncBlockerDoesNotExistException/SyncConfigurationStillExistsException/ // ThrottlingException/UnsupportedOperationException/ // UnsupportedProviderTypeException/UpdateOutOfSyncException -- // InvalidInputException is the real type for malformed/missing-required- // field input, confirmed against every mutating op's error list in // botocore's codestar-connections/2019-12-01/service-2.json (e.g. // CreateRepositoryLink, CreateSyncConfiguration, GetResourceSyncStatus all // list InvalidInputException, none list ValidationException). A previous // implementation invented a "ValidationException" type here that does not // exist in the real service. ErrValidation = awserr.New("InvalidInputException", awserr.ErrInvalidParameter) // ErrTagLimitExceeded is returned when a create/tag operation would push a // resource's tag count over maxTagsPerResource. Real CreateConnection's // complete error list is [LimitExceededException, ResourceNotFoundException, // ResourceUnavailableException] and CreateHost's is [LimitExceededException] // only (botocore codestar-connections/2019-12-01/service-2.json) -- neither // documents InvalidInputException at all -- and TagResource's is // [ResourceNotFoundException, LimitExceededException]. LimitExceededException // is therefore the correct real type for "too many tags" everywhere, not // the generic ErrValidation/InvalidInputException a previous implementation // used. ErrTagLimitExceeded = awserr.New("LimitExceededException", awserr.ErrInvalidParameter) // ErrResourceInUse is returned when a host cannot be deleted because a // connection still references it ("Before you delete a host, all // connections associated to the host must be deleted."). A previous // implementation used ConflictException here on the theory that "no // dedicated typed error is documented for this case" -- but DeleteHost's // real, complete error list (botocore codestar-connections/2019-12-01/ // service-2.json) is exactly [ResourceNotFoundException, // ResourceUnavailableException]; ConflictException is not a possible // error for this operation at all (it belongs to UpdateHost's error list // instead). ResourceUnavailableException is the correct real type. ErrResourceInUse = awserr.New("ResourceUnavailableException", awserr.ErrConflict) // ErrSyncConfigStillExists is returned when a repository link cannot be // deleted because a sync configuration still references it. The real // DeleteRepositoryLink operation documents SyncConfigurationStillExistsException // for exactly this case. ErrSyncConfigStillExists = awserr.New("SyncConfigurationStillExistsException", awserr.ErrConflict) // ErrSyncBlockerNotFound is returned by UpdateSyncBlocker when the blocker ID // does not exist (or was created in a different region). The real operation // documents SyncBlockerDoesNotExistException for this case; it does NOT // resolve unknown IDs gracefully. ErrSyncBlockerNotFound = awserr.New("SyncBlockerDoesNotExistException", awserr.ErrNotFound) )
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Tags map[string]string `json:"tags,omitempty"`
ConnectionName string `json:"connectionName"`
ConnectionArn string `json:"connectionArn"`
ConnectionStatus string `json:"connectionStatus"`
OwnerAccountID string `json:"ownerAccountId"`
ProviderType string `json:"providerType"`
HostArn string `json:"hostArn,omitempty"`
}
Connection represents an in-memory AWS CodeStar connection.
ConnectionArn already embeds its own region (arn:partition:service:region: account:resource, see regionFromARN), so Connection needs no hidden region field: store_setup.go's connections table is keyed directly by ConnectionArn and its byRegion/byName indexes derive region from the ARN.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for CodeStar Connections operations.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a new CodeStar Connections handler backed by backend.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this handler instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the CodeStar Connections action from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the primary resource identifier from the JSON request body.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for CodeStar Connections requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches CodeStar Connections requests.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend.
Without this delegation, cli.go's setupPersistence type-asserts the service.Registerable value returned by Provider.Init (this Handler, not InMemoryBackend) against a Snapshot/Restore interface -- since Handler itself never exposed either method, InMemoryBackend.Snapshot/Restore (persistence.go) were dead code and this service was never actually persisted, despite implementing the Persistable contract.
type Host ¶
type Host struct {
Tags map[string]string `json:"tags,omitempty"`
VpcConfiguration *VpcConfiguration `json:"vpcConfiguration,omitempty"`
Name string `json:"name"`
HostArn string `json:"hostArn"`
ProviderType string `json:"providerType"`
ProviderEndpoint string `json:"providerEndpoint"`
Status string `json:"status"`
StatusMessage string `json:"statusMessage,omitempty"`
}
Host represents an in-memory AWS CodeStar host.
Like Connection, HostArn already embeds its own region, so Host needs no hidden region field either.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is a thread-safe in-memory store for CodeStar Connections resources.
connections and hosts are "clean" store.Table collections (see store_setup.go): each is keyed directly by its own ARN, which already embeds its region, so region isolation falls out of the byRegion/byName indexes with no hidden fields needed. repositoryLinks, syncConfigurations, repositorySyncStatuses, resourceSyncStatuses, and syncBlockers are "dirty": their identity (RepositoryLinkID; ResourceName+SyncType; RepositoryLinkID+Branch+SyncType; ResourceName+SyncType; ID) carries no region of its own, and lookups for the first four are scoped by the caller's context region (not by any embedded ARN region), so each type carries an unexported region-qualifying field and is registered with a composite "region|id" key. connections/hosts are registered on registry; the five dirty tables are NOT (store.New only), so they are excluded from registry.ResetAll() and must be reset explicitly -- see Reset below and persistence.go's mixed clean/dirty Snapshot/Restore.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new backend for the given account and region.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the account ID for this backend instance.
func (*InMemoryBackend) AddConnectionInternal ¶
func (b *InMemoryBackend) AddConnectionInternal(conn *Connection)
AddConnectionInternal seeds a connection directly for testing.
func (*InMemoryBackend) AddHostInternal ¶
func (b *InMemoryBackend) AddHostInternal(host *Host)
AddHostInternal seeds a host directly for testing.
func (*InMemoryBackend) AddRepositoryLinkInternal ¶
func (b *InMemoryBackend) AddRepositoryLinkInternal(ctx context.Context, link *RepositoryLink)
AddRepositoryLinkInternal seeds a repository link directly for testing.
func (*InMemoryBackend) CreateConnection ¶
func (b *InMemoryBackend) CreateConnection( ctx context.Context, name, providerType, hostArn string, tags map[string]string, ) (*Connection, error)
CreateConnection creates a new CodeStar connection.
func (*InMemoryBackend) CreateHost ¶
func (b *InMemoryBackend) CreateHost( ctx context.Context, name, providerType, providerEndpoint string, vpcConfig *VpcConfiguration, tags map[string]string, ) (*Host, error)
CreateHost creates a new CodeStar host.
func (*InMemoryBackend) CreateRepositoryLink ¶
func (b *InMemoryBackend) CreateRepositoryLink( ctx context.Context, connectionArn, ownerID, repoName, encryptionKeyArn string, tags map[string]string, ) (*RepositoryLink, error)
CreateRepositoryLink creates a new repository link.
func (*InMemoryBackend) CreateSyncBlocker ¶
func (b *InMemoryBackend) CreateSyncBlocker( ctx context.Context, resourceName, syncType, blockerType, createdReason string, ) (*SyncBlocker, error)
CreateSyncBlocker creates a new sync blocker for a resource (test helper + internal use).
func (*InMemoryBackend) CreateSyncConfiguration ¶
func (b *InMemoryBackend) CreateSyncConfiguration( ctx context.Context, branch, configFile, repositoryLinkID, resourceName, roleArn, syncType string, ) (*SyncConfiguration, error)
CreateSyncConfiguration creates a new sync configuration.
func (*InMemoryBackend) CreateSyncConfigurationFull ¶
func (b *InMemoryBackend) CreateSyncConfigurationFull( ctx context.Context, branch, configFile, repositoryLinkID, resourceName, roleArn, syncType, publishDeploymentStatus, triggerResourceUpdateOn string, ) (*SyncConfiguration, error)
CreateSyncConfigurationFull creates a sync configuration with optional PublishDeploymentStatus and TriggerResourceUpdateOn.
func (*InMemoryBackend) DeleteConnection ¶
func (b *InMemoryBackend) DeleteConnection(_ context.Context, connectionArn string) error
DeleteConnection removes a connection by ARN.
func (*InMemoryBackend) DeleteHost ¶
func (b *InMemoryBackend) DeleteHost(ctx context.Context, hostArn string) error
DeleteHost removes a host by ARN. Returns ErrResourceInUse if any connection references the host.
func (*InMemoryBackend) DeleteRepositoryLink ¶
func (b *InMemoryBackend) DeleteRepositoryLink(ctx context.Context, repositoryLinkID string) error
DeleteRepositoryLink removes a repository link by ID. Returns ErrResourceInUse if sync configs reference it.
func (*InMemoryBackend) DeleteSyncConfiguration ¶
func (b *InMemoryBackend) DeleteSyncConfiguration(ctx context.Context, resourceName, syncType string) error
DeleteSyncConfiguration removes a sync configuration.
func (*InMemoryBackend) GetConnection ¶
func (b *InMemoryBackend) GetConnection(_ context.Context, connectionArn string) (*Connection, error)
GetConnection returns a connection by ARN.
func (*InMemoryBackend) GetRepositoryLink ¶
func (b *InMemoryBackend) GetRepositoryLink(ctx context.Context, repositoryLinkID string) (*RepositoryLink, error)
GetRepositoryLink retrieves a repository link by ID.
func (*InMemoryBackend) GetRepositorySyncStatus ¶
func (b *InMemoryBackend) GetRepositorySyncStatus( ctx context.Context, repositoryLinkID, branch, syncType string, ) (*RepositorySyncStatus, error)
GetRepositorySyncStatus returns the latest sync status for a repository link and branch.
func (*InMemoryBackend) GetResourceSyncStatus ¶
func (b *InMemoryBackend) GetResourceSyncStatus( ctx context.Context, resourceName, syncType string, ) (*ResourceSyncStatus, error)
GetResourceSyncStatus returns the latest sync status for a resource.
func (*InMemoryBackend) GetSyncBlockerSummary ¶
func (b *InMemoryBackend) GetSyncBlockerSummary( ctx context.Context, resourceName, syncType string, ) (*SyncBlockerSummary, error)
GetSyncBlockerSummary returns the sync blocker summary for a resource.
func (*InMemoryBackend) GetSyncConfiguration ¶
func (b *InMemoryBackend) GetSyncConfiguration( ctx context.Context, resourceName, syncType string, ) (*SyncConfiguration, error)
GetSyncConfiguration retrieves a sync configuration by resource name and sync type.
func (*InMemoryBackend) ListConnections ¶
func (b *InMemoryBackend) ListConnections(ctx context.Context, providerTypeFilter, hostArnFilter string) []*Connection
ListConnections returns all connections sorted by name, optionally filtered by provider type or host ARN.
func (*InMemoryBackend) ListHosts ¶
func (b *InMemoryBackend) ListHosts(ctx context.Context) []*Host
ListHosts returns all hosts sorted by name.
func (*InMemoryBackend) ListRepositoryLinks ¶
func (b *InMemoryBackend) ListRepositoryLinks(ctx context.Context) []*RepositoryLink
ListRepositoryLinks returns all repository links sorted by ID.
func (*InMemoryBackend) ListRepositorySyncDefinitions ¶
func (b *InMemoryBackend) ListRepositorySyncDefinitions( ctx context.Context, repositoryLinkID, syncType string, ) ([]RepositorySyncDefinition, error)
ListRepositorySyncDefinitions returns the sync definitions derived from the sync configurations linked to repositoryLinkID, optionally filtered by syncType. Directory is sourced from each sync configuration's ConfigFile (per AWS docs: "This value comes from creating or updating the config-file field of a sync-configuration"). For CFN_STACK_SYNC -- the only SyncType gopherstack supports -- AWS docs state "the parent and target resource are the same", so Parent and Target both equal ResourceName.
func (*InMemoryBackend) ListSyncConfigurations ¶
func (b *InMemoryBackend) ListSyncConfigurations( ctx context.Context, repositoryLinkID, syncType string, ) []*SyncConfiguration
ListSyncConfigurations returns all sync configurations for a given repository link and sync type.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(_ context.Context, resourceArn string) (map[string]string, error)
ListTagsForResource returns the tags for a resource by ARN.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the default region for this backend instance.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all state in the backend.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) SetRepositorySyncStatus ¶
func (b *InMemoryBackend) SetRepositorySyncStatus( ctx context.Context, repositoryLinkID, branch, syncType, status string, events []SyncEvent, )
SetRepositorySyncStatus stores a sync status for a repository link/branch/syncType (test helper).
func (*InMemoryBackend) SetResourceSyncStatus ¶
func (b *InMemoryBackend) SetResourceSyncStatus( ctx context.Context, resourceName, syncType, status string, events []SyncEvent, )
SetResourceSyncStatus stores a sync status for a resource (test helper).
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(_ context.Context, resourceArn string, tags map[string]string) error
TagResource adds or updates tags on a resource.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(_ context.Context, resourceArn string, tagKeys []string) error
UntagResource removes tags from a resource.
func (*InMemoryBackend) UpdateHost ¶
func (b *InMemoryBackend) UpdateHost( _ context.Context, hostArn, providerEndpoint string, vpcConfig *VpcConfiguration, ) error
UpdateHost updates the provider endpoint and optional VPC configuration for a host.
func (*InMemoryBackend) UpdateRepositoryLink ¶
func (b *InMemoryBackend) UpdateRepositoryLink( ctx context.Context, repositoryLinkID, connectionArn, encryptionKeyArn string, ) (*RepositoryLink, error)
UpdateRepositoryLink updates the connection ARN or encryption key for a repository link.
func (*InMemoryBackend) UpdateSyncBlocker ¶
func (b *InMemoryBackend) UpdateSyncBlocker( ctx context.Context, id, resolvedReason string, ) (*SyncBlockerSummary, error)
UpdateSyncBlocker resolves a sync blocker by ID. If the blocker ID is not found (or was created in a different region than the caller's context, matching the original map-based lookup's region scoping), returns ErrSyncBlockerNotFound -- the real UpdateSyncBlocker operation documents SyncBlockerDoesNotExistException for exactly this case, it does not resolve unknown IDs gracefully.
func (*InMemoryBackend) UpdateSyncConfiguration ¶
func (b *InMemoryBackend) UpdateSyncConfiguration( ctx context.Context, resourceName, syncType, branch, configFile, repositoryLinkID, roleArn string, ) (*SyncConfiguration, error)
UpdateSyncConfiguration updates branch, config file, role ARN, or repository link for a sync configuration.
func (*InMemoryBackend) UpdateSyncConfigurationFull ¶
func (b *InMemoryBackend) UpdateSyncConfigurationFull( ctx context.Context, resourceName, syncType, branch, configFile, repositoryLinkID, roleArn, publishDeploymentStatus, triggerResourceUpdateOn string, ) (*SyncConfiguration, error)
UpdateSyncConfigurationFull updates a sync configuration including optional publish/trigger fields.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS CodeStar Connections.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the CodeStar Connections service backend and handler.
type RepositoryLink ¶
type RepositoryLink struct {
CreatedAt time.Time `json:"createdAt"`
Tags map[string]string `json:"tags,omitempty"`
ConnectionArn string `json:"connectionArn"`
OwnerID string `json:"ownerID"`
RepositoryName string `json:"repositoryName"`
RepositoryLinkID string `json:"repositoryLinkID"`
RepositoryLinkArn string `json:"repositoryLinkArn"`
ProviderType string `json:"providerType"`
EncryptionKeyArn string `json:"encryptionKeyArn,omitempty"`
// contains filtered or unexported fields
}
RepositoryLink represents an in-memory AWS CodeStar Connections repository link.
Tags: unlike SyncConfiguration, CreateRepositoryLinkInput has a real `Tags []types.Tag` member (confirmed against aws-sdk-go-v2's generated api_op_CreateRepositoryLink.go), so repository links are taggable via TagResource/UntagResource/ListTagsForResource just like connections and hosts. Note RepositoryLinkInfo (the Get/List/Create/Update response shape) has no Tags member of its own -- tags are never echoed back in-line the way CreateConnectionOutput/CreateHostOutput do; they are only visible via ListTagsForResource.
type RepositorySyncDefinition ¶
RepositorySyncDefinition is a mapping from a repository branch to the AWS resource(s) being synced from that branch (see AWS docs for RepositorySyncDefinition).
type RepositorySyncStatus ¶
type RepositorySyncStatus struct {
StartedAt time.Time
Status string
Events []SyncEvent
// contains filtered or unexported fields
}
RepositorySyncStatus holds the latest sync attempt information for a repository link.
type ResourceSyncStatus ¶
type ResourceSyncStatus struct {
StartedAt time.Time
Status string
Events []SyncEvent
// contains filtered or unexported fields
}
ResourceSyncStatus holds the latest sync attempt for an AWS resource.
type SyncBlocker ¶
type SyncBlocker struct {
ID string
Type string
Status string
CreatedAt time.Time
CreatedReason string
ResolvedAt *time.Time
ResolvedReason string
ResourceName string
SyncType string
// contains filtered or unexported fields
}
SyncBlocker represents a single sync blocker entry.
type SyncBlockerSummary ¶
type SyncBlockerSummary struct {
ResourceName string
ParentResourceName string
LatestBlockers []SyncBlocker
}
SyncBlockerSummary is a summary of sync blockers for a resource.
type SyncConfiguration ¶
type SyncConfiguration struct {
CreatedAt time.Time `json:"createdAt"`
Branch string `json:"branch"`
ConfigFile string `json:"configFile"`
RepositoryLinkID string `json:"repositoryLinkID"`
ResourceName string `json:"resourceName"`
RoleArn string `json:"roleArn"`
SyncType string `json:"syncType"`
OwnerID string `json:"ownerID"`
ProviderType string `json:"providerType"`
RepositoryName string `json:"repositoryName"`
PublishDeploymentStatus string `json:"publishDeploymentStatus,omitempty"`
TriggerResourceUpdateOn string `json:"triggerResourceUpdateOn,omitempty"`
// contains filtered or unexported fields
}
SyncConfiguration represents an in-memory AWS CodeStar Connections sync configuration.
Source Files
¶
- connections.go
- errors.go
- handler.go
- handler_connections.go
- handler_hosts.go
- handler_repository_links.go
- handler_sync_blockers.go
- handler_sync_configurations.go
- handler_sync_statuses.go
- handler_tags.go
- hosts.go
- models.go
- persistence.go
- provider.go
- repository_links.go
- store.go
- store_setup.go
- sync_blockers.go
- sync_configurations.go
- sync_statuses.go
- tags.go