Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

    Handler takes one or more paths and returns a map of each to a matching Entry struct. If no Entry is matched for the path, the value for the key is nil.

    Types

    type Entry

    type Entry struct {
    	Primary   []Owner `json:"primary"`
    	Secondary []Owner `json:"secondary,omitempty"`
    }

    type Owner

    type Owner struct {
    	// GitHubUsername is a GitHub user name or team name.
    	GitHubUsername string `json:"githubUsername"`
    	GerritEmail    string `json:"gerritEmail"`
    }

    type Request

    type Request struct {
    	Payload struct {
    		Paths []string `json:"paths"`
    	} `json:"payload"`
    	Version int `json:"v"` // API version
    }

    type Response

    type Response struct {
    	Payload struct {
    		Entries map[string]*Entry `json:"entries"` // paths in request -> Entry
    	} `json:"payload"`
    	Error string `json:"error,omitempty"`
    }

    Source Files