configurationManager

package
v0.0.0-...-8873498 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationManager

type ConfigurationManager struct {
	TokenGenerationUrl string
}

func New

func New() *ConfigurationManager

func (*ConfigurationManager) Clear

func (cm *ConfigurationManager) Clear(key string) error

func (*ConfigurationManager) Get

func (cm *ConfigurationManager) Get(key string) (interface{}, error)

func (*ConfigurationManager) GetGithubToken

func (cm *ConfigurationManager) GetGithubToken() string

func (*ConfigurationManager) GetGitlabToken

func (cm *ConfigurationManager) GetGitlabToken() string

func (*ConfigurationManager) GetUserConfig

func (cm *ConfigurationManager) GetUserConfig() (*UserConfig, bool, error)

func (*ConfigurationManager) ParseToken

func (cm *ConfigurationManager) ParseToken() (*DecodedToken, error)

func (*ConfigurationManager) Set

func (cm *ConfigurationManager) Set(key string, value string) error

func (*ConfigurationManager) SyncRules

func (cm *ConfigurationManager) SyncRules(defaultRulesList map[string][]byte, folderName string) error

func (*ConfigurationManager) UpdateUserConfig

func (cm *ConfigurationManager) UpdateUserConfig(userConfig *UserConfig) error

type DecodedToken

type DecodedToken struct {
	Rules    []bool `json:"rules"`
	Email    string `json:"email"`
	UniqueId string `json:"uniqueId"`
}

type UserConfig

type UserConfig struct {
	MachineId   string `json:"machine_id"`
	AlleroToken string `json:"allero_token"`
}

Jump to

Keyboard shortcuts

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