mbcm

package
v0.15.108 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEncodeRule added in v0.11.20

func AddEncodeRule(req *AddEncodeRuleReq) error

func BatchGenEncode added in v0.12.5

func BatchGenEncode(req BatchGenReq) error

func CreateCarouselPic

func CreateCarouselPic(params *CreateCarouselAdRequest) error

func CreateOpinion added in v0.7.1

func CreateOpinion(req *CreateOpinionRequest) (string, 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(req CreateThemeRequest) error

func CreateVersionRecord

func CreateVersionRecord(reqParams *CreateVersionRecordRequest) error

func DelEncodeRule added in v0.11.20

func DelEncodeRule(tangentId, id string) error

func DeleteAboutUs

func DeleteAboutUs(id string) error

func DeleteCarouselPic

func DeleteCarouselPic(id string) error

func DeleteOption added in v0.15.41

func DeleteOption(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 GetDateCandidates added in v0.12.1

func GetDateCandidates() ([]interface{}, error)

func GetSerialCandidates added in v0.12.1

func GetSerialCandidates() ([]interface{}, error)

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func IssueEncodeRule added in v0.11.20

func IssueEncodeRule(tangentId, id string) (string, error)

func PreviewEncodeLog added in v0.11.20

func PreviewEncodeLog(req PreviewEncodeReq) (string, error)

func ReplyOpinion added in v0.7.1

func ReplyOpinion(req *ReplyOpinionRequest) error

func SetEncodeLog added in v0.11.20

func SetEncodeLog(req SetEncodeResourceStateReq) error

func SetEncodeRule added in v0.12.1

func SetEncodeRule(req SetEncodeResourceStateReq) error

func SetOptionShow added in v0.15.36

func SetOptionShow(reqParams *SetOptionShowRequest) error

func SetOptionUnShow added in v0.15.36

func SetOptionUnShow(reqParams *SetOptionUnShowRequest) error

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(req UpdateThemeRequest) 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 AddEncodeRuleReq added in v0.11.20

type AddEncodeRuleReq struct {
	Name         string              `json:"name"`
	RuleEncoding string              `json:"ruleEncoding"`
	State        uint8               `json:"state"`
	Separator    string              `json:"separator"`
	Version      string              `json:"version"`
	TangentId    string              `json:"tangentId"`
	UserId       string              `json:"userId"`
	Settings     []EncodeRuleSetting `json:"settings"`
	Auto         bool                `json:"auto"`
}

type BatchGenReq added in v0.12.5

type BatchGenReq struct {
	TangentId string `json:"tangentId"`
	Id        string `json:"id"`
	Num       int    `json:"num"`
}

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"`
	Priority int    `json:"priority"`
}

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"`
	Priority int    `json:"priority"`
}

type CreateOpinionRequest added in v0.7.1

type CreateOpinionRequest struct {
	SubmitterId   string   `json:"submitterId"`
	SubmitterName string   `json:"submitterName"`
	Type          int      `json:"type"`
	Content       string   `json:"content"`
	Pics          []string `json:"pics"`
}

type CreateOpinionResponse added in v0.7.1

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

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 {
	Name string `json:"name"`
	Page string `json:"page"`
	KVS  []Kvs  `json:"kvs"`
}

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 EncodeRuleSetting added in v0.11.20

type EncodeRuleSetting struct {
	Tpe       uint8       `json:"tpe"`
	V         interface{} `json:"v"`
	Separator string      `json:"separator"`
}

type EncodingResp added in v0.11.20

type EncodingResp struct {
	Encoding string `json:"encoding"`
	// 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 GetAllOpinionRequest added in v0.7.1

type GetAllOpinionRequest struct {
	Type          int    `form:"type"`
	SubmitterName string `form:"submitterName"`
	PageNo        int    `form:"pageNo"`
	PageSize      int    `form:"pageSize"`
}

type GetCandidatesResp added in v0.12.1

type GetCandidatesResp struct {
	Candidates []interface{} `json:"candidates"`
	// 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 GetOpinionResponse added in v0.7.1

type GetOpinionResponse struct {
	PagingOpinions
	// contains filtered or unexported fields
}

type GetOpinionsOfUserRequest added in v0.7.1

type GetOpinionsOfUserRequest struct {
	UserId   string `json:"userId"`
	PageNo   int    `json:"pageNo"`
	PageSize int    `json:"pageSize"`
}

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 GetRuleLogResp added in v0.11.20

type GetRuleLogResp struct {
	*LogResult
	// contains filtered or unexported fields
}

type GetRuleResp added in v0.11.20

type GetRuleResp struct {
	*RuleResult
	// contains filtered or unexported fields
}

type GetSingleOpinionResponse added in v0.7.1

type GetSingleOpinionResponse struct {
	Info OpinionInfo `json:"info"`
	// contains filtered or unexported fields
}

type GetThemeQuery added in v0.13.80

type GetThemeQuery struct {
	Id       string `form:"id"`
	Name     string `form:"name"`
	Page     string `form:"page"`
	PageNo   int    `form:"pageNo"`
	PageSize int    `form:"pageSize"`
}

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 KVPair added in v0.8.3

type KVPair struct {
	Key   int    `json:"key"`
	Value string `json:"value"`
}

func GetTypeDict added in v0.8.3

func GetTypeDict() ([]KVPair, error)

type Kvs added in v0.13.80

type Kvs struct {
	K string `json:"k"`
	V string `json:"v"`
}

type Log added in v0.11.20

type Log struct {
	ID           string `json:"id"`
	EncodeRuleId string `json:"encodeRuleId"`
	Encoding     string `json:"encoding"`
	State        uint8  `json:"state"`
	TangentId    string `json:"tangentId"`
	Issue        bool   `json:"issue"`
	CreateTime   string `json:"createTime"`
}

type LogResult added in v0.11.20

type LogResult struct {
	Infos      []Log `json:"infos"`
	TotalCount int64 `json:"totalCount"`
	PageNo     int   `json:"pageNo"`
}

func GetEncodeRuleLog added in v0.11.20

func GetEncodeRuleLog(req QueryEncodeRuleLogReq) (*LogResult, error)

type OpinionInfo added in v0.7.1

type OpinionInfo struct {
	ID            string   `json:"id"`
	SubmitterName string   `json:"submitterName"`
	TypeString    string   `json:"typeString"`
	Content       string   `json:"content"`
	SubmitTime    string   `json:"submitTime"`
	Reply         string   `json:"reply"`
	ReplayTime    string   `json:"replayTime"`
	Pics          []string `json:"pics"`
	IsShow        uint8    `json:"isShow"`
}

func GetSingleOpinion added in v0.7.1

func GetSingleOpinion(opinionId string) (*OpinionInfo, error)

type OpinionReplyResponse added in v0.7.1

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

type OssObjInfo added in v0.7.1

type OssObjInfo struct {
	Url     string `json:"url"`
	ObjName string `json:"objName"`
}

func UploadOpinionPic added in v0.7.1

func UploadOpinionPic(pic *multipart.FileHeader) (*OssObjInfo, error)

type PagingOpinions added in v0.7.1

type PagingOpinions struct {
	Total  int64         `json:"total"`
	PageNo int           `json:"pageNo"`
	Infos  []OpinionInfo `json:"infos"`
}

func GetAllOpinion added in v0.7.1

func GetAllOpinion(opinionType int, submitterName string, isShow uint8, pageNo int, pageSize int) (*PagingOpinions, error)

func GetOpinionsOfUser added in v0.7.1

func GetOpinionsOfUser(userId string, pageNo int, pageSize int) (*PagingOpinions, error)

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 PreviewEncodeReq added in v0.11.20

type PreviewEncodeReq struct {
	Separator string              `json:"separator"`
	Settings  []EncodeRuleSetting `json:"settings"`
}

type QueryEncodeRuleLogReq added in v0.11.20

type QueryEncodeRuleLogReq struct {
	ID           string `form:"id"`
	EncodeRuleId string `form:"encodeRuleId"`
	Encoding     string `form:"encoding"`
	State        uint8  `form:"state"`
	TangentId    string `form:"tangentId"`
	Issue        bool   `form:"issue"`
	PageNo       int    `form:"pageNo"`
	PageSize     int    `form:"pageSize"`
}

type QueryEncodeRuleReq added in v0.11.20

type QueryEncodeRuleReq struct {
	ID           string `form:"id"`
	Name         string `form:"name"`
	RuleEncoding string `form:"ruleEncoding"`
	State        uint8  `form:"state"`
	Separator    string `form:"separator"`
	Version      string `form:"version"`
	TangentId    string `form:"tangentId"`
	PageNo       int    `form:"pageNo"`
	PageSize     int    `form:"pageSize"`
}

type ReplyOpinionRequest added in v0.7.1

type ReplyOpinionRequest struct {
	OpinionId    string `json:"opinionId"`
	ReplyContent string `json:"replyContent"`
}

type RuleInfo added in v0.11.20

type RuleInfo struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	RuleEncoding string        `json:"ruleEncoding"`
	State        uint8         `json:"state"`
	Separator    string        `json:"separator"`
	Version      string        `json:"version"`
	TangentId    string        `json:"tangentId"`
	CheckCode    string        `json:"checkCode"`
	CreateBy     string        `json:"createBy"`
	CreatedAt    string        `json:"createdAt"`
	Settings     []SettingInfo `json:"settings"`
	IssueNum     int64         `json:"issueNum"`
	Auto         bool          `json:"auto"`
}

type RuleResult added in v0.11.20

type RuleResult struct {
	Infos      []RuleInfo `json:"infos"`
	TotalCount int64      `json:"totalCount"`
	PageNo     int        `json:"pageNo"`
}

func GetEncodeRule added in v0.11.20

func GetEncodeRule(req QueryEncodeRuleReq) (*RuleResult, error)

type SetEncodeResourceStateReq added in v0.12.1

type SetEncodeResourceStateReq struct {
	ID        string `json:"id" `
	TangentId string `json:"tangentId"`
	State     uint8  `json:"state"`
	Auto      bool   `json:"auto"`
}

type SetOptionShowRequest added in v0.15.36

type SetOptionShowRequest struct {
	ID string `json:"id"`
}

type SetOptionUnShowRequest added in v0.15.36

type SetOptionUnShowRequest struct {
	ID string `json:"id"`
}

type SettingInfo added in v0.11.20

type SettingInfo struct {
	ID           string `json:"id"`
	Tpe          uint8  `json:"tpe"`
	Setting      string `json:"setting"`
	Separator    string `json:"separator"`
	EncodeRuleId string `json:"encodeRuleId"`
	Priority     uint8  `json:"priority"`
}

type ThemeCommonResponse added in v0.13.80

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

type ThemeInfo added in v0.3.0

type ThemeInfo struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Page string `json:"page"`
	KVS  []Kvs  `json:"kvs"`
}

func GetTheme added in v0.3.0

func GetTheme(req GetThemeQuery) ([]ThemeInfo, int64, error)

type TypeDictResponse added in v0.8.3

type TypeDictResponse struct {
	Infos []KVPair `json:"infos"`
	// contains filtered or unexported fields
}

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"`
	Priority int    `json:"priority"`
}

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"`
	Name string `json:"name"`
	Page string `json:"page"`
	KVS  []Kvs  `json:"kvs"`
}

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 UploadOpinionPicRequest added in v0.7.1

type UploadOpinionPicRequest struct {
	Pic *multipart.FileHeader `form:"file"`
}

type UploadOpinionPicResponse added in v0.7.1

type UploadOpinionPicResponse struct {
	OssObjInfo
	// 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