config

package
v0.0.0-...-5abfebf Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	CertFile string // CertFile is the path to the certificate file used to validate the JWT token.
}

Authentication represents the configuration for authentication.

type Certificate

type Certificate struct {
	Status   bool   // Status indicates whether TLS is enabled.
	CertFile string // CertFile is the path to the certificate file.
	KeyFile  string // KeyFile is the path to the key file.
	CaFile   string // CaFile is the path to the CA file.
}

Certificate represents the TLS certificate configuration.

type Config

type Config struct {
	Servers   Servers   // Servers contains the configuration for various servers.
	Datastore Datastore // Datastore contains the configuration for the database.
}

Config represents the overall configuration for the application.

func GetInstance

func GetInstance() *Config

GetInstance returns the configuration.

type Datastore

type Datastore struct {
	Host     string // Host is the hostname or IP address of the database server.
	Port     int    // Port is the port number on which the database server listens.
	Database string // Database is the name of the database.
	Username string // Username is the username for the database connection.
	Password string // Password is the password for the database connection.
}

Datastore represents the configuration for the database connection.

type GrpcServer

type GrpcServer struct {
	Status        bool        // Status indicates whether gRPC is enabled.
	Host          string      // Host is the hostname or IP address of the gRPC server.
	Port          int         // Port is the port number on which the gRPC server listens.
	Certificate   Certificate // Certificate contains the TLS certificate configuration.
	StrictCurves  bool        // StrictCurves indicates whether to enforce strict elliptic curves.
	StrictCiphers bool        // StrictCiphers indicates whether to enforce strict ciphers.
}

GrpcServer represents the configuration for a gRPC server.

type MetricServer

type MetricServer struct {
	Status      bool        // Status indicates whether metrics are enabled.
	Host        string      // Host is the hostname or IP address of the metric server.
	Port        int         // Port is the port number on which the metric server listens.
	Token       string      // Token is the authentication token for the metric server.
	Certificate Certificate // Certificate contains the TLS certificate configuration.
}

MetricServer represents the configuration for a metric server.

type RestServer

type RestServer struct {
	Status         bool           // Status indicates whether REST is enabled.
	Host           string         // Host is the hostname or IP address of the REST server.
	Port           int            // Port is the port number on which the REST server listens.
	Certificate    Certificate    // Certificate contains the TLS certificate configuration.
	StrictCurves   bool           // StrictCurves indicates whether to enforce strict elliptic curves.
	StrictCiphers  bool           // StrictCiphers indicates whether to enforce strict ciphers.
	Authentication Authentication // Authentication contains the configuration for authentication.
}

RestServer represents the configuration for a REST server.

type Servers

type Servers struct {
	Grpc   GrpcServer   // Grpc contains the configuration for the gRPC server.
	Metric MetricServer // Metric contains the configuration for the metric server.
	Rest   RestServer   // Rest contains the configuration for the REST server.
}

Servers represents the configuration for various servers.

Jump to

Keyboard shortcuts

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