| 
									
										
										
										
											2024-10-02 00:57:17 +08:00
										 |  |  | package config | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"github.com/zeromicro/go-zero/core/stores/cache" | 
					
						
							|  |  |  | 	"github.com/zeromicro/go-zero/zrpc" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Config struct { | 
					
						
							|  |  |  | 	zrpc.RpcServerConf | 
					
						
							|  |  |  | 	DataSource string          // 数据库连接的 DSN 字符串 | 
					
						
							|  |  |  | 	CacheRedis cache.CacheConf // 缓存配置,使用 go-zero 自带的缓存配置结构体 | 
					
						
							| 
									
										
										
										
											2024-10-15 00:23:07 +08:00
										 |  |  | 	Alipay     AlipayConfig | 
					
						
							|  |  |  | 	TopUp      TopUpConfig | 
					
						
							| 
									
										
										
										
											2024-10-15 17:19:23 +08:00
										 |  |  | 	UserRpc    zrpc.RpcClientConf | 
					
						
							| 
									
										
										
										
											2024-10-15 00:23:07 +08:00
										 |  |  | } | 
					
						
							|  |  |  | type AlipayConfig struct { | 
					
						
							|  |  |  | 	AppID           string | 
					
						
							|  |  |  | 	PrivateKey      string | 
					
						
							|  |  |  | 	AlipayPublicKey string | 
					
						
							|  |  |  | 	IsProduction    bool | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | type TopUpConfig struct { | 
					
						
							|  |  |  | 	MaxTopUpAmount int64 | 
					
						
							| 
									
										
										
										
											2024-10-15 17:19:23 +08:00
										 |  |  | 	Subject        string | 
					
						
							|  |  |  | 	NotifyURL      string | 
					
						
							|  |  |  | 	ReturnURL      string | 
					
						
							| 
									
										
										
										
											2024-10-02 00:57:17 +08:00
										 |  |  | } |