pkg

package
v0.0.0-...-832427b Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectManager

func DetectManager(ctx context.Context, directory string) string

func GetAllRegistereredManager

func GetAllRegistereredManager() []string

func LoveDependency

func LoveDependency(directory string) error

func LoveOrganization

func LoveOrganization(url string) error

func LoveRepos

func LoveRepos(love Love, repos []*Repository) error

func RegistarManager

func RegistarManager(name string, m ManagerFactory)

func RegistarPlatform

func RegistarPlatform(name string, p PlatformFactory)

func SortOrganization

func SortOrganization(repos []*Repository) map[string][]*Repository

Types

type Love

type Love interface {
	Initialize(config *system.SecretConfig) (Love, error)
	//Decode(url string) (*Repository, error)
	GetOrgRepos(org string) ([]*Repository, error)
	IsLoved(repo *Repository) (bool, error)
	SendLove(repo *Repository) error
}

func GetPlatform

func GetPlatform(name string, ctx context.Context) (Love, error)

type LoveBag

type LoveBag interface {
	Initialize(directory string) LoveBag
	File() string
	Read() ([]*Repository, error)
}

func GetManager

func GetManager(name string, ctx context.Context) (LoveBag, error)

type ManagerFactory

type ManagerFactory func(ctx context.Context) LoveBag

type PlatformFactory

type PlatformFactory func(ctx context.Context) (Love, error)

type Repository

type Repository struct {
	Platform string
	Owner    string
	Name     string

	Url string

	HasMirror bool
	MirrorUrl string
}

func UrlToRepo

func UrlToRepo(url string) *Repository

Directories

Path Synopsis
dep

Jump to

Keyboard shortcuts

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