credentials

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(raw []byte) (map[string]*Item, error)

Decode decodes the git-credentials-encoded data and stores the result in the value pointed to by v.

Static Method

func Encode

func Encode(v map[string]*Item) ([]byte, error)

Encode returns the git-credentials encoding of the data.

Static Method

Types

type Credentials

type Credentials interface {
	Encode(v map[string]*Item) ([]byte, error)
	Decode(raw []byte) (map[string]*Item, error)
}

func New

func New() Credentials

type Item

type Item struct {
	Protocol string `json:"protocol"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	// contains filtered or unexported fields
}

func ParseItem added in v1.2.1

func ParseItem(raw string) (*Item, error)

func (*Item) Parse added in v1.2.1

func (i *Item) Parse(raw string) error

func (*Item) Raw added in v1.2.1

func (i *Item) Raw() string

func (*Item) String added in v1.2.1

func (i *Item) String() string

Jump to

Keyboard shortcuts

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