transfer

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 SSHPublicKey

type SSHPublicKey struct {
	SSHPublicKeyID   string
	SSHPublicKeyBody string
	DateImported     time.Time
}

SSHPublicKey represents an SSH public key for a Transfer user.

type Server

type Server struct {
	ServerID             string
	Arn                  string
	Endpoint             string
	Domain               string
	EndpointType         string
	IdentityProviderType string
	LoggingRole          string
	Protocols            []string
	State                string
	Tags                 map[string]string
	UserCount            int
	CreatedAt            time.Time
	// contains filtered or unexported fields
}

Server represents an AWS Transfer Family server.

type Store

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

Store manages Transfer Family resources in memory.

func NewStore

func NewStore(accountID, region string) *Store

NewStore returns a new empty Transfer Store.

func (*Store) CreateServer

func (s *Store) CreateServer(domain, endpointType, identityProvider, loggingRole string, protocols []string, tags map[string]string) (*Server, error)

CreateServer creates a new Transfer server.

func (*Store) CreateUser

func (s *Store) CreateUser(serverID, userName, role, homeDir, homeDirType string, tags map[string]string) (*User, error)

CreateUser creates a new user on a server.

func (*Store) CreateWorkflow

func (s *Store) CreateWorkflow(description string, steps, onException []map[string]any, tags map[string]string) (*Workflow, error)

CreateWorkflow creates a new Transfer workflow.

func (*Store) DeleteSSHPublicKey

func (s *Store) DeleteSSHPublicKey(serverID, userName, keyID string) error

DeleteSSHPublicKey removes an SSH public key from a user.

func (*Store) DeleteServer

func (s *Store) DeleteServer(id string) bool

DeleteServer removes a server.

func (*Store) DeleteUser

func (s *Store) DeleteUser(serverID, userName string) bool

DeleteUser removes a user.

func (*Store) DeleteWorkflow

func (s *Store) DeleteWorkflow(id string) bool

DeleteWorkflow removes a workflow.

func (*Store) DescribeWorkflow

func (s *Store) DescribeWorkflow(id string) (*Workflow, bool)

DescribeWorkflow retrieves a workflow by ID.

func (*Store) GetServer

func (s *Store) GetServer(id string) (*Server, bool)

GetServer retrieves a server by ID.

func (*Store) GetUser

func (s *Store) GetUser(serverID, userName string) (*User, bool)

GetUser retrieves a user.

func (*Store) ImportSSHPublicKey

func (s *Store) ImportSSHPublicKey(serverID, userName, keyBody string) (*SSHPublicKey, error)

ImportSSHPublicKey adds an SSH public key to a user.

func (*Store) ListServers

func (s *Store) ListServers() []*Server

ListServers returns all servers.

func (*Store) ListTagsForResource

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

ListTagsForResource returns tags for a resource by ARN.

func (*Store) ListUsers

func (s *Store) ListUsers(serverID string) []*User

ListUsers returns all users for a server.

func (*Store) ListWorkflows

func (s *Store) ListWorkflows() []*Workflow

ListWorkflows returns all workflows.

func (*Store) StartServer

func (s *Store) StartServer(id string) error

StartServer starts a server, transitioning to ONLINE.

func (*Store) StopServer

func (s *Store) StopServer(id string) error

StopServer stops a server, transitioning to STOPPING then OFFLINE.

func (*Store) TagResource

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

TagResource adds 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) UpdateServer

func (s *Store) UpdateServer(id, loggingRole string, protocols []string) (*Server, error)

UpdateServer updates a server's configuration.

func (*Store) UpdateUser

func (s *Store) UpdateUser(serverID, userName, homeDir, role string) (*User, error)

UpdateUser updates a user's configuration.

type TransferService

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

TransferService is the cloudmock implementation of the AWS Transfer Family API.

func New

func New(accountID, region string) *TransferService

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

func (*TransferService) Actions

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

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

func (*TransferService) HandleRequest

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

HandleRequest routes an incoming Transfer request to the appropriate handler.

func (*TransferService) HealthCheck

func (s *TransferService) HealthCheck() error

HealthCheck always returns nil.

func (*TransferService) Name

func (s *TransferService) Name() string

Name returns the AWS service name used for routing.

type User

type User struct {
	ServerID          string
	UserName          string
	Arn               string
	HomeDirectory     string
	HomeDirectoryType string
	Role              string
	SshPublicKeys     []*SSHPublicKey
	Tags              map[string]string
	CreatedAt         time.Time
}

User represents an AWS Transfer Family user.

type Workflow

type Workflow struct {
	WorkflowID  string
	Arn         string
	Description string
	Steps       []map[string]any
	OnException []map[string]any
	Tags        map[string]string
	CreatedAt   time.Time
}

Workflow represents an AWS Transfer Family workflow.

Jump to

Keyboard shortcuts

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