provider

package
v2.3.0-beta37 Latest Latest
Warning

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

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

Documentation

Overview

Package provider provides functionality for the keploy provider.\

Index

Constants

This section is empty.

Variables

View Source
var CustomHelpTemplate = `` /* 375-byte string literal not displayed */
View Source
var DockerConfig = DockerConfigStruct{
	DockerImage: "ghcr.io/keploy/keploy",
}
View Source
var ExampleOneClickInstall = `` /* 741-byte string literal not displayed */
View Source
var Examples = `` /* 1183-byte string literal not displayed */
View Source
var IsConfigFileFound = true
View Source
View Source
var RootCustomHelpTemplate = `` /* 712-byte string literal not displayed */
View Source
var RootExamples = `` /* 379-byte string literal not displayed */
View Source
var TeleGlobalMap = make(map[string]interface{})
View Source
var VersionTemplate = `{{with .Version}}{{printf "Keploy %s" .}}{{end}}{{"\n"}}`
View Source
var WithoutexampleOneClickInstall = `
Note: If installed keploy without One Click Install, use "keploy example --customSetup true"
`

Functions

func GenerateDockerEnvs

func GenerateDockerEnvs(config DockerConfigStruct) string

func Get

func Get(ctx context.Context, cmd string, cfg *config.Config, logger *zap.Logger, tel *telemetry.Telemetry, auth service.Auth) (interface{}, error)

func LogExample

func LogExample(example string) string
func PrintLogo(disableANSI bool)

func RunInDocker

func RunInDocker(ctx context.Context, logger *zap.Logger) error

func StartInDocker

func StartInDocker(ctx context.Context, logger *zap.Logger, conf *config.Config) error

StartInDocker will check if the docker command is provided as an input then start the Keploy as a docker container and run the command should also return a boolean if the execution is moved to docker

Types

type CmdConfigurator

type CmdConfigurator struct {
	// contains filtered or unexported fields
}

func NewCmdConfigurator

func NewCmdConfigurator(logger *zap.Logger, config *config.Config) *CmdConfigurator

func (*CmdConfigurator) AddFlags

func (c *CmdConfigurator) AddFlags(cmd *cobra.Command) error

func (*CmdConfigurator) AddUncommonFlags

func (c *CmdConfigurator) AddUncommonFlags(cmd *cobra.Command)

func (*CmdConfigurator) CreateConfigFile

func (c *CmdConfigurator) CreateConfigFile(ctx context.Context, defaultCfg config.Config) error

func (*CmdConfigurator) PreProcessFlags

func (c *CmdConfigurator) PreProcessFlags(cmd *cobra.Command) error

func (*CmdConfigurator) UpdateConfigData

func (c *CmdConfigurator) UpdateConfigData(defaultCfg config.Config) config.Config

func (*CmdConfigurator) Validate

func (c *CmdConfigurator) Validate(ctx context.Context, cmd *cobra.Command) error

func (*CmdConfigurator) ValidateFlags

func (c *CmdConfigurator) ValidateFlags(ctx context.Context, cmd *cobra.Command) error

type CommonInternalService

type CommonInternalService struct {
	Instrumentation *core.Core
	// contains filtered or unexported fields
}

func GetCommonServices

func GetCommonServices(_ context.Context, c *config.Config, logger *zap.Logger) (*CommonInternalService, error)

type DockerConfigStruct

type DockerConfigStruct struct {
	DockerImage string
	Envs        map[string]string
}

type ServiceProvider

type ServiceProvider struct {
	// contains filtered or unexported fields
}

func NewServiceProvider

func NewServiceProvider(logger *zap.Logger, cfg *config.Config, auth service.Auth) *ServiceProvider

func (*ServiceProvider) GetService

func (n *ServiceProvider) GetService(ctx context.Context, cmd string) (interface{}, error)

Jump to

Keyboard shortcuts

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