netrc

package
v0.43.3-0...-9926edd Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package netrc contains functionality to work with netrc.

Index

Constants

View Source
const Filename = netrcFilename

Filename exposes the netrc filename based on the current operating system.

Variables

This section is empty.

Functions

func PutMachine

func PutMachine(envContainer app.EnvContainer, machine Machine) error

PutMachine adds the given Machine to the configured netrc file.

Types

type Machine

type Machine interface {
	// Empty for default machine.
	Name() string
	Login() string
	Password() string
	Account() string
}

Machine is a machine.

func GetMachineForName

func GetMachineForName(envContainer app.EnvContainer, name string) (_ Machine, retErr error)

GetMachineForName returns the Machine for the given name.

Returns nil if no such Machine.

func NewMachine

func NewMachine(
	name string,
	login string,
	password string,
	account string,
) Machine

NewMachine creates a new Machine.

Jump to

Keyboard shortcuts

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