brand

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package brand 品牌

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelPlugins added in v1.5.0

func DelPlugins(c *gin.Context)

func Info

func Info(c *gin.Context)

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

func List

func List(c *gin.Context)

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

func RegisterBrandRouter

func RegisterBrandRouter(r gin.IRouter)

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

func UpdatePlugin added in v1.5.0

func UpdatePlugin(c *gin.Context)

Types

type Brand

type Brand struct {
	cloud.Brand
	Plugins  []Plugin `json:"plugins"`
	IsAdded  bool     `json:"is_added"`  // 是否已添加
	IsNewest bool     `json:"is_newest"` // 是否是最新
}

Brand 品牌信息

func GetBrandInfo

func GetBrandInfo(name string) (brand Brand, err error)

GetBrandInfo 获取品牌详情

type BrandInfo

type BrandInfo struct {
	cloud.Brand
	IsAdded  bool `json:"is_added"`  // 是否已添加
	IsNewest bool `json:"is_newest"` // 是否是最新
}

BrandInfo 品牌信息

func ListAddedBrands added in v1.5.0

func ListAddedBrands() (brandInfos []BrandInfo, err error)

ListAddedBrands 获取已添加插件的品牌,不请求SC

func ListBrands

func ListBrands() (brandInfos []BrandInfo, err error)

ListBrands 获取所有品牌

type InfoResp

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

InfoResp 品牌详情接口返回数据

type Plugin

type Plugin struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Version  string `json:"version"`
	Brand    string `json:"brand"`
	Info     string `json:"info"`
	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