amplify

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmplifyService

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

AmplifyService is the cloudmock implementation of the AWS Amplify API.

func New

func New(accountID, region string) *AmplifyService

New returns a new AmplifyService for the given AWS account ID and region.

func (*AmplifyService) Actions

func (s *AmplifyService) Actions() []service.Action

Actions returns the list of Amplify API actions supported by this service.

func (*AmplifyService) HandleRequest

func (s *AmplifyService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming Amplify request to the appropriate handler.

func (*AmplifyService) HealthCheck

func (s *AmplifyService) HealthCheck() error

HealthCheck always returns nil (no external dependencies).

func (*AmplifyService) Name

func (s *AmplifyService) Name() string

Name returns the AWS service name used for routing.

type App

type App struct {
	AppId                 string
	AppArn                string
	Name                  string
	Description           string
	Repository            string
	Platform              string
	IamServiceRoleArn     string
	DefaultDomain         string
	EnableBranchAutoBuild bool
	CreateTime            time.Time
	UpdateTime            time.Time
	Tags                  map[string]string
}

App represents an Amplify application.

type BackendEnvironment

type BackendEnvironment struct {
	BackendEnvironmentArn string
	EnvironmentName       string
	AppId                 string
	DeploymentArtifacts   string
	StackName             string
	CreateTime            time.Time
	UpdateTime            time.Time
}

BackendEnvironment represents an Amplify backend environment.

type Branch

type Branch struct {
	BranchArn          string
	BranchName         string
	AppId              string
	Description        string
	Stage              string
	Framework          string
	EnableAutoBuild    bool
	EnableNotification bool
	DisplayName        string
	CreateTime         time.Time
	UpdateTime         time.Time
	Tags               map[string]string
}

Branch represents an Amplify branch.

type DomainAssociation

type DomainAssociation struct {
	DomainAssociationArn             string
	DomainName                       string
	AppId                            string
	EnableAutoSubDomain              bool
	DomainStatus                     string
	SubDomains                       []SubDomain
	CertificateVerificationDNSRecord string
	Tags                             map[string]string
}

DomainAssociation represents an Amplify domain association.

type Job

type Job struct {
	JobArn        string
	JobId         string
	AppId         string
	BranchName    string
	JobType       string
	Status        string
	CommitId      string
	CommitMessage string
	StartTime     time.Time
	EndTime       *time.Time
	Lifecycle     *lifecycle.Machine
	Tags          map[string]string
}

Job represents an Amplify build job.

type Store

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

Store manages all Amplify state in memory.

func NewStore

func NewStore(accountID, region string) *Store

NewStore returns a new Store for the given account and region.

func (*Store) CreateApp

func (s *Store) CreateApp(name, description, repository, platform, iamRole string, tags map[string]string) *App

CreateApp creates a new Amplify app.

func (*Store) CreateBackendEnvironment

func (s *Store) CreateBackendEnvironment(appID, envName, deploymentArtifacts, stackName string) (*BackendEnvironment, bool)

CreateBackendEnvironment creates a new backend environment for an app.

func (*Store) CreateBranch

func (s *Store) CreateBranch(appID, branchName, description, stage, framework string, enableAutoBuild bool, tags map[string]string) (*Branch, bool)

CreateBranch creates a new branch for an app.

func (*Store) CreateDomainAssociation

func (s *Store) CreateDomainAssociation(appID, domainName string, enableAutoSubDomain bool, subDomains []SubDomain, tags map[string]string) (*DomainAssociation, bool)

CreateDomainAssociation creates a new domain association.

func (*Store) CreateWebhook

func (s *Store) CreateWebhook(appID, branchName, description string, tags map[string]string) (*Webhook, bool)

CreateWebhook creates a new webhook.

func (*Store) DeleteApp

func (s *Store) DeleteApp(appID string) bool

DeleteApp removes an app and all associated resources.

func (*Store) DeleteBackendEnvironment

func (s *Store) DeleteBackendEnvironment(appID, envName string) (*BackendEnvironment, bool)

DeleteBackendEnvironment removes a backend environment.

func (*Store) DeleteBranch

func (s *Store) DeleteBranch(appID, branchName string) bool

DeleteBranch removes a branch.

func (*Store) DeleteDomainAssociation

func (s *Store) DeleteDomainAssociation(appID, domainName string) bool

DeleteDomainAssociation removes a domain association.

func (*Store) DeleteWebhook

func (s *Store) DeleteWebhook(webhookID string) bool

DeleteWebhook removes a webhook.

func (*Store) GetApp

func (s *Store) GetApp(appID string) (*App, bool)

GetApp returns an app by ID.

func (*Store) GetBackendEnvironment

func (s *Store) GetBackendEnvironment(appID, envName string) (*BackendEnvironment, bool)

GetBackendEnvironment returns a backend environment by app and env name.

func (*Store) GetBranch

func (s *Store) GetBranch(appID, branchName string) (*Branch, bool)

GetBranch returns a branch.

func (*Store) GetDomainAssociation

func (s *Store) GetDomainAssociation(appID, domainName string) (*DomainAssociation, bool)

GetDomainAssociation returns a domain association.

func (*Store) GetJob

func (s *Store) GetJob(appID, branchName, jobID string) (*Job, bool)

GetJob returns a job.

func (*Store) GetWebhook

func (s *Store) GetWebhook(webhookID string) (*Webhook, bool)

GetWebhook returns a webhook.

func (*Store) ListApps

func (s *Store) ListApps() []*App

ListApps returns all apps.

func (*Store) ListBackendEnvironments

func (s *Store) ListBackendEnvironments(appID string) ([]*BackendEnvironment, bool)

ListBackendEnvironments returns all backend environments for an app.

func (*Store) ListBranches

func (s *Store) ListBranches(appID string) ([]*Branch, bool)

ListBranches returns all branches for an app.

func (*Store) ListDomainAssociations

func (s *Store) ListDomainAssociations(appID string) ([]*DomainAssociation, bool)

ListDomainAssociations returns all domain associations for an app.

func (*Store) ListJobs

func (s *Store) ListJobs(appID, branchName string) ([]*Job, bool)

ListJobs returns all jobs for a branch.

func (*Store) ListTagsForResource

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

ListTagsForResource returns tags for a resource by ARN.

func (*Store) ListWebhooks

func (s *Store) ListWebhooks(appID string) ([]*Webhook, bool)

ListWebhooks returns all webhooks for an app.

func (*Store) StartJob

func (s *Store) StartJob(appID, branchName, jobType, commitID, commitMessage string, tags map[string]string) (*Job, bool)

StartJob starts a new build job.

func (*Store) StopJob

func (s *Store) StopJob(appID, branchName, jobID string) (*Job, bool)

StopJob stops a running job.

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags map[string]string) bool

TagResource applies tags to a resource by ARN.

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, keys []string) bool

UntagResource removes tags from a resource by ARN.

func (*Store) UpdateApp

func (s *Store) UpdateApp(appID, name, description, platform, iamRole string) (*App, bool)

UpdateApp updates an app.

func (*Store) UpdateBranch

func (s *Store) UpdateBranch(appID, branchName, description, stage, framework string) (*Branch, bool)

UpdateBranch updates a branch.

func (*Store) UpdateDomainAssociation

func (s *Store) UpdateDomainAssociation(appID, domainName string, enableAutoSubDomain *bool, subDomains []SubDomain) (*DomainAssociation, bool)

UpdateDomainAssociation updates a domain association.

func (*Store) UpdateWebhook

func (s *Store) UpdateWebhook(webhookID, branchName, description string) (*Webhook, bool)

UpdateWebhook updates a webhook.

type SubDomain

type SubDomain struct {
	Prefix     string
	BranchName string
	DnsRecord  string
	Verified   bool
}

SubDomain represents a sub-domain within a domain association.

type Webhook

type Webhook struct {
	WebhookArn  string
	WebhookId   string
	WebhookUrl  string
	AppId       string
	BranchName  string
	Description string
	CreateTime  time.Time
	UpdateTime  time.Time
	Tags        map[string]string
}

Webhook represents an Amplify webhook.

Jump to

Keyboard shortcuts

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