importserver: Index | Files | Directories

package importserver

import ""


Package Files


func NewHandler Uses

func NewHandler(templateDirPath string, data *Data) (http.Handler, error)

NewHandler returns a new http.Handler.

type Data Uses

type Data struct {
    Title            string
    PathToGoRedirect map[string]*GoRedirect
    ExtraLinkToName  map[string]string

Data represents the data needed to create a http.Handler.

type GoRedirect Uses

type GoRedirect struct {
    URL        string
    VCS        string
    Repository string
    Images     []*Image
    Private    bool

GoRedirect represents a go redirect.

func StandardGithubGoRedirect Uses

func StandardGithubGoRedirect(goPackage string, githubUser string, githubRepo string) *GoRedirect

StandardGithubGoRedirect returns a GoRedirect for a Github repo with the Images from StandardGithubImageSet.

func StandardPrivateGithubGoRedirect Uses

func StandardPrivateGithubGoRedirect(goPackage string, githubUser string, githubRepo string) *GoRedirect

StandardPrivateGithubGoRedirect returns a private GoRedirect for a Github repo with no Images.

type Image Uses

type Image struct {
    URL    string
    Source string

Image represents an image to display on the index page.

func StandardGithubImageSet Uses

func StandardGithubImageSet(goPackage string, githubUser string, githubRepo string) []*Image

StandardGithubImageSet returns Images for a GitHub repo for CircleCI, Go Report Card, GoDoc, and a MIT License badge.

type StandardGithubGoRedirectBuilder Uses

type StandardGithubGoRedirectBuilder interface {
    GoRedirect(relGoPackage string, githubRepo string) *GoRedirect
    PrivateGoRedirect(relGoPackage string, githubRepo string) *GoRedirect

StandardGithubGoRedirectBuilder uses a common base go package and GitHub user to build GoRedirects.

func NewStandardGithubGoRedirectBuilder Uses

func NewStandardGithubGoRedirectBuilder(baseGoPackage string, githubUser string) StandardGithubGoRedirectBuilder

NewStandardGithubGoRedirectBuilder returns a StandardGithubGoRedirectBuilder for the given base go package and GitHub user.



Package importserver imports 6 packages (graph) and is imported by 2 packages. Updated 2019-04-07. Refresh now. Tools for package owners.