mbcm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCarouselPic

func CreateCarouselPic(params *CreateCarouselAdRequest) error

func CreateOrUpdateAboutUs

func CreateOrUpdateAboutUs(reqParams *CreateAboutUsRequest) error

func CreatePosterResource

func CreatePosterResource(params *CreatePosterResourceRequest) (uint64, error)

func CreateTheme added in v0.3.0

func CreateTheme(page, k, v string) error

func CreateVersionRecord

func CreateVersionRecord(reqParams *CreateVersionRecordRequest) error

func DeleteAboutUs

func DeleteAboutUs(id string) error

func DeleteCarouselPic

func DeleteCarouselPic(id string) error

func DeletePosterResource

func DeletePosterResource(id string) error

func DeleteTheme added in v0.3.0

func DeleteTheme(id string) error

func DeleteVersionRecord

func DeleteVersionRecord(id string) error

func Destroy

func Destroy()

func GetBuiltinTheme added in v0.4.0

func GetBuiltinTheme() ([]string, error)

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func UpdateAboutUs

func UpdateAboutUs(reqParams *UpdateAboutUsRequest) error

func UpdateCarouselPic

func UpdateCarouselPic(params *UpdateCarouselAdRequest) error

func UpdatePosterResource

func UpdatePosterResource(params *UpdatePosterResourceRequest) error

func UpdateTheme added in v0.3.0

func UpdateTheme(id, page, k, v string) error

func UpdateVersionRecord

func UpdateVersionRecord(reqParams *UpdateVersionRecordRequest) error

func UploadCarouselPic

func UploadCarouselPic(pic *multipart.FileHeader) (string, string, error)

Types

type AboutUsInfo

type AboutUsInfo struct {
	ID         string
	Type       uint8
	Content    string
	CreateDate string
}

func GetAboutUs

func GetAboutUs(params *GetAboutUsQuery) ([]AboutUsInfo, int64, error)

type CarouselAdInfo

type CarouselAdInfo struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Detail   string `json:"detail"`
	TypeName uint8  `json:"typeName"`
	JumpAddr string `json:"jumpAddr"`
	JumpType uint8  `json:"jumpType"`
	Url      string `json:"url"`
}

func GetCarouselPic

func GetCarouselPic(params *GetCarouselAdsQuery) ([]CarouselAdInfo, int64, error)

type CreateAboutUsRequest

type CreateAboutUsRequest struct {
	Type    uint8  `json:"type" binding:"required"`
	Content string `json:"content" binding:"required"`
}

type CreateCarouselAdRequest

type CreateCarouselAdRequest struct {
	Name     string `json:"name" binding:"required"`
	Detail   string `json:"detail"`
	TypeName uint8  `json:"typeName" binding:"required"`
	JumpAddr string `json:"jumpAddr" binding:"required"`
	JumpType uint8  `json:"jumpType"`
	Url      string `json:"url"`
}

type CreatePosterResourceRequest

type CreatePosterResourceRequest struct {
	ImgFileName  string `json:"imgFileName" binding:"required"`
	Text         string `json:"text" `
	BelongsDate  string `json:"belongsDate" binding:"required"`
	Photographer string `json:"photographer" binding:"required"`
	IsHoliday    uint8  `json:"isHoliday" binding:"required"`
}

type CreatePosterResourceResponse

type CreatePosterResourceResponse struct {
	ID uint64 `json:"id"`
	// contains filtered or unexported fields
}

type CreateThemeRequest added in v0.3.0

type CreateThemeRequest struct {
	Page string `json:"page"`
	K    string `json:"k"`
	V    string `json:"v"`
}

type CreateVersionRecordRequest

type CreateVersionRecordRequest struct {
	Remarks     string `json:"remarks"`
	Content     string `json:"content" binding:"required"`
	Number      string `json:"number"`
	State       uint8  `json:"state"`
	PublishDate string `json:"publishDate"`
}

type CreateVersionRecordResponse

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

type DeletePosterResourceResponse

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

type GetAboutUsQuery

type GetAboutUsQuery struct {
	Type     uint8 `form:"type"`
	PageNo   int   `form:"pageNo"`
	PageSize int   `form:"pageSize"`
}

type GetAboutUsResponse

type GetAboutUsResponse struct {
	PageNo     int           `json:"pageNo"`
	TotalCount int64         `json:"totalCount"`
	Infos      []AboutUsInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetBuiltinThemesResponse added in v0.3.0

type GetBuiltinThemesResponse struct {
	Themes []string `json:"themes"`
	// contains filtered or unexported fields
}

type GetCarouselAdsQuery

type GetCarouselAdsQuery struct {
	ID       string `form:"id"`
	Name     string `form:"name"`
	JumpAddr string `form:"jumpAddr"`
	JumpType uint8  `form:"jumpType"`
	TypeName uint8  `form:"typeName"`
	PageNo   int    `form:"pageNo"`
	PageSize int    `form:"pageSize"`
}

type GetCarouselAdsResponse

type GetCarouselAdsResponse struct {
	PageNo     int              `json:"pageNo"`
	TotalCount int64            `json:"totalCount"`
	Infos      []CarouselAdInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetPosterResourcesQuery

type GetPosterResourcesQuery struct {
	ID           uint64 `form:"id"`
	ImgFileName  string `form:"imgFileName"`
	Text         string `form:"text"`
	BelongsDate  string `form:"belongsDate"`
	Photographer string `form:"photographer"`
	IsHoliday    uint8  `form:"isHoliday"`
	PageNo       int    `form:"pageNo"`
	PageSize     int    `form:"pageSize"`
}

type GetPosterResourcesResponse

type GetPosterResourcesResponse struct {
	PageNo     int                  `json:"pageNo"`
	TotalCount int64                `json:"totalCount"`
	Infos      []PosterResourceInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetThemesResponse added in v0.3.0

type GetThemesResponse struct {
	PageNo     int         `json:"pageNo"`
	TotalCount int64       `json:"totalCount"`
	Infos      []ThemeInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetVersionRecordQuery

type GetVersionRecordQuery struct {
	ID          string `form:"id"`
	Number      string `form:"number"`
	State       uint8  `form:"state"`
	CreateDate  string `form:"createDate"`
	PublishDate string `form:"publishDate"`
	PageNo      int    `form:"pageNo"`
	PageSize    int    `form:"pageSize"`
}

type GetVersionRecordResult

type GetVersionRecordResult struct {
	PageNo     int                 `json:"pageNo"`
	TotalCount int64               `json:"totalCount"`
	Infos      []VersionRecordInfo `json:"infos"`
	// contains filtered or unexported fields
}

type PosterResourceInfo

type PosterResourceInfo struct {
	ID           uint64
	ImgFileName  string
	Text         string
	BelongsDate  *time.Time
	Photographer string
	IsHoliday    uint8
}

func GetPosterResources

func GetPosterResources(params *GetPosterResourcesQuery) ([]PosterResourceInfo, int64, error)

type ThemeInfo added in v0.3.0

type ThemeInfo struct {
	ID   string `json:"id"`
	Page string `json:"page"`
	K    string `json:"k"`
	V    string `json:"v"`
}

func GetTheme added in v0.3.0

func GetTheme(page string, pageNo, pageSize int) ([]ThemeInfo, int64, error)

type UpdateAboutUsRequest

type UpdateAboutUsRequest struct {
	ID      string `json:"id" binding:"required"`
	Type    uint8  `json:"type"`
	Content string `json:"content"`
}

type UpdateCarouselAdRequest

type UpdateCarouselAdRequest struct {
	ID       string `json:"id" binding:"required"`
	Name     string `json:"name"`
	Detail   string `json:"detail"`
	JumpAddr string `json:"jumpAddr"`
	JumpType uint8  `json:"jumpType"`
	TypeName uint8  `json:"typeName"`
	Url      string `json:"url"`
}

type UpdatePosterResourceRequest

type UpdatePosterResourceRequest struct {
	ID           uint64 `json:"id" binding:"required"`
	ImgFileName  string `json:"imgFileName"`
	Text         string `json:"text"`
	BelongsDate  string `json:"belongsDate"`
	Photographer string `json:"photographer"`
	IsHoliday    uint8  `json:"isHoliday"`
}

type UpdatePosterResourceResponse

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

type UpdateThemeRequest added in v0.3.0

type UpdateThemeRequest struct {
	ID   string `json:"id"`
	Page string `json:"page"`
	K    string `json:"k"`
	V    string `json:"v"`
}

type UpdateVersionRecordRequest

type UpdateVersionRecordRequest struct {
	ID          string `json:"id" binding:"required"`
	Number      string `json:"number"`
	Content     string `json:"content"`
	Remarks     string `json:"remarks"`
	State       uint8  `json:"state"`
	PublishDate string `json:"publishDate"`
}

type UploadCarouselAdPicResponse

type UploadCarouselAdPicResponse struct {
	Url     string `json:"url"`
	ObjName string `json:"objName"`
	// contains filtered or unexported fields
}

type VersionRecordInfo

type VersionRecordInfo struct {
	ID          string
	Number      string
	Content     string
	Remarks     string
	CreateDate  string
	State       uint8
	PublishDate string
}

func GetVersionRecord

func GetVersionRecord(params *GetVersionRecordQuery) ([]VersionRecordInfo, int64, error)

Jump to

Keyboard shortcuts

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