codeartifact

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

type DomainPermissionsPolicy struct {
	Document string
	Revision string
}

DomainPermissionsPolicy holds the resource policy for a domain.

type ExternalConnection

type ExternalConnection struct {
	ExternalConnectionName string
	PackageFormat          string
	Status                 string
}

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

type PackageOriginRestrictions struct {
	Publish  string
	Upstream string
}

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

type ServiceLocator interface {
	Lookup(name string) (service.Service, error)
}

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 NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty CodeArtifact store.

func (*Store) CreateDomain

func (s *Store) CreateDomain(name, encryptionKey string, tags map[string]string) (*Domain, *service.AWSError)

func (*Store) CreateRepository

func (s *Store) CreateRepository(domainName, repoName, description string, upstreams []UpstreamRepo, tags map[string]string) (*Repository, *service.AWSError)

func (*Store) DeleteDomain

func (s *Store) DeleteDomain(name string) (*Domain, *service.AWSError)

func (*Store) DeleteDomainPermissionsPolicy

func (s *Store) DeleteDomainPermissionsPolicy(domainName string) *service.AWSError

func (*Store) DeleteRepository

func (s *Store) DeleteRepository(domainName, repoName string) (*Repository, *service.AWSError)

func (*Store) DescribeDomain

func (s *Store) DescribeDomain(name string) (*Domain, *service.AWSError)

func (*Store) DescribePackage

func (s *Store) DescribePackage(domainName, repoName, format, namespace, pkgName string) (*Package, *service.AWSError)

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

func (s *Store) EnsurePackage(domainName, repoName, format, namespace, pkgName, version string)

EnsurePackage creates a package and version if they don't exist (used for testing).

func (*Store) GetAuthorizationToken

func (s *Store) GetAuthorizationToken(domainName string) (string, time.Time, *service.AWSError)

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 (s *Store) GetRepositoryEndpoint(domainName, repoName, format string) (string, *service.AWSError)

func (*Store) ListDomains

func (s *Store) ListDomains() []*Domain

func (*Store) ListPackageVersions

func (s *Store) ListPackageVersions(domainName, repoName, format, namespace, pkgName string) ([]*PackageVersion, *service.AWSError)

func (*Store) ListPackages

func (s *Store) ListPackages(domainName, repoName, format, namespace string) []*Package

func (*Store) ListRepositories

func (s *Store) ListRepositories(domainName string) []*Repository

func (*Store) ListTagsForResource

func (s *Store) ListTagsForResource(arn string) map[string]string

func (*Store) PutDomainPermissionsPolicy

func (s *Store) PutDomainPermissionsPolicy(domainName, document string) (*DomainPermissionsPolicy, *service.AWSError)

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags map[string]string) *service.AWSError

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, keys []string) *service.AWSError

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.

Jump to

Keyboard shortcuts

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