fileconfig

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Provider is the database provider name
	Provider = "provider"
	// BindingType is the database binding type e.g. mongodb, postgresql
	BindingType = "type"
)

Variables

This section is empty.

Functions

func GetBindingRootDirectory

func GetBindingRootDirectory() string

GetBindingRootDirectory returns the root directory where service binding operator will save the config files

Types

type BindingFileReader

type BindingFileReader struct {
	ReadDir  func(filename string) ([]fs.FileInfo, error)
	ReadFile func(filename string) ([]byte, error)
	Stat     func(fileanme string) (fs.FileInfo, error)
}

BindingFileReader read the file config

func NewBindingReader

func NewBindingReader() *BindingFileReader

NewBindingReader creates and returns and NewBindingReader object

func (*BindingFileReader) ReadServiceBindingConfig

func (bfr *BindingFileReader) ReadServiceBindingConfig() ([]ServiceBinding, error)

ReadServiceBindingConfig reads binding config files and converts them into a list of ServiceBinding objects

type ServiceBinding

type ServiceBinding struct {
	Name        string
	Provider    string
	Properties  map[string]string
	BindingType string
}

ServiceBinding type is the data structure for bound config file

Jump to

Keyboard shortcuts

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