samba

package module
v0.0.0-...-3ad346a Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultNetConnection

func DefaultNetConnection(serverName string) (net.Conn, error)

func DefaultSambaDialer

func DefaultSambaDialer(userName, password string) *smb2.Dialer

func DefaultSambaSession

func DefaultSambaSession(conn net.Conn, dialer *smb2.Dialer) (*smb2.Session, error)

func NewDialer

func NewDialer(username string, password string) *smb2.Dialer

func NewSession

func NewSession(conn *net.Conn, dialer *smb2.Dialer) (*smb2.Session, error)

func NewTCPConnection

func NewTCPConnection(server string) (*net.Conn, error)

Types

type Samba

type Samba struct {
	Host          string
	Port          uint16
	UserName      string
	Password      string
	ShareName     string
	Session       *smb2.Session
	Share         *smb2.Share
	NetConnection func(serverName string) (net.Conn, error)
	SambaDialer   func(userName, password string) *smb2.Dialer
	SambaSession  func(conn net.Conn, dialer *smb2.Dialer) (*smb2.Session, error)
}

func NewSamba

func NewSamba(host, userName, password, shareName string, port uint16) *Samba

func (*Samba) Connect

func (s *Samba) Connect() error

func (*Samba) Mount

func (s *Samba) Mount() error

func (*Samba) Send

func (s *Samba) Send(source string, destination string) error

func (*Samba) SendMany

func (s *Samba) SendMany(sourcePath string, destinationPath string, fileNames []string) error

func (*Samba) Server

func (s *Samba) Server() string

Jump to

Keyboard shortcuts

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