Documentation
¶
Index ¶
- Variables
- type Access
- type Agreement
- type AsyncOperationRecord
- type Certificate
- type Connector
- type ConnectorAs2Config
- type ConnectorSftpConfig
- type CopyStepDetails
- type CreateAccessInput
- type CreateConnectorInput
- type CreateServerInput
- type CreateUserInput
- type CustomStepDetails
- type DecryptStepDetails
- type DeleteStepDetails
- type EndpointDetails
- type Execution
- type FileTransferResult
- 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) Shutdown(_ context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type HomeDirectoryMapEntry
- type HostKey
- type IdentityProviderDetails
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddCertificateInternal(certID string)
- func (b *InMemoryBackend) AddConnectorInternal(connectorID, url string)
- func (b *InMemoryBackend) AddProfileInternal(profileID, profileType string)
- func (b *InMemoryBackend) AddServerInternal(serverID string)
- func (b *InMemoryBackend) AddWebAppInternal(webAppID string)
- func (b *InMemoryBackend) AddWorkflowInternal(workflowID string)
- func (b *InMemoryBackend) Close()
- func (b *InMemoryBackend) CountUserSSHPublicKeys(serverID, userName string) int
- func (b *InMemoryBackend) CreateAccess(serverID, externalID, role, homeDir string, tags map[string]string) (*Access, error)
- func (b *InMemoryBackend) CreateAccessFull(in *CreateAccessInput) (*Access, error)
- func (b *InMemoryBackend) CreateAgreement(...) (*Agreement, error)
- func (b *InMemoryBackend) CreateAgreementFull(...) (*Agreement, error)
- func (b *InMemoryBackend) CreateConnector(url, accessRole string, sftpConfig *ConnectorSftpConfig, ...) (*Connector, error)
- func (b *InMemoryBackend) CreateConnectorFull(in *CreateConnectorInput) (*Connector, error)
- func (b *InMemoryBackend) CreateExecution(workflowID string) (*Execution, error)
- func (b *InMemoryBackend) CreateProfile(profileType, as2ID string, tags map[string]string) (*Profile, error)
- func (b *InMemoryBackend) CreateServer(protocols []string, tags map[string]string) (*Server, error)
- func (b *InMemoryBackend) CreateServerFull(in *CreateServerInput) (*Server, error)
- func (b *InMemoryBackend) CreateUser(serverID, userName, homeDir, role string, tags map[string]string) (*User, error)
- func (b *InMemoryBackend) CreateUserFull(in *CreateUserInput) (*User, error)
- func (b *InMemoryBackend) CreateWebApp(tags map[string]string) (*WebApp, error)
- func (b *InMemoryBackend) CreateWorkflow(description string, steps []WorkflowStep, onExceptionSteps []WorkflowStep, ...) (*Workflow, error)
- func (b *InMemoryBackend) DeleteAccess(serverID, externalID string) error
- func (b *InMemoryBackend) DeleteAgreement(serverID, agreementID string) error
- func (b *InMemoryBackend) DeleteCertificate(certificateID string) error
- func (b *InMemoryBackend) DeleteConnector(connectorID string) error
- func (b *InMemoryBackend) DeleteHostKey(serverID, hostKeyID string) error
- func (b *InMemoryBackend) DeleteProfile(profileID string) error
- func (b *InMemoryBackend) DeleteSSHPublicKey(serverID, userName, sshPublicKeyID string) error
- func (b *InMemoryBackend) DeleteServer(serverID string) error
- func (b *InMemoryBackend) DeleteUser(serverID, userName string) error
- func (b *InMemoryBackend) DeleteWebApp(webAppID string) error
- func (b *InMemoryBackend) DeleteWebAppCustomization(webAppID string) error
- func (b *InMemoryBackend) DeleteWorkflow(workflowID string) error
- func (b *InMemoryBackend) DescribeAccess(serverID, externalID string) (*Access, error)
- func (b *InMemoryBackend) DescribeAgreement(serverID, agreementID string) (*Agreement, error)
- func (b *InMemoryBackend) DescribeCertificate(certificateID string) (*Certificate, error)
- func (b *InMemoryBackend) DescribeConnector(connectorID string) (*Connector, error)
- func (b *InMemoryBackend) DescribeExecution(workflowID, executionID string) (*Execution, error)
- func (b *InMemoryBackend) DescribeHostKey(serverID, hostKeyID string) (*HostKey, error)
- func (b *InMemoryBackend) DescribeProfile(profileID string) (*Profile, error)
- func (b *InMemoryBackend) DescribeServer(serverID string) (*Server, error)
- func (b *InMemoryBackend) DescribeUser(serverID, userName string) (*User, error)
- func (b *InMemoryBackend) DescribeWebApp(webAppID string) (*WebApp, error)
- func (b *InMemoryBackend) DescribeWebAppCustomization(webAppID string) (*WebAppCustomization, error)
- func (b *InMemoryBackend) DescribeWorkflow(workflowID string) (*Workflow, error)
- func (b *InMemoryBackend) ImportCertificate(usage, body, description string, notBefore, notAfter time.Time, ...) (*Certificate, error)
- func (b *InMemoryBackend) ImportHostKey(serverID, hostKeyBody, description string, tags map[string]string) (*HostKey, error)
- func (b *InMemoryBackend) ImportSSHPublicKey(serverID, userName, sshPublicKeyBody string) (*SSHPublicKey, error)
- func (b *InMemoryBackend) ListAccesses(serverID string) ([]*Access, error)
- func (b *InMemoryBackend) ListAgreements(serverID string) ([]*Agreement, error)
- func (b *InMemoryBackend) ListCertificates() []*Certificate
- func (b *InMemoryBackend) ListConnectors() []*Connector
- func (b *InMemoryBackend) ListExecutions(workflowID string) ([]*Execution, error)
- func (b *InMemoryBackend) ListFileFileTransferResults(connectorID string) []*FileTransferResult
- func (b *InMemoryBackend) ListHostKeys(serverID string) ([]*HostKey, error)
- func (b *InMemoryBackend) ListProfiles() []*Profile
- func (b *InMemoryBackend) ListSSHPublicKeys(serverID, userName string) []*SSHPublicKey
- func (b *InMemoryBackend) ListServers() []Server
- func (b *InMemoryBackend) ListTagsForResource(resourceARN string) map[string]string
- func (b *InMemoryBackend) ListUsers(serverID string) ([]User, error)
- func (b *InMemoryBackend) ListWebApps() []*WebApp
- func (b *InMemoryBackend) ListWorkflows() []*Workflow
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SendWorkflowStepStateRecord(workflowID, executionID, token, status string) error
- func (b *InMemoryBackend) ServerUserCount(serverID string) int
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartAsyncOperationRecord(connectorID, opType string) string
- func (b *InMemoryBackend) StartFileFileTransferResult(connectorID string, files []string) string
- func (b *InMemoryBackend) StartServer(serverID string) error
- func (b *InMemoryBackend) StopServer(serverID string) error
- func (b *InMemoryBackend) TagResource(resourceARN string, tags map[string]string) error
- func (b *InMemoryBackend) TestIdentityProvider(serverID, userName string) (int, string)
- func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateAccess(serverID, externalID, role, homeDir string) (*Access, error)
- func (b *InMemoryBackend) UpdateAccessFull(in *UpdateAccessInput) (*Access, error)
- func (b *InMemoryBackend) UpdateAgreement(serverID, agreementID, description, status string) (*Agreement, error)
- func (b *InMemoryBackend) UpdateCertificate(certificateID, description string) (*Certificate, error)
- func (b *InMemoryBackend) UpdateConnector(connectorID, url, accessRole string, sftpConfig *ConnectorSftpConfig, ...) (*Connector, error)
- func (b *InMemoryBackend) UpdateConnectorFull(in *UpdateConnectorInput) (*Connector, error)
- func (b *InMemoryBackend) UpdateHostKey(serverID, hostKeyID, description string) (*HostKey, error)
- func (b *InMemoryBackend) UpdateProfile(profileID, as2ID string) (*Profile, error)
- func (b *InMemoryBackend) UpdateProfileFull(in *UpdateProfileInput) (*Profile, error)
- func (b *InMemoryBackend) UpdateServer(serverID string, protocols []string) (*Server, error)
- func (b *InMemoryBackend) UpdateServerFull(in *UpdateServerInput) (*Server, error)
- func (b *InMemoryBackend) UpdateUser(serverID, userName, homeDir, role string) (*User, error)
- func (b *InMemoryBackend) UpdateUserFull(in *UpdateUserInput) (*User, error)
- func (b *InMemoryBackend) UpdateWebApp(webAppID string, identityProviderDetails *WebAppIdentityProviderDetails) (*WebApp, error)
- func (b *InMemoryBackend) UpdateWebAppCustomization(webAppID, title, logoFile, faviconFile string) (*WebAppCustomization, error)
- type PosixProfile
- type Profile
- type ProtocolDetails
- type Provider
- type S3StorageOptions
- type SSHPublicKey
- type Server
- type StorageBackend
- type TagStepDetails
- type UpdateAccessInput
- type UpdateConnectorInput
- type UpdateProfileInput
- type UpdateServerInput
- type UpdateUserInput
- type User
- type WebApp
- type WebAppCustomization
- type WebAppIdentityProviderDetails
- type Workflow
- type WorkflowDetail
- type WorkflowDetails
- type WorkflowStep
Constants ¶
This section is empty.
Variables ¶
var ( // ErrServerNotFound is returned when a Transfer server is not found. ErrServerNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrUserNotFound is returned when a Transfer user is not found. ErrUserNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrUserAlreadyExists is returned when a Transfer user already exists. ErrUserAlreadyExists = awserr.New("ResourceExistsException", awserr.ErrConflict) // ErrInvalidProtocol is returned when an unsupported protocol is specified. ErrInvalidProtocol = awserr.New( "InvalidRequestException: unsupported protocol", awserr.ErrInvalidParameter, ) // ErrServerStateConflict is returned when a state transition is invalid. ErrServerStateConflict = awserr.New( "ConflictException: server is already in the requested state", awserr.ErrConflict, ) // ErrAccessNotFound is returned when a Transfer access is not found. ErrAccessNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrAccessAlreadyExists is returned when an access with the same ExternalId already exists. ErrAccessAlreadyExists = awserr.New("ResourceExistsException", awserr.ErrConflict) // ErrAgreementNotFound is returned when a Transfer agreement is not found. ErrAgreementNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrConnectorNotFound is returned when a Transfer connector is not found. ErrConnectorNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrProfileNotFound is returned when a Transfer profile is not found. ErrProfileNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrWebAppNotFound is returned when a Transfer web app is not found. ErrWebAppNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrWorkflowNotFound is returned when a Transfer workflow is not found. ErrWorkflowNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrCertificateNotFound is returned when a Transfer certificate is not found. ErrCertificateNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrHostKeyNotFound is returned when a Transfer host key is not found. ErrHostKeyNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrSSHPublicKeyNotFound is returned when a Transfer SSH public key is not found. ErrSSHPublicKeyNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrValidation is returned when a required parameter is missing or invalid. ErrValidation = awserr.New("InvalidRequestException", awserr.ErrInvalidParameter) )
var ErrNilAppContext = errors.New("transfer: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
var ErrSSHPublicKeyDuplicate = awserr.New("ResourceExistsException", awserr.ErrConflict)
ErrSSHPublicKeyDuplicate is returned when an SSH public key body already exists for the user.
var ErrSecurityPolicyNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
ErrSecurityPolicyNotFound is returned when a named security policy is not found.
var ErrServerOnline = awserr.New( "ConflictException: server must be offline to be deleted", awserr.ErrConflict, )
ErrServerOnline is returned when an operation requires the server to be OFFLINE.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct {
CreatedAt time.Time `json:"created_at"`
PosixProfile *PosixProfile `json:"posix_profile,omitempty"`
Tags map[string]string `json:"tags"`
ExternalID string `json:"external_id"`
ServerID string `json:"server_id"`
Role string `json:"role"`
HomeDir string `json:"home_dir"`
AccountID string `json:"account_id"`
Region string `json:"region"`
HomeDirectoryType string `json:"home_directory_type,omitempty"`
Policy string `json:"policy,omitempty"`
HomeDirectoryMappings []HomeDirectoryMapEntry `json:"home_directory_mappings,omitempty"`
}
Access represents an AWS Transfer access policy entry for a server.
type Agreement ¶
type Agreement struct {
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
AgreementID string `json:"agreement_id"`
ServerID string `json:"server_id"`
Description string `json:"description"`
LocalProfileID string `json:"local_profile_id"`
PartnerProfileID string `json:"partner_profile_id"`
BaseDirectory string `json:"base_directory"`
AccessRole string `json:"access_role"`
AccountID string `json:"account_id"`
Region string `json:"region"`
Status string `json:"status"`
}
Agreement represents an AWS Transfer AS2 agreement.
type AsyncOperationRecord ¶
type AsyncOperationRecord struct {
CreatedAt time.Time `json:"created_at"`
ID string `json:"id"`
ConnectorID string `json:"connector_id"`
Status string `json:"status"`
Type string `json:"type"`
}
AsyncOperationRecord stores state for async connector operations (directory listing, delete, move).
type Certificate ¶
type Certificate struct {
NotBeforeDate time.Time `json:"not_before_date,omitzero"`
NotAfterDate time.Time `json:"not_after_date,omitzero"`
ActiveDate time.Time `json:"active_date,omitzero"`
InactiveDate time.Time `json:"inactive_date,omitzero"`
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
CertificateID string `json:"certificate_id"`
Description string `json:"description"`
Usage string `json:"usage"`
Body string `json:"body"`
Status string `json:"status"`
AccountID string `json:"account_id"`
Region string `json:"region"`
}
Certificate represents an imported AWS Transfer certificate.
type Connector ¶
type Connector struct {
SftpConfig *ConnectorSftpConfig `json:"sftp_config,omitempty"`
As2Config *ConnectorAs2Config `json:"as2_config,omitempty"`
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
ConnectorID string `json:"connector_id"`
URL string `json:"url"`
AccessRole string `json:"access_role"`
AccountID string `json:"account_id"`
Region string `json:"region"`
LoggingRole string `json:"logging_role,omitempty"`
SecurityPolicyName string `json:"security_policy_name,omitempty"`
}
Connector represents an AWS Transfer connector used to initiate file transfers.
type ConnectorAs2Config ¶
type ConnectorAs2Config struct {
LocalProfileID string `json:"local_profile_id,omitempty"`
PartnerProfileID string `json:"partner_profile_id,omitempty"`
SigningAlgorithm string `json:"signing_algorithm,omitempty"`
EncryptionAlgorithm string `json:"encryption_algorithm,omitempty"`
MdnSigningAlgorithm string `json:"mdn_signing_algorithm,omitempty"`
MdnResponse string `json:"mdn_response,omitempty"`
MessageSubject string `json:"message_subject,omitempty"`
Compression string `json:"compression,omitempty"`
}
ConnectorAs2Config holds AS2-specific connector configuration.
type ConnectorSftpConfig ¶
type ConnectorSftpConfig struct {
UserSecretID string `json:"user_secret_id,omitempty"`
TrustedHostKeys []string `json:"trusted_host_keys,omitempty"`
}
ConnectorSftpConfig holds SFTP-specific connector configuration.
type CopyStepDetails ¶
type CopyStepDetails struct {
DestinationFileLocation map[string]any `json:"destination_file_location,omitempty"`
Name string `json:"name,omitempty"`
SourceFileLocation string `json:"source_file_location,omitempty"`
OverwriteExisting string `json:"overwrite_existing,omitempty"`
}
CopyStepDetails holds details for a Copy workflow step.
type CreateAccessInput ¶
type CreateAccessInput struct {
PosixProfile *PosixProfile
Tags map[string]string
ServerID string
ExternalID string
Role string
HomeDir string
HomeDirectoryType string
Policy string
HomeDirectoryMappings []HomeDirectoryMapEntry
}
CreateAccessInput holds all optional fields for CreateAccess.
type CreateConnectorInput ¶
type CreateConnectorInput struct {
SftpConfig *ConnectorSftpConfig
As2Config *ConnectorAs2Config
Tags map[string]string
URL string
AccessRole string
LoggingRole string
SecurityPolicyName string
}
CreateConnectorInput holds all fields for CreateConnector.
type CreateServerInput ¶
type CreateServerInput struct {
IdentityProviderDetails *IdentityProviderDetails
EndpointDetails *EndpointDetails
ProtocolDetails *ProtocolDetails
WorkflowDetails *WorkflowDetails
S3StorageOptions *S3StorageOptions
Protocols []string
Tags map[string]string
IdentityProviderType string
EndpointType string
LoggingRole string
PreAuthenticationLoginBanner string
PostAuthenticationLoginBanner string
HostKey string
Certificate string
Domain string
SecurityPolicyName string
IPAddressType string
StructuredLogDestinations []string
}
CreateServerInput holds all optional fields for CreateServer.
type CreateUserInput ¶
type CreateUserInput struct {
PosixProfile *PosixProfile
Tags map[string]string
ServerID string
UserName string
HomeDir string
Role string
HomeDirectoryType string
Policy string
HomeDirectoryMappings []HomeDirectoryMapEntry
}
CreateUserInput holds all optional fields for CreateUser.
type CustomStepDetails ¶
type CustomStepDetails struct {
Name string `json:"name,omitempty"`
Target string `json:"target,omitempty"`
SourceFileLocation string `json:"source_file_location,omitempty"`
Timeout int32 `json:"timeout,omitempty"`
}
CustomStepDetails holds details for a Custom workflow step.
type DecryptStepDetails ¶
type DecryptStepDetails struct {
DestinationFileLocation map[string]any `json:"destination_file_location,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
SourceFileLocation string `json:"source_file_location,omitempty"`
OverwriteExisting string `json:"overwrite_existing,omitempty"`
}
DecryptStepDetails holds details for a Decrypt workflow step.
type DeleteStepDetails ¶
type DeleteStepDetails struct {
Name string `json:"name,omitempty"`
SourceFileLocation string `json:"source_file_location,omitempty"`
}
DeleteStepDetails holds details for a Delete workflow step.
type EndpointDetails ¶
type EndpointDetails struct {
VpcEndpointID string `json:"vpc_endpoint_id,omitempty"`
VpcID string `json:"vpc_id,omitempty"`
AddressAllocationIDs []string `json:"address_allocation_ids,omitempty"`
SubnetIDs []string `json:"subnet_ids,omitempty"`
SecurityGroupIDs []string `json:"security_group_ids,omitempty"`
}
EndpointDetails holds VPC endpoint configuration for a Transfer server.
type Execution ¶
type Execution struct {
InitialFileLocation map[string]any `json:"initial_file_location,omitempty"`
CurrentStep *WorkflowStep `json:"current_step,omitempty"`
PendingTokens map[string]string `json:"pending_tokens,omitempty"` // token -> stepName
CreatedAt time.Time `json:"created_at"`
ExecutionID string `json:"execution_id"`
WorkflowID string `json:"workflow_id"`
Status string `json:"status"` // "IN_PROGRESS", "COMPLETED", "EXCEPTION", "HANDLING_EXCEPTION"
}
Execution represents the lifecycle of a workflow execution.
type FileTransferResult ¶
type FileTransferResult struct {
CreatedAt time.Time `json:"created_at"`
TransferID string `json:"transfer_id"`
ConnectorID string `json:"connector_id"`
Status string `json:"status"`
Files []string `json:"files,omitempty"`
}
FileTransferResult stores state for a file transfer operation started via StartFileTransfer.
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for AWS Transfer Family operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new Transfer handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this Transfer instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the Transfer action from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the resource identifier from the request body.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported Transfer operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for Transfer requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset clears the handler state and rebuilds the dispatch table.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches Transfer API requests.
type HomeDirectoryMapEntry ¶
type HomeDirectoryMapEntry struct {
Entry string `json:"entry"`
Target string `json:"target"`
Type string `json:"type,omitempty"`
}
HomeDirectoryMapEntry holds a single logical directory mapping.
type HostKey ¶
type HostKey struct {
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
HostKeyID string `json:"host_key_id"`
ServerID string `json:"server_id"`
Description string `json:"description"`
Fingerprint string `json:"fingerprint,omitempty"`
Type string `json:"type"`
Value string `json:"value"`
AccountID string `json:"account_id"`
Region string `json:"region"`
}
HostKey represents an SSH host key associated with a Transfer server.
type IdentityProviderDetails ¶
type IdentityProviderDetails struct {
URL string `json:"url,omitempty"`
InvocationRole string `json:"invocation_role,omitempty"`
DirectoryID string `json:"directory_id,omitempty"`
Function string `json:"function,omitempty"`
SftpAuthenticationMethods string `json:"sftp_authentication_methods,omitempty"`
}
IdentityProviderDetails holds identity provider configuration for a Transfer server.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is the in-memory store for Transfer resources.
func NewInMemoryBackend ¶
func NewInMemoryBackend(ctx context.Context, accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the AWS account ID for this backend.
func (*InMemoryBackend) AddCertificateInternal ¶
func (b *InMemoryBackend) AddCertificateInternal(certID string)
AddCertificateInternal seeds a certificate for testing purposes.
func (*InMemoryBackend) AddConnectorInternal ¶
func (b *InMemoryBackend) AddConnectorInternal(connectorID, url string)
AddConnectorInternal seeds a connector for testing purposes.
func (*InMemoryBackend) AddProfileInternal ¶
func (b *InMemoryBackend) AddProfileInternal(profileID, profileType string)
AddProfileInternal seeds a profile for testing purposes.
func (*InMemoryBackend) AddServerInternal ¶
func (b *InMemoryBackend) AddServerInternal(serverID string)
AddServerInternal seeds a server for testing purposes.
func (*InMemoryBackend) AddWebAppInternal ¶
func (b *InMemoryBackend) AddWebAppInternal(webAppID string)
AddWebAppInternal seeds a web app for testing purposes.
func (*InMemoryBackend) AddWorkflowInternal ¶
func (b *InMemoryBackend) AddWorkflowInternal(workflowID string)
AddWorkflowInternal seeds a workflow for testing purposes.
func (*InMemoryBackend) Close ¶
func (b *InMemoryBackend) Close()
Close stops all scheduled server state-transition timers so none outlives the backend. It is safe to call multiple times.
func (*InMemoryBackend) CountUserSSHPublicKeys ¶
func (b *InMemoryBackend) CountUserSSHPublicKeys(serverID, userName string) int
CountUserSSHPublicKeys returns the number of SSH public keys for the given user on a server.
func (*InMemoryBackend) CreateAccess ¶
func (b *InMemoryBackend) CreateAccess( serverID, externalID, role, homeDir string, tags map[string]string, ) (*Access, error)
CreateAccess creates an access policy entry on an existing server.
func (*InMemoryBackend) CreateAccessFull ¶
func (b *InMemoryBackend) CreateAccessFull(in *CreateAccessInput) (*Access, error)
CreateAccessFull creates an access entry with full configuration.
func (*InMemoryBackend) CreateAgreement ¶
func (b *InMemoryBackend) CreateAgreement( serverID, description, localProfileID, partnerProfileID, baseDirectory, accessRole string, tags map[string]string, ) (*Agreement, error)
CreateAgreement creates an AS2 agreement on an existing server.
func (*InMemoryBackend) CreateAgreementFull ¶
func (b *InMemoryBackend) CreateAgreementFull( serverID, description, localProfileID, partnerProfileID, baseDirectory, accessRole, status string, tags map[string]string, ) (*Agreement, error)
CreateAgreementFull creates an AS2 agreement with an explicit initial status.
func (*InMemoryBackend) CreateConnector ¶
func (b *InMemoryBackend) CreateConnector( url, accessRole string, sftpConfig *ConnectorSftpConfig, as2Config *ConnectorAs2Config, tags map[string]string, ) (*Connector, error)
CreateConnector creates a Transfer connector. URL is required.
func (*InMemoryBackend) CreateConnectorFull ¶
func (b *InMemoryBackend) CreateConnectorFull(in *CreateConnectorInput) (*Connector, error)
CreateConnectorFull creates a Transfer connector with full configuration.
func (*InMemoryBackend) CreateExecution ¶
func (b *InMemoryBackend) CreateExecution(workflowID string) (*Execution, error)
CreateExecution creates a new execution for a workflow.
func (*InMemoryBackend) CreateProfile ¶
func (b *InMemoryBackend) CreateProfile( profileType, as2ID string, tags map[string]string, ) (*Profile, error)
CreateProfile creates an AS2 profile. ProfileType must be LOCAL or PARTNER.
func (*InMemoryBackend) CreateServer ¶
func (b *InMemoryBackend) CreateServer( protocols []string, tags map[string]string, ) (*Server, error)
CreateServer creates a new Transfer Family server.
func (*InMemoryBackend) CreateServerFull ¶
func (b *InMemoryBackend) CreateServerFull(in *CreateServerInput) (*Server, error)
func (*InMemoryBackend) CreateUser ¶
func (b *InMemoryBackend) CreateUser( serverID, userName, homeDir, role string, tags map[string]string, ) (*User, error)
CreateUser creates a user on the given server.
func (*InMemoryBackend) CreateUserFull ¶
func (b *InMemoryBackend) CreateUserFull(in *CreateUserInput) (*User, error)
CreateUserFull creates a user on the given server with full configuration.
func (*InMemoryBackend) CreateWebApp ¶
func (b *InMemoryBackend) CreateWebApp(tags map[string]string) (*WebApp, error)
CreateWebApp creates a Transfer web application.
func (*InMemoryBackend) CreateWorkflow ¶
func (b *InMemoryBackend) CreateWorkflow( description string, steps []WorkflowStep, onExceptionSteps []WorkflowStep, tags map[string]string, ) (*Workflow, error)
CreateWorkflow creates a Transfer workflow.
func (*InMemoryBackend) DeleteAccess ¶
func (b *InMemoryBackend) DeleteAccess(serverID, externalID string) error
DeleteAccess removes an access entry from a server.
func (*InMemoryBackend) DeleteAgreement ¶
func (b *InMemoryBackend) DeleteAgreement(serverID, agreementID string) error
DeleteAgreement removes an AS2 agreement from a server.
func (*InMemoryBackend) DeleteCertificate ¶
func (b *InMemoryBackend) DeleteCertificate(certificateID string) error
DeleteCertificate removes a certificate by ID.
func (*InMemoryBackend) DeleteConnector ¶
func (b *InMemoryBackend) DeleteConnector(connectorID string) error
DeleteConnector removes a connector by ID.
func (*InMemoryBackend) DeleteHostKey ¶
func (b *InMemoryBackend) DeleteHostKey(serverID, hostKeyID string) error
DeleteHostKey removes a host key from a server.
func (*InMemoryBackend) DeleteProfile ¶
func (b *InMemoryBackend) DeleteProfile(profileID string) error
DeleteProfile removes a profile by ID.
func (*InMemoryBackend) DeleteSSHPublicKey ¶
func (b *InMemoryBackend) DeleteSSHPublicKey(serverID, userName, sshPublicKeyID string) error
DeleteSSHPublicKey removes an SSH public key from a user on a server.
func (*InMemoryBackend) DeleteServer ¶
func (b *InMemoryBackend) DeleteServer(serverID string) error
DeleteServer removes a server and all of its associated resources (users, accesses, agreements, SSH keys, and host keys). The server must be OFFLINE; returns ErrServerOnline otherwise.
func (*InMemoryBackend) DeleteUser ¶
func (b *InMemoryBackend) DeleteUser(serverID, userName string) error
DeleteUser removes a user from the given server and also deletes all SSH public keys for that user.
func (*InMemoryBackend) DeleteWebApp ¶
func (b *InMemoryBackend) DeleteWebApp(webAppID string) error
DeleteWebApp removes a web app by ID.
func (*InMemoryBackend) DeleteWebAppCustomization ¶
func (b *InMemoryBackend) DeleteWebAppCustomization(webAppID string) error
DeleteWebAppCustomization clears the customization for a web app.
func (*InMemoryBackend) DeleteWorkflow ¶
func (b *InMemoryBackend) DeleteWorkflow(workflowID string) error
DeleteWorkflow removes a workflow by ID.
func (*InMemoryBackend) DescribeAccess ¶
func (b *InMemoryBackend) DescribeAccess(serverID, externalID string) (*Access, error)
DescribeAccess returns an access entry from a server.
func (*InMemoryBackend) DescribeAgreement ¶
func (b *InMemoryBackend) DescribeAgreement(serverID, agreementID string) (*Agreement, error)
DescribeAgreement returns an agreement from a server.
func (*InMemoryBackend) DescribeCertificate ¶
func (b *InMemoryBackend) DescribeCertificate(certificateID string) (*Certificate, error)
DescribeCertificate returns a certificate by ID.
func (*InMemoryBackend) DescribeConnector ¶
func (b *InMemoryBackend) DescribeConnector(connectorID string) (*Connector, error)
DescribeConnector returns a connector by ID.
func (*InMemoryBackend) DescribeExecution ¶
func (b *InMemoryBackend) DescribeExecution(workflowID, executionID string) (*Execution, error)
DescribeExecution returns an execution for a workflow.
func (*InMemoryBackend) DescribeHostKey ¶
func (b *InMemoryBackend) DescribeHostKey(serverID, hostKeyID string) (*HostKey, error)
DescribeHostKey returns a host key from a server.
func (*InMemoryBackend) DescribeProfile ¶
func (b *InMemoryBackend) DescribeProfile(profileID string) (*Profile, error)
DescribeProfile returns a profile by ID.
func (*InMemoryBackend) DescribeServer ¶
func (b *InMemoryBackend) DescribeServer(serverID string) (*Server, error)
DescribeServer returns the server with the given ID.
func (*InMemoryBackend) DescribeUser ¶
func (b *InMemoryBackend) DescribeUser(serverID, userName string) (*User, error)
DescribeUser returns the user with the given name on the given server.
func (*InMemoryBackend) DescribeWebApp ¶
func (b *InMemoryBackend) DescribeWebApp(webAppID string) (*WebApp, error)
DescribeWebApp returns a web app by ID.
func (*InMemoryBackend) DescribeWebAppCustomization ¶
func (b *InMemoryBackend) DescribeWebAppCustomization(webAppID string) (*WebAppCustomization, error)
DescribeWebAppCustomization returns the customization for a web app. Returns empty customization (not an error) when none has been set.
func (*InMemoryBackend) DescribeWorkflow ¶
func (b *InMemoryBackend) DescribeWorkflow(workflowID string) (*Workflow, error)
DescribeWorkflow returns a workflow by ID.
func (*InMemoryBackend) ImportCertificate ¶
func (b *InMemoryBackend) ImportCertificate( usage, body, description string, notBefore, notAfter time.Time, tags map[string]string, ) (*Certificate, error)
ImportCertificate imports a certificate. notBefore and notAfter are optional; zero values use defaults (now and +1 year). If body is a valid PEM certificate, NotBefore/NotAfter are extracted from it.
func (*InMemoryBackend) ImportHostKey ¶
func (b *InMemoryBackend) ImportHostKey( serverID, hostKeyBody, description string, tags map[string]string, ) (*HostKey, error)
ImportHostKey imports a host key onto a server.
func (*InMemoryBackend) ImportSSHPublicKey ¶
func (b *InMemoryBackend) ImportSSHPublicKey( serverID, userName, sshPublicKeyBody string, ) (*SSHPublicKey, error)
ImportSSHPublicKey imports an SSH public key for a user on a server.
func (*InMemoryBackend) ListAccesses ¶
func (b *InMemoryBackend) ListAccesses(serverID string) ([]*Access, error)
ListAccesses returns all accesses on a server sorted by externalID.
func (*InMemoryBackend) ListAgreements ¶
func (b *InMemoryBackend) ListAgreements(serverID string) ([]*Agreement, error)
ListAgreements returns all agreements on a server sorted by agreementID.
func (*InMemoryBackend) ListCertificates ¶
func (b *InMemoryBackend) ListCertificates() []*Certificate
ListCertificates returns all certificates sorted by certificateID.
func (*InMemoryBackend) ListConnectors ¶
func (b *InMemoryBackend) ListConnectors() []*Connector
ListConnectors returns all connectors sorted by connectorID.
func (*InMemoryBackend) ListExecutions ¶
func (b *InMemoryBackend) ListExecutions(workflowID string) ([]*Execution, error)
ListExecutions returns all executions for a workflow sorted by executionID.
func (*InMemoryBackend) ListFileFileTransferResults ¶
func (b *InMemoryBackend) ListFileFileTransferResults(connectorID string) []*FileTransferResult
ListFileFileTransferResults returns all transfer records for a connector.
func (*InMemoryBackend) ListHostKeys ¶
func (b *InMemoryBackend) ListHostKeys(serverID string) ([]*HostKey, error)
ListHostKeys returns all host keys on a server sorted by hostKeyID.
func (*InMemoryBackend) ListProfiles ¶
func (b *InMemoryBackend) ListProfiles() []*Profile
ListProfiles returns all profiles sorted by profileID.
func (*InMemoryBackend) ListSSHPublicKeys ¶
func (b *InMemoryBackend) ListSSHPublicKeys(serverID, userName string) []*SSHPublicKey
ListSSHPublicKeys returns all SSH public keys for a user on a server.
func (*InMemoryBackend) ListServers ¶
func (b *InMemoryBackend) ListServers() []Server
ListServers returns all servers sorted by ServerId (ascending, deterministic).
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(resourceARN string) map[string]string
ListTagsForResource returns tags for a resource identified by its ARN.
func (*InMemoryBackend) ListUsers ¶
func (b *InMemoryBackend) ListUsers(serverID string) ([]User, error)
ListUsers returns all users on a server sorted by username.
func (*InMemoryBackend) ListWebApps ¶
func (b *InMemoryBackend) ListWebApps() []*WebApp
ListWebApps returns all web apps sorted by webAppID.
func (*InMemoryBackend) ListWorkflows ¶
func (b *InMemoryBackend) ListWorkflows() []*Workflow
ListWorkflows returns all workflows sorted by workflowID.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the AWS region for this backend.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all stored resources, returning the backend to a clean state.
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) SendWorkflowStepStateRecord ¶
func (b *InMemoryBackend) SendWorkflowStepStateRecord(workflowID, executionID, token, status string) error
SendWorkflowStepStateRecord advances an execution by matching a token. Status must be "COMPLETE" or "EXCEPTION" per AWS API contract.
func (*InMemoryBackend) ServerUserCount ¶
func (b *InMemoryBackend) ServerUserCount(serverID string) int
ServerUserCount returns the number of users on the given server. Returns 0 if the server does not exist.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartAsyncOperationRecord ¶
func (b *InMemoryBackend) StartAsyncOperationRecord(connectorID, opType string) string
StartAsyncOperationRecord persists an async operation record and returns the operationID.
func (*InMemoryBackend) StartFileFileTransferResult ¶
func (b *InMemoryBackend) StartFileFileTransferResult(connectorID string, files []string) string
StartFileFileTransferResult persists a transfer record and returns the transferID.
func (*InMemoryBackend) StartServer ¶
func (b *InMemoryBackend) StartServer(serverID string) error
StartServer transitions a server to ONLINE state (via STARTING). Calling StartServer on an already-ONLINE server is idempotent (no-op, no error).
func (*InMemoryBackend) StopServer ¶
func (b *InMemoryBackend) StopServer(serverID string) error
StopServer transitions a server to OFFLINE state (via STOPPING). Calling StopServer on an already-OFFLINE server is idempotent (no-op, no error).
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(resourceARN string, tags map[string]string) error
TagResource applies tags to a resource identified by its ARN.
func (*InMemoryBackend) TestIdentityProvider ¶
func (b *InMemoryBackend) TestIdentityProvider(serverID, userName string) (int, string)
TestIdentityProvider tests the identity provider for a server.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error
UntagResource removes tag keys from a resource identified by its ARN.
func (*InMemoryBackend) UpdateAccess ¶
func (b *InMemoryBackend) UpdateAccess( serverID, externalID, role, homeDir string, ) (*Access, error)
UpdateAccess updates mutable fields on an access entry.
func (*InMemoryBackend) UpdateAccessFull ¶
func (b *InMemoryBackend) UpdateAccessFull(in *UpdateAccessInput) (*Access, error)
UpdateAccessFull updates all mutable fields on an access entry.
func (*InMemoryBackend) UpdateAgreement ¶
func (b *InMemoryBackend) UpdateAgreement( serverID, agreementID, description, status string, ) (*Agreement, error)
UpdateAgreement updates mutable fields on an agreement.
func (*InMemoryBackend) UpdateCertificate ¶
func (b *InMemoryBackend) UpdateCertificate( certificateID, description string, ) (*Certificate, error)
UpdateCertificate updates mutable fields on a certificate.
func (*InMemoryBackend) UpdateConnector ¶
func (b *InMemoryBackend) UpdateConnector( connectorID, url, accessRole string, sftpConfig *ConnectorSftpConfig, as2Config *ConnectorAs2Config, ) (*Connector, error)
UpdateConnector updates mutable fields on a connector.
func (*InMemoryBackend) UpdateConnectorFull ¶
func (b *InMemoryBackend) UpdateConnectorFull(in *UpdateConnectorInput) (*Connector, error)
UpdateConnectorFull updates all mutable fields on a connector.
func (*InMemoryBackend) UpdateHostKey ¶
func (b *InMemoryBackend) UpdateHostKey(serverID, hostKeyID, description string) (*HostKey, error)
UpdateHostKey updates mutable fields on a host key.
func (*InMemoryBackend) UpdateProfile ¶
func (b *InMemoryBackend) UpdateProfile(profileID, as2ID string) (*Profile, error)
UpdateProfile updates mutable fields on a profile (simplified, single-arg form).
func (*InMemoryBackend) UpdateProfileFull ¶
func (b *InMemoryBackend) UpdateProfileFull(in *UpdateProfileInput) (*Profile, error)
UpdateProfileFull updates all mutable fields on a profile.
func (*InMemoryBackend) UpdateServer ¶
func (b *InMemoryBackend) UpdateServer(serverID string, protocols []string) (*Server, error)
UpdateServer updates mutable fields on an existing server.
func (*InMemoryBackend) UpdateServerFull ¶
func (b *InMemoryBackend) UpdateServerFull(in *UpdateServerInput) (*Server, error)
UpdateServerFull updates all mutable fields on an existing server.
func (*InMemoryBackend) UpdateUser ¶
func (b *InMemoryBackend) UpdateUser(serverID, userName, homeDir, role string) (*User, error)
UpdateUser updates mutable fields on a user.
func (*InMemoryBackend) UpdateUserFull ¶
func (b *InMemoryBackend) UpdateUserFull(in *UpdateUserInput) (*User, error)
UpdateUserFull updates all mutable fields on a user.
func (*InMemoryBackend) UpdateWebApp ¶
func (b *InMemoryBackend) UpdateWebApp( webAppID string, identityProviderDetails *WebAppIdentityProviderDetails, ) (*WebApp, error)
UpdateWebApp updates mutable fields on a web app.
func (*InMemoryBackend) UpdateWebAppCustomization ¶
func (b *InMemoryBackend) UpdateWebAppCustomization( webAppID, title, logoFile, faviconFile string, ) (*WebAppCustomization, error)
UpdateWebAppCustomization sets or overwrites the customization for a web app.
type PosixProfile ¶
type PosixProfile struct {
SecondaryGids []int64 `json:"secondary_gids,omitempty"`
UID int64 `json:"uid"`
GID int64 `json:"gid"`
}
PosixProfile holds POSIX profile configuration for a Transfer user or access.
type Profile ¶
type Profile struct {
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
ProfileID string `json:"profile_id"`
ProfileType string `json:"profile_type"`
As2ID string `json:"as2_id"`
AccountID string `json:"account_id"`
Region string `json:"region"`
CertificateIDs []string `json:"certificate_ids,omitempty"`
}
Profile represents an AWS Transfer AS2 profile.
type ProtocolDetails ¶
type ProtocolDetails struct {
PassiveIP string `json:"passive_ip,omitempty"`
TLSSessionResumptionMode string `json:"tls_session_resumption_mode,omitempty"`
SetStatOption string `json:"set_stat_option,omitempty"`
As2Transports []string `json:"as2_transports,omitempty"`
}
ProtocolDetails holds protocol-specific configuration for a Transfer server.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS Transfer Family.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Transfer service backend and handler.
type S3StorageOptions ¶
type S3StorageOptions struct {
DirectoryListingOptimization string `json:"directory_listing_optimization,omitempty"`
}
S3StorageOptions holds S3 storage configuration for a Transfer server.
type SSHPublicKey ¶
type SSHPublicKey struct {
DateImported time.Time `json:"date_imported"`
SSHPublicKeyID string `json:"ssh_public_key_id"`
SSHPublicKeyBody string `json:"ssh_public_key_body"`
Fingerprint string `json:"fingerprint,omitempty"`
KeyType string `json:"key_type,omitempty"`
UserName string `json:"user_name"`
ServerID string `json:"server_id"`
}
SSHPublicKey represents an SSH public key attached to a Transfer user.
type Server ¶
type Server struct {
IdentityProviderDetails *IdentityProviderDetails `json:"identity_provider_details,omitempty"`
EndpointDetails *EndpointDetails `json:"endpoint_details,omitempty"`
ProtocolDetails *ProtocolDetails `json:"protocol_details,omitempty"`
WorkflowDetails *WorkflowDetails `json:"workflow_details,omitempty"`
S3StorageOptions *S3StorageOptions `json:"s3_storage_options,omitempty"`
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
ServerID string `json:"server_id"`
State string `json:"state"`
Endpoint string `json:"endpoint"`
Domain string `json:"domain"`
Region string `json:"region"`
AccountID string `json:"account_id"`
IdentityProviderType string `json:"identity_provider_type,omitempty"`
EndpointType string `json:"endpoint_type,omitempty"`
LoggingRole string `json:"logging_role,omitempty"`
PreAuthenticationLoginBanner string `json:"pre_authentication_login_banner,omitempty"`
PostAuthenticationLoginBanner string `json:"post_authentication_login_banner,omitempty"`
HostKey string `json:"host_key,omitempty"`
Certificate string `json:"certificate,omitempty"`
SecurityPolicyName string `json:"security_policy_name,omitempty"`
IPAddressType string `json:"ip_address_type,omitempty"`
StructuredLogDestinations []string `json:"structured_log_destinations,omitempty"`
Protocols []string `json:"protocols"`
}
Server represents an AWS Transfer Family server.
type StorageBackend ¶
type StorageBackend interface {
AccountID() string
Region() string
Reset()
CreateServer(protocols []string, tags map[string]string) (*Server, error)
CreateServerFull(in *CreateServerInput) (*Server, error)
DescribeServer(serverID string) (*Server, error)
ServerUserCount(serverID string) int
ListServers() []Server
StartServer(serverID string) error
StopServer(serverID string) error
DeleteServer(serverID string) error
UpdateServer(serverID string, protocols []string) (*Server, error)
UpdateServerFull(in *UpdateServerInput) (*Server, error)
CreateUser(serverID, userName, homeDir, role string, tags map[string]string) (*User, error)
CreateUserFull(in *CreateUserInput) (*User, error)
DescribeUser(serverID, userName string) (*User, error)
ListUsers(serverID string) ([]User, error)
DeleteUser(serverID, userName string) error
UpdateUser(serverID, userName, homeDir, role string) (*User, error)
UpdateUserFull(in *UpdateUserInput) (*User, error)
ListSSHPublicKeys(serverID, userName string) []*SSHPublicKey
CreateAccess(
serverID, externalID, role, homeDir string,
tags map[string]string,
) (*Access, error)
CreateAccessFull(in *CreateAccessInput) (*Access, error)
DeleteAccess(serverID, externalID string) error
DescribeAccess(serverID, externalID string) (*Access, error)
ListAccesses(serverID string) ([]*Access, error)
UpdateAccess(serverID, externalID, role, homeDir string) (*Access, error)
UpdateAccessFull(in *UpdateAccessInput) (*Access, error)
CountUserSSHPublicKeys(serverID, userName string) int
CreateAgreement(
serverID, description, localProfileID, partnerProfileID, baseDirectory, accessRole string,
tags map[string]string,
) (*Agreement, error)
CreateAgreementFull(
serverID, description, localProfileID, partnerProfileID, baseDirectory, accessRole, status string,
tags map[string]string,
) (*Agreement, error)
DeleteAgreement(serverID, agreementID string) error
DescribeAgreement(serverID, agreementID string) (*Agreement, error)
ListAgreements(serverID string) ([]*Agreement, error)
UpdateAgreement(serverID, agreementID, description, status string) (*Agreement, error)
CreateConnector(
url, accessRole string,
sftpConfig *ConnectorSftpConfig,
as2Config *ConnectorAs2Config,
tags map[string]string,
) (*Connector, error)
CreateConnectorFull(in *CreateConnectorInput) (*Connector, error)
DeleteConnector(connectorID string) error
DescribeConnector(connectorID string) (*Connector, error)
ListConnectors() []*Connector
UpdateConnector(
connectorID, url, accessRole string,
sftpConfig *ConnectorSftpConfig,
as2Config *ConnectorAs2Config,
) (*Connector, error)
UpdateConnectorFull(in *UpdateConnectorInput) (*Connector, error)
CreateProfile(profileType, as2ID string, tags map[string]string) (*Profile, error)
DeleteProfile(profileID string) error
DescribeProfile(profileID string) (*Profile, error)
ListProfiles() []*Profile
UpdateProfile(profileID, as2ID string) (*Profile, error)
UpdateProfileFull(in *UpdateProfileInput) (*Profile, error)
CreateWebApp(tags map[string]string) (*WebApp, error)
DeleteWebApp(webAppID string) error
DescribeWebApp(webAppID string) (*WebApp, error)
ListWebApps() []*WebApp
UpdateWebApp(
webAppID string,
identityProviderDetails *WebAppIdentityProviderDetails,
) (*WebApp, error)
DeleteWebAppCustomization(webAppID string) error
DescribeWebAppCustomization(webAppID string) (*WebAppCustomization, error)
UpdateWebAppCustomization(webAppID, title, logoFile, faviconFile string) (*WebAppCustomization, error)
CreateWorkflow(
description string,
steps []WorkflowStep,
onExceptionSteps []WorkflowStep,
tags map[string]string,
) (*Workflow, error)
DeleteWorkflow(workflowID string) error
DescribeWorkflow(workflowID string) (*Workflow, error)
ListWorkflows() []*Workflow
DeleteCertificate(certificateID string) error
ImportCertificate(
usage, body, description string,
notBefore, notAfter time.Time,
tags map[string]string,
) (*Certificate, error)
DescribeCertificate(certificateID string) (*Certificate, error)
ListCertificates() []*Certificate
UpdateCertificate(certificateID, description string) (*Certificate, error)
ImportHostKey(
serverID, hostKeyBody, description string,
tags map[string]string,
) (*HostKey, error)
DeleteHostKey(serverID, hostKeyID string) error
DescribeHostKey(serverID, hostKeyID string) (*HostKey, error)
ListHostKeys(serverID string) ([]*HostKey, error)
UpdateHostKey(serverID, hostKeyID, description string) (*HostKey, error)
ImportSSHPublicKey(serverID, userName, sshPublicKeyBody string) (*SSHPublicKey, error)
DeleteSSHPublicKey(serverID, userName, sshPublicKeyID string) error
TagResource(resourceARN string, tags map[string]string) error
UntagResource(resourceARN string, tagKeys []string) error
ListTagsForResource(resourceARN string) map[string]string
CreateExecution(workflowID string) (*Execution, error)
DescribeExecution(workflowID, executionID string) (*Execution, error)
ListExecutions(workflowID string) ([]*Execution, error)
StartFileFileTransferResult(connectorID string, files []string) string
ListFileFileTransferResults(connectorID string) []*FileTransferResult
StartAsyncOperationRecord(connectorID, opType string) string
TestIdentityProvider(serverID, userName string) (int, string)
SendWorkflowStepStateRecord(workflowID, executionID, token, status string) error
}
StorageBackend defines the interface for Transfer backend implementations. All mutating methods must be safe for concurrent use.
type TagStepDetails ¶
type TagStepDetails struct {
Name string `json:"name,omitempty"`
SourceFileLocation string `json:"source_file_location,omitempty"`
Tags []map[string]any `json:"tags,omitempty"`
}
TagStepDetails holds details for a Tag workflow step.
type UpdateAccessInput ¶
type UpdateAccessInput struct {
PosixProfile *PosixProfile
ServerID string
ExternalID string
Role string
HomeDir string
HomeDirectoryType string
Policy string
HomeDirectoryMappings []HomeDirectoryMapEntry
SetPosixProfile bool
SetHomeDirectoryType bool
SetPolicy bool
SetHomeDirectoryMappings bool
}
UpdateAccessInput holds all mutable fields for UpdateAccessFull.
type UpdateConnectorInput ¶
type UpdateConnectorInput struct {
SftpConfig *ConnectorSftpConfig
As2Config *ConnectorAs2Config
ConnectorID string
URL string
AccessRole string
LoggingRole string
SecurityPolicyName string
SetLoggingRole bool
SetSecurityPolicyName bool
}
UpdateConnectorInput holds all optional fields for UpdateConnector.
type UpdateProfileInput ¶
type UpdateProfileInput struct {
ProfileID string
As2ID string
CertificateIDs []string
SetCertificateIDs bool
}
UpdateProfileInput holds mutable fields for UpdateProfile.
type UpdateServerInput ¶
type UpdateServerInput struct {
IdentityProviderDetails *IdentityProviderDetails
EndpointDetails *EndpointDetails
ProtocolDetails *ProtocolDetails
WorkflowDetails *WorkflowDetails
S3StorageOptions *S3StorageOptions
SecurityPolicyName string
ServerID string
Certificate string
EndpointType string
HostKey string
LoggingRole string
PreAuthenticationLoginBanner string
PostAuthenticationLoginBanner string
IPAddressType string
StructuredLogDestinations []string
Protocols []string
SetLoggingRole bool
SetIdentityProviderDetails bool
SetCertificate bool
SetPreAuthBanner bool
SetPostAuthBanner bool
SetSecurityPolicyName bool
SetIPAddressType bool
SetEndpointType bool
SetEndpointDetails bool
SetProtocolDetails bool
SetWorkflowDetails bool
SetS3StorageOptions bool
SetStructuredLogDestinations bool
SetHostKey bool
}
UpdateServerInput holds all optional fields for UpdateServer.
type UpdateUserInput ¶
type UpdateUserInput struct {
PosixProfile *PosixProfile
ServerID string
UserName string
HomeDir string
Role string
HomeDirectoryType string
Policy string
HomeDirectoryMappings []HomeDirectoryMapEntry
SetPosixProfile bool
SetHomeDirectoryMappings bool
SetPolicy bool
SetHomeDirectoryType bool
}
UpdateUserInput holds all optional fields for UpdateUser.
type User ¶
type User struct {
CreatedAt time.Time `json:"created_at"`
PosixProfile *PosixProfile `json:"posix_profile,omitempty"`
Tags map[string]string `json:"tags"`
UserName string `json:"user_name"`
ServerID string `json:"server_id"`
HomeDir string `json:"home_dir"`
Role string `json:"role"`
AccountID string `json:"account_id"`
Region string `json:"region"`
HomeDirectoryType string `json:"home_directory_type,omitempty"`
Policy string `json:"policy,omitempty"`
HomeDirectoryMappings []HomeDirectoryMapEntry `json:"home_directory_mappings,omitempty"`
}
User represents a user on an AWS Transfer Family server.
type WebApp ¶
type WebApp struct {
IdentityProviderDetails *WebAppIdentityProviderDetails `json:"identity_provider_details,omitempty"`
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
WebAppID string `json:"web_app_id"`
AccountID string `json:"account_id"`
Region string `json:"region"`
}
WebApp represents an AWS Transfer web application.
type WebAppCustomization ¶
WebAppCustomization holds per-web-app branding customization.
type WebAppIdentityProviderDetails ¶
type WebAppIdentityProviderDetails struct {
IdentityProviderType string `json:"identity_provider_type,omitempty"`
InstanceArn string `json:"instance_arn,omitempty"`
Role string `json:"role,omitempty"`
URL string `json:"url,omitempty"`
Directory string `json:"directory,omitempty"`
Function string `json:"function,omitempty"`
}
WebAppIdentityProviderDetails holds identity provider configuration for a web app.
type Workflow ¶
type Workflow struct {
CreatedAt time.Time `json:"created_at"`
Tags map[string]string `json:"tags"`
WorkflowID string `json:"workflow_id"`
Description string `json:"description"`
AccountID string `json:"account_id"`
Region string `json:"region"`
Steps []WorkflowStep `json:"steps,omitempty"`
OnExceptionSteps []WorkflowStep `json:"on_exception_steps,omitempty"`
}
Workflow represents an AWS Transfer workflow for file processing.
type WorkflowDetail ¶
type WorkflowDetail struct {
WorkflowID string `json:"workflow_id"`
ExecutionRole string `json:"execution_role"`
}
WorkflowDetail holds a single workflow ID + execution role pair.
type WorkflowDetails ¶
type WorkflowDetails struct {
OnUpload []WorkflowDetail `json:"on_upload,omitempty"`
OnPartialUpload []WorkflowDetail `json:"on_partial_upload,omitempty"`
}
WorkflowDetails holds workflow trigger configuration for a Transfer server.
type WorkflowStep ¶
type WorkflowStep struct {
CopyStepDetails *CopyStepDetails `json:"copy_step_details,omitempty"`
CustomStepDetails *CustomStepDetails `json:"custom_step_details,omitempty"`
DeleteStepDetails *DeleteStepDetails `json:"delete_step_details,omitempty"`
TagStepDetails *TagStepDetails `json:"tag_step_details,omitempty"`
DecryptStepDetails *DecryptStepDetails `json:"decrypt_step_details,omitempty"`
Type string `json:"type"`
}
WorkflowStep represents a single step in an AWS Transfer workflow.
Source Files
¶
- access.go
- agreements.go
- certificates.go
- connectors.go
- errors.go
- handler.go
- handler_access.go
- handler_agreements.go
- handler_certificates.go
- handler_connectors.go
- handler_host_keys.go
- handler_profiles.go
- handler_security_policies.go
- handler_servers.go
- handler_ssh_keys.go
- handler_tags.go
- handler_users.go
- handler_web_apps.go
- handler_workflows.go
- host_keys.go
- interfaces.go
- models.go
- persistence.go
- profiles.go
- provider.go
- servers.go
- ssh_keys.go
- store.go
- store_setup.go
- tags.go
- users.go
- web_apps.go
- workflows.go