app

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(opts CliOpts) *App

func (*App) Start

func (a *App) Start(ctx context.Context) error

type AppConfig

type AppConfig struct {
	Server struct {
		Host string       `yaml:"host"`
		Port string       `yaml:"port"`
		Tls  AppConfigTls `yaml:"tls"`
	} `yaml:"server"`

	Database struct {
		Host string `yaml:"host"`
		Port string `yaml:"port"`
		User string `yaml:"user"`
		Pass string `yaml:"pass"`
		Name string `yaml:"name"`
	} `yaml:"database"`

	Coin struct {
		Xmr struct {
			Daemon AppConfigDaemon `yaml:"daemon"`
		} `yaml:"xmr"`
		Btc struct {
			Daemon AppConfigDaemon `yaml:"daemon"`
		} `yaml:"btc"`
		Ltc struct {
			Daemon AppConfigDaemon `yaml:"daemon"`
		} `yaml:"ltc"`
		Eth struct {
			Daemon AppConfigDaemon `yaml:"daemon"`
		} `yaml:"eth"`
		Bnb struct {
			Daemon AppConfigDaemon `yaml:"daemon"`
		} `yaml:"bnb"`
	} `yaml:"coin"`
}

func NewAppConfig

func NewAppConfig(path string) (*AppConfig, error)

type AppConfigDaemon

type AppConfigDaemon struct {
	Url  string `yaml:"url"`
	User string `yaml:"user"`
	Pass string `yaml:"pass"`
}

type AppConfigTls added in v0.4.0

type AppConfigTls struct {
	Mode string `yaml:"mode"`
	Ca   string `yaml:"ca"`
	Cert string `yaml:"cert"`
	Key  string `yaml:"key"`
}

type CliOpts added in v0.4.0

type CliOpts struct {
	ConfigPath        string
	ClientCAPaths     string
	ReflectionEnabled bool
}

type MetadataInterceptor added in v0.4.0

type MetadataInterceptor struct {
	// contains filtered or unexported fields
}

func NewMetadataInterceptor added in v0.4.0

func NewMetadataInterceptor(log *zerolog.Logger) *MetadataInterceptor

func (*MetadataInterceptor) Intercepte added in v0.4.0

func (i *MetadataInterceptor) Intercepte(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)

type RequestLoggingInterceptor

type RequestLoggingInterceptor struct {
	// contains filtered or unexported fields
}

func NewRequestLoggingInterceptor

func NewRequestLoggingInterceptor(log *zerolog.Logger) *RequestLoggingInterceptor

func (*RequestLoggingInterceptor) Intercepte

func (i *RequestLoggingInterceptor) Intercepte(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)

type TlsMode added in v0.4.0

type TlsMode string
const (
	NONE_TLS_MODE TlsMode = "none"
	TLS_TLS_MODE  TlsMode = "tls"
	MTLS_TLS_MODE TlsMode = "mtls"
)

Jump to

Keyboard shortcuts

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