1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-18 01:03:14 +00:00

vendor: add github.com/goftp/server

This commit is contained in:
Nick Craig-Wood
2018-09-14 17:16:54 +01:00
parent a25875170b
commit a14f0d46d7
18 changed files with 2312 additions and 0 deletions

28
vendor/github.com/goftp/server/auth.go generated vendored Normal file
View File

@@ -0,0 +1,28 @@
// Copyright 2018 The goftp Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package server
// Auth is an interface to auth your ftp user login.
type Auth interface {
CheckPasswd(string, string) (bool, error)
}
var (
_ Auth = &SimpleAuth{}
)
// SimpleAuth implements Auth interface to provide a memory user login auth
type SimpleAuth struct {
Name string
Password string
}
// CheckPasswd will check user's password
func (a *SimpleAuth) CheckPasswd(name, pass string) (bool, error) {
if name != a.Name || pass != a.Password {
return false, nil
}
return true, nil
}