gitcredentials

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureHelper

func ConfigureHelper(binaryPath, userName string, port int) error

func RemoveHelper

func RemoveHelper(userName string) error

func RemoveHelperFromPath

func RemoveHelperFromPath(gitConfigPath string) error

func SetUser

func SetUser(userName string, user *GitUser) error

func ToString

func ToString(credentials *GitCredentials) string

Types

type GitCredentials

type GitCredentials struct {
	Protocol string `json:"protocol,omitempty"`
	URL      string `json:"url,omitempty"`
	Host     string `json:"host,omitempty"`
	Path     string `json:"path,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func GetCredentials

func GetCredentials(requestObj *GitCredentials) (*GitCredentials, error)

func Parse

func Parse(raw string) (*GitCredentials, error)

type GitUser

type GitUser struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

func GetUser

func GetUser() (*GitUser, error)

Jump to

Keyboard shortcuts

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