Versions in this module Expand all Collapse all v0 v0.0.4 Jan 18, 2020 v0.0.3 Jan 18, 2020 v0.0.1 Jan 18, 2020 Changes in this version + const SEQUEL_PRO_PLIST_FORMAT + func Asset(name string) ([]byte, error) + func AssetDigest(name string) ([sha256.Size]byte, error) + func AssetDir(name string) ([]string, error) + func AssetInfo(name string) (os.FileInfo, error) + func AssetNames() []string + func AssetString(name string) (string, error) + func CreateKeychainEntryForService(service, account, password string, trustedApplications []string) error + func CreateOrUpdateKeychainEntriesForService(service, account, password string, trustedApplications []string) error + func Digests() (map[string][sha256.Size]byte, error) + func DynamicUnmarshalYamlAmanarConfiguration(data []byte) (map[interface{}]interface{}, error) + func HandleResultErrors(resultErrors []gojsonschema.ResultError) + func MustAsset(name string) []byte + func MustAssetString(name string) string + func ProcessAmanar(githubToken string, a *Amanar) + func ProcessAmanarWithWriter(githubToken string, a *Amanar, writer io.Writer) + func ProcessConstantConfigItem(constant Constant, writer io.Writer) + func ProcessVaultConfigItem(configurables *Configurables, credentials *Credentials, writer io.Writer) + func RestoreAsset(dir, name string) error + func RestoreAssets(dir, name string) error + func UpdateCredentials(flows []Flower, credentials *Credentials) + func ValidateConfiguration(documentLoader gojsonschema.JSONLoader) (err error, re []gojsonschema.ResultError) + type Amanar struct + AmanarConfiguration []AmanarConfiguration + func LoadConfiguration(configFilepath string) (*Amanar, error, []gojsonschema.ResultError) + func UnmarshalAmanar(data []byte) (Amanar, error) + func UnmarshalYamlAmanarConfiguration(data []byte) (Amanar, error) + func (r *Amanar) Marshal() ([]byte, error) + type AmanarConfiguration struct + Constant *Constant + VaultAddress *string + VaultConfiguration []VaultConfiguration + func (cs *AmanarConfiguration) MarshalYaml() ([]byte, error) + type Configurables struct + IntellijDatasources []IntellijDatasource + IntellijRunConfigurations []IntellijRunConfiguration + JSONDatasources []JSONDatasource + PosticoDatasources []PosticoDatasource + Querious2Datasources []Querious2Datasource + SequelProDatasources []SequelProDatasource + ShellDatasources []ShellDatasource + TemplateDatasources []TemplateDatasource + type ConfigurationProcessor interface + ProcessConfig func() + func NewConfigurationProcessor(githubToken string, ac AmanarConfiguration, writer io.Writer) (ConfigurationProcessor, error) + type Constant struct + Template *string + TemplatePath *string + func (c *Constant) GetTemplate() *string + func (c *Constant) GetTemplatePath() *string + type ConstantConfigurationProcessor struct + func (c ConstantConfigurationProcessor) ProcessConfig() + type Credentials struct + Password string + Username string + func CreateCredentialsFromSecret(secret *api.Secret) (*Credentials, error) + type Flower interface + Name func() string + PersistChanges func() error + UpdateWithCredentials func(credentials *Credentials) error + type GithubLoginBody struct + Token string + type IntellijDatasource struct + DatabaseUUID string + DatasourceFilePath string + type IntellijDatasourceFile struct + Document *etree.Document + Fullpath string + func NewIntellijDatasourceFile(filepath string) (*IntellijDatasourceFile, error) + func (dc *IntellijDatasourceFile) UpdateUsername(databaseUuid string, newUsername string) (oldUsername string, err error) + func (dc *IntellijDatasourceFile) WriteToFile() error + type IntellijDatasourceFlow struct + func NewIntellijDatasourceFlow(config *IntellijDatasource) (*IntellijDatasourceFlow, error) + func (ds *IntellijDatasourceFlow) Name() string + func (ds *IntellijDatasourceFlow) PersistChanges() (err error) + func (ds *IntellijDatasourceFlow) UpdateWithCredentials(credentials *Credentials) (err error) + type IntellijRunConfig struct + Document *etree.Document + Fullpath string + func NewIntellijRunConfig(filepath string) (*IntellijRunConfig, error) + func (rc *IntellijRunConfig) UpdateEnvironmentVariable(environmentVariable, databaseHost string, credentials *Credentials) (err error) + func (rc *IntellijRunConfig) WriteToFile() (err error) + type IntellijRunConfigsFlow struct + func NewIntellijRunConfigsFlow(config *IntellijRunConfiguration) (*IntellijRunConfigsFlow, error) + func (rc *IntellijRunConfigsFlow) Name() string + func (rc *IntellijRunConfigsFlow) PersistChanges() (err error) + func (rc *IntellijRunConfigsFlow) UpdateWithCredentials(credentials *Credentials) (err error) + type IntellijRunConfiguration struct + DatabaseHost string + EnvironmentVariable string + RunConfigurationsFolderPath string + type JSONCredential struct + Identifier string + Password string + Username string + type JSONCredentials []JSONCredential + func UnmarshalJSONCredentials(data []byte) (JSONCredentials, error) + func (r *JSONCredentials) Marshal() ([]byte, error) + type JSONDatasource struct + Filepath string + Identifier string + type JSONFlow struct + func NewJSONFlow(config *JSONDatasource) (*JSONFlow, error) + func (sf *JSONFlow) Name() string + func (sf *JSONFlow) PersistChanges() error + func (sf *JSONFlow) UpdateWithCredentials(credentials *Credentials) error + type JsonBytesSchemaValidator struct + func NewJsonBytesSchemaValidator(jsonBytes []byte) *JsonBytesSchemaValidator + func (j JsonBytesSchemaValidator) Validate() (err error, re []gojsonschema.ResultError) + type PosticoDatasource struct + DatabaseUUID string + PosticoSqlitePath string + type PosticoFavorite struct + Database sql.NullString + Host sql.NullString + Nickname sql.NullString + Port sql.NullInt64 + UUID string + User sql.NullString + type PosticoFlow struct + func NewPosticoFlow(config *PosticoDatasource) (*PosticoFlow, error) + func (pf *PosticoFlow) Name() string + func (pf *PosticoFlow) PersistChanges() (err error) + func (pf *PosticoFlow) UpdateWithCredentials(credentials *Credentials) error + type PosticoSQLiteDatabase struct + Database *sql.DB + func NewPosticoSQLiteDatabase(filepath string) (*PosticoSQLiteDatabase, error) + func (pdb *PosticoSQLiteDatabase) GetFavoriteFromUUID(uuid string) (*PosticoFavorite, error) + func (pdb *PosticoSQLiteDatabase) UpdateUsername(databaseUuid string, username string) error + type Querious2Datasource struct + DatabaseUUID string + Querious2SqlitePath string + type Querious2Flow struct + func NewQuerious2Flow(config *Querious2Datasource) (*Querious2Flow, error) + func (qf *Querious2Flow) Name() string + func (qf *Querious2Flow) PersistChanges() (err error) + func (qf *Querious2Flow) UpdateWithCredentials(credentials *Credentials) error + type Querious2SQLiteDatabase struct + Filepath string + func NewQuerious2SQLiteDatabase(filepath string) (*Querious2SQLiteDatabase, error) + func (qdb *Querious2SQLiteDatabase) UpdateUsername(databaseUuid string, username string) error + type SchemaValidator interface + Validate func() (err error, re []gojsonschema.ResultError) + type SequelProDatasource struct + DatabaseUUID string + SequelProPlistPath string + type SequelProFlow struct + func NewSequelProFlow(config *SequelProDatasource) (spf *SequelProFlow, err error) + func (sp *SequelProFlow) Name() string + func (sp *SequelProFlow) PersistChanges() (err error) + func (sp *SequelProFlow) UpdateWithCredentials(credentials *Credentials) (err error) + type SequelProPlistItem struct + ColorIndex int64 + Database string + Host string + Id int64 + Name string + Port string + SSHHost string + SSHKeyLocation string + SSHKeyLocationEnabled int + SSHPort string + SSHUser string + SSLCACertFileLocation string + SSLCACertFileLocationEnabled int + SSLCertificateFileLocation string + SSLCertificateFileLocationEnabled int + SSLKeyFileLocation string + SSLKeyFileLocationEnabled int + Socket string + Type int + UseSSL int + User string + type SequelProRootPlist struct + FavoritesRoot struct{ ... } + type ShellDatasource struct + Filepath string + PasswordVariable string + UsernameVariable string + type ShellFile struct + AST *syntax.File + func NewShellFile(filepath string) (*ShellFile, error) + func (sf *ShellFile) UpdateCredentials(usernameVariable, passwordVariable string, credentials *Credentials) + func (sf *ShellFile) WriteToDisk() error + type ShellFlow struct + func NewShellFlow(config *ShellDatasource) (*ShellFlow, error) + func (sf *ShellFlow) Name() string + func (sf *ShellFlow) PersistChanges() error + func (sf *ShellFlow) UpdateWithCredentials(credentials *Credentials) error + type StructSchemaValidator struct + func NewStructSchemaValidator(goStruct *Amanar) *StructSchemaValidator + func (s StructSchemaValidator) Validate() (err error, re []gojsonschema.ResultError) + type TemplateDatasource struct + Template *string + TemplatePath *string + func (tds *TemplateDatasource) GetTemplate() *string + func (tds *TemplateDatasource) GetTemplatePath() *string + type TemplateDefiner interface + GetTemplate func() *string + GetTemplatePath func() *string + type TemplateFlow struct + func NewTemplateFlow(config *TemplateDatasource, writer io.Writer) (*TemplateFlow, error) + func (tf *TemplateFlow) Name() string + func (tf *TemplateFlow) PersistChanges() error + func (tf *TemplateFlow) UpdateWithCredentials(credentials *Credentials) error + type TemplateSource struct + func NewTemplateSource(definer TemplateDefiner, writer io.Writer) (source *TemplateSource, err error) + func NewTemplateSourceFromFile(templateFilepath *string, writer io.Writer) (*TemplateSource, error) + func NewTemplateSourceFromString(templateString *string, writer io.Writer) (*TemplateSource, error) + func (t TemplateSource) WriteToDisk(credentials Credentials) error + func (t TemplateSource) WriteToDiskWithoutContext() error + type VaultConfiguration struct + Configurables Configurables + VaultPath string + VaultRole string + type VaultConfigurationProcessor struct + func (v VaultConfigurationProcessor) ProcessConfig() + type VaultGithubAuthClient struct + GithubToken string + VaultAddress string + func (vc *VaultGithubAuthClient) GetCredential(vaultPath, vaultRole string) (*api.Secret, error) + func (vc *VaultGithubAuthClient) LoginWithGithub() error