items

package
v0.0.0-...-7d3e243 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceTypeREST    = ServiceType("rest")
	ServiceTypeGRPC    = ServiceType("grpc")
	ServiceTypeMetrics = ServiceType("metrics")
)

Variables

View Source
var (
	ExitCodeIntervalsNegative            = NewExitCodeIntervalsNegative()
	ExitCodeIntervalsNegativeAndPositive = NewExitCodeIntervalsNegativeAndPositive()
)
View Source
var (
	PathsOptsNothing     = &PathsOpts{}
	PathsOptsRebaseOnCWD = &PathsOpts{
		Base: &empty,
	}
	PathsOptsRebaseOnCWDFallbackOnCWD = &PathsOpts{
		Base:     &empty,
		Fallback: &empty,
	}
	PathsOptsDefault = PathsOptsNothing
)

Functions

This section is empty.

Types

type ClickHouse

type ClickHouse struct {
	// Enabled specifies whether item is enabled
	Enabled bool `mapstructure:"enabled"`
	// Schema specifies schema to use Ex.: https http tcp
	Schema string `mapstructure:"schema"`
	// Username specifies ClickHouse username
	Username string `mapstructure:"username"`
	// Password specifies ClickHouse password
	Password string `mapstructure:"password"`
	// Hostname specifies ClickHouse host
	Hostname string `mapstructure:"hostname"`
	// Port specifies ClickHouse port
	Port int `mapstructure:"port"`
	// Database specifies ClickHouse database
	Database string `mapstructure:"database"`
	// DSN in the form: http://username:password@clickhouse.host:8123/database as a combination of all above
	DSN string `mapstructure:"dsn"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewClickHouse

func NewClickHouse() *ClickHouse

NewClickHouse

func (*ClickHouse) GetDSN

func (c *ClickHouse) GetDSN() string

GetDSN

func (*ClickHouse) GetDatabase

func (c *ClickHouse) GetDatabase() string

GetDatabase

func (*ClickHouse) GetEnabled

func (c *ClickHouse) GetEnabled() bool

GetEnabled

func (*ClickHouse) GetHostname

func (c *ClickHouse) GetHostname() string

GetHostname

func (*ClickHouse) GetPassword

func (c *ClickHouse) GetPassword() string

GetPassword

func (*ClickHouse) GetPort

func (c *ClickHouse) GetPort() int

GetPort

func (*ClickHouse) GetSchema

func (c *ClickHouse) GetSchema() string

GetSchema

func (*ClickHouse) GetUsername

func (c *ClickHouse) GetUsername() string

GetUsername

func (*ClickHouse) String

func (c *ClickHouse) String() string

String

type Command

type Command struct {
	// Enabled specifies whether this command is enabled or not
	Enabled bool `mapstructure:"enabled"`
	// Workdir specifies workdir of the command
	Workdir string `mapstructure:"workdir"`
	// Env specifies ENV vars to use for a command
	Env []string `mapstructure:"env"`
	// Command specifies CLI command to launch
	Command []string `mapstructure:"command"`
	// FailExitCodeIntervals specifies in which exit code intervals command is considered to fail.
	// Allows to tune the exit code treatment and not only check for zero or non-zero value
	FailExitCodeIntervals *ExitCodeIntervals `mapstructure:"failExitCodeIntervals"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewCommand

func NewCommand() *Command

NewCommand is a constructor

func (*Command) ExitCodeReportsFailure

func (c *Command) ExitCodeReportsFailure(code int) bool

ExitCodeReportsFailure checks whether provided exit code reports program failure

func (*Command) ExpandCommand

func (c *Command) ExpandCommand(macro *macros.Expander) []string

ExpandCommand gets slice of strings which represents command with parameters with macros expanded

func (*Command) ExpandCommandLine

func (c *Command) ExpandCommandLine(macro *macros.Expander) string

ExpandCommandLine gets one string of a command with parameters with macros expanded

func (*Command) GetCommand

func (c *Command) GetCommand() []string

GetCommand is a getter

func (*Command) GetCommandLine

func (c *Command) GetCommandLine() string

GetCommandLine returns commdn as a line

func (*Command) GetEnabled

func (c *Command) GetEnabled() bool

GetEnabled is a getter

func (*Command) GetEnv

func (c *Command) GetEnv() []string

GetEnv is a getter

func (*Command) GetWorkdir

func (c *Command) GetWorkdir() string

GetWorkdir is a getter

func (*Command) String

func (c *Command) String() string

String is a stringifier

type Dir

type Dir struct {
	Dir string `mapstructure:"dir"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewDir

func NewDir() *Dir

NewDir is a constructor

func (*Dir) Get

func (f *Dir) Get() string

Get is a getter

func (*Dir) String

func (f *Dir) String() string

String is a stringifier

type DirFile

type DirFile struct {
	Dir     string `mapstructure:"dir"`
	File    string `mapstructure:"file"`
	Pattern string `mapstructure:"pattern"`
}

DirFile specifies file and/or folder with pattern

func NewDirFile

func NewDirFile() *DirFile

NewDirFile is a constructor

func (*DirFile) GetDir

func (i *DirFile) GetDir() string

GetDir is a getter

func (*DirFile) GetFile

func (i *DirFile) GetFile() string

GetFile is a getter

func (*DirFile) GetPattern

func (i *DirFile) GetPattern() string

GetPattern is a getter

func (*DirFile) String

func (i *DirFile) String() string

String is a stringifier

type ExitCodeIntervals

type ExitCodeIntervals struct {
	Negative bool `mapstructure:"negative"`
	Zero     bool `mapstructure:"zero"`
	Positive bool `mapstructure:"positive"`
}

ExitCodeIntervals specifies intervals where command's exit code lays in - negative, zero or positive. It can be used to make decisions on the interval of the exit code.

func NewExitCodeIntervalsNegative

func NewExitCodeIntervalsNegative() *ExitCodeIntervals

NewExitCodeIntervalsNegative creates new negative exit code interval

func NewExitCodeIntervalsNegativeAndPositive

func NewExitCodeIntervalsNegativeAndPositive() *ExitCodeIntervals

NewExitCodeIntervalsNegativeAndPositive creates new negative and positive exit code interval

func (*ExitCodeIntervals) Check

func (c *ExitCodeIntervals) Check(code int) bool

Check compares code with are the intervals specified and returns true in case code is covered by intervals

type File

type File struct {
	File string `mapstructure:"file"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewFile

func NewFile() *File

NewFile is a constructor

func (*File) Get

func (f *File) Get() string

Get is a getter

func (*File) String

func (f *File) String() string

String is a stringifier

type JWT

type JWT struct {
	Audience string      `mapstructure:"audience"`
	Issuer   string      `mapstructure:"issuer"`
	JWKS     *jwks2.JWKS `mapstructure:"jwks"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewJWT

func NewJWT() *JWT

NewJWT is a constructor

func (*JWT) GetAudience

func (o *JWT) GetAudience() string

GetAudience is a getter

func (*JWT) GetIssuer

func (o *JWT) GetIssuer() string

GetIssuer is a getter

func (*JWT) GetJWKS

func (o *JWT) GetJWKS() *jwks2.JWKS

GetJWKS is a getter

func (*JWT) String

func (o *JWT) String() string

String is a stringifier

type Kafka

type Kafka struct {
	Enabled bool `mapstructure:"enabled"`
	// Brokers specifies list of Kafka brokers to connect to. Used by server and client
	Brokers []string `mapstructure:"brokers"`
	// Topic specifies topic to read from or write into in Kafka. Used by server and client
	Topic string `mapstructure:"topic"`
	// GroupID specifies consumer group id. Used by client only
	GroupID string `mapstructure:"groupID"`
	// ReadNewest specifies whether to read newest messages. Used by client only
	ReadNewest bool `mapstructure:"readNewest"`
	// Ack specifies whether to ack messages. Used by client only
	Ack bool `mapstructure:"ack"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewKafka

func NewKafka() *Kafka

NewKafka is a constructor

func (*Kafka) GetAck

func (k *Kafka) GetAck() bool

GetAck is a getter

func (*Kafka) GetBrokers

func (k *Kafka) GetBrokers() []string

GetBrokers is a getter

func (*Kafka) GetGroupID

func (k *Kafka) GetGroupID() string

GetGroupID is a getter

func (*Kafka) GetReadNewest

func (k *Kafka) GetReadNewest() bool

GetReadNewest is a getter

func (*Kafka) GetTopic

func (k *Kafka) GetTopic() string

GetTopic is a getter

func (*Kafka) String

func (k *Kafka) String() string

String is a stringifier

type Log

type Log struct {
	Level     string `mapstructure:"level"`
	Formatter string `mapstructure:"format"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewLog

func NewLog() *Log

NewLog is a constructor

func (*Log) GetFormatter

func (l *Log) GetFormatter() string

GetFormatter is a getter

func (*Log) GetLevel

func (l *Log) GetLevel() string

GetLevel is a getter

func (*Log) String

func (l *Log) String() string

String is a stringifier

type Manticore

type Manticore struct {
	Enabled bool `mapstructure:"enabled"`
	// Hostname specifies ClickHouse host
	Hostname string `mapstructure:"hostname"`
	// Port specifies ClickHouse port
	Port int `mapstructure:"port"`
	// DSN in the form: manticore.host:port as a combination of all above
	DSN string `mapstructure:"dsn"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewManticore

func NewManticore() *Manticore

NewManticore is a constructor

func (*Manticore) GetDSN

func (c *Manticore) GetDSN() string

GetDSN is a getter

func (*Manticore) GetEnabled

func (c *Manticore) GetEnabled() bool

GetEnabled is a getter

func (*Manticore) GetHostname

func (c *Manticore) GetHostname() string

GetHostname is a getter

func (*Manticore) GetPort

func (c *Manticore) GetPort() int

GetPort is a getter

func (*Manticore) String

func (c *Manticore) String() string

String is a stringifier

type MinIO

type MinIO struct {
	Enabled bool `mapstructure:"enabled"`
	// MinIO connection
	Endpoint           string `mapstructure:"endpoint"`
	AccessKeyID        string `mapstructure:"accessKeyID"`
	SecretAccessKey    string `mapstructure:"secretAccessKey"`
	Secure             bool   `mapstructure:"secure"`
	InsecureSkipVerify bool   `mapstructure:"insecureSkipVerify"`
	// MinIO internals
	Bucket           string `mapstructure:"bucket"`
	BucketAutoCreate bool   `mapstructure:"bucketAutoCreate"`
	Region           string `mapstructure:"region"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewMinIO

func NewMinIO() *MinIO

NewMinIO is a constructor

func (*MinIO) GetAccessKeyID

func (m *MinIO) GetAccessKeyID() string

GetAccessKeyID is a getter

func (*MinIO) GetBucket

func (m *MinIO) GetBucket() string

GetBucket is a getter

func (*MinIO) GetBucketAutoCreate

func (m *MinIO) GetBucketAutoCreate() bool

GetBucketAutoCreate is a getter

func (*MinIO) GetEnabled

func (m *MinIO) GetEnabled() bool

GetEnabled is a getter

func (*MinIO) GetEndpoint

func (m *MinIO) GetEndpoint() string

GetEndpoint is a getter

func (*MinIO) GetInsecureSkipVerify

func (m *MinIO) GetInsecureSkipVerify() bool

GetInsecureSkipVerify is a getter

func (*MinIO) GetRegion

func (m *MinIO) GetRegion() string

GetRegion is a getter

func (*MinIO) GetSecretAccessKey

func (m *MinIO) GetSecretAccessKey() string

GetSecretAccessKey is a getter

func (*MinIO) GetSecure

func (m *MinIO) GetSecure() bool

GetSecure is a getter

func (*MinIO) String

func (m *MinIO) String() string

String is a stringifier

type MultiPaths

type MultiPaths map[string][]string

MultiPaths represents map key => multiple paths

func NewMultiPaths

func NewMultiPaths() *MultiPaths

NewMultiPaths creates new MultiPaths

func (*MultiPaths) Get

func (f *MultiPaths) Get(name string, opts ...*PathsOpts) string

Get gets the first path

func (*MultiPaths) GetAll

func (f *MultiPaths) GetAll(name string, opts ...*PathsOpts) []string

GetAll is a getter

func (*MultiPaths) GetFile

func (f *MultiPaths) GetFile(filename, name string, opts ...*PathsOpts) string

GetFile gets a file based on paths

func (*MultiPaths) GetMap

func (f *MultiPaths) GetMap() map[string][]string

GetMap gets as map

func (*MultiPaths) GetNames

func (f *MultiPaths) GetNames() []string

GetNames gets list of names in paths

func (*MultiPaths) String

func (f *MultiPaths) String() string

String is a stringifier

type MySQL

type MySQL struct {
	Enabled bool `mapstructure:"enabled"`
	// Username specifies MySQL username
	Username string `mapstructure:"username"`
	// Password specifies MySQL password
	Password string `mapstructure:"password"`
	// Hostname specifies MySQL host
	Hostname string `mapstructure:"hostname"`
	// Port specifies MySQL port
	Port int `mapstructure:"port"`
	// Database specifies MySQL database
	Database string `mapstructure:"database"`
	// DSN in the form: user:password@tcp(host:3306)/database as a combination of all above
	DSN string `mapstructure:"dsn"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewMySQL

func NewMySQL() *MySQL

NewMySQL is a constructor

func (*MySQL) GetDSN

func (c *MySQL) GetDSN() string

GetDSN is a getter

func (*MySQL) GetDatabase

func (c *MySQL) GetDatabase() string

GetDatabase is a getter

func (*MySQL) GetEnabled

func (c *MySQL) GetEnabled() bool

GetEnabled is a getter

func (*MySQL) GetHostname

func (c *MySQL) GetHostname() string

GetHostname is a getter

func (*MySQL) GetPassword

func (c *MySQL) GetPassword() string

GetPassword is a getter

func (*MySQL) GetPort

func (c *MySQL) GetPort() int

GetPort is a getter

func (*MySQL) GetUsername

func (c *MySQL) GetUsername() string

GetUsername is a getter

func (*MySQL) String

func (c *MySQL) String() string

String is a stringifier

type NamedCommands

type NamedCommands map[string]*Command

NamedCommands is a set named commands. Each command has string name by which it can be accessed. IMPORTANT. IMPORTANT. Do not forget to update String() function IMPORTANT.

func NewNamedCommands

func NewNamedCommands() *NamedCommands

NewNamedCommands creates new named commands

func (*NamedCommands) GetCommand

func (c *NamedCommands) GetCommand(name string) *Command

GetCommand returns command by its name

func (*NamedCommands) GetNames

func (c *NamedCommands) GetNames() []string

GetNames gets list of names in commands

func (*NamedCommands) HasCommand

func (c *NamedCommands) HasCommand(name string) bool

HasCommand checks whether there is a command with specified name

func (*NamedCommands) String

func (c *NamedCommands) String() string

String is a stringifier

type OAuth

type OAuth struct {
	Enabled bool `mapstructure:"enabled"`

	// ClientID is the application's identifier.
	ClientID string `mapstructure:"client-id"`
	// ClientSecret is the application's secret.
	ClientSecret string `mapstructure:"client-secret"`
	// TokenURL is the identity server's token endpoint URL, where to send token request.
	TokenURL string `mapstructure:"token-url"`
	// EndpointParams are additional parameters for requests to the token endpoint.
	// Such as:
	// Unique identifier for the API. This value will be used as the audience parameter on authorization calls.
	//    audience:
	//      - a.b.c
	EndpointParams url.Values `mapstructure:"endpoint-params"`

	RegisterURL        string `mapstructure:"register-url"`
	InitialAccessToken string `mapstructure:"initial-access-token"`

	// JWT section
	JWT *JWT `mapstructure:"jwt"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewOAuth

func NewOAuth() *OAuth

NewOAuth is a condtructor

func (*OAuth) GetClientID

func (o *OAuth) GetClientID() string

GetClientID is a getter

func (*OAuth) GetClientSecret

func (o *OAuth) GetClientSecret() string

GetClientSecret is a getter

func (*OAuth) GetEnabled

func (o *OAuth) GetEnabled() bool

GetEnabled is a getter

func (*OAuth) GetEndpointParams

func (o *OAuth) GetEndpointParams() url.Values

GetEndpointParams is a getter

func (*OAuth) GetInitialAccessToken

func (o *OAuth) GetInitialAccessToken() string

GetInitialAccessToken is a getter

func (*OAuth) GetJWT

func (o *OAuth) GetJWT() *JWT

GetJWT is a getter

func (*OAuth) GetRegisterURL

func (o *OAuth) GetRegisterURL() string

GetRegisterURL is a getter

func (*OAuth) GetTokenURL

func (o *OAuth) GetTokenURL() string

GetTokenURL is a getter

func (*OAuth) String

func (o *OAuth) String() string

String is a stringifier

type OAuthConfigurator

type OAuthConfigurator interface {
	GetEnabled() bool
	GetClientID() string
	GetClientSecret() string
	GetTokenURL() string
	GetEndpointParams() url.Values
	GetRegisterURL() string
	GetInitialAccessToken() string
	GetJWT() *JWT
}

OAuthConfigurator

type OTP

type OTP struct {
	Enabled bool   `mapstructure:"enabled"`
	Server  string `mapstructure:"server"`
	Client  string `mapstructure:"client"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewOTP

func NewOTP() *OTP

NewOTP is a condtructor

func (*OTP) GetClient

func (o *OTP) GetClient() string

GetClient is a getter

func (*OTP) GetEnabled

func (o *OTP) GetEnabled() bool

GetEnabled is a getter

func (*OTP) GetServer

func (o *OTP) GetServer() string

GetServer is a getter

func (*OTP) String

func (o *OTP) String() string

String is a stringifier

type OTPConfigurator

type OTPConfigurator interface {
	GetEnabled() bool
	GetServer() string
	GetClient() string
}

OTPConfigurator - one time password (token) related section of config

type Paths

type Paths map[string]string

Paths represents map key => one path

func NewPaths

func NewPaths() *Paths

NewPaths creates new Paths

func (*Paths) Get

func (f *Paths) Get(name string, opts ...*PathsOpts) string

Get gets the first path

func (*Paths) GetAll

func (f *Paths) GetAll(name string, opts ...*PathsOpts) []string

GetAll is a getter

func (*Paths) GetFile

func (f *Paths) GetFile(filename, name string, opts ...*PathsOpts) string

GetFile gets a file based on paths

func (*Paths) GetMap

func (f *Paths) GetMap() map[string]string

GetMap gets as map

func (*Paths) GetNames

func (f *Paths) GetNames() []string

GetNames gets list of names in paths

func (*Paths) String

func (f *Paths) String() string

String is a stringifier

type PathsConfigurator

type PathsConfigurator interface {
	GetAll(name string, opts ...*PathsOpts) []string
	Get(name string, opts ...*PathsOpts) string
	GetFile(filename, name string, opts ...*PathsOpts) string
}

PathsConfigurator

type PathsOpts

type PathsOpts struct {
	// Base specifies the base on top of which to rebase relative paths.
	// In case base == nil no rebase required
	// In case *base == "" use CWD as a base
	// Otherwise rebase on top of *base, in case path is a relative one
	Base *string
	// Fallback specifies path which to fall back to in case specified paths name not found
	// In case fallback == nil no fallback required
	// In case *fallback == "" use CWD as a fallback
	// Otherwise fallback on *fallback
	Fallback *string
}

PathsOpts specifies paths options, such as base dir for rebase and fallback dir

type PostgreSQL

type PostgreSQL struct {
	Enabled bool `mapstructure:"enabled"`
	// Username specifies PostgreSQL username
	Username string `mapstructure:"username"`
	// Password specifies PostgreSQL password
	Password string `mapstructure:"password"`
	// Hostname specifies PostgreSQL host
	Hostname string `mapstructure:"hostname"`
	// Port specifies PostgreSQL port
	Port int `mapstructure:"port"`
	// Database specifies PostgreSQL database
	Database string `mapstructure:"database"`
	// DSN in the form: postgres://user:password@host:5432/database as a combination of all above
	DSN string `mapstructure:"dsn"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewPostgreSQL

func NewPostgreSQL() *PostgreSQL

NewPostgreSQL is a constructor

func (*PostgreSQL) GetDSN

func (c *PostgreSQL) GetDSN() string

GetDSN is a getter

func (*PostgreSQL) GetDatabase

func (c *PostgreSQL) GetDatabase() string

GetDatabase is a getter

func (*PostgreSQL) GetEnabled

func (c *PostgreSQL) GetEnabled() bool

GetEnabled is a getter

func (*PostgreSQL) GetHostname

func (c *PostgreSQL) GetHostname() string

GetHostname is a getter

func (*PostgreSQL) GetPassword

func (c *PostgreSQL) GetPassword() string

GetPassword is a getter

func (*PostgreSQL) GetPort

func (c *PostgreSQL) GetPort() int

GetPort is a getter

func (*PostgreSQL) GetUsername

func (c *PostgreSQL) GetUsername() string

GetUsername is a getter

func (*PostgreSQL) String

func (c *PostgreSQL) String() string

String is a stringifier

type Service

type Service struct {
	Enabled bool        `mapstructure:"enabled"`
	Name    string      `mapstructure:"name"`
	Type    ServiceType `mapstructure:"type"`
	Address string      `mapstructure:"address"`
	Paths   *MultiPaths `mapstructure:"paths"`
	TLS     *TLS        `mapstructure:"tls"`
	OAuth   *OAuth      `mapstructure:"oauth"`
	OTP     *OTP        `mapstructure:"otp"`
	Backend *Service    `mapstructure:"backend"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewService

func NewService() *Service

NewService creates new Service

func (*Service) GetAddress

func (s *Service) GetAddress() string

GetAddress is a getter

func (*Service) GetBackend

func (s *Service) GetBackend() ServiceConfigurator

GetBackend is a getter

func (*Service) GetEnabled

func (s *Service) GetEnabled() bool

GetEnabled is a getter

func (*Service) GetName

func (s *Service) GetName() string

GetName is a getter

func (*Service) GetOAuth

func (s *Service) GetOAuth() OAuthConfigurator

GetOAuth is a getter

func (*Service) GetOTP

func (s *Service) GetOTP() OTPConfigurator

GetOTP is a getter

func (*Service) GetPaths

func (s *Service) GetPaths() PathsConfigurator

GetPaths is a getter

func (*Service) GetTLS

func (s *Service) GetTLS() TLSConfigurator

GetTLS is a getter

func (*Service) GetType

func (s *Service) GetType() ServiceType

GetType is a getter

func (*Service) String

func (s *Service) String() string

String is a stringifier

type ServiceConfigurator

type ServiceConfigurator interface {
	GetEnabled() bool
	GetName() string
	GetType() ServiceType
	GetAddress() string
	GetPaths() PathsConfigurator
	GetTLS() TLSConfigurator
	GetOAuth() OAuthConfigurator
	GetOTP() OTPConfigurator
	GetBackend() ServiceConfigurator
	fmt.Stringer
}

type ServiceType

type ServiceType string

type ServicesConfigurator

type ServicesConfigurator interface {
	GetList() []ServiceConfigurator
	Len() int
	Get(name string) ServiceConfigurator
	fmt.Stringer
}

type ServicesList

type ServicesList []*Service

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewServicesList

func NewServicesList() *ServicesList

NewServicesList creates new services list

func (*ServicesList) Get

Get gets service

func (*ServicesList) GetList

func (s *ServicesList) GetList() []ServiceConfigurator

GetList return list

func (*ServicesList) Len

func (s *ServicesList) Len() int

Len returns number of entries in the services list

func (*ServicesList) String

func (s *ServicesList) String() string

String is a stringifier

type ServicesMap

type ServicesMap map[string]*Service

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewServicesMap

func NewServicesMap() *ServicesMap

NewServicesMap creates new services map

func (*ServicesMap) Get

func (s *ServicesMap) Get(name string) ServiceConfigurator

Get gets a service

func (*ServicesMap) GetList

func (s *ServicesMap) GetList() []ServiceConfigurator

GetList return list

func (*ServicesMap) Len

func (s *ServicesMap) Len() int

Len returns number of entries in the services list

func (*ServicesMap) String

func (s *ServicesMap) String() string

String is a stringifier

type TLS

type TLS struct {
	Enabled            bool   `mapstructure:"enabled"`
	ServerNameOverride string `mapstructure:"server-name-override"`
	CAFile             string `mapstructure:"ca-file"`
	PrivateKeyFile     string `mapstructure:"private-key-file"`
	PublicCertFile     string `mapstructure:"public-cert-file"`
}

IMPORTANT IMPORTANT Do not forget to update String() function IMPORTANT

func NewTLS

func NewTLS() *TLS

NewTLS creates new TLS

func (*TLS) GetCAFile

func (t *TLS) GetCAFile() string

GetCAFile is a getter

func (*TLS) GetEnabled

func (t *TLS) GetEnabled() bool

GetEnabled is a getter

func (*TLS) GetPrivateKeyFile

func (t *TLS) GetPrivateKeyFile() string

GetPrivateKeyFile is a getter

func (*TLS) GetPublicCertFile

func (t *TLS) GetPublicCertFile() string

GetPublicCertFile is a getter

func (*TLS) GetServerNameOverride

func (t *TLS) GetServerNameOverride() string

GetServerNameOverride is a getter

func (*TLS) HasCAFile

func (t *TLS) HasCAFile() bool

HasCAFile checks whether CAFile is specified

func (*TLS) HasPrivateKeyFile

func (t *TLS) HasPrivateKeyFile() bool

HasPrivateKeyFile checks whether PrivateKeyFile is specified

func (*TLS) HasPublicCertFile

func (t *TLS) HasPublicCertFile() bool

HasPublicCertFile checks whether PublicCertFile is specified

func (*TLS) HasServerNameOverride

func (t *TLS) HasServerNameOverride() bool

HasServerNameOverride checks whether ServerNameOverride is specified

func (*TLS) IsEnabled

func (t *TLS) IsEnabled() bool

IsEnabled checks whether TLS is enabled

func (*TLS) String

func (t *TLS) String() string

String is a stringifier

type TLSConfigurator

type TLSConfigurator interface {
	IsEnabled() bool
	GetEnabled() bool
	HasServerNameOverride() bool
	GetServerNameOverride() string
	HasCAFile() bool
	GetCAFile() string
	HasPrivateKeyFile() bool
	GetPrivateKeyFile() string
	HasPublicCertFile() bool
	GetPublicCertFile() string
}

TLSConfigurator

Jump to

Keyboard shortcuts

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