conf

package
v0.5.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfixCommentDefault      = "default"
	InfixCommentHots         = "hots"
	InfixCommentNewest       = "newest"
	PrefixNewestTweets       = "paopao:newesttweets:"
	PrefixHotsTweets         = "paopao:hotstweets:"
	PrefixFollowingTweets    = "paopao:followingtweets:"
	PrefixUserTweets         = "paopao:usertweets:"
	PrefixUnreadmsg          = "paopao:unreadmsg:"
	PrefixOnlineUser         = "paopao:onlineuser:"
	PrefixIdxTweetsNewest    = "paopao:index:tweets:newest:"
	PrefixIdxTweetsHots      = "paopao:index:tweets:hots:"
	PrefixIdxTweetsFollowing = "paopao:index:tweets:following:"
	PrefixIdxTrends          = "paopao:index:trends:"
	PrefixMessages           = "paopao:messages:"
	PrefixUserInfo           = "paopao:user:info:"
	PrefixUserProfile        = "paopao:user:profile:"
	PrefixUserInfoById       = "paopao:user:info:id:"
	PrefixUserInfoByName     = "paopao:user:info:name:"

	PrefixMyFriendIds   = "paopao:myfriendids:"
	PrefixMyFollowIds   = "paopao:myfollowids:"
	PrefixTweetComment  = "paopao:comment:"
	KeySiteStatus       = "paopao:sitestatus"
	KeyHistoryMaxOnline = "history.max.online"
)

以下包含一些在cache中会用到的key的前缀

View Source
const (
	TableAnouncement        = "user"
	TableAnouncementContent = "anouncement_content"
	TableAttachment         = "attachment"
	TableCaptcha            = "captcha"
	TableComment            = "comment"
	TableCommentMetric      = "comment_metric"
	TableCommentContent     = "comment_content"
	TableCommentReply       = "comment_reply"
	TableFollowing          = "following"
	TableContact            = "contact"
	TableContactGroup       = "contact_group"
	TableMessage            = "message"
	TablePost               = "post"
	TablePostMetric         = "post_metric"
	TablePostByComment      = "post_by_comment"
	TablePostByMedia        = "post_by_media"
	TablePostAttachmentBill = "post_attachment_bill"
	TablePostCollection     = "post_collection"
	TablePostContent        = "post_content"
	TablePostStar           = "post_star"
	TableTag                = "tag"
	TableUser               = "user"
	TableUserRelation       = "user_relation"
	TableUserMetric         = "user_metric"
	TableWalletRecharge     = "wallet_recharge"
	TableWalletStatement    = "wallet_statement"
)

Variables

View Source
var (
	KeyNewestTweets      cache.KeyPool[int]
	KeyHotsTweets        cache.KeyPool[int]
	KeyFollowingTweets   cache.KeyPool[string]
	KeyUnreadMsg         cache.KeyPool[int64]
	KeyOnlineUser        cache.KeyPool[int64]
	KeyUserInfoById      cache.KeyPool[int64]
	KeyUserInfoByName    cache.KeyPool[string]
	KeyUserProfileByName cache.KeyPool[string]
	KeyMyFriendIds       cache.KeyPool[int64]
	KeyMyFollowIds       cache.KeyPool[int64]
)

以下包含一些在cache中会用到的池化后的key

View Source
var (
	PyroscopeSetting        *pyroscopeConf
	DatabaseSetting         *databaseConf
	MysqlSetting            *mysqlConf
	PostgresSetting         *postgresConf
	Sqlite3Setting          *sqlite3Conf
	PprofServerSetting      *httpServerConf
	MetricsServerSetting    *httpServerConf
	WebServerSetting        *httpServerConf
	AdminServerSetting      *httpServerConf
	SpaceXServerSetting     *httpServerConf
	BotServerSetting        *httpServerConf
	LocalossServerSetting   *httpServerConf
	FrontendWebSetting      *httpServerConf
	DocsServerSetting       *httpServerConf
	MobileServerSetting     *grpcServerConf
	AppSetting              *appConf
	CacheSetting            *cacheConf
	EventManagerSetting     *eventManagerConf
	MetricManagerSetting    *metricManagerConf
	JobManagerSetting       *jobManagerConf
	CacheIndexSetting       *cacheIndexConf
	SimpleCacheIndexSetting *simpleCacheIndexConf
	BigCacheIndexSetting    *bigCacheIndexConf
	RedisCacheIndexSetting  *redisCacheIndexConf
	SmsJuheSetting          *smsJuheConf
	AlipaySetting           *alipayConf
	TweetSearchSetting      *tweetSearchConf
	ZincSetting             *zincConf
	MeiliSetting            *meiliConf
	ObjectStorage           *objectStorageConf
	AliOSSSetting           *aliOSSConf
	COSSetting              *cosConf
	HuaweiOBSSetting        *huaweiOBSConf
	MinIOSetting            *minioConf
	S3Setting               *s3Conf
	LocalOSSSetting         *localossConf
	JWTSetting              *jwtConf
	WebProfileSetting       *WebProfileConf
)

Functions

func GetOssDomain added in v0.2.0

func GetOssDomain() string

func Initial added in v0.3.0

func Initial(suite []string, noDefault bool)

func MustAlipayClient added in v0.4.0

func MustAlipayClient() *alipay.Client

func MustGormDB added in v0.2.0

func MustGormDB() *gorm.DB

func MustRedisClient added in v0.3.0

func MustRedisClient() rueidis.Client

func MustSqlDB added in v0.4.0

func MustSqlDB() *sql.DB

func OpenSqlite3 added in v0.2.0

func OpenSqlite3() (string, *sql.DB, error)

func RunMode added in v0.2.0

func RunMode() string

func UseSentryGin added in v0.3.0

func UseSentryGin() bool

Types

type TableNameMap added in v0.4.0

type TableNameMap map[string]string

type WebProfileConf added in v0.5.0

type WebProfileConf struct {
	UseFriendship             bool   `json:"use_friendship"`
	EnableTrendsBar           bool   `json:"enable_trends_bar"`
	EnableWallet              bool   `json:"enable_wallet"`
	AllowTweetAttachment      bool   `json:"allow_tweet_attachment"`
	AllowTweetAttachmentPrice bool   `json:"allow_tweet_attachment_price"`
	AllowTweetVideo           bool   `json:"allow_tweet_video"`
	AllowUserRegister         bool   `json:"allow_user_register"`
	AllowPhoneBind            bool   `json:"allow_phone_bind"`
	DefaultTweetMaxLength     int    `json:"default_tweet_max_length"`
	TweetWebEllipsisSize      int    `json:"tweet_web_ellipsis_size"`
	TweetMobileEllipsisSize   int    `json:"tweet_mobile_ellipsis_size"`
	DefaultTweetVisibility    string `json:"default_tweet_visibility"`
	DefaultMsgLoopInterval    int    `json:"default_msg_loop_interval"`
	CopyrightTop              string `json:"copyright_top"`
	CopyrightLeft             string `json:"copyright_left"`
	CopyrightLeftLink         string `json:"copyright_left_link"`
	CopyrightRight            string `json:"copyright_right"`
	CopyrightRightLink        string `json:"copyright_right_link"`
}

Jump to

Keyboard shortcuts

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