Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDeleteLimitExcedeed = errors.New("delete limit excedeed")
Functions ¶
func IterateProduct ¶
func IterateProduct(sellerapi *api.TokopediaApi, handleItem func(page int, product *model.SellerProductItem, delete func() int) error, filters ...model.Filter) error
func SaveDeleteConfig ¶
func SaveDeleteConfig(fname string, cfg *DeleteConfig) error
Types ¶
type AkunDeleteItem ¶
type DeleteConfig ¶
type DeleteConfig struct { LimitConcurent int `json:"limit_concurent"` LimitProduct int `json:"limit_product"` Title []string `json:"title"` StatusProduct model.ProductStatus `json:"product_status"` CategoryID string `json:"category_id"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` TStartTime time.Time `json:"-"` TEndTime time.Time `json:"-"` Akuns []*AkunDeleteItem `json:"akuns"` SoldFilter *SoldConfig `json:"sold_filter,omitempty"` ViewFilter *ViewConfig `json:"view_filter,omitempty"` }
func NewDeleteConfig ¶
func NewDeleteConfig(fname string) (*DeleteConfig, error)
func (*DeleteConfig) GenerateFilter ¶
func (cfg *DeleteConfig) GenerateFilter() func(product *model.SellerProductItem) (bool, string)
func (*DeleteConfig) GenerateFilterTime ¶
func (cfg *DeleteConfig) GenerateFilterTime() FilterHandler
func (*DeleteConfig) GenerateFilterTitle ¶
func (cfg *DeleteConfig) GenerateFilterTitle() FilterHandler
func (*DeleteConfig) UnmarshalJSON ¶
func (cfg *DeleteConfig) UnmarshalJSON(data []byte) error
type DeleteRunner ¶
type DeleteRunner struct { Config *DeleteConfig // contains filtered or unexported fields }
func NewDeleteRunner ¶
func NewDeleteRunner(cfg *DeleteConfig) *DeleteRunner
func (*DeleteRunner) Run ¶
func (runner *DeleteRunner) Run()
func (*DeleteRunner) RunDeleteAkun ¶
func (runner *DeleteRunner) RunDeleteAkun(akun *AkunDeleteItem) error
func (*DeleteRunner) RunDeleteViolation ¶ added in v1.0.2
func (runner *DeleteRunner) RunDeleteViolation(sapi *api.TokopediaApi) error
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶
func NewErrorHandler(ctx context.Context) *ErrorHandler
func (*ErrorHandler) Error ¶
func (erh *ErrorHandler) Error() error
func (*ErrorHandler) SetError ¶
func (erh *ErrorHandler) SetError(err error)
type FilterHandler ¶
type FilterHandler func(product *model.SellerProductItem) bool
type SoldConfig ¶
func (*SoldConfig) GenerateFilter ¶
func (soldf *SoldConfig) GenerateFilter() FilterHandler
type ViewConfig ¶
func (*ViewConfig) GenerateFilter ¶
func (view *ViewConfig) GenerateFilter() FilterHandler
Click to show internal directories.
Click to hide internal directories.