cc

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogLevel added in v0.8.3

func GetLogLevel() zerolog.Level

Types

type CC

type CC struct {
	Context   context.Context
	Config    *config.Config
	Log       *zerolog.Logger
	UI        *clui.UI
	Retriever retriever.Retriever
	// contains filtered or unexported fields
}

CC contains dependencies that are cross cutting and are needed in most of the providers that make up this application

func BuildCC added in v0.8.2

func BuildCC(logOutput logger.Writer, errorOutput logger.ErrWriter, output io.Writer, cfg *logger.Config) (*CC, error)

func BuildTestCC added in v0.8.2

func BuildTestCC(ctrl *gomock.Controller, cfg *logger.Config) (*CC, error)

func (*CC) AddProvider

func (c *CC) AddProvider(prov provider.Provider) error

AddProvider to the context

func (*CC) ConnectRetriever

func (c *CC) ConnectRetriever() error

func (*CC) Dispose

func (c *CC) Dispose()

Dispose all the resources. This can be called any number of times

func (*CC) GetLatestVersion

func (c *CC) GetLatestVersion(pluginName string) (string, error)

func (*CC) GetProvider

func (c *CC) GetProvider(name string) provider.Provider

GetProvider with the given name

func (*CC) GetProviders

func (c *CC) GetProviders() map[string]provider.Provider

func (*CC) GetRemotePluginsInfo

func (c *CC) GetRemotePluginsInfo() (map[string]map[string][]string, error)

func (*CC) LoadConfig

func (c *CC) LoadConfig(path string) error

LoadConfig loads the plugin and logger config from a configuration file

func (*CC) LoadProviders

func (c *CC) LoadProviders() error

func (*CC) ProviderExists

func (c *CC) ProviderExists(name string) bool

ProviderExists returns true if the provider has already been added to the context

func (*CC) SetLogger

func (c *CC) SetLogger(w io.Writer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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