profiles

package
v0.0.0-...-76e4591 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceName        = "pdfdb"
	DefaultProfileName = "default"
)

Variables

This section is empty.

Functions

func EnvironmentDatabaseURL

func EnvironmentDatabaseURL() string

func ResolveDatabaseURL

func ResolveDatabaseURL() (string, error)

Types

type Config

type Config struct {
	ActiveProfile string   `json:"activeProfile"`
	Profiles      []string `json:"profiles"`
}

type KeychainStore

type KeychainStore struct{}

func (KeychainStore) Delete

func (KeychainStore) Delete(service, user string) error

func (KeychainStore) Get

func (KeychainStore) Get(service, user string) (string, error)

func (KeychainStore) Set

func (KeychainStore) Set(service, user, password string) error

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(path string, secrets SecretStore) *Manager

func NewDefault

func NewDefault() (*Manager, error)

func (*Manager) ActiveURL

func (m *Manager) ActiveURL() (string, error)

func (*Manager) Config

func (m *Manager) Config() (Config, error)

func (*Manager) Delete

func (m *Manager) Delete(name string) error

func (*Manager) List

func (m *Manager) List() ([]Profile, error)

func (*Manager) Save

func (m *Manager) Save(name, databaseURL string) error

func (*Manager) SetActive

func (m *Manager) SetActive(name string) error

func (*Manager) URL

func (m *Manager) URL(name string) (string, error)

type Profile

type Profile struct {
	Name   string `json:"name"`
	Active bool   `json:"active"`
}

type SecretStore

type SecretStore interface {
	Get(service, user string) (string, error)
	Set(service, user, password string) error
	Delete(service, user string) error
}

Jump to

Keyboard shortcuts

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