brand

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package brand 品牌

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Info

func Info(c *gin.Context)

Info 用于处理品牌详情接口的请求

func List

func List(c *gin.Context)

List 用于处理品牌列表接口的请求

func RegisterBrandRouter

func RegisterBrandRouter(r gin.IRouter)

RegisterBrandRouter 注册与品牌相关的路由及其处理函数

Types

type Brand

type Brand struct {
	LogoURL        string           `json:"logo_url"`
	Name           string           `json:"name"`
	Plugins        []Plugin         `json:"plugins"`
	IsAdded        bool             `json:"is_added"`  // 是否已添加
	IsNewest       bool             `json:"is_newest"` // 是否是最新
	SupportDevices []*plugin.Device `json:"support_devices"`
}

Branch 品牌信息

func GetBrandInfo

func GetBrandInfo(req *http.Request, name string) (brand Brand, err error)

GetBrandInfo 获取品牌详情

type BrandInfo

type BrandInfo struct {
	LogoURL      string   `json:"logo_url"`
	Name         string   `json:"name"`
	PluginAmount int      `json:"plugin_amount"` // 插件数量
	Plugins      []Plugin `json:"plugins"`
	IsAdded      bool     `json:"is_added"`  // 是否已添加
	IsNewest     bool     `json:"is_newest"` // 是否是最新
}

BrandInfo 品牌信息

func ListBrands

func ListBrands(req *http.Request, isAdded bool) (brands []BrandInfo)

type InfoResp

type InfoResp struct {
	Brand Brand `json:"brand"`
}

InfoResp 品牌详情接口返回数据

type Plugin

type Plugin struct {
	plugin.Plugin
	IsAdded  bool `json:"is_added"`
	IsNewest bool `json:"is_newest"`
}

type Resp

type Resp struct {
	Brands []BrandInfo `json:"brands"`
}

Resp 品牌列表接口返回数据

Jump to

Keyboard shortcuts

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