file_extensions

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTOMLV0Into

func DecodeTOMLV0Into(data *TOMLV0, sub *cst.Value) error

func DecodeTOMLV1Into

func DecodeTOMLV1Into(data *TOMLV1, sub *cst.Value) error

func EncodeTOMLV0From

func EncodeTOMLV0From(data *TOMLV0, doc *document.Document, container *cst.Node) error

func EncodeTOMLV1From

func EncodeTOMLV1From(data *TOMLV1, doc *document.Document, container *cst.Node) error

Types

type Config

type Config struct {
	Config   string
	Conflict string
	Lockfile string
	Organize string
	Repo     string
	Tag      string
	Type     string
	Zettel   string
}

func Default

func Default() Config

func MakeConfig

func MakeConfig(base Config, overlays ...OverlayGetter) Config

func MakeDefaultConfig

func MakeDefaultConfig(overlays ...OverlayGetter) Config

func (Config) GetFileExtensionForGenre

func (config Config) GetFileExtensionForGenre(
	getter domain_interfaces.GenreGetter,
) string

type ConfigGetter

type ConfigGetter interface {
	GetFileExtensions() Config
}

type Overlay

type Overlay struct {
	Config   *string
	Conflict *string
	Lockfile *string
	Organize *string
	Repo     *string
	Tag      *string
	Type     *string
	Zettel   *string
}

type OverlayGetter

type OverlayGetter interface {
	GetFileExtensionsOverlay() Overlay
}

type TOMLV0

type TOMLV0 struct {
	Organize *string `toml:"organize"`
	Repo     *string `toml:"kasten"`
	Tag      *string `toml:"etikett"`
	Type     *string `toml:"typ"`
	Zettel   *string `toml:"zettel"`
}

func (TOMLV0) GetFileExtensionsOverlay

func (config TOMLV0) GetFileExtensionsOverlay() Overlay

func (*TOMLV0) Reset

func (config *TOMLV0) Reset()

func (*TOMLV0) ResetWith

func (config *TOMLV0) ResetWith(b TOMLV0)

type TOMLV0Document

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

func DecodeTOMLV0

func DecodeTOMLV0(input []byte) (*TOMLV0Document, error)

func (*TOMLV0Document) Comment

func (d *TOMLV0Document) Comment(key string) string

func (*TOMLV0Document) Data

func (d *TOMLV0Document) Data() *TOMLV0

func (*TOMLV0Document) Encode

func (d *TOMLV0Document) Encode() ([]byte, error)

func (*TOMLV0Document) InlineComment

func (d *TOMLV0Document) InlineComment(key string) string

func (*TOMLV0Document) SetComment

func (d *TOMLV0Document) SetComment(key, comment string)

func (*TOMLV0Document) SetInlineComment

func (d *TOMLV0Document) SetInlineComment(key, comment string)

func (*TOMLV0Document) Undecoded

func (d *TOMLV0Document) Undecoded() []string

type TOMLV1

type TOMLV1 struct {
	Config   *string `toml:"config"`
	Conflict *string `toml:"conflict"`
	Lockfile *string `toml:"lockfile"`
	Organize *string `toml:"organize"`
	Repo     *string `toml:"repo"`
	Tag      *string `toml:"tag"`
	Type     *string `toml:"type"`
	Zettel   *string `toml:"zettel"`
}

func DefaultOverlay

func DefaultOverlay() TOMLV1

func (TOMLV1) GetFileExtensionsOverlay

func (config TOMLV1) GetFileExtensionsOverlay() Overlay

func (*TOMLV1) Reset

func (config *TOMLV1) Reset()

func (*TOMLV1) ResetWith

func (config *TOMLV1) ResetWith(b TOMLV1)

type TOMLV1Document

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

func DecodeTOMLV1

func DecodeTOMLV1(input []byte) (*TOMLV1Document, error)

func (*TOMLV1Document) Comment

func (d *TOMLV1Document) Comment(key string) string

func (*TOMLV1Document) Data

func (d *TOMLV1Document) Data() *TOMLV1

func (*TOMLV1Document) Encode

func (d *TOMLV1Document) Encode() ([]byte, error)

func (*TOMLV1Document) InlineComment

func (d *TOMLV1Document) InlineComment(key string) string

func (*TOMLV1Document) SetComment

func (d *TOMLV1Document) SetComment(key, comment string)

func (*TOMLV1Document) SetInlineComment

func (d *TOMLV1Document) SetInlineComment(key, comment string)

func (*TOMLV1Document) Undecoded

func (d *TOMLV1Document) Undecoded() []string

Source Files

  • main.go
  • toml_v0.go
  • toml_v0_tommy.go
  • toml_v1.go
  • toml_v1_tommy.go

Jump to

Keyboard shortcuts

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