adr

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAdr = errors.New("adr")
View Source
var ErrForEachStop = errors.New("stop iterating")

Functions

func ForEach

func ForEach(conf *config.Config, callback func(*Adr) error) error

func Index

func Index(conf *config.Config) error

func Update

func Update(conf *config.Config, adr *Adr) error

Types

type Adr

type Adr struct {
	Filename string `yaml:"-"`
	Type     string `yaml:"type"`
	Number   Number `yaml:"number"`
	Title    string `yaml:"title"`
	Date     string `yaml:"date"`
	Status   Status `yaml:"status"`
	Link     Number `yaml:"link,omitempty"`
	Body     []byte `yaml:"-"`
}

func ByID added in v0.0.2

func ByID(conf *config.Config, number Number) (*Adr, error)

func Create

func Create(conf *config.Config, title string) (*Adr, error)

func Parse

func Parse(path string) (*Adr, error)

type Adrs

type Adrs map[Number]*Adr

func List

func List(conf *config.Config) (Adrs, error)

type Number

type Number int

type Status

type Status string
const (
	StatusProposed   Status = "proposed"
	StatusAccepted   Status = "accepted"
	StatusDeprecated Status = "deprecated"
	StatusSuperseded Status = "superseded"
)

Jump to

Keyboard shortcuts

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