conf

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPlatformPath

func BuildPlatformPath(path string) string

BuildPlatformPath returns platform path.

func GetActiveRepositoriesConfigData

func GetActiveRepositoriesConfigData() ([]map[string]interface{}, error)

GetActiveRepositoriesConfigData returns active repositories config.

func GetAppConfig

func GetAppConfig() *model.AppConfig

GetAppConfig gets app config model.

func GetAppConfigData

func GetAppConfigData() (map[string]interface{}, error)

GetAppConfigData returns app config data.

func GetAppConfigField

func GetAppConfigField(section string, field string) reflect.Value

GetAppConfigField returns app config field.

func GetApplicationName

func GetApplicationName() string

GetApplicationName returns application name.

func GetBlockedRepositoriesConfigData

func GetBlockedRepositoriesConfigData() ([]map[string]interface{}, error)

GetBlockedRepositoriesConfigData returns blocked repositories config.

func GetPlatformByUUID

func GetPlatformByUUID(UUID string) *model.PlatformConfig

GetPlatformByUUID returns platform config by platform UUID.

func GetPlatformsConfig

func GetPlatformsConfig() []model.PlatformConfig

GetPlatformsConfig gets platforms config.

func GetPlatformsConfigData

func GetPlatformsConfigData() ([]map[string]interface{}, error)

GetPlatformsConfigData returns platform config data.

func GetRepositoriesConfig

func GetRepositoriesConfig() []model.RepositoryConfig

GetRepositoriesConfig returns repositories config.

func GetRepositoriesConfigData

func GetRepositoriesConfigData() ([]map[string]interface{}, error)

GetRepositoriesConfigData returns repositories config data.

func GetRepositoryByUUID

func GetRepositoryByUUID(UUID string) *model.RepositoryConfig

GetRepositoryByUUID returns repository config by repository UUID.

func GetRepositoryDestinationRepositoryName

func GetRepositoryDestinationRepositoryName(repoConfig *model.RepositoryConfig) string

GetRepositoryDestinationRepositoryName parses destination repository name.

func GetRepositorySourceRepositoryName

func GetRepositorySourceRepositoryName(repoConfig *model.RepositoryConfig) string

GetRepositorySourceRepositoryName parses source repository name.

func Init

func Init(application string)

Init sets application name.

func Load

func Load(path string, v interface{}) error

Load gets config file.

func LoadWith

func LoadWith(path string, v interface{}, um UnmarshalFunc) error

LoadWith gets file.

func Save

func Save(path string, v interface{}) error

Save stores file.

func SaveAppConfig

func SaveAppConfig(appConfig *model.AppConfig) error

SaveAppConfig stores app config.

func SavePlatformsConfig

func SavePlatformsConfig(platforms []model.PlatformConfig) error

SavePlatformsConfig stores platform config.

func SaveRepositoriesConfig

func SaveRepositoriesConfig(repositories []model.RepositoryConfig) error

SaveRepositoriesConfig stores repositories config.

func SaveWith

func SaveWith(path string, v interface{}, m MarshalFunc) error

SaveWith stores file.

Types

type MarshalFunc

type MarshalFunc func(v interface{}) ([]byte, error)

MarshalFunc returns bytes array.

type UnmarshalFunc

type UnmarshalFunc func(data []byte, v interface{}) error

UnmarshalFunc gets bytes array.

Jump to

Keyboard shortcuts

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