config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitwardenConfig

type BitwardenConfig struct {
	APIURL         string `json:"api_url,omitempty"`
	IdentityURL    string `json:"identity_url,omitempty"`
	AccessToken    string `json:"access_token,omitempty"`
	OrganizationId string `json:"organization,omitempty"`
	ProjectId      string `json:"project,omitempty"`
}

BitwardenConfig represents the configuration for the Bitwarden provider

type Config

type Config struct {
	Provider           ProviderType         `json:"provider"`
	FileVault          *FileConfig          `json:"file,omitempty"`
	BitwardenVault     *BitwardenConfig     `json:"bitwarden,omitempty"`
	ObjectStorageVault *ObjectStorageConfig `json:"object_storage,omitempty"`
	SSHPasswordKey     string               `json:"ssh_password_key,omitempty"`
}

Config represents the configuration structure

func ReadConfig

func ReadConfig(config_file string) (*Config, error)

ReadConfig reads the configuration from a JSON file

type FileConfig

type FileConfig struct {
	Key  string `json:"key,omitempty"`
	Path string `json:"path"`
}

FileConfig represents the configuration for the file provider

type ObjectStorageConfig added in v1.1.0

type ObjectStorageConfig struct {
	Region   string `json:"region"`
	Endpoint string `json:"endpoint"`
	Bucket   string `json:"bucket"`
	Key      string `json:"key"`
	Backup   bool   `json:"backup"`
}

type ProviderType

type ProviderType string

ProviderType represents the type of vault provider

const (
	FileProvider          ProviderType = "file"
	BitwardenProvider     ProviderType = "bitwarden"
	ObjectStorageProvider ProviderType = "object_storage"
)

Jump to

Keyboard shortcuts

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