config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

*

  • Copyright 2021 Napptive *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • https://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

*

  • Copyright 2020 Napptive *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • https://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

*

  • Copyright 2021 Napptive *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • https://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BQConfig

type BQConfig struct {
	// enabled contains a flag to indicate if analytics is enabled or not
	Enabled bool
	// BigQueryConfig contains the configuration to connect to BigQuery
	Config bqconfig.BigQueryConfig
}

func (*BQConfig) IsValid

func (bq *BQConfig) IsValid() error

func (*BQConfig) Print

func (bq *BQConfig) Print()

type CatalogManager

type CatalogManager struct {
	// GRPCPort with the port on which the service will be listening
	GRPCPort int
	// HTTPPort with the port on which the service will be listening for HTTP connections.
	HTTPPort int
	// AdminAPI determines in the administration API is to be launched.
	AdminAPI bool
	// AdminGRPCPort with the port on which the administration interface will be listening.
	AdminGRPCPort int
	// ElasticAddress with the address to connect to Elastic
	ElasticAddress string
	// Index with the name of the elastic index
	Index string
	// RepositoryPath with the path of the repository
	RepositoryPath string
	//CatalogUrl with the url of the repository (napptive repository must be nil)
	CatalogUrl string
}

CatalogManager with the catalog-manager configuration

func (*CatalogManager) IsValid

func (c *CatalogManager) IsValid() error

IsValid checks if the configuration options are valid.

func (*CatalogManager) Print

func (c *CatalogManager) Print()

Print the configuration using the application logger.

type Config

type Config struct {
	// CatalogManager with all the config parameters related to catalog-manager component
	CatalogManager
	// JWTConfig with the JWT specific configuration.
	JWTConfig
	// TeamConfig with the team configuration (repos and users)
	TeamConfig
	// BQConfig contains the configuration to connect to BigQuery
	BQConfig
	// TLS configuration
	TLSConfig
	// Version of the application.
	Version string
	// Commit related to this built.
	Commit string
	// Debug flag.
	Debug bool
}

Config structure with all the options required by the service and service components.

func (*Config) IsValid

func (c *Config) IsValid() error

IsValid checks if the configuration options are valid.

func (*Config) Print

func (c *Config) Print()

Print the configuration using the application logger.

type JWTConfig

type JWTConfig struct {
	// AuthEnabled is a flag indicating
	AuthEnabled bool
	// JWTConfig with the JWT specific configuration.
	nwjtConfig.JWTConfig
}

JWTConfig struct with njwt configuration

func (*JWTConfig) IsValid

func (c *JWTConfig) IsValid() error

IsValid checks if the configuration options are valid.

func (*JWTConfig) Print

func (c *JWTConfig) Print() error

IsValid checks if the configuration options are valid.

type TLSConfig

type TLSConfig struct {
	// LaunchSecureService determines if the gRPC service with TLS enabled must be launched.
	LaunchSecureService bool
	// CertificatePath with the path of the server certificate.
	CertificatePath string
	// PrivateKeyPath with the path of the private key associated with the certificate.
	PrivateKeyPath string
}

TLSConfig configuration of the service.

func (*TLSConfig) IsValid

func (t *TLSConfig) IsValid() error

IsValid checks if the configuration options are valid.

func (*TLSConfig) Print

func (t *TLSConfig) Print()

Print the configuration using the application logger.

type TeamConfig

type TeamConfig struct {
	Enabled         bool
	PrivilegedUsers []string
	TeamNamespaces  []string
}

TeamConfig with the configuration related to the priviledged team access.

func NewTeamConfig

func NewTeamConfig(enabled bool, users string, repositories string) TeamConfig

func (*TeamConfig) IsValid

func (t *TeamConfig) IsValid() error

func (*TeamConfig) Print

func (t *TeamConfig) Print()

type UserSQL

type UserSQL struct {
	// ConnStr with the connection string to connect to database
	ConnStr string
}

UserSQL contains all the configuration to connect to database

Jump to

Keyboard shortcuts

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