mq

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisStreamMQ

type RedisStreamMQ struct {
	Client            *redis.Client
	PublishPostStream string
	NewPostStream     string
	PostCancelStream  string

	PublishStatusHash string
	Oauth2CodeHash    string
}

func NewRedisStreamMQ

func NewRedisStreamMQ() *RedisStreamMQ

func (*RedisStreamMQ) CheckPostPublishStatus

func (r *RedisStreamMQ) CheckPostPublishStatus(postID int) (bool, error)

func (*RedisStreamMQ) DeletePostPublishStatus

func (r *RedisStreamMQ) DeletePostPublishStatus(postID int) error

删除稿件发布跟踪hash表

func (*RedisStreamMQ) GetOauth2Uin

func (r *RedisStreamMQ) GetOauth2Uin(code string) (int64, error)

获取oauth2_code对应的uin

func (*RedisStreamMQ) NewPost

func (r *RedisStreamMQ) NewPost(postID int) error

func (*RedisStreamMQ) PostCancel

func (r *RedisStreamMQ) PostCancel(postID int) error

func (*RedisStreamMQ) PublishPost

func (r *RedisStreamMQ) PublishPost(postID int) error

func (*RedisStreamMQ) SetOauth2Code

func (r *RedisStreamMQ) SetOauth2Code(code string, uin int64) error

存储oauth2_code和uin对应关系 十分钟过期

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳