Documentation
¶
Overview ¶
Package examples 提供示例代码
Index ¶
- func CloudStorageDriverExample()
- func DistributedWorkerExample()
- func LocalStorageExample()
- func MonitorQueueExample()
- func OrderProducerExample()
- func QueueEventIntegrationExample()
- func QueueExample()
- func QueueMiddlewareExample()
- func RedisQueueExample()
- func StorageExample()
- func WebSocketExample()
- type Config
- type User
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudStorageDriverExample ¶
func CloudStorageDriverExample()
CloudStorageDriverExample 展示云存储的基本用法
func QueueEventIntegrationExample ¶
func QueueEventIntegrationExample()
QueueEventIntegrationExample 展示队列与事件系统集成
Types ¶
type Config ¶
type Config struct {
GithubClientID string
GithubClientSecret string
GoogleClientID string
GoogleClientSecret string
WeChatAppID string
WeChatAppSecret string
BaseURL string
}
应用程序配置
type User ¶
type User struct {
ID int64
Name string
Email string
Avatar string
Provider string
SocialID string
}
User 代表应用程序中的用户模型
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository 实现了UserRepository接口
func (*UserRepository) CreateUser ¶
func (r *UserRepository) CreateUser(ctx context.Context, user interface{}) error
CreateUser 创建新用户
func (*UserRepository) FindUserBySocialID ¶
func (r *UserRepository) FindUserBySocialID(ctx context.Context, provider, socialID string) (interface{}, error)
FindUserBySocialID 通过社交平台ID查找用户
Source Files
¶
Click to show internal directories.
Click to hide internal directories.