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: 8 Imported by: 0

Documentation

Overview

Package model is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

UpSpecial
UpInfo
UpGroup
UpBaseStat
PBSetUpSwitchRes
PBUpSwitch

Index

Constants

View Source
const (
	// IsUp is up
	IsUp = 1
	// NotUp not up
	NotUp = 0
)
View Source
const (
	// AttrNo attribute yes and no
	AttrNo  = int(0)
	AttrYes = int(1)
	// AttrArchiveUp attribute bit
	AttrArchiveUp    = uint8(0)
	AttrArchiveNewUp = uint8(1)
	AttrLiveUp       = uint8(2)
	AttrLiveWhiteUp  = uint8(3)
)

Const State

View Source
const (
	// Open is open switch
	Open = 1
	// Close is close switch
	Close = 0
)
View Source
const (
	// AttrPlayer flow up window 's switch of attribute bit
	AttrPlayer = uint8(0)
	// AttrHonorWeekly honor weekly subscription 's switch of attribute bit
	AttrHonorWeekly = uint8(1)
)

Const State

Variables

View Source
var (
	ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage   = fmt.Errorf("proto: integer overflow")
)

Functions

func BitDesc

func BitDesc(bit uint8) (desc string)

BitDesc return bit desc.

func InAttr

func InAttr(attr int) (ok bool)

InAttr in correct attrs.

Types

type AddGroupArg

type AddGroupArg struct {
	Name      string `form:"name" validate:"required"`
	Tag       string `form:"tag" validate:"required"`
	ShortTag  string `form:"short_tag"`
	FontColor string `form:"font_color"`
	BgColor   string `form:"bg_color"`
	Remark    string `from:"remark"`
}

AddGroupArg arg

type AidPubTime

type AidPubTime struct {
	Aid       int64     `json:"aid"`
	PubDate   time.Time `json:"pubdate"`
	Copyright int8      `json:"copyright"`
}

AidPubTime aid's pubdate and copyright

type Archive

type Archive struct {
	ID    int64 `json:"id"`
	MID   int64 `json:"mid"`
	State int   `json:"state"`
}

Archive for db.

type ArgInfo

type ArgInfo struct {
	Mid  int64
	From int
}

ArgInfo info arg

type ArgMidWithDate

type ArgMidWithDate struct {
	Mid  int64
	Date time.Time // 需要查询的时间,如果不填,会使用当前最新的数据
}

ArgMidWithDate arg mid with date

type ArgSpecial

type ArgSpecial struct {
	GroupID int64
}

ArgSpecial special arg

type ArgUpSwitch

type ArgUpSwitch struct {
	Mid   int64
	State int
	From  int
	IP    string
}

ArgUpSwitch info arg

type BAP

type BAP struct {
	UserName  string `json:"username"`
	Title     string `json:"title"`
	Content   string `json:"content"`
	URL       string `json:"url"`
	Ty        string `json:"type"`
	Token     string `json:"token"`
	Signature string `json:"signature"`
	TimeStamp int64  `json:"timestamp"`
}

BAP for wechat msg.

type EditGroupArg

type EditGroupArg struct {
	AddArg *AddGroupArg
	ID     int64 `form:"id" validate:"required"`
}

EditGroupArg arg

type GetCardByMidArg

type GetCardByMidArg struct {
	Mid int64 `form:"mid" validate:"required"`
}

GetCardByMidArg arg

type GetGroupArg

type GetGroupArg struct {
	State int `form:"state"`
}

GetGroupArg arg

type GetSpecialArg

type GetSpecialArg struct {
	GroupID   int    `form:"group_id"`
	UID       int    `form:"uid"`
	FromTime  string `form:"from_time"`  // "2006-01-02 15:04:05"
	ToTime    string `form:"to_time"`    // "2006-01-02 15:04:05"
	Order     string `form:"order" `     // 根据mtime排序,默认从升序, 取值,asc/desc
	Export    string `form:"export"`     // csv
	Charset   string `form:"charset"`    // 导出编码格式,默认gbk
	Pn        uint   `form:"pn"`         // 页码,默认1
	Ps        uint   `form:"ps"`         // 每页数量,默认20
	Mids      string `form:"mids"`       // 用户ids,以,分隔
	AdminName string `form:"admin_name"` // 管理员昵称
}

GetSpecialArg arg

type GetSpecialByMidArg

type GetSpecialByMidArg struct {
	Mid int `form:"mid" validate:"required"`
}

GetSpecialByMidArg arg

type IdentifyAll

type IdentifyAll struct {
	Archive int `json:"archive"`
	Article int `json:"article"`
	Pic     int `json:"pic"`
	Blink   int `json:"blink"`
}

IdentifyAll for all type of uper identify.

type Info

type Info struct {
	Archive     int `json:"archive"`
	ArchiveFake int `json:"archive_fake"`
}

Info for auth by all platform

type ListCardByMidsArg

type ListCardByMidsArg struct {
	Mids string `form:"mids" validate:"required"` // mids split by ","
}

ListCardByMidsArg arg

type ListUpBaseArg

type ListUpBaseArg struct {
	LastID   int64   `form:"last_id"`
	Size     int     `form:"size"`
	Activity []int64 `form:"activity,split"`
}

ListUpBaseArg arg

func (*ListUpBaseArg) Validate

func (arg *ListUpBaseArg) Validate() bool

Validate ListUpBaseArg

type ListUpCardInfoArg

type ListUpCardInfoArg struct {
	Pn uint `form:"pn"` // page num
	Ps uint `form:"ps"` // query size
}

ListUpCardInfoArg arg

type Msg

type Msg struct {
	MID       int64 `json:"mid"`
	From      int   `json:"from"`
	IsAuthor  int   `json:"is_author"`
	TimeStamp int64 `json:"timestamp"`
}

Msg for databus consume.

type PBSetUpSwitchRes

type PBSetUpSwitchRes struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
}

func (*PBSetUpSwitchRes) Descriptor

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

func (*PBSetUpSwitchRes) GetId

func (m *PBSetUpSwitchRes) GetId() int64

func (*PBSetUpSwitchRes) Marshal

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

func (*PBSetUpSwitchRes) MarshalTo

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

func (*PBSetUpSwitchRes) ProtoMessage

func (*PBSetUpSwitchRes) ProtoMessage()

func (*PBSetUpSwitchRes) Reset

func (m *PBSetUpSwitchRes) Reset()

func (*PBSetUpSwitchRes) Size

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

func (*PBSetUpSwitchRes) String

func (m *PBSetUpSwitchRes) String() string

func (*PBSetUpSwitchRes) Unmarshal

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

type PBUpSwitch

type PBUpSwitch struct {
	State int32 `protobuf:"varint,1,opt,name=state,proto3" json:"state"`
}

func (*PBUpSwitch) Descriptor

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

func (*PBUpSwitch) GetState

func (m *PBUpSwitch) GetState() int32

func (*PBUpSwitch) Marshal

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

func (*PBUpSwitch) MarshalTo

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

func (*PBUpSwitch) ProtoMessage

func (*PBUpSwitch) ProtoMessage()

func (*PBUpSwitch) Reset

func (m *PBUpSwitch) Reset()

func (*PBUpSwitch) Size

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

func (*PBUpSwitch) String

func (m *PBUpSwitch) String() string

func (*PBUpSwitch) Unmarshal

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

type Pager

type Pager struct {
	Num   uint `json:"num"`
	Size  uint `json:"size"`
	Total int  `json:"total"`
}

Pager Common Pager def.

type RemoveGroupArg

type RemoveGroupArg struct {
	ID int32 `form:"id" validate:"required"`
}

RemoveGroupArg arg

type SignUp

type SignUp struct {
	ID        int64
	Mid       int64
	State     int
	BeginDate time.Time
	EndDate   time.Time
}

SignUp table sign_up

type Up

type Up struct {
	ID        int64 `json:"id"`
	MID       int64 `json:"mid"`
	Attribute int   `json:"attribute"`
}

Up for db.

func (*Up) AttrSet

func (u *Up) AttrSet(v int, bit uint8)

AttrSet set attribute.

func (*Up) AttrVal

func (u *Up) AttrVal(bit uint8) int

AttrVal get attribute.

type UpBaseStat

type UpBaseStat struct {
	View  int64 `protobuf:"varint,1,opt,name=View,proto3" json:"view"`
	Reply int64 `protobuf:"varint,2,opt,name=Reply,proto3" json:"reply"`
	Dm    int64 `protobuf:"varint,3,opt,name=Dm,proto3" json:"dm"`
	Fans  int64 `protobuf:"varint,4,opt,name=Fans,proto3" json:"fans"`
	Fav   int64 `protobuf:"varint,5,opt,name=Fav,proto3" json:"fav"`
	Like  int64 `protobuf:"varint,6,opt,name=Like,proto3" json:"like"`
}

func (*UpBaseStat) Descriptor

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

func (*UpBaseStat) GetDm

func (m *UpBaseStat) GetDm() int64

func (*UpBaseStat) GetFans

func (m *UpBaseStat) GetFans() int64

func (*UpBaseStat) GetFav

func (m *UpBaseStat) GetFav() int64

func (*UpBaseStat) GetLike

func (m *UpBaseStat) GetLike() int64

func (*UpBaseStat) GetReply

func (m *UpBaseStat) GetReply() int64

func (*UpBaseStat) GetView

func (m *UpBaseStat) GetView() int64

func (*UpBaseStat) Marshal

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

func (*UpBaseStat) MarshalTo

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

func (*UpBaseStat) ProtoMessage

func (*UpBaseStat) ProtoMessage()

func (*UpBaseStat) Reset

func (m *UpBaseStat) Reset()

func (*UpBaseStat) Size

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

func (*UpBaseStat) String

func (m *UpBaseStat) String() string

func (*UpBaseStat) Unmarshal

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

type UpCard

type UpCard struct {
	UpCardInfo *UpCardInfo      `json:"up_card_info"`
	Accounts   []*UpCardAccount `json:"accounts"`
	Videos     []*UpCardVideo   `json:"videos"`
	Images     []*UpCardImage   `json:"images"`
}

UpCard up card content

type UpCardAccount

type UpCardAccount struct {
	URL     string `json:"url"`
	Title   string `json:"title"`
	Desc    string `json:"desc"`
	Picture string `json:"picture"`
}

UpCardAccount for accounts in card info

type UpCardImage

type UpCardImage struct {
	URL    string `json:"url"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

UpCardImage for images in card info

type UpCardInfo

type UpCardInfo struct {
	MID             int64     `json:"mid"`
	NameCN          string    `json:"name_cn"`
	NameEN          string    `json:"name_en"`
	NameAlias       string    `json:"name_alias"`
	Signature       string    `json:"signature"`
	Content         string    `json:"content"`
	Nationality     string    `json:"nationality"`
	Nation          string    `json:"nation"`
	Gender          string    `json:"gender"`
	BloodType       string    `json:"blood_type"`
	Constellation   string    `json:"constellation"`
	Height          int       `json:"height"`
	Weight          int       `json:"weight"`
	BirthPlace      string    `json:"birth_place"`
	BirthDate       time.Time `json:"birth_date"`
	Occupation      string    `json:"occupation"`
	Tags            string    `json:"tags"`
	Masterpieces    string    `json:"masterpieces"`
	School          string    `json:"school"`
	Location        string    `json:"location"`
	Interests       string    `json:"interests"`
	Platform        string    `json:"platform"`
	PlatformAccount string    `json:"platform_account"`
}

UpCardInfo for up info in card info

type UpCardInfoPage

type UpCardInfoPage struct {
	Cards map[int64]*UpCard `json:"cards"`
	Page  *Pager            `json:"page"`
}

UpCardInfoPage page result of card info

type UpCardVideo

type UpCardVideo struct {
	URL      string    `json:"url"`
	Title    string    `json:"title"`
	Picture  string    `json:"picture"`
	Duration int64     `json:"duration"`
	CTime    time.Time `json:"ctime"`
}

UpCardVideo for videos in card info

type UpGroup

type UpGroup struct {
	ID        int64  `protobuf:"varint,1,opt,name=ID,proto3" json:"id"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Tag       string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag"`
	ShortTag  string `protobuf:"bytes,4,opt,name=short_tag,json=shortTag,proto3" json:"short_tag"`
	Remark    string `protobuf:"bytes,5,opt,name=remark,proto3" json:"remark"`
	State     int32  `protobuf:"varint,6,opt,name=state,proto3" json:"state"`
	FontColor string `protobuf:"bytes,7,opt,name=FontColor,proto3" json:"font_color"`
	BgColor   string `protobuf:"bytes,8,opt,name=BgColor,proto3" json:"bg_color"`
}

func (*UpGroup) Descriptor

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

func (*UpGroup) GetBgColor

func (m *UpGroup) GetBgColor() string

func (*UpGroup) GetFontColor

func (m *UpGroup) GetFontColor() string

func (*UpGroup) GetID

func (m *UpGroup) GetID() int64

func (*UpGroup) GetName

func (m *UpGroup) GetName() string

func (*UpGroup) GetRemark

func (m *UpGroup) GetRemark() string

func (*UpGroup) GetShortTag

func (m *UpGroup) GetShortTag() string

func (*UpGroup) GetState

func (m *UpGroup) GetState() int32

func (*UpGroup) GetTag

func (m *UpGroup) GetTag() string

func (*UpGroup) Marshal

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

func (*UpGroup) MarshalTo

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

func (*UpGroup) ProtoMessage

func (*UpGroup) ProtoMessage()

func (*UpGroup) Reset

func (m *UpGroup) Reset()

func (*UpGroup) Size

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

func (*UpGroup) String

func (m *UpGroup) String() string

func (*UpGroup) Unmarshal

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

type UpInfo

type UpInfo struct {
	IsAuthor int32 `protobuf:"varint,1,opt,name=isAuthor,proto3" json:"isAuthor"`
}

func (*UpInfo) Descriptor

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

func (*UpInfo) GetIsAuthor

func (m *UpInfo) GetIsAuthor() int32

func (*UpInfo) Marshal

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

func (*UpInfo) MarshalTo

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

func (*UpInfo) ProtoMessage

func (*UpInfo) ProtoMessage()

func (*UpInfo) Reset

func (m *UpInfo) Reset()

func (*UpInfo) Size

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

func (*UpInfo) String

func (m *UpInfo) String() string

func (*UpInfo) Unmarshal

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

type UpInfoActiveReply

type UpInfoActiveReply struct {
	ID        int64 `json:"id"`
	MID       int64 `json:"mid"`
	ActiveTid int16 `json:"active_tid"`
}

UpInfoActiveReply Reply

type UpInfoActiveReq

type UpInfoActiveReq struct {
	Mid int64 `form:"mid" validate:"required"`
}

UpInfoActiveReq req

type UpSpecial

type UpSpecial struct {
	ID        int64                       `protobuf:"varint,1,opt,name=ID,proto3" json:"id"`
	GroupID   int64                       `protobuf:"varint,2,opt,name=GroupID,proto3" json:"group_id"`
	GroupName string                      `protobuf:"bytes,3,opt,name=GroupName,proto3" json:"group_name"`
	GroupTag  string                      `protobuf:"bytes,4,opt,name=GroupTag,proto3" json:"group_tag"`
	Mid       int64                       `protobuf:"varint,5,opt,name=Mid,proto3" json:"mid"`
	Note      string                      `protobuf:"bytes,6,opt,name=Note,proto3" json:"note"`
	CTime     go_common_library_time.Time `protobuf:"varint,7,opt,name=CTime,proto3,casttype=go-common/library/time.Time" json:"ctime"`
	UID       int64                       `protobuf:"varint,8,opt,name=UID,proto3" json:"uid"`
	MTime     go_common_library_time.Time `protobuf:"varint,9,opt,name=MTime,proto3,casttype=go-common/library/time.Time" json:"mtime"`
	FontColor string                      `protobuf:"bytes,10,opt,name=FontColor,proto3" json:"font_color"`
	BgColor   string                      `protobuf:"bytes,11,opt,name=BgColor,proto3" json:"bg_color"`
}

func (*UpSpecial) Descriptor

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

func (*UpSpecial) GetBgColor

func (m *UpSpecial) GetBgColor() string

func (*UpSpecial) GetCTime

func (m *UpSpecial) GetCTime() go_common_library_time.Time

func (*UpSpecial) GetFontColor

func (m *UpSpecial) GetFontColor() string

func (*UpSpecial) GetGroupID

func (m *UpSpecial) GetGroupID() int64

func (*UpSpecial) GetGroupName

func (m *UpSpecial) GetGroupName() string

func (*UpSpecial) GetGroupTag

func (m *UpSpecial) GetGroupTag() string

func (*UpSpecial) GetID

func (m *UpSpecial) GetID() int64

func (*UpSpecial) GetMTime

func (m *UpSpecial) GetMTime() go_common_library_time.Time

func (*UpSpecial) GetMid

func (m *UpSpecial) GetMid() int64

func (*UpSpecial) GetNote

func (m *UpSpecial) GetNote() string

func (*UpSpecial) GetUID

func (m *UpSpecial) GetUID() int64

func (*UpSpecial) Marshal

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

func (*UpSpecial) MarshalTo

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

func (*UpSpecial) ProtoMessage

func (*UpSpecial) ProtoMessage()

func (*UpSpecial) Reset

func (m *UpSpecial) Reset()

func (*UpSpecial) Size

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

func (*UpSpecial) String

func (m *UpSpecial) String() string

func (*UpSpecial) Unmarshal

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

type UpSpecialWithName

type UpSpecialWithName struct {
	UpSpecial
	UName     string `json:"uname"`
	AdminName string `json:"admin_name"`
}

UpSpecialWithName arg with name

func (*UpSpecialWithName) Copy

func (u *UpSpecialWithName) Copy(special *UpSpecial)

Copy copy

func (*UpSpecialWithName) GetTitleFields

func (u *UpSpecialWithName) GetTitleFields() []string

GetTitleFields get title fields

func (*UpSpecialWithName) ToStringFields

func (u *UpSpecialWithName) ToStringFields() []string

ToStringFields get to string fields

type UpSwitch

type UpSwitch struct {
	ID        int64 `json:"id"`
	MID       int64 `json:"mid"`
	Attribute int   `json:"attribute"`
}

UpSwitch for db.

func (*UpSwitch) AttrSet

func (u *UpSwitch) AttrSet(v int, bit uint8)

AttrSet set attribute.

func (*UpSwitch) AttrVal

func (u *UpSwitch) AttrVal(bit uint8) int

AttrVal get attribute.

type UpsInfoActiveReq

type UpsInfoActiveReq struct {
	Mids []int64 `form:"mids,split" validate:"required,dive,gt=0"`
}

UpsInfoActiveReq req

type UpsPage

type UpsPage struct {
	Items []*UpSpecialWithName `json:"items"`
	Pager *Pager               `json:"page"`
}

UpsPage CategoryPager def.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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