app

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 13 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(pathToConfig string) *App

func (*App) Start

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

type AppConfig

type AppConfig struct {
	Mode AppMode `yaml:"mode"`

	Server struct {
		Host string `yaml:"host"`
		Port string `yaml:"port"`
	} `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"`
	} `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 AppMode

type AppMode string
const (
	DEV_APP_MODE  AppMode = "dev"
	PROD_APP_MODE AppMode = "prod"
)

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)

Jump to

Keyboard shortcuts

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