config

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package config contains logic for reading and parsing of devenv config

Description: This file has logic for reading and parsing local config

Index

Constants

View Source
const (
	ServiceConfigFileName = "service.yaml"
)

Variables

View Source
var DependencyConfigurationFiles = []string{"devenv.yaml", "noncompat-service.yaml"}

Functions

func ReadServiceName

func ReadServiceName(path string) (string, error)

ReadServiceName returns service name from local service config

Types

type Devenv

type Devenv struct {
	// Dependencies are the app dependencies
	Dependencies struct {
		// Optional is a list of OPTIONAL services e.g. the service can run / gracefully function without it running
		Optional []string `yaml:"optional"`

		// Required is a list of services that this service cannot function without
		Required []string `yaml:"required"`
	} `yaml:"dependencies"`
}

Devenv is the configuration of the app for use with the devenv

func ReadLocalDevenv

func ReadLocalDevenv(path string) (*Devenv, error)

ReadLocalDevenv returns DevenvConfig from local filesystem

func ReadRemote

func ReadRemote(ctx context.Context, b *box.Config, repositoryName, version string) (*Devenv, error)

ReadRemote returns DevenvConfig from remote GitHub repository

func (*Devenv) GetAllDependencies added in v1.51.0

func (c *Devenv) GetAllDependencies() []string

getDependencies returns both required and optional dependencies

Jump to

Keyboard shortcuts

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