Documentation ¶
Overview ¶
Package profile contains profile related code
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalProfileConfigMap ¶
func SetGlobalProfileConfigMap(configMap ProfileConfigMap)
SetGlobalProfileConfigMap sets global globalProfileConfigMap
Types ¶
type ProfileConfig ¶
type ProfileConfig struct { DefinitionFile string `yaml:"definition_file"` Definition profiledefinition.ProfileDefinition `yaml:"definition"` IsUserProfile bool `yaml:"-"` }
ProfileConfig represents a profile configuration.
type ProfileConfigMap ¶
type ProfileConfigMap map[string]ProfileConfig
ProfileConfigMap is a set of ProfileConfig instances each identified by name.
func GetGlobalProfileConfigMap ¶
func GetGlobalProfileConfigMap() ProfileConfigMap
GetGlobalProfileConfigMap gets global globalProfileConfigMap
type Provider ¶
type Provider interface { // HasProfile returns true if and only if we have a profile by this name. HasProfile(profileName string) bool // GetProfile returns the profile with this name, or nil if there isn't one. GetProfile(profileName string) *ProfileConfig // GetProfileNameForSysObjectID returns the best matching profile for this sysObjectID, or nil if there isn't one. GetProfileNameForSysObjectID(sysObjectID string) (string, error) }
Provider is an interface that provides profiles by name
func GetProfileProvider ¶
func GetProfileProvider(initConfigProfiles ProfileConfigMap) (Provider, error)
GetProfileProvider returns a Provider that knows the on-disk profiles as well as any overrides from the initConfig.
func StaticProvider ¶
func StaticProvider(profiles ProfileConfigMap) Provider
StaticProvider makes a provider that serves the static data from this config map.
Click to show internal directories.
Click to hide internal directories.