Documentation
¶
Index ¶
- Variables
- type AgeRange
- type Barcodes
- type Collection
- type Collections
- type CommonResponse
- type Dimensions
- type ExtendedData
- type GetSetRequest
- type IBrickAuth
- type IBrickHash
- type IBrickSet
- type IBrickStorage
- type IClient
- type Image
- type Instruction
- type LEGOCom
- type LEGOComDetails
- type Option
- type Rating
- type Review
- type Sets
- type Subthemes
- type Themes
- type Years
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.Default()
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collections ¶
type CommonResponse ¶
type CommonResponse struct { Status string `json:"status"` Message string `json:"message"` Themes []*Themes `json:"themes"` Matches int `json:"matches"` Sets []*Sets `json:"sets"` Hash string `json:"hash"` Reviews []*Review `json:"reviews"` Subthemes []*Subthemes `json:"subthemes"` Instructions []*Instruction `json:"instructions"` AdditionalImages []*Image `json:"additionalImages"` Years []*Years }
func (CommonResponse) Error ¶
func (c CommonResponse) Error() error
func (CommonResponse) IsSuccess ¶
func (c CommonResponse) IsSuccess() bool
type Dimensions ¶
type ExtendedData ¶
type GetSetRequest ¶
type GetSetRequest struct { SetID int `json:"setID,omitempty"` Query string `json:"query,omitempty"` Theme string `json:"theme,omitempty"` SetNumber string `json:"setNumber,omitempty"` PageSize int `json:"pageSize,omitempty"` PageNumber int `json:"pageNumber,omitempty"` }
func (GetSetRequest) JSON ¶
func (g GetSetRequest) JSON() string
type IBrickAuth ¶
type IBrickAuth interface { Login(ctx context.Context) (string, error) CheckUserHash(ctx context.Context, hash string) (bool, error) CheckKey(ctx context.Context, key string) (bool, error) }
func NewAuth ¶
func NewAuth(apiKey, username, password string, client IClient) IBrickAuth
type IBrickHash ¶
func NewHash ¶
func NewHash(auth IBrickAuth, store IBrickStorage, expires time.Duration) IBrickHash
type IBrickSet ¶
type IBrickSet interface { GetSets(ctx context.Context, params *GetSetRequest) (int, []*Sets, error) GetThemes(ctx context.Context) (int, []*Themes, error) GetReviews(ctx context.Context, setID int) (int, []*Review, error) GetSubthemes(ctx context.Context, theme string) (int, []*Subthemes, error) GetInstructions(ctx context.Context, setID int) (int, []*Instruction, error) GetInstructions2(ctx context.Context, setNumber string) (int, []*Instruction, error) GetAdditionalImages(ctx context.Context, setID int) (int, []*Image, error) GetYears(ctx context.Context, theme string) (int, []*Years, error) }
type IBrickStorage ¶
type IClient ¶
type Instruction ¶
type LEGOCom ¶
type LEGOCom struct { US LEGOComDetails `json:"US"` UK LEGOComDetails `json:"UK"` CA LEGOComDetails `json:"CA"` DE LEGOComDetails `json:"DE"` }
type LEGOComDetails ¶
type Option ¶
type Option func(conf *config)
func WithHashExpires ¶
func WithImagePath ¶
func WithStorage ¶
func WithStorage(s IBrickStorage) Option
type Sets ¶
type Sets struct { SetID int `json:"setID"` Number string `json:"number"` NumberVariant int `json:"numberVariant"` Name string `json:"name"` Year int `json:"year"` Theme string `json:"theme"` ThemeGroup string `json:"themeGroup"` Subtheme string `json:"subtheme"` Category string `json:"category"` Released bool `json:"released"` Pieces int `json:"pieces"` Minifigs int `json:"minifigs"` Image Image `json:"image"` BricksetURL string `json:"bricksetURL"` Collection Collection `json:"collection"` Collections Collections `json:"collections"` LEGOCom LEGOCom `json:"LEGOCom"` Rating float32 `json:"rating"` ReviewCount int `json:"reviewCount"` PackagingType string `json:"packagingType"` Availability string `json:"availability"` InstructionsCount int `json:"instructionsCount"` AdditionalImageCount int `json:"additionalImageCount"` AgeRange AgeRange `json:"ageRange"` Dimensions Dimensions `json:"dimensions"` Barcode Barcodes `json:"barcode"` ExtendedData ExtendedData `json:"extendedData"` LastUpdated string `json:"lastUpdated"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.