credfile

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrReadOnly is the read-only error.
	ErrReadOnly = fmt.Errorf("this handler is read only")
)

Functions

This section is empty.

Types

type IniHandler

type IniHandler struct {
	// contains filtered or unexported fields
}

IniHandler handles the credential file.

func NewIniHandler

func NewIniHandler(readOnly bool, path string) *IniHandler

NewIniHandler create a new credential handler.

func (*IniHandler) GetFilePath added in v0.2.0

func (h *IniHandler) GetFilePath() string

GetFilePath returns the path of file.

func (*IniHandler) Read

func (h *IniHandler) Read() (map[string]core.Cred, error)

Read read the credential file.

func (*IniHandler) Remove

func (h *IniHandler) Remove() error

Remove delete the file.

func (*IniHandler) Write

func (h *IniHandler) Write(creds map[string]core.Cred) error

Write overwrite credentials on the file.

Jump to

Keyboard shortcuts

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