docs

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeURL added in v0.0.23

func MakeURL(baseURL, revision, path string) string

MakeURL constructs a full document URL from its parts

Types

type Config

type Config struct {
	Sources []Source `yaml:"sources" validate:"required,dive"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type DocumentURL added in v0.0.23

type DocumentURL struct {
	BaseURL  string // e.g., "https://github.com/owner/repo"
	Revision string // e.g., "main"
	Path     string // e.g., "docs/README.md"
}

DocumentURL represents the parts of a document URL

func ParseURL added in v0.0.23

func ParseURL(url string) (*DocumentURL, error)

ParseURL parses a document URL into its component parts

type Source

type Source struct {
	Name   string        `yaml:"name"             validate:"required"`
	Type   string        `yaml:"type"             validate:"required,oneof=github"`
	GitHub *gitHubSource `yaml:"github,omitempty" validate:"required_if=Type github"`
}

func (Source) ChangesSince

func (s Source) ChangesSince(ctx context.Context, revision string) (iter.Seq[Update], string, func() error)

func (Source) Get

func (s Source) Get(ctx context.Context, path, revision string) (string, error)

func (Source) Suggest

func (s Source) Suggest(ctx context.Context, path, revision, content string) (string, error)

func (Source) URL

func (s Source) URL() string

type Update

type Update struct {
	Revision string
	Path     string
	BlobSHA  string
}

Jump to

Keyboard shortcuts

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