git

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportReaderFS

type ImportReaderFS struct {
	Folder string
	FS     billy.Filesystem
}

func (ImportReaderFS) ReadFile

func (ir ImportReaderFS) ReadFile(s string) ([]byte, error)

type Package

type Package struct {
	Author  string `json:"author"`
	Type    string `json:"type"`
	Version string `json:"version"`

	Template   *snd.Template   `json:"template"`
	DataSource *snd.DataSource `json:"dataSource"`
	Generator  *snd.Generator  `json:"generator"`
	Entries    []snd.Entry     `json:"entries"`
}

Package represents a variant between Template, DataSource and Generator fetched from git.

type PublicEntry

type PublicEntry struct {
	Author  string   `json:"author"`
	Contact string   `json:"contact"`
	Repos   []string `json:"repos"`
}

PublicEntry represents an entry in the public package repository by some Author. One entry can contain multiple git repos where packages for S&D are stored.

type PublicList added in v0.6.1

type PublicList struct {
	Name        string        `json:"name"`
	Author      string        `json:"author"`
	Description string        `json:"description"`
	Entries     []PublicEntry `json:"entries"`
}

PublicList represents a curated list of public package entries.

func GetPackages

func GetPackages(url string) (PublicList, error)

GetPackages fetches a PublicList by URL. It expects a JSON encoded file.

type Repo

type Repo struct {
	URL      string         `json:"url"`
	Readme   string         `json:"readme"`
	Versions map[string]Tag `json:"versions"`
}

func GetRepo

func GetRepo(url string) (Repo, error)

func (Repo) Fetch

func (r Repo) Fetch(tag Tag) ([]Package, error)

type Tag

type Tag struct {
	Hash string    `json:"hash"`
	Name string    `json:"name"`
	Date time.Time `json:"date"`
}

Jump to

Keyboard shortcuts

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