cmd

package
v0.0.0-...-5785f03 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "symphony-api",
	Short: "Symphony API",
	Long: `
	
	S Y M P H O N Y
	
	`,
	Run: func(cmd *cobra.Command, args []string) {
		jsonFile, err := os.Open(configFile)
		if err != nil {
			fmt.Println(err)
			return
		}
		defer jsonFile.Close()
		bytes, err := ioutil.ReadAll(jsonFile)
		if err != nil {
			fmt.Println(err)
			return
		}
		config := host.HostConfig{}
		err = json.Unmarshal(bytes, &config)
		if err != nil {
			fmt.Println(err)
			return
		}
		starHost := host.APIHost{}
		err = starHost.Launch(config, []vf.IVendorFactory{
			svf.SymphonyVendorFactory{},
		}, []mf.IManagerFactroy{
			&mu.SymphonyManagerFactory{},
		}, []pf.IProviderFactory{
			spf.SymphonyProviderFactory{},
		}, true)
		if err != nil {
			fmt.Println(err)
			return
		}
	},
}

Functions

func Execute

func Execute(versiong string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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