configuration

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package configuration implements configuration service required by the edge-cluster service

Package configuration implements configuration service required by the edge-cluster service

Package configuration implements configuration service required by the edge-cluster service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnknownError

func IsUnknownError(err error) bool

IsUnknownError indicates whether the error is of type UnknownError

func NewUnknownError

func NewUnknownError(message string) error

NewUnknownError creates a new UnknownError error

func NewUnknownErrorWithError

func NewUnknownErrorWithError(message string, err error) error

NewUnknownErrorWithError creates a new UnknownError error

Types

type ConfigurationContract

type ConfigurationContract interface {
	// GetGrpcHost retrieves gRPC host name
	// Returns the gRPC host name or error if something goes wrong
	GetGrpcHost() (string, error)

	// GetGrpcPort retrieves gRPC port number
	// Returns the gRPC port number or error if something goes wrong
	GetGrpcPort() (int, error)

	// GetHttpsHost retrieves HTTPS host name
	// Returns the HTTPS host name or error if something goes wrong
	GetHttpsHost() (string, error)

	// GetHttpsPort retrieves HTTPS port number
	// Returns the HTTPS port number or error if something goes wrong
	GetHttpsPort() (int, error)

	// GetDatabaseConnectionString retrieves the database connection string
	// Returns the database connection string or error if something goes wrong
	GetDatabaseConnectionString() (string, error)

	// GetDatabaseName retrieves the database name
	// Returns the database name or error if something goes wrong
	GetDatabaseName() (string, error)
}

ConfigurationContract declares the service that provides configuration required by different Tenat modules

func NewEnvConfigurationService

func NewEnvConfigurationService() (ConfigurationContract, error)

NewEnvConfigurationService creates new instance of the EnvConfigurationService, setting up all dependencies and returns the instance Returns the new service or error if something goes wrong

type UnknownError

type UnknownError struct {
	Message string
	Err     error
}

UnknownError indicates that an unknown error has happened

func (UnknownError) Error

func (e UnknownError) Error() string

Error returns message for the UnknownError error type Returns the error nessage

func (UnknownError) Unwrap

func (e UnknownError) Unwrap() error

Unwrap returns the err if provided through NewUnknownErrorWithError function, otherwise returns nil

Directories

Path Synopsis
Package mock_configuration is a generated GoMock package.
Package mock_configuration is a generated GoMock package.

Jump to

Keyboard shortcuts

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