-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for github credentials
- Loading branch information
1 parent
812a34d
commit cf8b041
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package credentials | ||
|
||
// GitHub defines a reference GitHub connection. | ||
type GitHub struct { | ||
ID string `json:"Id"` | ||
|
||
gitCredential | ||
} | ||
|
||
// NewReference creates and initializes a reference Git credential. | ||
func NewGitHub(id string) *Reference { | ||
return &Reference{ | ||
ID: id, | ||
gitCredential: gitCredential{ | ||
CredentialType: GitCredentialTypeGitHub, | ||
}, | ||
} | ||
} | ||
|
||
// Type returns the type for this Git credential. | ||
func (u *GitHub) Type() Type { | ||
return u.CredentialType | ||
} | ||
|
||
var _ GitCredential = &GitHub{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters