model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// State
	StateAutoLock    = -11
	StateLock        = -10
	StateReject      = -3
	StatePending     = -2
	StateOpen        = 0
	StateOpenPending = 2
	StateOpenReject  = 3
	StateAutoPass    = 4
	StateRePending   = 5 // 重复编辑待审
	StateReReject    = 6 // 重复编辑未通过
	StateRePass      = 7 // 重复编辑通过

	// groups for creation center.
	GroupAll      = 0 // except draft and deleted. 0 2 -2 3 -3 -10
	GroupPending  = 1 // -2 2
	GroupPassed   = 2 // 0
	GroupUnpassed = 3 // -10 -3 3

	NoLikeState  = 0
	LikeState    = 1
	DislikeState = 2

	// Templates
	TemplateText         = 1
	TemplateSingleImg    = 2
	TemplateMultiImg     = 3
	TemplateSingleBigImg = 4

	// Attributes
	//AttrBitNoDistribute 禁止分发(空间/分区/动态)
	AttrBitNoDistribute = uint(1)
	//AttrBitNoRegion 禁止在分区页显示
	AttrBitNoRegion = uint(2)
	//AttrBitNoRank 禁止排行
	AttrBitNoRank = uint(3)

	// AuthorStatePass 过审
	AuthorStateReject  = -1
	AuthorStatePending = 0
	AuthorStatePass    = 1
	AuthorStateClose   = 2
)

Const .

View Source
const (
	CardPrefixBangumi   = "ss"
	CardPrefixBangumiEp = "ep"
	CardPrefixTicket    = "pw"
	CardPrefixMall      = "sp"
	CardPrefixAudio     = "au"
	CardPrefixArchive   = "av"
	CardPrefixArticle   = "cv"
)

Cards

View Source
const (
	// ReprintForbid 禁止转载.
	ReprintForbid = int8(0)
	// ReprintAllow 允许规范转载.
	ReprintAllow = int8(1)
	// NoImage 无图.
	///NoImage = int8(1)
	// HeadImage 头图.
	HeadImage = int8(4)
)

const

View Source
const (
	HotspotTypeView  = 0
	HotspotTypePtime = 1
)

hotspot type

View Source
const (
	// PlatAndroid is int8 for android.
	PlatAndroid = int8(0)
	// PlatIPhone is int8 for iphone.
	PlatIPhone = int8(1)
	// PlatIPad is int8 for ipad.
	PlatIPad = int8(2)
	// PlatWPhone is int8 for wphone.
	PlatWPhone = int8(3)
	// PlatAndroidG is int8 for Android Global.
	PlatAndroidG = int8(4)
	// PlatIPhoneI is int8 for Iphone Global.
	PlatIPhoneI = int8(5)
	// PlatIPadI is int8 for IPAD Global.
	PlatIPadI = int8(6)
	// PlatAndroidTV is int8 for AndroidTV Global.
	PlatAndroidTV = int8(7)
	// PlatAndroidI is int8 for Android Global.
	PlatAndroidI = int8(8)
	// PlatH5 is int8 for H5
	PlatH5 = int8(9)
	// PlatPC is int8 for PC
	PlatPC = int8(10)
	//PlatOther is int8 for unknow plat
	PlatOther = int8(11)
)
View Source
const (
	ListSortPtime = 0
	ListSortView  = 1
)

sort type

View Source
const (
	// FieldDefault with recommends
	FieldDefault = iota
	// FieldNew new list
	FieldNew
	// FieldLike like stat
	FieldLike
	// FieldReply reply stat
	FieldReply
	// FieldFav favorite stat
	FieldFav
	// FieldView view stat
	FieldView
)

Variables

View Source
var (
	ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModel   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	RankMonth           = int64(1)
	RankWeek            = int64(2)
	RankYesterday       = int64(3)
	RankBeforeYesterday = int64(4)
)

rank

View Source
var HotspotTypes = [...]int8{HotspotTypeView, HotspotTypePtime}

HotspotTypes types

SortFields all field

Functions

func CheckBFSImage

func CheckBFSImage(src string) bool

CheckBFSImage check bfs file

func CleanURL

func CleanURL(url string) (path string)

CleanURL cuts host.

func CleanURLs

func CleanURLs(urls []string) (paths []string)

CleanURLs .

func Client

func Client(plat int8) string

Client 成转换AI部门的client

func CompleteURL

func CompleteURL(path string) (url string)

CompleteURL adds host on path.

func CompleteURLs

func CompleteURLs(paths []string) (urls []string)

CompleteURLs .

func ConvertPlat

func ConvertPlat(p int8) (plat int8)

ConvertPlat convert plat from resource

func Group2State

func Group2State(group int) (states []int64)

Group2State mapping creation group to

func HistoryClient

func HistoryClient(plat int8) (client int8)

HistoryClient .

func InReprints

func InReprints(rp int8) (ok bool)

InReprints check reprint in all reprints.

func InTemplateID

func InTemplateID(tid int8) (ok bool)

InTemplateID check tid in all tids.

func NoDistributeAttr

func NoDistributeAttr(attr int32) bool

NoDistributeAttr check if no distribute

func NoRegionAttr

func NoRegionAttr(attr int32) bool

NoRegionAttr check if no region

func Plat

func Plat(mobiApp, device string) int8

Plat return plat by platStr or mobiApp

func ValidTemplate

func ValidTemplate(tid int32, imgs []string) bool

ValidTemplate checks template id & images count.

Types

type AccountCard

type AccountCard struct {
	Mid         string  `json:"mid"`
	Name        string  `json:"name"`
	Approve     bool    `json:"approve"`
	Sex         string  `json:"sex"`
	Rank        string  `json:"rank"`
	Face        string  `json:"face"`
	DisplayRank string  `json:"DisplayRank"`
	Regtime     int64   `json:"regtime"`
	Spacesta    int     `json:"spacesta"`
	Birthday    string  `json:"birthday"`
	Place       string  `json:"place"`
	Description string  `json:"description"`
	Article     int     `json:"article"`
	Attentions  []int64 `json:"attentions"`
	Fans        int     `json:"fans"`
	Friend      int     `json:"friend"`
	Attention   int     `json:"attention"`
	Sign        string  `json:"sign"`
	LevelInfo   struct {
		Cur     int         `json:"current_level"`
		Min     int         `json:"current_min"`
		NowExp  int         `json:"current_exp"`
		NextExp interface{} `json:"next_exp"`
	} `json:"level_info"`
	Pendant struct {
		Pid    int    `json:"pid"`
		Name   string `json:"name"`
		Image  string `json:"image"`
		Expire int    `json:"expire"`
	} `json:"pendant"`
	Nameplate struct {
		Nid        int    `json:"nid"`
		Name       string `json:"name"`
		Image      string `json:"image"`
		ImageSmall string `json:"image_small"`
		Level      string `json:"level"`
		Condition  string `json:"condition"`
	} `json:"nameplate"`
	OfficialVerify struct {
		Type int    `json:"type"`
		Desc string `json:"desc"`
	} `json:"official_verify"`
	Vip struct {
		Type          int    `json:"vipType"`
		DueDate       int64  `json:"vipDueDate"`
		DueRemark     string `json:"dueRemark"`
		AccessStatus  int    `json:"accessStatus"`
		VipStatus     int    `json:"vipStatus"`
		VipStatusWarn string `json:"vipStatusWarn"`
	} `json:"vip"`
}

AccountCard .

func (*AccountCard) FromCard

func (ac *AccountCard) FromCard(card *account.Card)

FromCard from account card.

func (*AccountCard) FromProfileStat

func (ac *AccountCard) FromProfileStat(card *account.ProfileStat)

FromProfileStat .

type ActInfo

type ActInfo struct {
	Activities []*Activity `json:"activities"`
	Banners    []*Banner   `json:"banners"`
}

ActInfo .

type Activity

type Activity struct {
	ActURL  string `json:"act_url"`
	Author  string `json:"author"`
	Cover   string `json:"cover"`
	Ctime   string `json:"ctime"`
	Dic     string `json:"dic"`
	Etime   string `json:"etime"`
	Flag    string `json:"flag"`
	H5Cover string `json:"h5_cover"`
	ID      int64  `json:"id"`
	Letime  string `json:"letime"`
	Level   string `json:"level"`
	Lstime  string `json:"lstime"`
	Mtime   string `json:"mtime"`
	Name    string `json:"name"`
	Oid     int64  `json:"oid"`
	State   int64  `json:"state"`
	Stime   string `json:"stime"`
	Tags    string `json:"tags"`
	Type    int64  `json:"type"`
	Uetime  string `json:"uetime"`
	Ustime  string `json:"ustime"`
}

Activity .

type AnniversaryAuthor

type AnniversaryAuthor struct {
	Articles    int32  `json:"articles"`
	Words       int64  `json:"words"`
	Views       int64  `json:"views"`
	Coins       int64  `json:"coins"`
	Title       string `json:"title"`
	Publish     string `json:"publish"`
	Rank        string `json:"rank"`
	ReaderMid   int64  `json:"reader"`
	ReaderUname string `json:"reader_name"`
	ReaderFace  string `json:"reader_face"`
}

AnniversaryAuthor .

type AnniversaryInfo

type AnniversaryInfo struct {
	Mid        int64              `json:"mid"`
	Uname      string             `json:"uname"`
	Face       string             `json:"face"`
	ReaderInfo *AnniversaryReader `json:"reader_info"`
	AuthorInfo *AnniversaryAuthor `json:"author_info"`
}

AnniversaryInfo .

type AnniversaryReader

type AnniversaryReader struct {
	Words        int64  `json:"words"`
	Views        int64  `json:"views"`
	Coins        int64  `json:"coins"`
	Comments     int64  `json:"comments"`
	Title        string `json:"title"`
	AuthorMid    int64  `json:"author"`
	AuthorUname  string `json:"author_name"`
	Rank         string `json:"rank"`
	FirstComment string `json:"first_comment"`
	CommentDate  string `json:"comment_date"`
}

AnniversaryReader .

type Apply

type Apply struct {
	Verify bool `json:"verify"`
	Forbid bool `json:"forbid"`
	Phone  int  `json:"phone"`
}

Apply apply model

type ArgAid

type ArgAid struct {
	Aid    int64
	RealIP string
}

ArgAid .

type ArgAidCid

type ArgAidCid struct {
	Aid    int64
	Cid    int64
	RealIP string
}

ArgAidCid .

type ArgAidContent

type ArgAidContent struct {
	Aid     int64
	Content string
	RealIP  string
}

ArgAidContent .

type ArgAidMid

type ArgAidMid struct {
	Aid    int64
	Mid    int64
	RealIP string
}

ArgAidMid .

type ArgAids

type ArgAids struct {
	Aids   []int64
	RealIP string
}

ArgAids .

type ArgArticle

type ArgArticle struct {
	Action          int
	Aid             int64
	Category        int64
	Title           string
	Summary         string
	BannerURL       string
	TemplateID      int32
	State           int32
	Mid             int64
	Reprint         int32
	ImageURLs       []string
	OriginImageURLs []string
	Tags            []string
	Content         string
	Words           int64
	DynamicIntro    string
	ActivityID      int64
	ListID          int64
	RealIP          string
	MediaID         int64
	Spoiler         int32
}

ArgArticle .

type ArgAuthor

type ArgAuthor struct {
	Mid    int64
	RealIP string
}

ArgAuthor .

type ArgCreationArts

type ArgCreationArts struct {
	Mid      int64
	Sort     int
	Group    int
	Category int
	Pn, Ps   int
	RealIP   string
}

ArgCreationArts .

type ArgFav

type ArgFav struct {
	Mid    int64
	Pn, Ps int
	RealIP string
}

ArgFav .

type ArgForce

type ArgForce struct {
	Force  bool
	RealIP string
}

ArgForce force update

type ArgIP

type ArgIP struct {
	RealIP string
}

ArgIP .

type ArgMid

type ArgMid struct {
	Mid    int64
	RealIP string
}

ArgMid .

type ArgMidAids

type ArgMidAids struct {
	Mid    int64
	Aids   []int64
	RealIP string
}

ArgMidAids .

type ArgNewArt

type ArgNewArt struct {
	PubTime int64
	RealIP  string
}

ArgNewArt .

type ArgPtime

type ArgPtime struct {
	Aid     int64
	PubTime int64
	RealIP  string
}

ArgPtime .

type ArgRecommends

type ArgRecommends struct {
	Cid    int64
	Sort   int
	Aids   []int64
	Pn, Ps int
	RealIP string
}

ArgRecommends .

type ArgSort

type ArgSort struct {
	Aid     int64
	Changed [][2]int64
	RealIP  string
}

ArgSort .

type ArgStats

type ArgStats struct {
	*Stats
	Aid int64
}

ArgStats .

type ArgUpArts

type ArgUpArts struct {
	Mid    int64
	Pn, Ps int
	Sort   int
	RealIP string
}

ArgUpArts .

type ArgUpDraft

type ArgUpDraft struct {
	Mid    int64
	Pn, Ps int
	RealIP string
}

ArgUpDraft .

type ArgUpsArts

type ArgUpsArts struct {
	Mids   []int64
	Pn, Ps int
	RealIP string
}

ArgUpsArts .

type ArtPage

type ArtPage struct {
	Pn    int `json:"pn"`
	Ps    int `json:"ps"`
	Total int `json:"total"`
}

ArtPage article page.

type ArtParam

type ArtParam struct {
	AID             int64    `json:"aid"`
	MID             int64    `json:"mid"`
	Category        int64    `json:"category"`
	State           int32    `json:"state"`
	Reprint         int32    `json:"reprint"`
	TemplateID      int32    `json:"tid"`
	Title           string   `json:"title"`
	BannerURL       string   `json:"banner_url"`
	Content         string   `json:"content"`
	Summary         string   `json:"summary"`
	Tags            string   `json:"tags"`
	ImageURLs       []string `json:"image_urls"`
	OriginImageURLs []string `json:"origin_image_urls"`
	RealIP          string   `json:"-"`
	Action          int      `json:"action"`
	Words           int64    `json:"words"`
	DynamicIntro    string   `json:"dynamic_intro"`
	ActivityID      int64    `json:"activity_id"`
	ListID          int64    `json:"list_id"`
	MediaID         int64    `json:"media_id"`
	Spoiler         int32    `json:"spoiler"`
}

ArtParam param for article info input.

type Article

type Article struct {
	*Meta                `protobuf:"bytes,1,opt,name=meta,embedded=meta" json:""`
	Content              string   `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	Keywords             string   `protobuf:"bytes,3,opt,name=keywords,proto3" json:"keywords"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func TransformArticle

func TransformArticle(arg *ArgArticle) *Article

TransformArticle .

func (*Article) Descriptor

func (*Article) Descriptor() ([]byte, []int)

func (*Article) IsNormal

func (a *Article) IsNormal() bool

IsNormal judge article state.

func (*Article) Marshal

func (m *Article) Marshal() (dAtA []byte, err error)

func (*Article) MarshalTo

func (m *Article) MarshalTo(dAtA []byte) (int, error)

func (*Article) ProtoMessage

func (*Article) ProtoMessage()

func (*Article) Reset

func (m *Article) Reset()

func (*Article) Size

func (m *Article) Size() (n int)

func (*Article) String

func (m *Article) String() string

func (*Article) Unmarshal

func (m *Article) Unmarshal(dAtA []byte) error

func (*Article) XXX_DiscardUnknown

func (m *Article) XXX_DiscardUnknown()

func (*Article) XXX_Marshal

func (m *Article) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Article) XXX_Merge

func (dst *Article) XXX_Merge(src proto.Message)

func (*Article) XXX_Size

func (m *Article) XXX_Size() int

func (*Article) XXX_Unmarshal

func (m *Article) XXX_Unmarshal(b []byte) error

type ArticleViewList

type ArticleViewList struct {
	Position int     `json:"position"`
	Aids     []int64 `json:"articles_id"`
	From     string  `json:"from"`
	Mid      int64   `json:"mid"`
	Build    int     `json:"build"`
	Buvid    string  `json:"buvid"`
	Plat     int8    `json:"plat"`
}

ArticleViewList .

type Articles

type Articles struct {
	*Article
	Pre  int64 `json:"pre"`
	Next int64 `json:"next"`
}

Articles .

type AudioCard

type AudioCard struct {
	ID       int64  `json:"song_id"`
	Title    string `json:"title"`
	UpMid    int64  `json:"up_mid"`
	UpName   string `json:"up_name"`
	Play     int64  `json:"play_num"`
	Reply    int64  `json:"reply_num"`
	CoverURL string `json:"cover_url"`
}

AudioCard .

type Author

type Author struct {
	Mid                  int64          `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
	Name                 string         `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Face                 string         `protobuf:"bytes,3,opt,name=face,proto3" json:"face"`
	Pendant              Pendant        `protobuf:"bytes,4,opt,name=pendant" json:"pendant"`
	OfficialVerify       OfficialVerify `protobuf:"bytes,5,opt,name=official_verify,json=officialVerify" json:"official_verify"`
	Nameplate            Nameplate      `protobuf:"bytes,6,opt,name=nameplate" json:"nameplate"`
	Vip                  VipInfo        `protobuf:"bytes,7,opt,name=vip" json:"vip"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Author) Descriptor

func (*Author) Descriptor() ([]byte, []int)

func (*Author) Marshal

func (m *Author) Marshal() (dAtA []byte, err error)

func (*Author) MarshalTo

func (m *Author) MarshalTo(dAtA []byte) (int, error)

func (*Author) ProtoMessage

func (*Author) ProtoMessage()

func (*Author) Reset

func (m *Author) Reset()

func (*Author) Size

func (m *Author) Size() (n int)

func (*Author) String

func (m *Author) String() string

func (*Author) Unmarshal

func (m *Author) Unmarshal(dAtA []byte) error

func (*Author) XXX_DiscardUnknown

func (m *Author) XXX_DiscardUnknown()

func (*Author) XXX_Marshal

func (m *Author) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Author) XXX_Merge

func (dst *Author) XXX_Merge(src proto.Message)

func (*Author) XXX_Size

func (m *Author) XXX_Size() int

func (*Author) XXX_Unmarshal

func (m *Author) XXX_Unmarshal(b []byte) error

type AuthorLimit

type AuthorLimit struct {
	Limit int        `json:"limit"`
	State int        `json:"state"`
	Rtime xtime.Time `json:"rtime"`
}

AuthorLimit .

func (*AuthorLimit) Forbid

func (a *AuthorLimit) Forbid() bool

Forbid .

func (*AuthorLimit) Pass

func (a *AuthorLimit) Pass() bool

Pass .

type AuthorPermission

type AuthorPermission struct {
	State int        `json:"state"`
	Rtime xtime.Time `json:"rtime"`
}

AuthorPermission recode of article_authors table.

type BangumiCard

type BangumiCard struct {
	ID       int64  `json:"season_id"`
	Type     int64  `json:"season_type"`
	TypeName string `json:"season_type_name"`
	Image    string `json:"cover"`
	Title    string `json:"title"`
	Rating   struct {
		Score float64 `json:"score"`
		Count int64   `json:"count"`
	} `json:"rating"`
	Playable    bool  `json:"playable"`
	FollowCount int64 `json:"follow_count"`
	PlayCount   int64 `json:"play_count"`
}

BangumiCard .

type Banner struct {
	ID         int    `json:"id"`
	Plat       int8   `json:"-"`
	Position   int    `json:"index"`
	Title      string `json:"title"`
	Image      string `json:"image"`
	URL        string `json:"url"`
	Build      int    `json:"-"`
	Condition  string `json:"-"`
	Rule       string `json:"-"`
	ResID      int    `json:"resource_id"`
	ServerType int    `json:"server_type"`
	CmMark     int    `json:"cm_mark"`
	IsAd       bool   `json:"is_ad"`
	RequestID  string `json:"request_id"`
}

Banner struct

type BannerRule

type BannerRule struct {
	Area      string `json:"area"`
	Hash      string `json:"hash"`
	Build     int    `json:"build"`
	Condition string `json:"conditions"`
	Channel   string `json:"channel"`
}

BannerRule .

type Cards

type Cards struct {
	Type        string       `json:"type,omitempty"`
	TicketCard  *TicketCard  `json:"ticket_card,omitempty"`
	BangumiCard *BangumiCard `json:"bangumi_card,omitempty"`
	MallCard    *MallCard    `json:"mall_card,omitempty"`
	AudioCard   *AudioCard   `json:"audio_card,omitempty"`
}

Cards .

func (*Cards) Item

func (c *Cards) Item() interface{}

Item .

func (*Cards) Key

func (c *Cards) Key() string

Key .

type Categories

type Categories []*Category

Categories for sorting category.

func (Categories) Len

func (as Categories) Len() int

func (Categories) Less

func (as Categories) Less(i, j int) bool

func (Categories) Swap

func (as Categories) Swap(i, j int)

type Category

type Category struct {
	ID                   int64       `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	ParentID             int64       `protobuf:"varint,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id"`
	Name                 string      `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
	Position             int64       `protobuf:"varint,4,opt,name=position,proto3" json:"-"`
	Children             []*Category `protobuf:"bytes,5,rep,name=children" json:"children,omitempty"`
	BannerURL            string      `protobuf:"bytes,6,opt,name=banner_url,json=bannerUrl,proto3" json:"banner_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Category) Descriptor

func (*Category) Descriptor() ([]byte, []int)

func (*Category) Marshal

func (m *Category) Marshal() (dAtA []byte, err error)

func (*Category) MarshalTo

func (m *Category) MarshalTo(dAtA []byte) (int, error)

func (*Category) ProtoMessage

func (*Category) ProtoMessage()

func (*Category) Reset

func (m *Category) Reset()

func (*Category) Size

func (m *Category) Size() (n int)

func (*Category) String

func (m *Category) String() string

func (*Category) Unmarshal

func (m *Category) Unmarshal(dAtA []byte) error

func (*Category) XXX_DiscardUnknown

func (m *Category) XXX_DiscardUnknown()

func (*Category) XXX_Marshal

func (m *Category) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Category) XXX_Merge

func (dst *Category) XXX_Merge(src proto.Message)

func (*Category) XXX_Size

func (m *Category) XXX_Size() int

func (*Category) XXX_Unmarshal

func (m *Category) XXX_Unmarshal(b []byte) error

type CheatInfo

type CheatInfo struct {
	Valid    string `json:"valid"`
	Client   string `json:"client"`
	Cvid     string `json:"cvid"`
	Mid      string `json:"mid"`
	Lv       string `json:"lv"`
	Ts       string `json:"ts"`
	IP       string `json:"ip"`
	UA       string `json:"ua"`
	Refer    string `json:"refer"`
	Sid      string `json:"sid"`
	Buvid    string `json:"buvid"`
	DeviceID string `json:"device_id"`
	Build    string `json:"build"`
	Reason   string `json:"reason"`
}

CheatInfo .

type CreationArts

type CreationArts struct {
	Articles []*Meta           `json:"articles"`
	Type     *CreationArtsType `json:"type"`
	Page     *ArtPage          `json:"page"`
}

CreationArts creation article list.

type CreationArtsType

type CreationArtsType struct {
	All       int `json:"all"`
	Audit     int `json:"audit"`
	Passed    int `json:"passed"`
	NotPassed int `json:"not_passed"`
}

CreationArtsType creation article-list type's count.

type CreativeArtList

type CreativeArtList struct {
	Articles []*CreativeMeta   `json:"articles"`
	Type     *CreationArtsType `json:"type"`
	Page     *ArtPage          `json:"page"`
}

CreativeArtList article for list.

type CreativeDraftList

type CreativeDraftList struct {
	Drafts   []*CreativeMeta `json:"drafts"`
	Page     *ArtPage        `json:"page"`
	DraftURL string          `json:"draft_url"`
}

CreativeDraftList draft list.

type CreativeList

type CreativeList struct {
	*List
	Total int `json:"total"`
}

CreativeList creative list

type CreativeMeta

type CreativeMeta struct {
	ID              int64     `json:"id"`
	Title           string    `json:"title"`
	Content         string    `json:"content"`
	Summary         string    `json:"summary"`
	BannerURL       string    `json:"banner_url"`
	Reason          string    `json:"reason"`
	TemplateID      int32     `json:"template_id"`
	State           int32     `json:"state"`
	Reprint         int32     `json:"reprint"`
	ImageURLs       []string  `json:"image_urls"`
	OriginImageURLs []string  `json:"origin_image_urls"`
	Tags            []string  `json:"tags"`
	Category        *Category `json:"category"`
	Author          *Author   `json:"author"`
	Stats           *Stats    `json:"stats"`
	PTime           time.Time `json:"publish_time"`
	CTime           time.Time `json:"ctime"`
	MTime           time.Time `json:"mtime"`
	ViewURL         string    `json:"view_url"`
	EditURL         string    `json:"edit_url"`
	IsPreview       int       `json:"is_preview"`
	DynamicIntro    string    `json:"dynamic_intro"`
	List            *List     `json:"list"`
	MediaID         int64     `json:"media_id"`
	Spoiler         int32     `json:"spoiler"`
	EditTimes       int       `json:"edit_times"`
	PreViewURL      string    `json:"pre_view_url"`
}

CreativeMeta article detail.

type Draft

type Draft struct {
	*Article
	Tags   []string `json:"tags"`
	ListID int64    `json:"list_id"`
	List   *List    `json:"list"`
}

Draft draft struct.

func TransformDraft

func TransformDraft(arg *ArgArticle) *Draft

TransformDraft .

type DraftMsg

type DraftMsg struct {
	Aid int64 `json:"aid"`
	Mid int64 `json:"mid"`
}

DraftMsg means article's draft message in databus.

type Drafts

type Drafts struct {
	Drafts []*Draft `json:"drafts"`
	Page   *ArtPage `json:"page"`
}

Drafts draft list.

type ExtMsg

type ExtMsg struct {
	Tags []*Tag `json:"tags"`
}

ExtMsg .

type Favorite

type Favorite struct {
	*Meta
	FavoriteTime int64 `json:"favorite_time"`
	Valid        bool  `json:"valid"`
}

Favorite user favorite list.

type FullListArtMeta

type FullListArtMeta struct {
	*ListArtMeta
	Stats     Stats `json:"stats"`
	LikeState int8  `json:"like_state"`
}

FullListArtMeta .

type Hotspot

type Hotspot struct {
	ID          int64        `json:"id"`
	Tag         string       `json:"tag"`
	Title       string       `json:"title"`
	TopArticles []int64      `json:"top_articles"`
	Icon        bool         `json:"icon"`
	Stats       HotspotStats `json:"stats"`
}

Hotspot model

type HotspotResp

type HotspotResp struct {
	Hotspot  *Hotspot        `json:"hotspot"`
	Articles []*MetaWithLike `json:"articles"`
}

HotspotResp model

type HotspotStats

type HotspotStats struct {
	Read  int64 `json:"read"`
	Reply int64 `json:"reply"`
	Count int64 `json:"count"`
}

HotspotStats .

type Identify

type Identify struct {
	Identify int `json:"identify"`
	Phone    int `json:"phone"`
}

Identify user verify info.

type List

type List struct {
	ID                   int64                       `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	Mid                  int64                       `protobuf:"varint,2,opt,name=mid,proto3" json:"mid"`
	Name                 string                      `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
	ImageURL             string                      `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url"`
	UpdateTime           go_common_library_time.Time `protobuf:"varint,5,opt,name=update_time,json=updateTime,proto3,casttype=go-common/library/time.Time" json:"update_time"`
	Ctime                go_common_library_time.Time `protobuf:"varint,6,opt,name=ctime,proto3,casttype=go-common/library/time.Time" json:"ctime"`
	PublishTime          go_common_library_time.Time `protobuf:"varint,7,opt,name=publish_time,json=publishTime,proto3,casttype=go-common/library/time.Time" json:"publish_time"`
	Summary              string                      `protobuf:"bytes,8,opt,name=summary,proto3" json:"summary"`
	Words                int64                       `protobuf:"varint,9,opt,name=words,proto3" json:"words"`
	Read                 int64                       `protobuf:"varint,10,opt,name=read,proto3" json:"read"`
	ArticlesCount        int64                       `protobuf:"varint,11,opt,name=articles_count,json=articlesCount,proto3" json:"articles_count"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

func (*List) Descriptor

func (*List) Descriptor() ([]byte, []int)

func (*List) FillDefaultImage

func (l *List) FillDefaultImage(image string)

FillDefaultImage .

func (*List) Marshal

func (m *List) Marshal() (dAtA []byte, err error)

func (*List) MarshalTo

func (m *List) MarshalTo(dAtA []byte) (int, error)

func (*List) ProtoMessage

func (*List) ProtoMessage()

func (*List) Reset

func (m *List) Reset()

func (*List) Size

func (m *List) Size() (n int)

func (*List) String

func (m *List) String() string

func (*List) Unmarshal

func (m *List) Unmarshal(dAtA []byte) error

func (*List) XXX_DiscardUnknown

func (m *List) XXX_DiscardUnknown()

func (*List) XXX_Marshal

func (m *List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*List) XXX_Merge

func (dst *List) XXX_Merge(src proto.Message)

func (*List) XXX_Size

func (m *List) XXX_Size() int

func (*List) XXX_Unmarshal

func (m *List) XXX_Unmarshal(b []byte) error

type ListArtMeta

type ListArtMeta struct {
	ID          int64       `json:"id"`
	Title       string      `json:"title"`
	State       int         `json:"state"`
	PublishTime xtime.Time  `json:"publish_time"`
	Position    int         `json:"-"`
	Words       int64       `json:"words"`
	ImageURLs   []string    `json:"image_urls"`
	Category    *Category   `json:"category"`
	Categories  []*Category `json:"categories"`
	Summary     string      `json:"summary"`
}

ListArtMeta .

func (*ListArtMeta) IsNormal

func (a *ListArtMeta) IsNormal() bool

IsNormal judge whether article's state is normal.

func (*ListArtMeta) Strong

func (a *ListArtMeta) Strong()

Strong fill

type ListArticles

type ListArticles struct {
	List      *List          `json:"list"`
	Articles  []*ListArtMeta `json:"articles"`
	Author    *Author        `json:"author"`
	Last      ListArtMeta    `json:"last"`
	Attention bool           `json:"attention"`
}

ListArticles list articles

type ListInfo

type ListInfo struct {
	List  *List        `json:"list"`
	Last  *ListArtMeta `json:"last"`
	Next  *ListArtMeta `json:"next"`
	Now   int          `json:"now"`
	Total int          `json:"total"`
}

ListInfo list info

type MallCard

type MallCard struct {
	ID     int64    `json:"itemsId"`
	Name   string   `json:"name"`
	Brief  string   `json:"brief"`
	Images []string `json:"img"`
	Price  int64    `json:"price"`
	Type   int      `json:"type"`
}

MallCard .

type Media

type Media struct {
	Score                int32    `protobuf:"varint,1,opt,name=score,proto3" json:"score"`
	MediaID              int64    `protobuf:"varint,2,opt,name=media_id,json=mediaId,proto3" json:"media_id"`
	Title                string   `protobuf:"bytes,3,opt,name=title,proto3" json:"title"`
	Cover                string   `protobuf:"bytes,4,opt,name=cover,proto3" json:"cover"`
	Area                 string   `protobuf:"bytes,5,opt,name=area,proto3" json:"area"`
	TypeID               int32    `protobuf:"varint,6,opt,name=type_id,json=typeId,proto3" json:"type_id"`
	TypeName             string   `protobuf:"bytes,7,opt,name=type_name,json=typeName,proto3" json:"type_name"`
	Spoiler              int32    `protobuf:"varint,8,opt,name=spoiler,proto3" json:"spoiler"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Media) Descriptor

func (*Media) Descriptor() ([]byte, []int)

func (*Media) Marshal

func (m *Media) Marshal() (dAtA []byte, err error)

func (*Media) MarshalTo

func (m *Media) MarshalTo(dAtA []byte) (int, error)

func (*Media) ProtoMessage

func (*Media) ProtoMessage()

func (*Media) Reset

func (m *Media) Reset()

func (*Media) Size

func (m *Media) Size() (n int)

func (*Media) String

func (m *Media) String() string

func (*Media) Unmarshal

func (m *Media) Unmarshal(dAtA []byte) error

func (*Media) XXX_DiscardUnknown

func (m *Media) XXX_DiscardUnknown()

func (*Media) XXX_Marshal

func (m *Media) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Media) XXX_Merge

func (dst *Media) XXX_Merge(src proto.Message)

func (*Media) XXX_Size

func (m *Media) XXX_Size() int

func (*Media) XXX_Unmarshal

func (m *Media) XXX_Unmarshal(b []byte) error

type MediaResp

type MediaResp struct {
	Code    int          `json:"code"`
	Message string       `json:"message"`
	Result  *MediaResult `json:"result"`
}

MediaResp .

type MediaResult

type MediaResult struct {
	Score int32 `json:"score"`
	Media struct {
		MediaID  int64  `json:"media_id"`
		Title    string `json:"title"`
		Cover    string `json:"cover"`
		Area     string `json:"area"`
		TypeID   int32  `json:"type_id"`
		TypeName string `json:"type_name"`
	} `json:"media"`
}

MediaResult .

type Meta

type Meta struct {
	ID                   int64                       `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	Category             *Category                   `protobuf:"bytes,2,opt,name=category" json:"category"`
	Categories           []*Category                 `protobuf:"bytes,3,rep,name=categories" json:"categories"`
	Title                string                      `protobuf:"bytes,4,opt,name=title,proto3" json:"title"`
	Summary              string                      `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary"`
	BannerURL            string                      `protobuf:"bytes,6,opt,name=banner_url,json=bannerUrl,proto3" json:"banner_url"`
	TemplateID           int32                       `protobuf:"varint,7,opt,name=template_id,json=templateId,proto3" json:"template_id"`
	State                int32                       `protobuf:"varint,8,opt,name=state,proto3" json:"state"`
	Author               *Author                     `protobuf:"bytes,9,opt,name=author" json:"author"`
	Reprint              int32                       `protobuf:"varint,10,opt,name=reprint,proto3" json:"reprint"`
	ImageURLs            []string                    `protobuf:"bytes,11,rep,name=image_urls,json=imageUrls" json:"image_urls"`
	PublishTime          go_common_library_time.Time `protobuf:"varint,12,opt,name=publish_time,json=publishTime,proto3,casttype=go-common/library/time.Time" json:"publish_time"`
	Ctime                go_common_library_time.Time `protobuf:"varint,13,opt,name=ctime,proto3,casttype=go-common/library/time.Time" json:"ctime"`
	Mtime                go_common_library_time.Time `protobuf:"varint,14,opt,name=mtime,proto3,casttype=go-common/library/time.Time" json:"mtime,omitempty"`
	Stats                *Stats                      `protobuf:"bytes,15,opt,name=stats" json:"stats,omitempty"`
	Tags                 []*Tag                      `protobuf:"bytes,16,rep,name=tags" json:"tags,omitempty"`
	Attributes           int32                       `protobuf:"varint,17,opt,name=attributes,proto3" json:"attributes,omitempty"`
	Reason               string                      `protobuf:"bytes,18,opt,name=reason,proto3" json:"reason,omitempty"`
	Words                int64                       `protobuf:"varint,19,opt,name=words,proto3" json:"words"`
	Dynamic              string                      `protobuf:"bytes,20,opt,name=dynamic,proto3" json:"dynamic,omitempty"`
	OriginImageURLs      []string                    `protobuf:"bytes,21,rep,name=origin_image_urls,json=originImageUrls" json:"origin_image_urls"`
	List                 *List                       `protobuf:"bytes,22,opt,name=list" json:"list"`
	IsLike               bool                        `protobuf:"varint,23,opt,name=isLike,proto3" json:"is_like"`
	Media                *Media                      `protobuf:"bytes,24,opt,name=media" json:"media"`
	ApplyTime            string                      `protobuf:"bytes,25,opt,name=apply_time,json=applyTime,proto3" json:"apply_time"`
	CheckTime            string                      `protobuf:"bytes,26,opt,name=check_time,json=checkTime,proto3" json:"check_time"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

func (*Meta) AttrSet

func (a *Meta) AttrSet(v int32, bit uint)

AttrSet sets attr value by bit.

func (*Meta) AttrVal

func (a *Meta) AttrVal(bit uint) bool

AttrVal gets attr val by bit.

func (*Meta) Descriptor

func (*Meta) Descriptor() ([]byte, []int)

func (*Meta) IsNormal

func (a *Meta) IsNormal() bool

IsNormal judge whether article's state is normal.

func (*Meta) Marshal

func (m *Meta) Marshal() (dAtA []byte, err error)

func (*Meta) MarshalTo

func (m *Meta) MarshalTo(dAtA []byte) (int, error)

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) Reset

func (m *Meta) Reset()

func (*Meta) Size

func (m *Meta) Size() (n int)

func (*Meta) String

func (m *Meta) String() string

func (*Meta) Strong

func (a *Meta) Strong() *Meta

Strong fill blank images and tags

func (*Meta) Unmarshal

func (m *Meta) Unmarshal(dAtA []byte) error

func (*Meta) XXX_DiscardUnknown

func (m *Meta) XXX_DiscardUnknown()

func (*Meta) XXX_Marshal

func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Meta) XXX_Merge

func (dst *Meta) XXX_Merge(src proto.Message)

func (*Meta) XXX_Size

func (m *Meta) XXX_Size() int

func (*Meta) XXX_Unmarshal

func (m *Meta) XXX_Unmarshal(b []byte) error

type MetaWithLike

type MetaWithLike struct {
	Meta
	LikeState int `json:"like_state"`
}

MetaWithLike meta with like

type Metas

type Metas []*Meta

Metas Metas

func (Metas) Len

func (as Metas) Len() int

func (Metas) Less

func (as Metas) Less(i, j int) bool

func (Metas) Swap

func (as Metas) Swap(i, j int)

type MoreArts

type MoreArts struct {
	Articles  []*Meta      `json:"articles"`
	Total     int          `json:"total"`
	ReadCount int64        `json:"read_count"`
	Author    *AccountCard `json:"author"`
	Attention bool         `json:"attention"`
}

MoreArts .

type Nameplate

type Nameplate struct {
	Nid                  int      `protobuf:"varint,1,opt,name=nid,proto3,casttype=int" json:"nid"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Image                string   `protobuf:"bytes,3,opt,name=image,proto3" json:"image"`
	ImageSmall           string   `protobuf:"bytes,4,opt,name=image_small,json=imageSmall,proto3" json:"image_small"`
	Level                string   `protobuf:"bytes,5,opt,name=level,proto3" json:"level"`
	Condition            string   `protobuf:"bytes,6,opt,name=condition,proto3" json:"condition"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Nameplate) Descriptor

func (*Nameplate) Descriptor() ([]byte, []int)

func (*Nameplate) Marshal

func (m *Nameplate) Marshal() (dAtA []byte, err error)

func (*Nameplate) MarshalTo

func (m *Nameplate) MarshalTo(dAtA []byte) (int, error)

func (*Nameplate) ProtoMessage

func (*Nameplate) ProtoMessage()

func (*Nameplate) Reset

func (m *Nameplate) Reset()

func (*Nameplate) Size

func (m *Nameplate) Size() (n int)

func (*Nameplate) String

func (m *Nameplate) String() string

func (*Nameplate) Unmarshal

func (m *Nameplate) Unmarshal(dAtA []byte) error

func (*Nameplate) XXX_DiscardUnknown

func (m *Nameplate) XXX_DiscardUnknown()

func (*Nameplate) XXX_Marshal

func (m *Nameplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Nameplate) XXX_Merge

func (dst *Nameplate) XXX_Merge(src proto.Message)

func (*Nameplate) XXX_Size

func (m *Nameplate) XXX_Size() int

func (*Nameplate) XXX_Unmarshal

func (m *Nameplate) XXX_Unmarshal(b []byte) error

type Notice

type Notice struct {
	ID        int64  `json:"id"`
	Title     string `json:"title"`
	Content   string `json:"content"`
	URL       string `json:"url"`
	Plat      int    `json:"-"`
	Condition int    `json:"-"`
	Build     int    `json:"-"`
}

Notice notice

type NoticeState

type NoticeState map[string]bool

NoticeState .

func NewNoticeState

func NewNoticeState(value int64) (res NoticeState)

NewNoticeState .

func (NoticeState) ToInt64

func (n NoticeState) ToInt64() (res int64)

ToInt64 .

type OfficialVerify

type OfficialVerify struct {
	Type                 int64    `protobuf:"varint,1,opt,name=type,proto3" json:"type"`
	Desc                 string   `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OfficialVerify) Descriptor

func (*OfficialVerify) Descriptor() ([]byte, []int)

func (*OfficialVerify) Marshal

func (m *OfficialVerify) Marshal() (dAtA []byte, err error)

func (*OfficialVerify) MarshalTo

func (m *OfficialVerify) MarshalTo(dAtA []byte) (int, error)

func (*OfficialVerify) ProtoMessage

func (*OfficialVerify) ProtoMessage()

func (*OfficialVerify) Reset

func (m *OfficialVerify) Reset()

func (*OfficialVerify) Size

func (m *OfficialVerify) Size() (n int)

func (*OfficialVerify) String

func (m *OfficialVerify) String() string

func (*OfficialVerify) Unmarshal

func (m *OfficialVerify) Unmarshal(dAtA []byte) error

func (*OfficialVerify) XXX_DiscardUnknown

func (m *OfficialVerify) XXX_DiscardUnknown()

func (*OfficialVerify) XXX_Marshal

func (m *OfficialVerify) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OfficialVerify) XXX_Merge

func (dst *OfficialVerify) XXX_Merge(src proto.Message)

func (*OfficialVerify) XXX_Size

func (m *OfficialVerify) XXX_Size() int

func (*OfficialVerify) XXX_Unmarshal

func (m *OfficialVerify) XXX_Unmarshal(b []byte) error

type Page

type Page struct {
	Pn    int `json:"pn"`
	Ps    int `json:"ps"`
	Total int `json:"total"`
}

Page model

type Pendant

type Pendant struct {
	Pid                  int32    `protobuf:"varint,1,opt,name=pid,proto3" json:"pid"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Image                string   `protobuf:"bytes,3,opt,name=image,proto3" json:"image"`
	Expire               int32    `protobuf:"varint,4,opt,name=expire,proto3" json:"expire"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Pendant) Descriptor

func (*Pendant) Descriptor() ([]byte, []int)

func (*Pendant) Marshal

func (m *Pendant) Marshal() (dAtA []byte, err error)

func (*Pendant) MarshalTo

func (m *Pendant) MarshalTo(dAtA []byte) (int, error)

func (*Pendant) ProtoMessage

func (*Pendant) ProtoMessage()

func (*Pendant) Reset

func (m *Pendant) Reset()

func (*Pendant) Size

func (m *Pendant) Size() (n int)

func (*Pendant) String

func (m *Pendant) String() string

func (*Pendant) Unmarshal

func (m *Pendant) Unmarshal(dAtA []byte) error

func (*Pendant) XXX_DiscardUnknown

func (m *Pendant) XXX_DiscardUnknown()

func (*Pendant) XXX_Marshal

func (m *Pendant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pendant) XXX_Merge

func (dst *Pendant) XXX_Merge(src proto.Message)

func (*Pendant) XXX_Size

func (m *Pendant) XXX_Size() int

func (*Pendant) XXX_Unmarshal

func (m *Pendant) XXX_Unmarshal(b []byte) error

type Rank

type Rank struct {
	Aid   int64 `json:"aid"`
	Score int64 `json:"score"`
}

Rank .

type RankCategory

type RankCategory struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

RankCategory .

type RankMeta

type RankMeta struct {
	*Meta
	Attention bool  `json:"attention"`
	Score     int64 `json:"score"`
}

RankMeta .

type RankResp

type RankResp struct {
	Note string  `json:"note"`
	List []*Rank `json:"list"`
}

RankResp .

type RecAuthor

type RecAuthor struct {
	*AccountCard
	RecReason string `json:"rec_reason"`
}

RecAuthor .

type Recommend

type Recommend struct {
	ArticleID         int64  `json:"article_id,omitempty"`
	Position          int    `json:"-"`
	EndTime           int64  `json:"-"`
	Rec               bool   `json:"rec"`
	RecFlag           bool   `json:"rec_flag"`
	RecText           string `json:"rec_text"`
	RecImageURL       string `json:"rec_image_url"`
	RecImageStartTime int64  `json:"-"`
	RecImageEndTime   int64  `json:"-"`
}

Recommend model

type RecommendArt

type RecommendArt struct {
	Meta
	Recommend
}

RecommendArt model

type RecommendArtWithLike

type RecommendArtWithLike struct {
	RecommendArt
	LikeState int `json:"like_state"`
}

RecommendArtWithLike model

type RecommendAuthor

type RecommendAuthor struct {
	UpID      int64  `json:"up_id"`
	RecReason string `json:"rec_reason"`
	RecType   int    `json:"rec_type"`
	Tid       int    `json:"tid"`
	Stid      int    `json:"second_tid"`
}

RecommendAuthor .

type RecommendAuthors

type RecommendAuthors struct {
	Count   int          `json:"count"`
	Authors []*RecAuthor `json:"authors"`
}

RecommendAuthors .

type RecommendHome

type RecommendHome struct {
	RecommendPlus
	Categories []*Category `json:"categories"`
	IP         string      `json:"ip"`
}

RecommendHome .

type RecommendPlus

type RecommendPlus struct {
	Banners  []*Banner               `json:"banners"`
	Articles []*RecommendArtWithLike `json:"articles"`
	Ranks    []*RankMeta             `json:"ranks"`
	Hotspots []*Hotspot              `json:"hotspots"`
}

RecommendPlus .

type Recommends

type Recommends [][]*Recommend

Recommends model

func (Recommends) Len

func (as Recommends) Len() int

func (Recommends) Less

func (as Recommends) Less(i, j int) bool

func (Recommends) Swap

func (as Recommends) Swap(i, j int)

type SearchArt

type SearchArt struct {
	ID          int64
	PublishTime int64
	Tags        []string
	StatsView   int64
	StatsReply  int64
}

SearchArt search article model

type Setting

type Setting struct {
	// 是否开启申请
	ApplyOpen bool `json:"apply_info"`
	// 申请限制
	ApplyLimit int64 `json:"apply_limit"`
	// 申请被拒绝后的冷冻期
	ApplyFrozenDuration int64 `json:"frozen_duration"`
	// 是否在推荐页面展示最新投稿
	ShowRecommendNewArticles bool `json:"show_rec_new_arts"`
	// 是否展示web端排行榜的说明
	ShowRankNote bool `json:"show_rank_note"`
	// 是否展示app专栏主要的排行榜
	ShowAppHomeRank bool `json:"show_app_home_rank"`
	// 详情页展示稍后在看
	ShowLaterWatch bool `json:"show_later_watch"`
	// 详情页展示小窗播放
	ShowSmallWindow bool `json:"show_small_window"`
	// 热点标签
	ShowHotspot bool `json:"show_hotspot"`
}

Setting .

type SkyHorseResp

type SkyHorseResp struct {
	Code int `json:"code"`
	Data []struct {
		ID        int64  `json:"id"`
		AvFeature string `json:"av_feature"`
	} `json:"data"`
	UserFeature string `json:"user_feature"`
}

SkyHorseResp response

type StatMsg

type StatMsg struct {
	View      *int64     `json:"view"`
	Like      *int64     `json:"like"`
	Dislike   *int64     `json:"dislike"`
	Favorite  *int64     `json:"fav"`
	Reply     *int64     `json:"reply"`
	Share     *int64     `json:"share"`
	Coin      *int64     `json:"coin"`
	Aid       int64      `json:"aid"`
	Mid       int64      `json:"mid"`
	IP        string     `json:"ip"`
	CheatInfo *CheatInfo `json:"cheat_info"`
}

StatMsg means article's stat message in databus.

func (*StatMsg) String

func (sm *StatMsg) String() (res string)

type Stats

type Stats struct {
	View                 int64    `protobuf:"varint,1,opt,name=view,proto3" json:"view"`
	Favorite             int64    `protobuf:"varint,2,opt,name=favorite,proto3" json:"favorite"`
	Like                 int64    `protobuf:"varint,3,opt,name=like,proto3" json:"like"`
	Dislike              int64    `protobuf:"varint,4,opt,name=dislike,proto3" json:"dislike"`
	Reply                int64    `protobuf:"varint,5,opt,name=reply,proto3" json:"reply"`
	Share                int64    `protobuf:"varint,6,opt,name=share,proto3" json:"share"`
	Coin                 int64    `protobuf:"varint,7,opt,name=coin,proto3" json:"coin"`
	Dynamic              int64    `protobuf:"varint,8,opt,name=dynamic,proto3" json:"dynamic"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Stats) Descriptor

func (*Stats) Descriptor() ([]byte, []int)

func (*Stats) Marshal

func (m *Stats) Marshal() (dAtA []byte, err error)

func (*Stats) MarshalTo

func (m *Stats) MarshalTo(dAtA []byte) (int, error)

func (*Stats) ProtoMessage

func (*Stats) ProtoMessage()

func (*Stats) Reset

func (m *Stats) Reset()

func (*Stats) Size

func (m *Stats) Size() (n int)

func (*Stats) String

func (m *Stats) String() string

func (*Stats) Unmarshal

func (m *Stats) Unmarshal(dAtA []byte) error

func (*Stats) XXX_DiscardUnknown

func (m *Stats) XXX_DiscardUnknown()

func (*Stats) XXX_Marshal

func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Stats) XXX_Merge

func (dst *Stats) XXX_Merge(src proto.Message)

func (*Stats) XXX_Size

func (m *Stats) XXX_Size() int

func (*Stats) XXX_Unmarshal

func (m *Stats) XXX_Unmarshal(b []byte) error

type Tag

type Tag struct {
	Tid                  int64    `protobuf:"varint,1,opt,name=tid,proto3" json:"tid"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Tag) Descriptor

func (*Tag) Descriptor() ([]byte, []int)

func (*Tag) Marshal

func (m *Tag) Marshal() (dAtA []byte, err error)

func (*Tag) MarshalTo

func (m *Tag) MarshalTo(dAtA []byte) (int, error)

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) Size

func (m *Tag) Size() (n int)

func (*Tag) String

func (m *Tag) String() string

func (*Tag) Unmarshal

func (m *Tag) Unmarshal(dAtA []byte) error

func (*Tag) XXX_DiscardUnknown

func (m *Tag) XXX_DiscardUnknown()

func (*Tag) XXX_Marshal

func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tag) XXX_Merge

func (dst *Tag) XXX_Merge(src proto.Message)

func (*Tag) XXX_Size

func (m *Tag) XXX_Size() int

func (*Tag) XXX_Unmarshal

func (m *Tag) XXX_Unmarshal(b []byte) error

type TagArts

type TagArts struct {
	Tid  int64   `json:"tid"`
	Aids []int64 `json:"aids"`
}

TagArts .

type ThirtyDayArticle

type ThirtyDayArticle struct {
	Category  string            `json:"category"`
	ThirtyDay []*data.ThirtyDay `json:"thirty_day"`
}

ThirtyDayArticle for article 30 days data.

type TicketCard

type TicketCard struct {
	ID        int64   `json:"id"`
	Name      string  `json:"name"`
	Image     string  `json:"performance_image"`
	StartTime int64   `json:"start_time"`
	EndTime   int64   `json:"end_time"`
	Province  string  `json:"province_name"`
	City      string  `json:"city_name"`
	District  string  `json:"district_name"`
	Venue     string  `json:"venue_name"`
	PriceLow  float64 `json:"price_low"`
	URL       string  `json:"url"`
}

TicketCard .

type UpArtMetas

type UpArtMetas struct {
	Articles []*Meta `json:"articles"`
	Pn       int     `json:"pn"`
	Ps       int     `json:"ps"`
	Count    int     `json:"count"`
}

UpArtMetas article list.

type UpArtMetasLists

type UpArtMetasLists struct {
	*UpArtMetas
	UpLists UpLists `json:"up_lists"`
}

UpArtMetasLists .

type UpLists

type UpLists struct {
	Lists []*List `json:"lists"`
	Total int     `json:"total"`
}

UpLists .

type UpStat

type UpStat struct {
	View      int64 `json:"view"`
	Reply     int64 `json:"reply"`
	Like      int64 `json:"like"`
	Coin      int64 `json:"coin"`
	Fav       int64 `json:"fav"`
	Share     int64 `json:"share"`
	PreView   int64 `json:"-"`
	PreReply  int64 `json:"-"`
	PreLike   int64 `json:"-"`
	PreCoin   int64 `json:"-"`
	PreFav    int64 `json:"-"`
	PreShare  int64 `json:"-"`
	IncrView  int64 `json:"incr_view"`
	IncrReply int64 `json:"incr_reply"`
	IncrLike  int64 `json:"incr_like"`
	IncrCoin  int64 `json:"incr_coin"`
	IncrFav   int64 `json:"incr_fav"`
	IncrShare int64 `json:"incr_share"`
}

UpStat for bigdata article up stat

type ViewInfo

type ViewInfo struct {
	Like            int8     `json:"like"`
	Attention       bool     `json:"attention"`
	Favorite        bool     `json:"favorite"`
	Coin            int64    `json:"coin"`
	Stats           Stats    `json:"stats"`
	Title           string   `json:"title"`
	BannerURL       string   `json:"banner_url"`
	Mid             int64    `json:"mid"`
	AuthorName      string   `json:"author_name"`
	IsAuthor        bool     `json:"is_author"`
	ImageURLs       []string `json:"image_urls"`
	OriginImageURLs []string `json:"origin_image_urls"`
	Shareable       bool     `json:"shareable"`
	ShowLaterWatch  bool     `json:"show_later_watch"`
	ShowSmallWindow bool     `json:"show_small_window"`
	InList          bool     `json:"in_list"`
	Pre             int64    `json:"pre"`
	Next            int64    `json:"next"`
}

ViewInfo model

type VipInfo

type VipInfo struct {
	Type                 int32    `protobuf:"varint,1,opt,name=type,proto3" json:"type"`
	Status               int32    `protobuf:"varint,2,opt,name=status,proto3" json:"status"`
	DueDate              int64    `protobuf:"varint,3,opt,name=due_date,json=dueDate,proto3" json:"due_date"`
	VipPayType           int32    `protobuf:"varint,4,opt,name=vip_pay_type,json=vipPayType,proto3" json:"vip_pay_type"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VipInfo) Descriptor

func (*VipInfo) Descriptor() ([]byte, []int)

func (*VipInfo) Marshal

func (m *VipInfo) Marshal() (dAtA []byte, err error)

func (*VipInfo) MarshalTo

func (m *VipInfo) MarshalTo(dAtA []byte) (int, error)

func (*VipInfo) ProtoMessage

func (*VipInfo) ProtoMessage()

func (*VipInfo) Reset

func (m *VipInfo) Reset()

func (*VipInfo) Size

func (m *VipInfo) Size() (n int)

func (*VipInfo) String

func (m *VipInfo) String() string

func (*VipInfo) Unmarshal

func (m *VipInfo) Unmarshal(dAtA []byte) error

func (*VipInfo) XXX_DiscardUnknown

func (m *VipInfo) XXX_DiscardUnknown()

func (*VipInfo) XXX_Marshal

func (m *VipInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VipInfo) XXX_Merge

func (dst *VipInfo) XXX_Merge(src proto.Message)

func (*VipInfo) XXX_Size

func (m *VipInfo) XXX_Size() int

func (*VipInfo) XXX_Unmarshal

func (m *VipInfo) XXX_Unmarshal(b []byte) error

type WebListArticles

type WebListArticles struct {
	List      *List              `json:"list"`
	Articles  []*FullListArtMeta `json:"articles"`
	Author    *Author            `json:"author"`
	Last      ListArtMeta        `json:"last"`
	Attention bool               `json:"attention"`
}

WebListArticles .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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