kegeye

package
v0.0.0-...-1dda83a Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedSourceType = errors.New("unsupported dex source type")
	ErrNoKegFound            = errors.New("no keg found in repo")
)
View Source
var (
	ErrNotEnoughTsvParts = errors.New("not enough tsv parts in dex entry")
)

Functions

func ReadDexEntry

func ReadDexEntry(url string, id int) (string, error)

Types

type Dex

type Dex struct {
	Source     string        `json:"source"`
	SourceType DexSourceType `json:"sourceType"`
	Commit     string        `json:"commit"`
	Nodes      NodeMap       `json:"nodes"`
	// contains filtered or unexported fields
}

func GetDexFromGit

func GetDexFromGit(cloneUrl string) (Dex, error)

func NewDex

func NewDex(sourceType DexSourceType, source string) Dex

func (*Dex) Hydrate

func (d *Dex) Hydrate() error

type DexSourceType

type DexSourceType string
const (
	DexSourceGithub DexSourceType = "github"
)

type Node

type Node struct {
	Id        int       `json:"id"`
	Timestamp time.Time `json:"timestamp"`
	Title     string    `json:"title"`
}

func NodeFromSlice

func NodeFromSlice(s []string) (*Node, error)

type NodeMap

type NodeMap map[int]Node

type NodeSlice

type NodeSlice []Node

func NodeSliceFromTsv

func NodeSliceFromTsv(s [][]string) (NodeSlice, error)

func (NodeSlice) ToNodeMap

func (ns NodeSlice) ToNodeMap() NodeMap

Jump to

Keyboard shortcuts

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