repositories

package
v0.0.0-...-a7fb1eb Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: AGPL-3.0 Imports: 8 Imported by: 1

README

Repositories

This repositories directory is intended to give a clean overview of what each service brings to the table in terms of coverage. Each service lives in a folder that implements the CoverageRepository interface:

// A Coverage Repository is any service that can also provide coverage information
type CoverageRepository interface {
  Repository
  AddUrls(tree *tree.Node) error
  AddCoverage(tree *tree.Node)
}

When the server starts a function in coverage.go builds the coverage tree. It starts an empty tree, then iterates through each service, calling both AddUrls & AddCoverage so each service gets a chance to add it's info.

The AddUrls function takes a tree of urls, and adds nodes for all urls that the service may know about. We're selective about what is included here for the sake of sanity, and each service makes it's own "decisions" about what is & isn't a viable url for inclusion. It's worth noting that this is expected to be a list of urls that the service "knows about", not coverage information. That's the job of AddCoverage

AddCoverage attaches coverage information to the tree.

Once each service has added it's information, the function in coverage.go walks the completed tree, tabulating coverage information.

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CoverageRepository

type CoverageRepository interface {
	Repository
	AddUrls(tree *tree.Node, sources ...*core.Source) error
	AddCoverage(tree *tree.Node)
}

A Coverage Repository is any service that can also provide coverage information

type Repository

type Repository interface {
	GetId() string
	DataRepo() *core.DataRepo
}

a Repository is anything that stores data.

type RepositoryGetParams

type RepositoryGetParams struct {
	Id   string
	Name string
}

type RepositoryListParams

type RepositoryListParams struct {
	Orderby string
	Limit   int
	Offset  int
}

type RepositoryRequests

type RepositoryRequests int

func (RepositoryRequests) Get

func (RepositoryRequests) List

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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