Documentation
¶
Index ¶
- Variables
- func NewChatClient(host string, sSetting sfx.SecuritySettingsParams) (pb.ChatServiceClient, error)
- func NewChatPrivateClient(host string, sSetting sfx.SecuritySettingsParams) (pb.ChatPrivateServiceClient, error)
- type ChatClientParams
- type ChatClientResult
- type ChatPrivateClientParams
- type ChatPrivateClientResult
- type ChatSettingParams
- type ChatSettingResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ChatClientModule = fx.Provide( func( setting ChatSettingParams, sSetting sfx.SecuritySettingsParams, ) (out ChatClientResult, err error) { if cli, e := NewChatClient(setting.ChatUrl, sSetting); e != nil { err = e } else { out.ChatClient = cli } return }, )
View Source
var ChatPrivateClientModule = fx.Provide( func( setting ChatSettingParams, sSetting sfx.SecuritySettingsParams, ) (out ChatPrivateClientResult, err error) { if cli, e := NewChatPrivateClient(setting.ChatUrl, sSetting); e != nil { err = e } else { out.ChatClient = cli } return }, )
View Source
var ChatSettingsModule = fx.Provide( func() (out ChatSettingResult, err error) { err = out.LoadFromEnv() return }, )
Functions ¶
func NewChatClient ¶
func NewChatClient(host string, sSetting sfx.SecuritySettingsParams) (pb.ChatServiceClient, error)
func NewChatPrivateClient ¶
func NewChatPrivateClient(host string, sSetting sfx.SecuritySettingsParams) (pb.ChatPrivateServiceClient, error)
Types ¶
type ChatClientParams ¶
type ChatClientParams struct { fx.In ChatClient pb.ChatServiceClient `name:"ChatClient"` }
type ChatClientResult ¶
type ChatClientResult struct { fx.Out ChatClient pb.ChatServiceClient `name:"ChatClient"` }
type ChatPrivateClientParams ¶
type ChatPrivateClientParams struct { fx.In ChatClient pb.ChatPrivateServiceClient `name:"ChatPrivateClient"` }
type ChatPrivateClientResult ¶
type ChatPrivateClientResult struct { fx.Out ChatClient pb.ChatPrivateServiceClient `name:"ChatPrivateClient"` }
type ChatSettingParams ¶
type ChatSettingResult ¶
type ChatSettingResult struct { fx.Out Name string `name:"ChatName" envconfig:"CHAT_NAME" default:"chat"` ChatUrl string `name:"ChatUrl" envconfig:"CHAT_URL" default:"localhost:8081"` ChatInterval int `name:"ChatInterval" envconfig:"WORLD_CHAT_INTERVAL" default:"2"` }
func (*ChatSettingResult) LoadFromEnv ¶
func (l *ChatSettingResult) LoadFromEnv() (err error)
Click to show internal directories.
Click to hide internal directories.