record

package
v0.0.0-...-e0ef36e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankCardRecord

type BankCardRecord struct {
	ID             string    `db:"id"`
	LastUpdateDate time.Time `db:"last_update_date"`

	CardNumber string     `db:"card_number"`
	Month      time.Month `db:"month"`
	Day        uint32     `db:"day"`
	Code       uint       `db:"code"`
}

func NewBankCardRecord

func NewBankCardRecord(cardNumber string, month time.Month, day uint32, code uint) *BankCardRecord

func (*BankCardRecord) GetId

func (r *BankCardRecord) GetId() string

func (*BankCardRecord) GetLastUpdateDate

func (r *BankCardRecord) GetLastUpdateDate() time.Time

func (*BankCardRecord) ProvideToClient

func (r *BankCardRecord) ProvideToClient(printer printer) error

func (*BankCardRecord) ToProto

func (r *BankCardRecord) ToProto() *proto.Record

type BinaryRecord

type BinaryRecord struct {
	ID             string    `db:"id"`
	LastUpdateDate time.Time `db:"last_update_date"`

	Binary []byte `db:"binary"`
}

func NewBinaryRecord

func NewBinaryRecord(key string, data []byte) *BinaryRecord

func (*BinaryRecord) GetId

func (r *BinaryRecord) GetId() string

func (*BinaryRecord) GetLastUpdateDate

func (r *BinaryRecord) GetLastUpdateDate() time.Time

func (*BinaryRecord) ProvideToClient

func (r *BinaryRecord) ProvideToClient(printer printer) error

func (*BinaryRecord) ToProto

func (r *BinaryRecord) ToProto() *proto.Record

type LoginPasswordRecord

type LoginPasswordRecord struct {
	ID             string    `db:"id"`
	LastUpdateDate time.Time `db:"last_update_date"`

	Login    string `db:"login"`
	Password string `db:"password"`
}

func NewLoginPasswordRecord

func NewLoginPasswordRecord(login, password string) *LoginPasswordRecord

func (*LoginPasswordRecord) GetId

func (r *LoginPasswordRecord) GetId() string

func (*LoginPasswordRecord) GetLastUpdateDate

func (r *LoginPasswordRecord) GetLastUpdateDate() time.Time

func (*LoginPasswordRecord) ProvideToClient

func (r *LoginPasswordRecord) ProvideToClient(printer printer) error

ProvideToClient implements Record

func (*LoginPasswordRecord) ToProto

func (r *LoginPasswordRecord) ToProto() *proto.Record

type Record

type Record interface {
	GetId() string
	GetLastUpdateDate() time.Time
	ToProto() *proto.Record

	ProvideToClient(printer printer) error
}

func FromProto

func FromProto(rec *proto.Record) Record

type TextRecord

type TextRecord struct {
	ID             string    `db:"id"`
	LastUpdateDate time.Time `db:"last_update_date"`

	Text string `db:"text"`
}

func NewTextRecord

func NewTextRecord(key string, text string) *TextRecord

func (*TextRecord) GetId

func (r *TextRecord) GetId() string

func (*TextRecord) GetLastUpdateDate

func (r *TextRecord) GetLastUpdateDate() time.Time

func (*TextRecord) ProvideToClient

func (r *TextRecord) ProvideToClient(printer printer) error

func (*TextRecord) ToProto

func (r *TextRecord) ToProto() *proto.Record

Jump to

Keyboard shortcuts

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