model

package
v0.0.0-...-956cb47 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatastoreKind = "gas#esun"
	DatastoreKey  = "expected"
)
View Source
const (
	ESUNJPY = "ESUN_JPY"
)

ESUNJPY is esun jpy now prcing

View Source
const SendKey = "SEND_KEY"

SendKey is for queue to send mail

Variables

This section is empty.

Functions

func ByteToFloat64

func ByteToFloat64(bytes []byte) float64

ByteToFloat64 is byte to float64

func Float64ToByte

func Float64ToByte(float float64) []byte

Float64ToByte is float64 to byte

Types

type Crawler

type Crawler struct {
	Resp *http.Response
}

Crawler for crawler

func (*Crawler) GetJpy

func (crawler *Crawler) GetJpy() (jpy float64, err error)

GetJpy is crawler JPY from ESUN response

type Esun

type Esun struct {
	Expected float64         `json:"expected"`
	JPY      float64         `json:"jpy"`
	Err      error           `json:"-"`
	Ctx      context.Context `json:"-"`
}

Esun is esun bank

func (*Esun) GetJPY

func (esun *Esun) GetJPY(c chan bool)

GetJPY is get JPY from ESUN

func (*Esun) SetExpected

func (esun *Esun) SetExpected(c chan bool)

SetExpected is set expected to memcache

func (*Esun) SetMemcache

func (esun *Esun) SetMemcache()

SetMemcache is set into memcache

type Expected

type Expected struct {
	Expected float64 `json:"expected"`
}

Expected is default expected from Firestore

func (*Expected) GetDatastore

func (ex *Expected) GetDatastore(ctx context.Context, value interface{})

GetDatastore is get from Datastore

func (*Expected) PutDatastore

func (ex *Expected) PutDatastore(ctx context.Context, value interface{})

PutDatastore is store to Datastore

type Mail

type Mail struct {
	Ctx  context.Context
	Esun Esun
}

Mail for send mail

func (*Mail) GetEsun

func (m *Mail) GetEsun()

GetEsun is get ESUN from memcache

func (*Mail) Send

func (m *Mail) Send()

Send will send mail

Jump to

Keyboard shortcuts

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