Inital commit: skeleton of runner logic
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.ohea.xyz/golang/config"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
ServerUrl string
|
||||
Id string
|
||||
Secret string
|
||||
Tags []string
|
||||
}
|
||||
|
||||
func GetConfig() (config.Config[Config], bool, error) {
|
||||
configData := config.Config[Config]{
|
||||
Name: "cursorius",
|
||||
Filename: "runner",
|
||||
Config: Config{
|
||||
ServerUrl: "FILL IN",
|
||||
Id: "FILL IN",
|
||||
Secret: "FILL IN",
|
||||
Tags: []string{},
|
||||
},
|
||||
}
|
||||
|
||||
isNew, err := configData.Get()
|
||||
if err != nil {
|
||||
return configData, false, fmt.Errorf("Could not read config file: %v", err)
|
||||
}
|
||||
return configData, isNew, nil
|
||||
}
|
||||
Reference in New Issue
Block a user