common

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitFullName

func SplitFullName(fullName string) (string, string)

SplitFullName split a git FullName format to vendor and repo strings.

Types

type Publisher

type Publisher struct {
	Id            string    `yaml:"id"`
	Name          string    `yaml:"name"`
	Organizations []url.URL `yaml:"orgs"`
	Repositories  []url.URL `yaml:"repos"`
}

func LoadPublishers

func LoadPublishers(path string) ([]Publisher, error)

LoadPublishers loads the publishers YAML file and returns a slice of Publisher.

type Repository

type Repository struct {
	Name         string
	URL          url.URL
	CanonicalURL url.URL
	FileRawURL   string
	GitBranch    string
	Publisher    Publisher
	Headers      map[string]string
}

Repository is a single code repository. FileRawURL contains the direct url to the raw file.

func (*Repository) GenerateID

func (repo *Repository) GenerateID() string

generateID generates a hash based on unique git repo URL.

func (*Repository) GenerateSlug

func (repo *Repository) GenerateSlug() string

generateSlug generates a readable unique string based on repository name.

Jump to

Keyboard shortcuts

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