gqlmodel

package
v0.0.0-...-7c4a8a6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionDisplay   Action = "DISPLAY"
	ActionClickItem Action = "CLICK_ITEM"
)

func (Action) IsValid

func (e Action) IsValid() bool

func (Action) MarshalGQL

func (e Action) MarshalGQL(w io.Writer)

func (Action) String

func (e Action) String() string

func (*Action) UnmarshalGQL

func (e *Action) UnmarshalGQL(v interface{}) error

type AppliedMetadata

type AppliedMetadata struct {
	Name   string   `json:"name"`
	Values []string `json:"values"`
}

type ErrorCode

type ErrorCode string
const (
	ErrorCodeNotFound ErrorCode = "NOT_FOUND"
	ErrorCodeInternal ErrorCode = "INTERNAL"
)

func (ErrorCode) IsValid

func (e ErrorCode) IsValid() bool

func (ErrorCode) MarshalGQL

func (e ErrorCode) MarshalGQL(w io.Writer)

func (ErrorCode) String

func (e ErrorCode) String() string

func (*ErrorCode) UnmarshalGQL

func (e *ErrorCode) UnmarshalGQL(v interface{}) error

type Event

type Event struct {
	ID        EventID                `json:"id"`
	Action    Action                 `json:"action"`
	CreatedAt time.Time              `json:"createdAt"`
	Params    map[string]interface{} `json:"params"`
}

type EventID

type EventID string
const (
	EventIDHome             EventID = "HOME"
	EventIDSearch           EventID = "SEARCH"
	EventIDQuerySuggestions EventID = "QUERY_SUGGESTIONS"
	EventIDSimilarItems     EventID = "SIMILAR_ITEMS"
)

func (EventID) IsValid

func (e EventID) IsValid() bool

func (EventID) MarshalGQL

func (e EventID) MarshalGQL(w io.Writer)

func (EventID) String

func (e EventID) String() string

func (*EventID) UnmarshalGQL

func (e *EventID) UnmarshalGQL(v interface{}) error

type Facet

type Facet struct {
	Title      string        `json:"title"`
	FacetType  FacetType     `json:"facetType"`
	Values     []*FacetValue `json:"values"`
	TotalCount int           `json:"totalCount"`
}

type FacetType

type FacetType string
const (
	FacetTypeCategoryIDS FacetType = "CATEGORY_IDS"
	FacetTypeBrandNames  FacetType = "BRAND_NAMES"
	FacetTypeColors      FacetType = "COLORS"
	FacetTypeMetadata    FacetType = "METADATA"
)

func (FacetType) IsValid

func (e FacetType) IsValid() bool

func (FacetType) MarshalGQL

func (e FacetType) MarshalGQL(w io.Writer)

func (FacetType) String

func (e FacetType) String() string

func (*FacetType) UnmarshalGQL

func (e *FacetType) UnmarshalGQL(v interface{}) error

type FacetValue

type FacetValue struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Count int    `json:"count"`
}

type GetSimilarItemsInput

type GetSimilarItemsInput struct {
	ItemID   string `json:"itemId"`
	Page     *int   `json:"page"`
	PageSize *int   `json:"pageSize"`
}

type GetSimilarItemsResponse

type GetSimilarItemsResponse struct {
	SearchID       string          `json:"searchId"`
	ItemConnection *ItemConnection `json:"itemConnection"`
}

type HomeClickItemActionParams

type HomeClickItemActionParams struct {
	ComponentID string `json:"componentId"`
	ItemID      string `json:"itemId"`
}

type HomeComponent

type HomeComponent struct {
	ID      string               `json:"id"`
	Payload HomeComponentPayload `json:"payload"`
}

type HomeComponentPayload

type HomeComponentPayload interface {
	IsHomeComponentPayload()
}

type HomeComponentPayloadCategories

type HomeComponentPayloadCategories struct {
	Title      string          `json:"title"`
	Categories []*ItemCategory `json:"categories"`
}

func (HomeComponentPayloadCategories) IsHomeComponentPayload

func (HomeComponentPayloadCategories) IsHomeComponentPayload()

type HomeComponentPayloadItemGroups

type HomeComponentPayloadItemGroups struct {
	Title   string                       `json:"title"`
	Payload []*HomeComponentPayloadItems `json:"payload"`
}

func (HomeComponentPayloadItemGroups) IsHomeComponentPayload

func (HomeComponentPayloadItemGroups) IsHomeComponentPayload()

type HomeComponentPayloadItems

type HomeComponentPayloadItems struct {
	Title string  `json:"title"`
	Items []*Item `json:"items"`
}

func (HomeComponentPayloadItems) IsHomeComponentPayload

func (HomeComponentPayloadItems) IsHomeComponentPayload()

type HomeComponentPayloadMediaPosts

type HomeComponentPayloadMediaPosts struct {
	Title string       `json:"title"`
	Posts []*MediaPost `json:"posts"`
}

func (HomeComponentPayloadMediaPosts) IsHomeComponentPayload

func (HomeComponentPayloadMediaPosts) IsHomeComponentPayload()

type HomeResponse

type HomeResponse struct {
	Components []*HomeComponent `json:"components"`
}

type Item

type Item struct {
	ID             string              `json:"id"`
	GroupID        string              `json:"groupID"`
	Name           string              `json:"name"`
	Description    string              `json:"description"`
	Status         ItemStatus          `json:"status"`
	URL            string              `json:"url"`
	AffiliateURL   string              `json:"affiliateUrl"`
	Price          int                 `json:"price"`
	ImageUrls      []string            `json:"imageUrls"`
	AverageRating  float64             `json:"averageRating"`
	ReviewCount    int                 `json:"reviewCount"`
	CategoryID     string              `json:"categoryId"`
	Colors         []ItemColor         `json:"colors"`
	Platform       ItemSellingPlatform `json:"platform"`
	SameGroupItems []*Item             `json:"sameGroupItems"`
}

type ItemCategory

type ItemCategory struct {
	ID       string          `json:"id"`
	Name     string          `json:"name"`
	Level    int             `json:"level"`
	ParentID *string         `json:"parentId"`
	ImageURL *string         `json:"imageUrl"`
	Parent   *ItemCategory   `json:"parent"`
	Children []*ItemCategory `json:"children"`
}

type ItemColor

type ItemColor string
const (
	ItemColorWhite       ItemColor = "WHITE"
	ItemColorYellow      ItemColor = "YELLOW"
	ItemColorOrange      ItemColor = "ORANGE"
	ItemColorPink        ItemColor = "PINK"
	ItemColorRed         ItemColor = "RED"
	ItemColorBeige       ItemColor = "BEIGE"
	ItemColorSilver      ItemColor = "SILVER"
	ItemColorGold        ItemColor = "GOLD"
	ItemColorGray        ItemColor = "GRAY"
	ItemColorPurple      ItemColor = "PURPLE"
	ItemColorBrown       ItemColor = "BROWN"
	ItemColorGreen       ItemColor = "GREEN"
	ItemColorBlue        ItemColor = "BLUE"
	ItemColorBlack       ItemColor = "BLACK"
	ItemColorNavy        ItemColor = "NAVY"
	ItemColorKhaki       ItemColor = "KHAKI"
	ItemColorWineRed     ItemColor = "WINE_RED"
	ItemColorTransparent ItemColor = "TRANSPARENT"
)

func (ItemColor) IsValid

func (e ItemColor) IsValid() bool

func (ItemColor) MarshalGQL

func (e ItemColor) MarshalGQL(w io.Writer)

func (ItemColor) String

func (e ItemColor) String() string

func (*ItemColor) UnmarshalGQL

func (e *ItemColor) UnmarshalGQL(v interface{}) error

type ItemConnection

type ItemConnection struct {
	PageInfo *PageInfo `json:"pageInfo"`
	Nodes    []*Item   `json:"nodes"`
}

type ItemSellingPlatform

type ItemSellingPlatform string
const (
	ItemSellingPlatformRakuten       ItemSellingPlatform = "RAKUTEN"
	ItemSellingPlatformYahooShopping ItemSellingPlatform = "YAHOO_SHOPPING"
	ItemSellingPlatformPaypayMall    ItemSellingPlatform = "PAYPAY_MALL"
)

func (ItemSellingPlatform) IsValid

func (e ItemSellingPlatform) IsValid() bool

func (ItemSellingPlatform) MarshalGQL

func (e ItemSellingPlatform) MarshalGQL(w io.Writer)

func (ItemSellingPlatform) String

func (e ItemSellingPlatform) String() string

func (*ItemSellingPlatform) UnmarshalGQL

func (e *ItemSellingPlatform) UnmarshalGQL(v interface{}) error

type ItemStatus

type ItemStatus string
const (
	ItemStatusActive   ItemStatus = "ACTIVE"
	ItemStatusInactive ItemStatus = "INACTIVE"
)

func (ItemStatus) IsValid

func (e ItemStatus) IsValid() bool

func (ItemStatus) MarshalGQL

func (e ItemStatus) MarshalGQL(w io.Writer)

func (ItemStatus) String

func (e ItemStatus) String() string

func (*ItemStatus) UnmarshalGQL

func (e *ItemStatus) UnmarshalGQL(v interface{}) error

type MediaPost

type MediaPost struct {
	Slug         string               `json:"slug"`
	Title        string               `json:"title"`
	Description  string               `json:"description"`
	MainImageURL string               `json:"mainImageUrl"`
	PublishedAt  time.Time            `json:"publishedAt"`
	Categories   []*MediaPostCategory `json:"categories"`
}

type MediaPostCategory

type MediaPostCategory struct {
	ID    string   `json:"id"`
	Names []string `json:"names"`
}

type PageInfo

type PageInfo struct {
	Page       int `json:"page"`
	TotalPage  int `json:"totalPage"`
	TotalCount int `json:"totalCount"`
}

type QuerySuggestionsDisplayActionParams

type QuerySuggestionsDisplayActionParams struct {
	Query            string   `json:"query"`
	SuggestedQueries []string `json:"suggestedQueries"`
}

type QuerySuggestionsResponse

type QuerySuggestionsResponse struct {
	Query            string   `json:"query"`
	SuggestedQueries []string `json:"suggestedQueries"`
}

type SearchClickItemActionParams

type SearchClickItemActionParams struct {
	SearchID string `json:"searchId"`
	ItemID   string `json:"itemId"`
}

type SearchDisplayItemsActionParams

type SearchDisplayItemsActionParams struct {
	SearchID    string       `json:"searchId"`
	SearchFrom  SearchFrom   `json:"searchFrom"`
	SearchInput *SearchInput `json:"searchInput"`
	ItemIds     []string     `json:"itemIds"`
}

type SearchFilter

type SearchFilter struct {
	CategoryIds []string              `json:"categoryIds"`
	Platforms   []ItemSellingPlatform `json:"platforms"`
	BrandNames  []string              `json:"brandNames"`
	Colors      []ItemColor           `json:"colors"`
	MinPrice    *int                  `json:"minPrice"`
	MaxPrice    *int                  `json:"maxPrice"`
	MinRating   *int                  `json:"minRating"`
	Metadata    []*AppliedMetadata    `json:"metadata"`
}

type SearchFrom

type SearchFrom string
const (
	SearchFromURL             SearchFrom = "URL"
	SearchFromOpenSearch      SearchFrom = "OPEN_SEARCH"
	SearchFromHome            SearchFrom = "HOME"
	SearchFromSearch          SearchFrom = "SEARCH"
	SearchFromQuerySuggestion SearchFrom = "QUERY_SUGGESTION"
	SearchFromFilter          SearchFrom = "FILTER"
	SearchFromMedia           SearchFrom = "MEDIA"
)

func (SearchFrom) IsValid

func (e SearchFrom) IsValid() bool

func (SearchFrom) MarshalGQL

func (e SearchFrom) MarshalGQL(w io.Writer)

func (SearchFrom) String

func (e SearchFrom) String() string

func (*SearchFrom) UnmarshalGQL

func (e *SearchFrom) UnmarshalGQL(v interface{}) error

type SearchInput

type SearchInput struct {
	Query    string          `json:"query"`
	SortType *SearchSortType `json:"sortType"`
	Filter   *SearchFilter   `json:"filter"`
	Page     *int            `json:"page"`
	PageSize *int            `json:"pageSize"`
}

type SearchResponse

type SearchResponse struct {
	SearchID       string          `json:"searchId"`
	ItemConnection *ItemConnection `json:"itemConnection"`
	Facets         []*Facet        `json:"facets"`
}

type SearchSortType

type SearchSortType string
const (
	SearchSortTypeBestMatch   SearchSortType = "BEST_MATCH"
	SearchSortTypePriceAsc    SearchSortType = "PRICE_ASC"
	SearchSortTypePriceDesc   SearchSortType = "PRICE_DESC"
	SearchSortTypeReviewCount SearchSortType = "REVIEW_COUNT"
	SearchSortTypeRating      SearchSortType = "RATING"
)

func (SearchSortType) IsValid

func (e SearchSortType) IsValid() bool

func (SearchSortType) MarshalGQL

func (e SearchSortType) MarshalGQL(w io.Writer)

func (SearchSortType) String

func (e SearchSortType) String() string

func (*SearchSortType) UnmarshalGQL

func (e *SearchSortType) UnmarshalGQL(v interface{}) error

type SimilarItemsDisplayItemsActionParams

type SimilarItemsDisplayItemsActionParams struct {
	SearchID             string                `json:"searchId"`
	GetSimilarItemsInput *GetSimilarItemsInput `json:"getSimilarItemsInput"`
	ItemIds              []string              `json:"itemIds"`
}

Jump to

Keyboard shortcuts

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