validator

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string `koanf:"host" json:"host" envconfig:"host"`
	Port int    `koanf:"port" json:"port" envconfig:"port"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ValidationErrors

type ValidationErrors struct {
	NotValid bool
	Errors   []*pb.ValidationError
}

func (*ValidationErrors) Error

func (ve *ValidationErrors) Error() string

type ValidatorClient

type ValidatorClient interface {
	SendAverages(ctx context.Context, averages []*pb.AverageOutput) error
	Close() error
}

func New

func New(ctx context.Context, cfg *Config, log *slog.Logger) (ValidatorClient, error)

Jump to

Keyboard shortcuts

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