program

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartOfFile   byte = 0x2
	EndOfFile     byte = 0x3
	StartOfRecord byte = 0x1e
	StartOfEntry  byte = 0x1f
)

Variables

View Source
var ProgExitErr = ProgramExitError{}

ProgExitErr - The singleton instance of the program exit error

Functions

This section is empty.

Types

type GnocchiProgram

type GnocchiProgram struct {
	MasterPw []byte

	Debug bool
	// contains filtered or unexported fields
}

func StartProgram

func StartProgram(debug bool) (*GnocchiProgram, error)

StartProgram - Initializes new GnocchiProgram

func (*GnocchiProgram) HandleInput

func (prog *GnocchiProgram) HandleInput(input string) error

func (*GnocchiProgram) MasterPwIsSet

func (prog *GnocchiProgram) MasterPwIsSet() bool

func (*GnocchiProgram) PrintPrompt

func (prog *GnocchiProgram) PrintPrompt()

type LoginInfo

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

func NewBlankLoginInfo

func NewBlankLoginInfo() LoginInfo

func (*LoginInfo) GetAcctPassword

func (linfo *LoginInfo) GetAcctPassword(masterPw []byte) string

func (*LoginInfo) GetReader

func (linfo *LoginInfo) GetReader() io.Reader

func (*LoginInfo) MakeNewRandomSeed

func (linfo *LoginInfo) MakeNewRandomSeed()

func (*LoginInfo) PrintInfo

func (linfo *LoginInfo) PrintInfo(settings bool)

func (*LoginInfo) SetAllowedSpecialChars

func (linfo *LoginInfo) SetAllowedSpecialChars(chars string) error

func (*LoginInfo) SetGeneratedPwLength

func (linfo *LoginInfo) SetGeneratedPwLength(len int) error

type LoginInfoBuilder

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

type LoginInfoReader

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

func (LoginInfoReader) Read

func (linfR LoginInfoReader) Read(p []byte) (n int, err error)

type NewLoginProgramModule

type NewLoginProgramModule struct {
	ProgramModule
	// contains filtered or unexported fields
}

func (*NewLoginProgramModule) EditLogin

func (prog *NewLoginProgramModule) EditLogin(wrLinfo *LoginInfo)

func (*NewLoginProgramModule) HandleInput

func (prog *NewLoginProgramModule) HandleInput(input string) error

func (*NewLoginProgramModule) NewLogin

func (prog *NewLoginProgramModule) NewLogin(wrLinfo *LoginInfo)

func (*NewLoginProgramModule) PrintPrompt

func (prog *NewLoginProgramModule) PrintPrompt()

type ProgramExitError

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

ProgramExitError - Just a custom error for when a program has finished what it needs to do to tell parent program it should be exited.

func (ProgramExitError) Error

func (pee ProgramExitError) Error() string

pee ( ͡° ͜ʖ ͡°)

type ProgramModule

type ProgramModule interface {
	HandleInput(input string) error
	PrintPrompt()
}

ProgramModule - interface for cli programs and subprograms

type ProgramState

type ProgramState int

ProgramState - Int type for specifiying current state of a program

Jump to

Keyboard shortcuts

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