Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveApplicationConfig ¶ added in v1.1.71
func SaveApplicationConfig(base pdc_application.BaseApplication, config *TokopediaTokoLiburConfig) error
Types ¶
type AkunTokoLibur ¶
type Application ¶
type Application struct { Config *TokopediaTokoLiburConfig Report *Report }
func InitApplication ¶
func InitApplication(base pdc_application.BaseApplication) (*Application, error)
func NewApplication ¶
func NewApplication(config *TokopediaTokoLiburConfig, report *Report) *Application
func (*Application) ProcessLibur ¶
func (app *Application) ProcessLibur(item *ReportItem, tapi *api.TokopediaApi) error
func (*Application) Run ¶
func (app *Application) Run() error
type Report ¶
type Report struct { sync.Mutex Data []*ReportItem // contains filtered or unexported fields }
func NewReport ¶
func NewReport(config *TokopediaTokoLiburConfig) (*Report, error)
func (*Report) Iterate ¶
func (r *Report) Iterate( handler func( item *ReportItem, updateitem func(handler func(item *ReportItem) error) error, ) error, ) error
type ReportItem ¶
type ReportItem struct { *AkunTokoLibur StatusBefore string `csv:"status_before" json:"status_before"` StatusAfter string `csv:"status_after" json:"status_after"` Message string `csv:"message" json:"message"` Error string `csv:"error" json:"error"` }
func (*ReportItem) CreateDriver ¶
func (item *ReportItem) CreateDriver() (*tokopedia_lib.DriverAccount, error)
func (*ReportItem) ReportError ¶
func (r *ReportItem) ReportError(err error) error
type TokopediaTokoLiburConfig ¶ added in v1.1.71
type TokopediaTokoLiburConfig struct { BaseConfig pdc_application.BaseApplication `json:"-"` Libur bool `json:"libur"` Report string `json:"report"` Limit int `json:"limit"` CloseStart int `json:"closeStart"` CloseEnd int `json:"closeEnd"` }
func NewApplicationConfig ¶
func NewApplicationConfig(base pdc_application.BaseApplication) *TokopediaTokoLiburConfig
func (*TokopediaTokoLiburConfig) CreateCloseShopInput ¶ added in v1.1.71
func (c *TokopediaTokoLiburConfig) CreateCloseShopInput() *api.CloseShopScheduleInput
func (*TokopediaTokoLiburConfig) GetReportPath ¶ added in v1.1.71
func (c *TokopediaTokoLiburConfig) GetReportPath() string
Click to show internal directories.
Click to hide internal directories.