buf: github.com/bufbuild/buf/internal/pkg/netrc Index | Files

package netrc

import "github.com/bufbuild/buf/internal/pkg/netrc"

Package netrc contains functionality to work with netrc.


Package Files

machine.go netrc.go netrc_unix.go

func PutMachine Uses

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

PutMachine adds the given Machine to the configured netrc file.

type Machine Uses

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

Machine is a machine.

func GetMachineForName Uses

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 Uses

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

NewMachine creates a new Machine.

Package netrc imports 6 packages (graph) and is imported by 1 packages. Updated 2020-10-20. Refresh now. Tools for package owners.