idpwmemo_go

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 11 Imported by: 1

README

IDPWMemo-go

IDPWMemoで生成したメモデータをGoでも取り扱えるようにしたい

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataFormatError = errors.New("data format error")
View Source
var FailDecrypt = errors.New("failed decrypt")

Functions

This section is empty.

Types

type Error

type Error struct {
	Cause string
}

func (Error) Error

func (self Error) Error() string

type IDPWMemo

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

func NewIDPWMemo

func NewIDPWMemo() *IDPWMemo

func (*IDPWMemo) AddNewService

func (self *IDPWMemo) AddNewService(serviceName string) error

func (*IDPWMemo) ChangePassword

func (self *IDPWMemo) ChangePassword(newPassword []byte) error

func (*IDPWMemo) Clear

func (self *IDPWMemo) Clear()

func (*IDPWMemo) GetSelectedService added in v1.2.0

func (self *IDPWMemo) GetSelectedService() (*Service, error)

func (*IDPWMemo) GetService added in v1.2.0

func (self *IDPWMemo) GetService(index int) (*Service, error)

func (*IDPWMemo) LoadMemo

func (self *IDPWMemo) LoadMemo(buf []byte) error

func (*IDPWMemo) NewMemo

func (self *IDPWMemo) NewMemo() error

func (*IDPWMemo) Save

func (self *IDPWMemo) Save() ([]byte, error)

func (*IDPWMemo) Secrets

func (self *IDPWMemo) Secrets() (*Values, error)

func (*IDPWMemo) SelectService

func (self *IDPWMemo) SelectService(index int) error

func (*IDPWMemo) ServiceNames

func (self *IDPWMemo) ServiceNames() ([]string, error)

func (*IDPWMemo) Services

func (self *IDPWMemo) Services() ([]*Service, error)

func (*IDPWMemo) SetPassword

func (self *IDPWMemo) SetPassword(password []byte) error

func (*IDPWMemo) Values

func (self *IDPWMemo) Values() (*Values, error)

type Service

type Service struct {
	Time   int64
	Values []*Value
	// contains filtered or unexported fields
}

func NewService

func NewService(serviceName string) *Service

func (*Service) GetServiceName

func (self *Service) GetServiceName() string

type Value

type Value struct {
	ValueType
	Value string
}

func NewValue

func NewValue(valueType ValueType, value string) *Value

type ValueType

type ValueType interface {
	fmt.Stringer
	AsInt() int
	// contains filtered or unexported methods
}
var (
	ServiceName      ValueType = vtServiceName
	ServiceUrl       ValueType = vtServiceUrl
	Id               ValueType = vtId
	Password         ValueType = vtPassword
	Email            ValueType = vtEmail
	ReminderQuestion ValueType = vtReminderQuestion
	ReminderAnswer   ValueType = vtReminderAnswer
	Description      ValueType = vtDescription
)

func ToValueType

func ToValueType(v int) ValueType

type Values

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

func (*Values) Add

func (self *Values) Add(newValue *Value)

func (*Values) Get

func (self *Values) Get(index int) *Value

func (*Values) Len

func (self *Values) Len() int

func (*Values) Set

func (self *Values) Set(index int, newValue *Value) error

func (*Values) Slice

func (self *Values) Slice() []*Value

Jump to

Keyboard shortcuts

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