config

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OAM Metadata constants
	OAMAdapterNameMetadataKey       = "adapter.meshery.io/name"
	OAMComponentCategoryMetadataKey = "ui.meshery.io/category"
)
View Source
const (
	// ErrEmptyConfigCode represents the error when the configuration is either empty
	// or is invalid
	ErrEmptyConfigCode = "1022"

	// ErrGetLatestReleasesCode represents the error which occurs during the process of getting
	// latest releases
	ErrGetLatestReleasesCode = "1023"

	// ErrGetLatestReleaseNamesCode represents the error which occurs during the process of extracting
	// release names
	ErrGetLatestReleaseNamesCode = "1024"

	ErrGetManifestNamesCode = "1025"
)

Variables

View Source
var (
	ServerDefaults = map[string]string{
		"name":     smp.ServiceMesh_OPEN_SERVICE_MESH.Enum().String(),
		"type":     "adapter",
		"port":     "10009",
		"traceurl": status.None,
	}

	MeshSpecDefaults = map[string]string{
		"name":    smp.ServiceMesh_OPEN_SERVICE_MESH.Enum().String(),
		"status":  status.NotInstalled,
		"version": status.None,
	}

	ProviderConfigDefaults = map[string]string{
		configprovider.FilePath: configRootPath,
		configprovider.FileType: "yaml",
		configprovider.FileName: "osm",
	}

	KubeConfigDefaults = map[string]string{
		configprovider.FilePath: configRootPath,
		configprovider.FileType: "yaml",
		configprovider.FileName: "kubeconfig",
	}

	OperationsDefaults = getOperations(common.Operations)
)
View Source
var (
	OSMOperation          = strings.ToLower(smp.ServiceMesh_OPEN_SERVICE_MESH.Enum().String())
	OSMBookStoreOperation = "osm_bookstore_app"
	ServiceName           = "service_name"
)
View Source
var (
	// ErrEmptyConfig error is the error when config is invalid
	ErrEmptyConfig = errors.New(ErrEmptyConfigCode, errors.Alert, []string{"Config is empty"}, []string{}, []string{}, []string{})
)

Functions

func ErrGetLatestReleaseNames added in v0.5.6

func ErrGetLatestReleaseNames(err error) error

ErrGetLatestReleaseNames is the error for fetching nsm-mesh releases

func ErrGetLatestReleases added in v0.5.6

func ErrGetLatestReleases(err error) error

ErrGetLatestReleases is the error for fetching nsm-mesh releases

func ErrGetManifestNames added in v0.5.12

func ErrGetManifestNames(err error) error

ErrGetManifestNames is the error for fetching consul manifest names

func GetFileNames added in v0.5.12

func GetFileNames(owner string, repo string, path string) ([]string, error)

GetFileNames takes the url of a github repo and the path to a directory. Then returns all the filenames from that directory

func New

func New(provider string) (h config.Handler, err error)

func NewKubeconfigBuilder

func NewKubeconfigBuilder(provider string) (config.Handler, error)

func RootPath

func RootPath() string

RootPath returns the root config path

Types

type Asset added in v0.5.6

type Asset struct {
	Name        string `json:"name,omitempty"`
	State       string `json:"state,omitempty"`
	DownloadURL string `json:"browser_download_url,omitempty"`
}

Asset describes the github release asset object

type Release added in v0.5.6

type Release struct {
	ID      int             `json:"id,omitempty"`
	TagName string          `json:"tag_name,omitempty"`
	Name    adapter.Version `json:"name,omitempty"`
	Draft   bool            `json:"draft,omitempty"`
	Assets  []*Asset        `json:"assets,omitempty"`
}

Release is used to save the release informations

Jump to

Keyboard shortcuts

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