Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

transport: made public all the fields and standardized AuthMethod #649

Merged
merged 1 commit into from
Nov 21, 2017
Merged

transport: made public all the fields and standardized AuthMethod #649

merged 1 commit into from
Nov 21, 2017

Conversation

mcuadros
Copy link
Contributor

I made a small review on the AuthMethod at transport, some methods/fields were private making to the user more complex to build custom solutions.

Also I standardized AuthMethod constructors and fields, since we had for example Pass and Password in http/ssh

func (m *baseAuthMethod) hostKeyCallback() (ssh.HostKeyCallback, error) {
// SetHostKeyCallback sets the field HostKeyCallback in the given cfg. If
// HostKeyCallback is empty a default callback is created using
// NewKnownHostsHostKeyCallback.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the constructor is not correct.

Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
@@ -287,17 +292,26 @@ func filterKnownHostsFiles(files ...string) ([]string, error) {
return out, nil
}

type baseAuthMethod struct {
// HostKeyCallbackHelper is a helper that provides common functionality to
// configure HostKeyCallback into a ssh.ClientConfig.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssh.ClientConfig should be ssh.HostKeyCallback ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the field is called HostKeyCallback inside of the cfg

@mcuadros mcuadros merged commit b08cc8d into src-d:master Nov 21, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants