domain

package
v0.0.0-...-a5b95ba Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 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 QRCode

type QRCode struct {
	ID    string
	Index int
}

QRCode is just Generated ID to validate the permission to download techbook.

func NewQRCode

func NewQRCode(index int) *QRCode

func (*QRCode) GetQRCode

func (q *QRCode) GetQRCode() []byte

GetQRCode generates QRCode of techbook download URL.

func (*QRCode) GetURL

func (q *QRCode) GetURL() string

GetURL returns techbook download URL.

type QRCodeRepository

type QRCodeRepository interface {
	GetQRCodes(ctx context.Context) ([]*QRCode, error)
	IsExistQRCode(ctx context.Context, code *QRCode) bool
	// GenerateQRCodes(ctx context.Context, len int) error
	SaveQRCodes(ctx context.Context, qrs []*QRCode) error
}

QRCodeRepository defines what should be implemented as repository.

type TechBook

type TechBook []byte

TechBook is just []byte at this time.

type TechBookRepository

type TechBookRepository interface {
	SetTechBookURL(ctx context.Context, techBookURL string) error
	GetTechBookURL(ctx context.Context) (string, error)
	GetTechBook(ctx context.Context) (TechBook, error)
}

TechBookRepository defines what should be implemented as repository.

Jump to

Keyboard shortcuts

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