services

package
v1.1.54 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AkunEtalaseService

type AkunEtalaseService struct {
	sync.Mutex
	Etalase map[string]*api.ShopShowcaseResult
	// contains filtered or unexported fields
}

func NewAkunEtalaseService

func NewAkunEtalaseService(
	apiclient *api.TokopediaApi,
	mapservice *EtalaseMapService,
) *AkunEtalaseService

func (*AkunEtalaseService) GetEtalase

func (service *AkunEtalaseService) GetEtalase(catID int) (*api.ShopShowcaseResult, error)

func (*AkunEtalaseService) GetSellerEtalase

func (service *AkunEtalaseService) GetSellerEtalase(name string) (*api.ShopShowcaseResult, error)

func (*AkunEtalaseService) RefreshShowCase

func (service *AkunEtalaseService) RefreshShowCase() error

type EtalaseMapItem

type EtalaseMapItem struct {
	ID          uint   `gorm:"primarykey"`
	EtalaseName string `gorm:"index:etalase_map_unique,unique" json:"etalase_name"`
	CategoryID  int    `gorm:"index:etalase_map_unique,unique" json:"category_id"`
}

type EtalaseMapService

type EtalaseMapService struct {
	// contains filtered or unexported fields
}

func NewEtalaseMapService

func NewEtalaseMapService(
	db *gorm.DB,
	shopeePAgg shopee_repo.ProductAggregate,
) *EtalaseMapService

func (*EtalaseMapService) DeleteEtalase

func (service *EtalaseMapService) DeleteEtalase(name string) error

func (*EtalaseMapService) GetEtalase

func (service *EtalaseMapService) GetEtalase(catID int) (*EtalaseMapItem, error)

func (*EtalaseMapService) GetListMap added in v1.0.2

func (service *EtalaseMapService) GetListMap(namespace string) ([]*ShopeeEtalaseMapItem, error)

func (*EtalaseMapService) ListEtalase

func (service *EtalaseMapService) ListEtalase() ([]*EtalasePayload, error)

func (*EtalaseMapService) UpdateBulkMap added in v1.0.2

func (service *EtalaseMapService) UpdateBulkMap(payload []*EtalaseMapItem) error

type EtalasePayload

type EtalasePayload struct {
	Etalase string `json:"etalase"`
	CatIDs  []int  `json:"cat_ids"`
}

type ShopeeEtalaseMapItem added in v1.0.2

type ShopeeEtalaseMapItem struct {
	ShopeeID              int64 `json:"shopee_id"`
	TokopediaID           int   `json:"tokopedia_id"`
	Count                 int   `json:"product_count"`
	CategoryNoMapping     bool  `json:"category_no_mapping"`
	ShopeeCategoryName    []string
	TokopediaCategoryName []string
	EtalaseName           string
}

Jump to

Keyboard shortcuts

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