publisher

package
v0.49.4 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLocalTransferMissing

func IsLocalTransferMissing(err error) bool

func IsNonRetryable

func IsNonRetryable(err error) bool

Types

type Config

type Config struct {
	Type                  string
	Host                  string
	Port                  int
	User                  string
	Password              string
	PrivateKey            PrivateKeyConfig
	RemoteDir             string
	SubmittedPathPrefix   string
	HostKey               string
	KnownHostsFile        string
	InsecureIgnoreHostKey bool
}

func (Config) Enabled

func (c Config) Enabled() bool

func (Config) Validate

func (c Config) Validate() error

type LocalTransferMissingError

type LocalTransferMissingError struct {
	Path string
	// contains filtered or unexported fields
}

func (LocalTransferMissingError) Error

func (LocalTransferMissingError) Unwrap

func (e LocalTransferMissingError) Unwrap() error

type NonRetryableError

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

func (NonRetryableError) Error

func (e NonRetryableError) Error() string

func (NonRetryableError) Unwrap

func (e NonRetryableError) Unwrap() error

type Option

type Option func(*sftpPublisher)

func WithProgress

func WithProgress(fn func(Progress)) Option

type PrivateKeyConfig

type PrivateKeyConfig struct {
	Path       string
	Passphrase string
}

type Progress

type Progress struct {
	LocalPath string
	Bytes     int64
}

type PublishedTransfer

type PublishedTransfer struct {
	RelPath    string
	RemotePath string
}

type Publisher

type Publisher interface {
	Publish(ctx context.Context, localPath, relPath string) (*PublishedTransfer, error)
	Delete(ctx context.Context, remotePath string) error
}

func New

func New(cfg Config, opts ...Option) (Publisher, error)

Jump to

Keyboard shortcuts

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