acfun

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Site     = "acfun"
	BaseHost = "https://live.acfun.cn"
)
View Source
const (
	Live concern_type.Type = "live"
)
View Source
const (
	PathApiChannelList = "/api/channel/list"
)

Variables

View Source
var BasePath = map[string]string{
	PathApiChannelList: BaseHost,
}
View Source
var File_lsp_acfun_acfun_proto protoreflect.FileDescriptor

Functions

func APath

func APath(path string) string

func LiveUrl

func LiveUrl(uid int64) string

Types

type ApiChannelListRequest

type ApiChannelListRequest struct {
	Count   int32  `json:"count"`
	PCursor string `json:"pcursor"`
}

type ApiChannelListResponse

type ApiChannelListResponse struct {
	ChannelListData *ApiChannelListResponse_ChannelListData `protobuf:"bytes,1,opt,name=channelListData,proto3" json:"channelListData,omitempty"`
	// contains filtered or unexported fields
}

func ApiChannelList

func ApiChannelList(count int32, pcursor string) (*ApiChannelListResponse, error)

func (*ApiChannelListResponse) Descriptor deprecated

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

Deprecated: Use ApiChannelListResponse.ProtoReflect.Descriptor instead.

func (*ApiChannelListResponse) GetChannelListData

func (*ApiChannelListResponse) ProtoMessage

func (*ApiChannelListResponse) ProtoMessage()

func (*ApiChannelListResponse) ProtoReflect added in v1.1.1

func (x *ApiChannelListResponse) ProtoReflect() protoreflect.Message

func (*ApiChannelListResponse) Reset

func (x *ApiChannelListResponse) Reset()

func (*ApiChannelListResponse) String

func (x *ApiChannelListResponse) String() string

type ApiChannelListResponse_ChannelListData

type ApiChannelListResponse_ChannelListData struct {
	Result     int64                                                  `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	RequestId  string                                                 `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"`
	LiveList   []*ApiChannelListResponse_ChannelListData_LiveListItem `protobuf:"bytes,3,rep,name=liveList,proto3" json:"liveList,omitempty"`
	Count      int32                                                  `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	Pcursor    string                                                 `protobuf:"bytes,5,opt,name=pcursor,proto3" json:"pcursor,omitempty"`
	TotalCount int32                                                  `protobuf:"varint,6,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiChannelListResponse_ChannelListData) Descriptor deprecated

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

Deprecated: Use ApiChannelListResponse_ChannelListData.ProtoReflect.Descriptor instead.

func (*ApiChannelListResponse_ChannelListData) GetCount

func (*ApiChannelListResponse_ChannelListData) GetLiveList

func (*ApiChannelListResponse_ChannelListData) GetPcursor

func (*ApiChannelListResponse_ChannelListData) GetRequestId

func (*ApiChannelListResponse_ChannelListData) GetResult

func (*ApiChannelListResponse_ChannelListData) GetTotalCount

func (x *ApiChannelListResponse_ChannelListData) GetTotalCount() int32

func (*ApiChannelListResponse_ChannelListData) ProtoMessage

func (*ApiChannelListResponse_ChannelListData) ProtoReflect added in v1.1.1

func (*ApiChannelListResponse_ChannelListData) Reset

func (*ApiChannelListResponse_ChannelListData) String

type ApiChannelListResponse_ChannelListData_LiveListItem

type ApiChannelListResponse_ChannelListData_LiveListItem struct {
	User       *ApiChannelListResponse_ChannelListData_LiveListItem_User `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"`
	CoverUrls  []string                                                  `protobuf:"bytes,7,rep,name=coverUrls,proto3" json:"coverUrls,omitempty"`
	Title      string                                                    `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"`
	CreateTime int64                                                     `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime,omitempty"`
	AuthorId   int64                                                     `protobuf:"varint,10,opt,name=authorId,proto3" json:"authorId,omitempty"`
	LiveId     string                                                    `protobuf:"bytes,11,opt,name=liveId,proto3" json:"liveId,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiChannelListResponse_ChannelListData_LiveListItem) Descriptor deprecated

Deprecated: Use ApiChannelListResponse_ChannelListData_LiveListItem.ProtoReflect.Descriptor instead.

func (*ApiChannelListResponse_ChannelListData_LiveListItem) GetAuthorId

func (*ApiChannelListResponse_ChannelListData_LiveListItem) GetCoverUrls

func (*ApiChannelListResponse_ChannelListData_LiveListItem) GetCreateTime

func (*ApiChannelListResponse_ChannelListData_LiveListItem) GetLiveId

func (*ApiChannelListResponse_ChannelListData_LiveListItem) GetTitle

func (*ApiChannelListResponse_ChannelListData_LiveListItem) GetUser

func (*ApiChannelListResponse_ChannelListData_LiveListItem) ProtoMessage

func (*ApiChannelListResponse_ChannelListData_LiveListItem) ProtoReflect added in v1.1.1

func (*ApiChannelListResponse_ChannelListData_LiveListItem) Reset

func (*ApiChannelListResponse_ChannelListData_LiveListItem) String

type ApiChannelListResponse_ChannelListData_LiveListItem_User

type ApiChannelListResponse_ChannelListData_LiveListItem_User struct {
	Action        int32  `protobuf:"varint,1,opt,name=action,proto3" json:"action,omitempty"`
	Id            string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Name          string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	FanCountValue int64  `protobuf:"varint,4,opt,name=fanCountValue,proto3" json:"fanCountValue,omitempty"`
	FanCount      string `protobuf:"bytes,5,opt,name=fanCount,proto3" json:"fanCount,omitempty"`
	HeadUrl       string `protobuf:"bytes,6,opt,name=headUrl,proto3" json:"headUrl,omitempty"`
	// contains filtered or unexported fields
}

bool disableDanmakuShow = 1; string requestId = 2; string groupId = 3; int32 action = 4; int32 href = 5;

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) Descriptor deprecated

Deprecated: Use ApiChannelListResponse_ChannelListData_LiveListItem_User.ProtoReflect.Descriptor instead.

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) GetAction

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) GetFanCount

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) GetFanCountValue

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) GetHeadUrl

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) GetId

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) GetName

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) ProtoMessage

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) ProtoReflect added in v1.1.1

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) Reset

func (*ApiChannelListResponse_ChannelListData_LiveListItem_User) String

type Concern

type Concern struct {
	*StateManager
	// contains filtered or unexported fields
}

func NewConcern

func NewConcern(notifyChan chan<- concern.Notify) *Concern

func (*Concern) Add

func (c *Concern) Add(ctx mmsg.IMsgCtx, groupCode int64, id interface{}, ctype concern_type.Type) (concern.IdentityInfo, error)

func (*Concern) FindOrLoadUserInfo

func (c *Concern) FindOrLoadUserInfo(uid int64) (*UserInfo, error)

func (*Concern) FindUserInfo

func (c *Concern) FindUserInfo(uid int64, load bool) (*UserInfo, error)

func (*Concern) Get

func (c *Concern) Get(id interface{}) (concern.IdentityInfo, error)

func (*Concern) GetStateManager

func (c *Concern) GetStateManager() concern.IStateManager

func (*Concern) GroupWatchNotify

func (c *Concern) GroupWatchNotify(groupCode, mid int64)

func (Concern) LiveInfoKey

func (e Concern) LiveInfoKey(keys ...interface{}) string

func (Concern) NotLiveKey

func (e Concern) NotLiveKey(keys ...interface{}) string

func (*Concern) ParseId

func (c *Concern) ParseId(s string) (interface{}, error)

func (*Concern) Remove

func (c *Concern) Remove(ctx mmsg.IMsgCtx, groupCode int64, id interface{}, ctype concern_type.Type) (concern.IdentityInfo, error)

func (*Concern) Site

func (c *Concern) Site() string

func (*Concern) Start

func (c *Concern) Start() error

func (*Concern) Stop

func (c *Concern) Stop()

func (*Concern) Types

func (c *Concern) Types() []concern_type.Type

func (Concern) UidFirstTimestamp

func (e Concern) UidFirstTimestamp(keys ...interface{}) string

func (Concern) UserInfoKey

func (e Concern) UserInfoKey(keys ...interface{}) string

type ConcernLiveNotify

type ConcernLiveNotify struct {
	GroupCode int64
	*LiveInfo
}

func NewConcernLiveNotify

func NewConcernLiveNotify(groupCode int64, info *LiveInfo) *ConcernLiveNotify

func (*ConcernLiveNotify) GetGroupCode

func (notify *ConcernLiveNotify) GetGroupCode() int64

func (*ConcernLiveNotify) Logger

func (notify *ConcernLiveNotify) Logger() *logrus.Entry

func (*ConcernLiveNotify) ToMessage

func (notify *ConcernLiveNotify) ToMessage() (m *mmsg.MSG)

type GroupConcernConfig

type GroupConcernConfig struct {
	concern.IConfig
}

func NewGroupConcernConfig

func NewGroupConcernConfig(g concern.IConfig) *GroupConcernConfig

type LiveInfo

type LiveInfo struct {
	UserInfo
	LiveId   string `json:"live_id"`
	Title    string `json:"title"`
	Cover    string `json:"cover"`
	StartTs  int64  `json:"start_ts"`
	IsLiving bool   `json:"living"`
	// contains filtered or unexported fields
}

func (*LiveInfo) GetMSG added in v1.0.1

func (l *LiveInfo) GetMSG() *mmsg.MSG

func (*LiveInfo) IsLive

func (l *LiveInfo) IsLive() bool

func (*LiveInfo) LiveStatusChanged

func (l *LiveInfo) LiveStatusChanged() bool

func (*LiveInfo) Living

func (l *LiveInfo) Living() bool

func (*LiveInfo) Logger

func (l *LiveInfo) Logger() *logrus.Entry

func (*LiveInfo) Site

func (l *LiveInfo) Site() string

func (*LiveInfo) TitleChanged

func (l *LiveInfo) TitleChanged() bool

func (*LiveInfo) Type

func (l *LiveInfo) Type() concern_type.Type

type LivePageResponse added in v1.0.3

type LivePageResponse struct {
	LiveInfo *LivePageResponse_LiveInfo `protobuf:"bytes,1,opt,name=liveInfo,proto3" json:"liveInfo,omitempty"`
	// contains filtered or unexported fields
}

func LivePage added in v1.0.3

func LivePage(uid int64) (*LivePageResponse, error)

func (*LivePageResponse) Descriptor deprecated added in v1.0.3

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

Deprecated: Use LivePageResponse.ProtoReflect.Descriptor instead.

func (*LivePageResponse) GetLiveInfo added in v1.0.3

func (x *LivePageResponse) GetLiveInfo() *LivePageResponse_LiveInfo

func (*LivePageResponse) ProtoMessage added in v1.0.3

func (*LivePageResponse) ProtoMessage()

func (*LivePageResponse) ProtoReflect added in v1.1.1

func (x *LivePageResponse) ProtoReflect() protoreflect.Message

func (*LivePageResponse) Reset added in v1.0.3

func (x *LivePageResponse) Reset()

func (*LivePageResponse) String added in v1.0.3

func (x *LivePageResponse) String() string

type LivePageResponse_LiveInfo added in v1.0.3

type LivePageResponse_LiveInfo struct {
	User *LivePageResponse_LiveInfo_User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*LivePageResponse_LiveInfo) Descriptor deprecated added in v1.0.3

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

Deprecated: Use LivePageResponse_LiveInfo.ProtoReflect.Descriptor instead.

func (*LivePageResponse_LiveInfo) GetUser added in v1.0.3

func (*LivePageResponse_LiveInfo) ProtoMessage added in v1.0.3

func (*LivePageResponse_LiveInfo) ProtoMessage()

func (*LivePageResponse_LiveInfo) ProtoReflect added in v1.1.1

func (*LivePageResponse_LiveInfo) Reset added in v1.0.3

func (x *LivePageResponse_LiveInfo) Reset()

func (*LivePageResponse_LiveInfo) String added in v1.0.3

func (x *LivePageResponse_LiveInfo) String() string

type LivePageResponse_LiveInfo_User added in v1.0.3

type LivePageResponse_LiveInfo_User struct {
	HeadUrl       string `protobuf:"bytes,1,opt,name=headUrl,proto3" json:"headUrl,omitempty"`
	FanCountValue int32  `protobuf:"varint,2,opt,name=fanCountValue,proto3" json:"fanCountValue,omitempty"`
	Name          string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*LivePageResponse_LiveInfo_User) Descriptor deprecated added in v1.0.3

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

Deprecated: Use LivePageResponse_LiveInfo_User.ProtoReflect.Descriptor instead.

func (*LivePageResponse_LiveInfo_User) GetFanCountValue added in v1.0.3

func (x *LivePageResponse_LiveInfo_User) GetFanCountValue() int32

func (*LivePageResponse_LiveInfo_User) GetHeadUrl added in v1.0.3

func (x *LivePageResponse_LiveInfo_User) GetHeadUrl() string

func (*LivePageResponse_LiveInfo_User) GetName added in v1.0.3

func (*LivePageResponse_LiveInfo_User) ProtoMessage added in v1.0.3

func (*LivePageResponse_LiveInfo_User) ProtoMessage()

func (*LivePageResponse_LiveInfo_User) ProtoReflect added in v1.1.1

func (*LivePageResponse_LiveInfo_User) Reset added in v1.0.3

func (x *LivePageResponse_LiveInfo_User) Reset()

func (*LivePageResponse_LiveInfo_User) String added in v1.0.3

type StateManager

type StateManager struct {
	*concern.StateManager
	// contains filtered or unexported fields
}

func NewStateManager

func NewStateManager(notify chan<- concern.Notify) *StateManager

func (*StateManager) AddLiveInfo

func (s *StateManager) AddLiveInfo(info *LiveInfo) error

func (*StateManager) AddUserInfo

func (s *StateManager) AddUserInfo(info *UserInfo) error

func (*StateManager) ClearNotLiveCount

func (s *StateManager) ClearNotLiveCount(uid int64) error

func (*StateManager) DeleteLiveInfo

func (s *StateManager) DeleteLiveInfo(uid int64) error

func (*StateManager) GetGroupConcernConfig

func (s *StateManager) GetGroupConcernConfig(groupCode int64, id interface{}) (concernConfig concern.IConfig)

func (*StateManager) GetLiveInfo

func (s *StateManager) GetLiveInfo(uid int64) (*LiveInfo, error)

func (*StateManager) GetUidFirstTimestamp

func (s *StateManager) GetUidFirstTimestamp(uid int64) (timestamp int64, err error)

func (*StateManager) GetUserInfo

func (s *StateManager) GetUserInfo(uid int64) (*UserInfo, error)

func (*StateManager) IncNotLiveCount

func (s *StateManager) IncNotLiveCount(uid int64) int64

func (*StateManager) LiveInfoKey

func (e *StateManager) LiveInfoKey(keys ...interface{}) string

func (*StateManager) NotLiveKey

func (e *StateManager) NotLiveKey(keys ...interface{}) string

func (*StateManager) SetUidFirstTimestampIfNotExist

func (s *StateManager) SetUidFirstTimestampIfNotExist(uid int64, timestamp int64) error

func (*StateManager) UidFirstTimestamp

func (e *StateManager) UidFirstTimestamp(keys ...interface{}) string

func (*StateManager) UserInfoKey

func (e *StateManager) UserInfoKey(keys ...interface{}) string

type UserInfo

type UserInfo struct {
	Uid      int64  `json:"uid"`
	Name     string `json:"name"`
	Followed int    `json:"followed"`
	UserImg  string `json:"user_img"`
	LiveUrl  string `json:"live_url"`
}

func (*UserInfo) GetName

func (u *UserInfo) GetName() string

func (*UserInfo) GetUid

func (u *UserInfo) GetUid() interface{}

Jump to

Keyboard shortcuts

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