Help us shape the future of Go! Take the 2026 Go Developer Survey

transfer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package transfer is the SFTP server of AWS Transfer Family: users log in with an SSH key and see S3 objects as files. The control plane (servers, users, keys) lives in the generic engine, which hands this package a lookup of the user that is logging in; files are read and written through pogi's S3 with the hub, so nothing here imports the s3 package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Server, User    string
	Account, Region string
	Keys            []ssh.PublicKey
	Home            string    // PATH home directory: /bucket/prefix
	Mappings        []Mapping // LOGICAL home directory
}

Account is a user of a server, as the control plane stores it.

type Mapping

type Mapping struct{ Entry, Target string }

Mapping is one entry of a LOGICAL home directory: the path the user sees and the S3 path behind it.

type Server

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

Server accepts SSH connections and serves SFTP to the users the lookup finds.

ponytail: one listener for every server of the instance (a user name is taken from the first online server that has it, or <serverId>@<name> picks one); a file is held in memory while it is written, and read from S3 in ranges; an IAM role or policy of the user is not enforced; password logins do not exist.

func New

func New(h *core.Hub, lookup func(user string) *Account) (*Server, error)

New makes a server; Listen starts it.

func (*Server) Close

func (s *Server) Close()

Close stops listening; connections that are open finish on their own.

func (*Server) Fingerprint

func (s *Server) Fingerprint() string

Fingerprint is the host key fingerprint, as DescribeServer shows it.

func (*Server) Listen

func (s *Server) Listen(addr string) (string, error)

Listen serves on addr (a port of 0 takes a free one) and returns the address.

Jump to

Keyboard shortcuts

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