Documentation
¶
Index ¶
- type CodeArtifactService
- func (s *CodeArtifactService) Actions() []service.Action
- func (s *CodeArtifactService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
- func (s *CodeArtifactService) HealthCheck() error
- func (s *CodeArtifactService) Name() string
- func (s *CodeArtifactService) SetLocator(locator ServiceLocator)
- func (s *CodeArtifactService) Store() *Store
- type Domain
- type DomainPermissionsPolicy
- type ExternalConnection
- type Package
- type PackageOriginConfig
- type PackageOriginRestrictions
- type PackageVersion
- type Repository
- type ServiceLocator
- type Store
- func (s *Store) CreateDomain(name, encryptionKey string, tags map[string]string) (*Domain, *service.AWSError)
- func (s *Store) CreateRepository(domainName, repoName, description string, upstreams []UpstreamRepo, ...) (*Repository, *service.AWSError)
- func (s *Store) DeleteDomain(name string) (*Domain, *service.AWSError)
- func (s *Store) DeleteDomainPermissionsPolicy(domainName string) *service.AWSError
- func (s *Store) DeleteRepository(domainName, repoName string) (*Repository, *service.AWSError)
- func (s *Store) DescribeDomain(name string) (*Domain, *service.AWSError)
- func (s *Store) DescribePackage(domainName, repoName, format, namespace, pkgName string) (*Package, *service.AWSError)
- func (s *Store) DescribePackageVersion(domainName, repoName, format, namespace, pkgName, version string) (*PackageVersion, *service.AWSError)
- func (s *Store) DescribeRepository(domainName, repoName string) (*Repository, *service.AWSError)
- func (s *Store) EnsurePackage(domainName, repoName, format, namespace, pkgName, version string)
- func (s *Store) GetAuthorizationToken(domainName string) (string, time.Time, *service.AWSError)
- func (s *Store) GetDomainPermissionsPolicy(domainName string) (*DomainPermissionsPolicy, *service.AWSError)
- func (s *Store) GetPackageVersionReadme(domainName, repoName, format, namespace, pkgName, version string) (string, string, *service.AWSError)
- func (s *Store) GetRepositoryEndpoint(domainName, repoName, format string) (string, *service.AWSError)
- func (s *Store) ListDomains() []*Domain
- func (s *Store) ListPackageVersions(domainName, repoName, format, namespace, pkgName string) ([]*PackageVersion, *service.AWSError)
- func (s *Store) ListPackages(domainName, repoName, format, namespace string) []*Package
- func (s *Store) ListRepositories(domainName string) []*Repository
- func (s *Store) ListTagsForResource(arn string) map[string]string
- func (s *Store) PutDomainPermissionsPolicy(domainName, document string) (*DomainPermissionsPolicy, *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) UpdateRepository(domainName, repoName, description string, upstreams []UpstreamRepo) (*Repository, *service.AWSError)
- type UpstreamRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeArtifactService ¶
type CodeArtifactService struct {
// contains filtered or unexported fields
}
CodeArtifactService is the cloudmock implementation of the AWS CodeArtifact API. CodeArtifact uses the rest-json protocol.
func New ¶
func New(accountID, region string) *CodeArtifactService
New returns a new CodeArtifactService for the given AWS account ID and region.
func NewWithLocator ¶
func NewWithLocator(accountID, region string, locator ServiceLocator) *CodeArtifactService
NewWithLocator returns a new CodeArtifactService with a ServiceLocator.
func (*CodeArtifactService) Actions ¶
func (s *CodeArtifactService) Actions() []service.Action
Actions returns the list of CodeArtifact API actions supported.
func (*CodeArtifactService) HandleRequest ¶
func (s *CodeArtifactService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming CodeArtifact request to the appropriate handler.
func (*CodeArtifactService) HealthCheck ¶
func (s *CodeArtifactService) HealthCheck() error
HealthCheck always returns nil.
func (*CodeArtifactService) Name ¶
func (s *CodeArtifactService) Name() string
Name returns the AWS service name used for routing.
func (*CodeArtifactService) SetLocator ¶
func (s *CodeArtifactService) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service calls.
func (*CodeArtifactService) Store ¶
func (s *CodeArtifactService) Store() *Store
Store returns the underlying store (for testing).
type Domain ¶
type Domain struct {
Name string
ARN string
Owner string
Status string
EncryptionKey string
RepositoryCount int
AssetSizeBytes int64
CreatedTime time.Time
Tags map[string]string
}
Domain represents a CodeArtifact domain.
type DomainPermissionsPolicy ¶
DomainPermissionsPolicy holds the resource policy for a domain.
type ExternalConnection ¶
ExternalConnection describes an external package connection.
type Package ¶
type Package struct {
Format string
Namespace string
PackageName string
OriginConfig *PackageOriginConfig
}
Package represents a package in a repository.
type PackageOriginConfig ¶
type PackageOriginConfig struct {
Restrictions *PackageOriginRestrictions
}
PackageOriginConfig describes package origin restrictions.
type PackageOriginRestrictions ¶
PackageOriginRestrictions describes publish/upstream restrictions.
type PackageVersion ¶
type PackageVersion struct {
Version string
Status string
Revision string
DisplayName string
Summary string
HomePage string
PublishedTime time.Time
}
PackageVersion represents a specific version of a package.
type Repository ¶
type Repository struct {
Name string
ARN string
DomainName string
DomainOwner string
Description string
Upstreams []UpstreamRepo
ExternalConnections []ExternalConnection
CreatedTime time.Time
Tags map[string]string
}
Repository represents a CodeArtifact 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 CodeArtifact resources.
func (*Store) CreateDomain ¶
func (*Store) CreateRepository ¶
func (s *Store) CreateRepository(domainName, repoName, description string, upstreams []UpstreamRepo, tags map[string]string) (*Repository, *service.AWSError)
func (*Store) DeleteDomainPermissionsPolicy ¶
func (*Store) DeleteRepository ¶
func (s *Store) DeleteRepository(domainName, repoName string) (*Repository, *service.AWSError)
func (*Store) DescribeDomain ¶
func (*Store) DescribePackage ¶
func (*Store) DescribePackageVersion ¶
func (s *Store) DescribePackageVersion(domainName, repoName, format, namespace, pkgName, version string) (*PackageVersion, *service.AWSError)
func (*Store) DescribeRepository ¶
func (s *Store) DescribeRepository(domainName, repoName string) (*Repository, *service.AWSError)
func (*Store) EnsurePackage ¶
EnsurePackage creates a package and version if they don't exist (used for testing).
func (*Store) GetAuthorizationToken ¶
func (*Store) GetDomainPermissionsPolicy ¶
func (s *Store) GetDomainPermissionsPolicy(domainName string) (*DomainPermissionsPolicy, *service.AWSError)
func (*Store) GetPackageVersionReadme ¶
func (s *Store) GetPackageVersionReadme(domainName, repoName, format, namespace, pkgName, version string) (string, string, *service.AWSError)
GetPackageVersionReadme returns a synthetic README for a package version.
func (*Store) GetRepositoryEndpoint ¶
func (*Store) ListDomains ¶
func (*Store) ListPackageVersions ¶
func (s *Store) ListPackageVersions(domainName, repoName, format, namespace, pkgName string) ([]*PackageVersion, *service.AWSError)
func (*Store) ListPackages ¶
func (*Store) ListRepositories ¶
func (s *Store) ListRepositories(domainName string) []*Repository
func (*Store) ListTagsForResource ¶
func (*Store) PutDomainPermissionsPolicy ¶
func (s *Store) PutDomainPermissionsPolicy(domainName, document string) (*DomainPermissionsPolicy, *service.AWSError)
func (*Store) TagResource ¶
func (*Store) UntagResource ¶
func (*Store) UpdateRepository ¶
func (s *Store) UpdateRepository(domainName, repoName, description string, upstreams []UpstreamRepo) (*Repository, *service.AWSError)
type UpstreamRepo ¶
type UpstreamRepo struct {
RepositoryName string
}
UpstreamRepo describes an upstream repository reference.