ptfx

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PartyClientModule = fx.Provide(
	func(
		setting PartySettingParams,
		sSetting sfx.SecuritySettingsParams,
	) (out PartyClientResult, err error) {
		if cli, e := NewPartyClient(setting.PartyUrl, sSetting); e != nil {
			err = e
		} else {
			out.PartyClient = cli
		}
		return
	},
)
View Source
var PartySettingsModule = fx.Provide(
	func() (out PartySettingResult, err error) {
		err = out.LoadFromEnv()
		return
	},
)

Functions

func NewPartyClient

func NewPartyClient(host string, sSetting sfx.SecuritySettingsParams) (pb.PartyServiceClient, error)

Types

type PartyClientParams

type PartyClientParams struct {
	fx.In

	PartyClient pb.PartyServiceClient `name:"PartyClient"`
}

type PartyClientResult

type PartyClientResult struct {
	fx.Out

	PartyClient pb.PartyServiceClient `name:"PartyClient"`
}

type PartySettingParams

type PartySettingParams struct {
	fx.In
	Name     string `name:"PartyName"`
	PartyUrl string `name:"PartyUrl"`
}

type PartySettingResult

type PartySettingResult struct {
	fx.Out
	Name     string `name:"PartyName" envconfig:"PARTY_NAME" default:"party"`
	PartyUrl string `name:"PartyUrl" envconfig:"PARTY_URL" default:"localhost:8081"`
}

func (*PartySettingResult) LoadFromEnv

func (l *PartySettingResult) LoadFromEnv() (err error)

Jump to

Keyboard shortcuts

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