graph

package
v0.0.0-...-7f9a81d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGraphAddr = "localhost:8889"

DefaultGraphAddr defines the graph server's address when running locally. If the caller uses something other than the default it is assumed to be TLS'd.

Variables

This section is empty.

Functions

func Start

func Start(addr string) error

Start initializes the graph server and starts listening.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a client to the graph server.

func NewClient

func NewClient(addr string) *Client

NewClient creates a client to the graph server.

func (*Client) Get

func (c *Client) Get(repo string, cluster bool) (string, error)

Get takes a repo and cluster flag and returns a DOT representation of the repo.

type Post

type Post struct {
	Repo    string `json:"repo"`
	Cluster bool   `json:"cluster"`
}

Post defines the input POST body to the `/graph` endpoint. curl --data '{"repo":"github.com/siggy/gographs","cluster":true}' -X POST [graph-addr]/graph

Jump to

Keyboard shortcuts

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