Documentation ¶
Index ¶
Constants ¶
View Source
const ( IsucariAPIKey = "a15400e46c83635eb181-946abb51ff26a868317c" IsucariShopID = "11" )
View Source
const ( StatusInitial = "initial" StatusWaitPickup = "wait_pickup" StatusShipping = "shipping" StatusDone = "done" IsucariAPIToken = "Bearer 75ugk2m37a750fwir5xr-22l6h4wmue1bwrubzwd0" )
Variables ¶
View Source
var (
SecretSeed = []byte("secret-seed")
)
Functions ¶
func NewShipmentStore ¶
func NewShipmentStore() *shipmentStore
func RunServer ¶
func RunServer(paymentPort, shipmentPort int, dataDir string, allowedIPs []net.IP) (*ServerPayment, *ServerShipment, error)
Types ¶
type AppShipping ¶
type AppShipping struct { TransactionEvidenceID int64 `json:"transaction_evidence_id" db:"transaction_evidence_id"` Status string `json:"status" db:"status"` ReserveID string `json:"reserve_id" db:"reserve_id"` ReserveTime int64 `json:"reserve_time" db:"reserve_time"` ToAddress string `json:"to_address" db:"to_address"` ToName string `json:"to_name" db:"to_name"` FromAddress string `json:"from_address" db:"from_address"` FromName string `json:"from_name" db:"from_name"` }
type ServerPayment ¶
type ServerPayment struct { Server // contains filtered or unexported fields }
func NewPayment ¶
func NewPayment(allowedIPs []net.IP) *ServerPayment
func (*ServerPayment) ForceReportsSetStatus ¶
func (s *ServerPayment) ForceReportsSetStatus(itemID int64, status string)
ForceReportsSetStatus is the function for benchmarker
func (*ServerPayment) ForceSet ¶
func (s *ServerPayment) ForceSet(card string, itemID int64, price int) string
ForceSet is the function for benchmarker
func (*ServerPayment) GetReports ¶
func (s *ServerPayment) GetReports() map[int64]report
GetReports is the function for benchmarker コピーはしていないので注意
type ServerShipment ¶
type ServerShipment struct { Server // contains filtered or unexported fields }
func NewShipment ¶
func NewShipment(debug bool, dataDir string, allowedIPs []net.IP) *ServerShipment
func (*ServerShipment) CheckQRMD5 ¶
func (s *ServerShipment) CheckQRMD5(key string, md5Str string) bool
func (*ServerShipment) ForceSetStatus ¶
func (s *ServerShipment) ForceSetStatus(key string, status string) bool
Click to show internal directories.
Click to hide internal directories.