Documentation
¶
Index ¶
- Constants
- Variables
- func LangAttrs(lang string) map[string]interface{}
- func LinkAttrs(rel string, weight float64) map[string]interface{}
- func OwnerAttrs(owner *github.User) (map[string]interface{}, error)
- func RepoAttrs(repo *github.Repository, starredAt *github.Timestamp) (map[string]interface{}, error)
- func TopicAttrs(topic string) map[string]interface{}
- type Entity
- type Stars
Constants ¶
View Source
const ( // DefaultLabel is stars graph default label. DefaultLabel = "GitHubStars" // OwnedByEdgeLabel is a label for repo owner edge. OwnedByEdgeLabel = "OwnedBy" // IsLangEdgeLabel is a label for repo language edge. IsLangEdgeLabel = "IsLanguage" // HasTopicEdgeLabel is a label for repo topic edge. HasTopicEdgeLabel = "HasTopic" )
View Source
const ( // DefaultStyleType is default style type. DefaultStyleType = "filling" // OwnerShape is default owner node shape. OwnerShape = "hexagon" // RepoShape is default repo node shape. RepoShape = "diamond" // TopicShape is default topic node shape. TopicShape = "ellipse" // LangShape is default lang node shape. LangShape = "square" // LinkShape is default link shape. LinkShape = "normal" // UnknownShape is unknown shape. UnknownShape = "unknown" )
View Source
const (
// DefaultWeight is default edge weight.
DefaultWeight = 1.0
)
Variables ¶
View Source
var ( // OwnerColor is default owner node color. OwnerColor = color.RGBA{R: 245, G: 154, B: 240} // RepoColor is default repo node color. RepoColor = color.RGBA{R: 0, G: 255, B: 153} // TopicColor is default topic node color. TopicColor = color.RGBA{R: 153, G: 153, B: 255} // LangColor is default lang node color. LangColor = color.RGBA{R: 255, G: 133, B: 102} // LinkColor is default link color. LinkColor = color.RGBA{R: 0, G: 0, B: 0} // UnknownColor is default color for unknown entity. UnknownColor = color.RGBA{R: 255, G: 255, B: 255} )
Functions ¶
func TopicAttrs ¶
Types ¶
type Entity ¶
type Entity int
Entity is a GitHub stars graph entity
func (Entity) DefaultStyle ¶
DefaultStyle returns default style.Style.
type Stars ¶
type Stars struct {
// contains filtered or unexported fields
}
Stars builds GitHub stars graph.
func NewBuilder ¶
NewBuilder creates a new GH stars graph builder and returns it.
Click to show internal directories.
Click to hide internal directories.