Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Remove secrets-config wrapper for snap options #85

Merged
merged 2 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ type configOptions map[string]interface{}
type appOptions struct {
Config *configOptions `json:"config"`
Autostart *bool `json:"autostart"`
// custom app options
Proxy *proxyOptions `json:"proxy"`
}

type snapOptions struct {
Expand Down Expand Up @@ -84,30 +82,6 @@ func (cp *configProcessor) processGlobalConfigOptions(services []string) error {
return nil
}

// Process the "apps.<app>.<custom.option>" where <custom.option> is not "config"
func ProcessAppCustomOptions(service string) error {
var options snapOptions

// get the 'apps' json structure
jsonString, err := snapctl.Get("apps").Document().Run()
if err != nil {
return err
}
err = json.Unmarshal([]byte(jsonString), &options)
if err != nil {
return err
}

log.Debugf("Processing custom options for service: %s", service)

switch service {
case "secrets-config":
return processSecretsConfigOptions(options.Apps[service])
}

return nil
}

func validateAppConfigOptions(appConfigOptions map[string]appOptions, expectedServices []string) error {
// make sure that set services in options are one of the expected services
expected := make(map[string]bool)
Expand Down
304 changes: 0 additions & 304 deletions options/secrets-config.go

This file was deleted.