client

package
v0.0.0-...-b5cc06a Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FILENAME       = "ENCRYPTED"
	LAST_PUSH_DATE = "LAST_PUSH"

	C_CREATE  = 1
	C_SHOW    = 2
	C_DELETE  = 3
	C_PUSH    = 4
	C_REPLACE = 5
	C_ABOUT   = 9

	C_CREATE_IST  = "[create] [company name] [id] [password]"
	C_SHOW_IST    = "[show] [company name] or [show] for all lists"
	C_DELETE_IST  = "[delete] [company name]"
	C_ABOUT_IST   = "[about]"
	C_REPLACE_IST = "[replace] [company name] [id] [password]"
	C_PUSH_IST    = "[push] [url] [id] [password]"

	F_HELP = "-h"

	ERR_MSG      = "Error, check your command by printing '[command] [-h]'"
	COMMAND_LIST = "create, delete, show"
	ABOUT_MSG    = "This program safely stores your passwords."
	CREDIT       = "Copyright 2015 Chungseok Baek csbaek0429@gmail.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Type        int
	Instruction string
	Arguments   []string
	Flags       []string
}

func ParseCommands

func ParseCommands(strs []string) *Command

func (*Command) Run

func (c *Command) Run()

entry point of command.go note that it has *Command pointer receiver

type DecryptedPassword

type DecryptedPassword struct {
	Key   string
	Value string
}

Password before decryption

func (*DecryptedPassword) SimpleEncrypt

func (notyet *DecryptedPassword) SimpleEncrypt() *EncryptedPassword

SimpleDecrypt accepts pointer receiver *DecryptedPassword and returns *EncryptedPassword

func (*DecryptedPassword) String

func (notyet *DecryptedPassword) String() string

type EncryptedPassword

type EncryptedPassword struct {
	Key   string
	Value string
}

Password before encryption

func (*EncryptedPassword) SimpleDecrypt

func (encrypted *EncryptedPassword) SimpleDecrypt() *DecryptedPassword

SimpleDecrypt accepts pointer receiver *EncryptedPassword and returns *DecryptedPassword

Jump to

Keyboard shortcuts

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