Documentation
¶
Index ¶
- func ErrorCode(err error) string
- func SetValue(path, key, value string) error
- func UnsetValue(path, key string) error
- func Value(cfg Config, key string) (string, bool)
- type Config
- type EditorConfig
- type Error
- type LoadOptions
- type LoadResult
- type MarkdownConfig
- type NoteConfig
- type OutputConfig
- type PathOptions
- type Paths
- type RemoteConfig
- type SearchConfig
- type SettingProjection
- type SourceSet
- type StorageConfig
- type ThemeSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnsetValue ¶
Types ¶
type Config ¶
type Config struct {
Vault string `mapstructure:"vault" yaml:"vault" json:"vault,omitempty"`
Remote RemoteConfig `mapstructure:"remote" yaml:"remote" json:"remote"`
Output OutputConfig `mapstructure:"output" yaml:"output" json:"output"`
Editor EditorConfig `mapstructure:"editor" yaml:"editor" json:"editor"`
Note NoteConfig `mapstructure:"note" yaml:"note" json:"note"`
Search SearchConfig `mapstructure:"search" yaml:"search" json:"search"`
Storage StorageConfig `mapstructure:"storage" yaml:"storage" json:"storage"`
Themes ThemeSet `mapstructure:"themes" yaml:"themes" json:"themes"`
Markdown MarkdownConfig `mapstructure:"markdown" yaml:"markdown" json:"markdown"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type EditorConfig ¶
type EditorConfig struct {
Command string `mapstructure:"command" yaml:"command" json:"command,omitempty"`
}
type LoadOptions ¶
type LoadResult ¶
type LoadResult struct {
Config Config `json:"config"`
Sources SourceSet `json:"sources"`
Settings []SettingProjection `json:"settings,omitempty"`
}
func Load ¶
func Load(opts LoadOptions) (LoadResult, error)
type MarkdownConfig ¶
type NoteConfig ¶
type OutputConfig ¶
type OutputConfig struct {
Style string `mapstructure:"style" yaml:"style" json:"style"`
Color string `mapstructure:"color" yaml:"color" json:"color"`
Theme string `mapstructure:"theme" yaml:"theme" json:"theme"`
Width int `mapstructure:"width" yaml:"width" json:"width"`
Markdown MarkdownConfig `mapstructure:"markdown" yaml:"markdown" json:"markdown"`
}
type PathOptions ¶
type Paths ¶
func ResolvePaths ¶
func ResolvePaths(opts PathOptions) Paths
type RemoteConfig ¶
type RemoteConfig struct {
APIURL string `mapstructure:"api_url" yaml:"api_url" json:"api_url,omitempty"`
}
type SearchConfig ¶
type SettingProjection ¶ added in v0.1.3
type SettingProjection struct {
Key string `json:"key"`
Value string `json:"value"`
Source string `json:"source"`
Writable bool `json:"writable"`
WriteScope string `json:"write_scope"`
WritableScopes []string `json:"writable_scopes,omitempty"`
NextAction string `json:"next_action,omitempty"`
SecretRefBoundary string `json:"secret_ref_boundary,omitempty"`
}
type SourceSet ¶
type StorageConfig ¶
type StorageConfig struct {
Backend string `mapstructure:"backend" yaml:"backend" json:"backend,omitempty"`
Bucket string `mapstructure:"bucket" yaml:"bucket" json:"bucket,omitempty"`
Region string `mapstructure:"region" yaml:"region" json:"region,omitempty"`
Prefix string `mapstructure:"prefix" yaml:"prefix" json:"prefix,omitempty"`
Endpoint string `mapstructure:"endpoint" yaml:"endpoint" json:"endpoint,omitempty"`
Profile string `mapstructure:"profile" yaml:"profile" json:"profile,omitempty"`
Token string `mapstructure:"token" yaml:"token" json:"-"`
}
Click to show internal directories.
Click to hide internal directories.