multipmuri

package module
Version: v1.14.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

multipmuri

A library to parse project-management URIs (inspired by @multiformats)

CircleCI GoDoc License GitHub release Go Report Card CodeFactor codecov Made by Manfred Touron

Usage

This libraries parses an URI that you could find in a README, markdown, comment field of the populat project-management tools.

You can use the library to parse an URI:

  • without context (i.e. github.com/moul/depviz#42)
  • with a context (i.e. #42 in the context of github.com/moul/depviz)
import "moul.io/multipmuri"

depviz42, _ := multipmuri.DecodeString("github.com/moul/depviz#42")
fmt.Println(depviz42) // https://github.com/moul/depviz/issues/42

depviz43, _ := depviz42.RelDecodeString("#43")
fmt.Println(depviz43) // https://github.com/moul/depviz/issues/43

Install

$ go get -u moul.io/multipmuri

License

© 2019 Manfred Touron - Apache-2.0 License

Documentation

Overview

Example
depviz42, _ := DecodeString("github.com/moul/depviz#42")
fmt.Println(depviz42) // https://github.com/moul/depviz/issues/42

depviz43, _ := depviz42.RelDecodeString("#43")
fmt.Println(depviz43) // https://github.com/moul/depviz/issues/43
Output:

https://github.com/moul/depviz/issues/42
https://github.com/moul/depviz/issues/43

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entities added in v1.4.0

type Entities []Entity

type Entity added in v1.0.0

type Entity interface {
	WithKind                                // an entity always have a kind (issue, MR, provider, service, milestone, ...)
	WithProvider                            // an entity always have a provider (GitHub, GitLab, Trello, Jira, ...)
	RelDecodeString(string) (Entity, error) // try to parse an URI based on relative context
	Equals(Entity) bool                     // is the same of
	Contains(Entity) bool                   // is parent of or is the same of
	String() string                         // canonical URL
	LocalID() string                        // short name
}

func DecodeString

func DecodeString(input string) (Entity, error)
Example
for _, uri := range []string{
	"https://github.com",
	"github.com",
	"github.com/moul",
	"@moul",
	"github.com/moul/depviz",
	"moul/depviz",
	"moul/depviz/milestone/1",
	"moul/depviz#1",
	"github.com/moul/depviz/issues/2",
	"github.com/moul/depviz/pull/1",
	"https://github.com/moul/depviz/issues/1",
	"https://github.com/moul/depviz#1",
	"github://moul/depviz#1",
	"github://github.com/moul/depviz#1",
	"github://https://github.com/moul/depviz#1",
	"github://ghenterprise.company.com/a/b#42",
	"github://https://ghenterprise.company.com",
	"git@github.com:moul/depviz",
} {
	decoded, err := DecodeString(uri)
	if err != nil {
		fmt.Printf("%-42s error: %v\n", uri, err)
		continue
	}
	fmt.Printf("%-42s %-48s %-8s %s\n", uri, decoded.String(), decoded.Provider(), decoded.Kind())
}
Output:

https://github.com                         https://github.com/                              github   service
github.com                                 https://github.com/                              github   service
github.com/moul                            https://github.com/moul                          github   user-or-organization
@moul                                      error: ambiguous uri "@moul"
github.com/moul/depviz                     https://github.com/moul/depviz                   github   project
moul/depviz                                error: ambiguous uri "moul/depviz"
moul/depviz/milestone/1                    error: ambiguous uri "moul/depviz/milestone/1"
moul/depviz#1                              error: ambiguous uri "moul/depviz#1"
github.com/moul/depviz/issues/2            https://github.com/moul/depviz/issues/2          github   issue
github.com/moul/depviz/pull/1              https://github.com/moul/depviz/issues/1          github   merge-request
https://github.com/moul/depviz/issues/1    https://github.com/moul/depviz/issues/1          github   issue
https://github.com/moul/depviz#1           https://github.com/moul/depviz/issues/1          github   issue-or-merge-request
github://moul/depviz#1                     https://github.com/moul/depviz/issues/1          github   issue-or-merge-request
github://github.com/moul/depviz#1          https://github.com/moul/depviz/issues/1          github   issue-or-merge-request
github://https://github.com/moul/depviz#1  https://github.com/moul/depviz/issues/1          github   issue-or-merge-request
github://ghenterprise.company.com/a/b#42   https://ghenterprise.company.com/a/b/issues/42   github   issue-or-merge-request
github://https://ghenterprise.company.com  https://ghenterprise.company.com/                github   service
git@github.com:moul/depviz                 https://github.com/moul/depviz                   github   project

func NewUnknownEntity added in v1.1.0

func NewUnknownEntity() Entity

func OwnerEntity added in v1.8.0

func OwnerEntity(source Entity) Entity
Example
entities := []Entity{
	NewGitHubIssue("", "moul", "depviz", "42"),
	NewGitHubMilestone("", "moul", "depviz", "42"),
	NewGitHubRepo("", "moul", "depviz"),
	NewGitHubOwner("", "moul"),
	NewGitHubService(""),
}
for _, entity := range entities {
	fmt.Printf("%-50s -> %v\n", entity, OwnerEntity(entity))
}
Output:

https://github.com/moul/depviz/issues/42           -> https://github.com/moul
https://github.com/moul/depviz/milestone/42        -> https://github.com/moul
https://github.com/moul/depviz                     -> https://github.com/moul
https://github.com/moul                            -> https://github.com/moul
https://github.com/                                -> <nil>

func RepoEntity added in v1.8.0

func RepoEntity(source Entity) Entity
Example
entities := []Entity{
	NewGitHubIssue("", "moul", "depviz", "42"),
	NewGitHubMilestone("", "moul", "depviz", "42"),
	NewGitHubRepo("", "moul", "depviz"),
	NewGitHubOwner("", "moul"),
	NewGitHubService(""),
}
for _, entity := range entities {
	fmt.Printf("%-50s -> %v\n", entity, RepoEntity(entity))
}
Output:

https://github.com/moul/depviz/issues/42           -> https://github.com/moul/depviz
https://github.com/moul/depviz/milestone/42        -> https://github.com/moul/depviz
https://github.com/moul/depviz                     -> https://github.com/moul/depviz
https://github.com/moul                            -> <nil>
https://github.com/                                -> <nil>

func ServiceEntity added in v1.8.0

func ServiceEntity(source Entity) Entity
Example
entities := []Entity{
	NewGitHubIssue("", "moul", "depviz", "42"),
	NewGitHubMilestone("", "moul", "depviz", "42"),
	NewGitHubRepo("", "moul", "depviz"),
	NewGitHubOwner("", "moul"),
	NewGitHubService(""),
}
for _, entity := range entities {
	fmt.Printf("%-50s -> %v\n", entity, ServiceEntity(entity))
}
Output:

https://github.com/moul/depviz/issues/42           -> https://github.com/
https://github.com/moul/depviz/milestone/42        -> https://github.com/
https://github.com/moul/depviz                     -> https://github.com/
https://github.com/moul                            -> https://github.com/
https://github.com/                                -> https://github.com/

type GitHubIssue

type GitHubIssue struct {
	Issue
	// contains filtered or unexported fields
}

func NewGitHubIssue added in v1.0.0

func NewGitHubIssue(hostname, ownerID, repoID, id string) *GitHubIssue
Example
entity := NewGitHubIssue("", "moul", "depviz", "42")
fmt.Println("entity")
fmt.Println(" ", entity.String())
fmt.Println(" ", entity.Kind())
fmt.Println(" ", entity.Provider())

relatives := []string{
	"@moul",
	"#4242",
	"moul2/depviz2#43",
	"moul/depviz#42",
	"moul/depviz",
	"github.com/moul2/depviz2#42",
	"https://github.com/moul2/depviz2#42",
	"https://example.com/a/b#42",
	"https://gitlab.com/moul/depviz/issues/42",
}
fmt.Println("relationships")
for _, name := range relatives {
	attrs := ""
	rel, err := entity.RelDecodeString(name)
	if err != nil {
		fmt.Printf("  %-42s -> error: %v\n", name, err)
		continue
	}
	if rel.Equals(entity) {
		attrs += " (equals)"
	}
	if entity.Contains(rel) {
		attrs += " (contains)"
	}
	if rel.Contains(entity) {
		attrs += " (is contained)"
	}
	fmt.Printf("  %-42s -> %s%s\n", name, rel.String(), attrs)
}
fmt.Println("repo:", entity.RepoEntity().String())
fmt.Println("owner:", entity.OwnerEntity().String())
fmt.Println("complex relationship:",
	entity.Owner().
		Service().
		Owner("test1").
		Repo("test2").
		Issue("42").
		Repo().
		Service().
		Owner("test3").
		Repo("test4").
		Milestone("42").
		String())
Output:

entity
  https://github.com/moul/depviz/issues/42
  issue
  github
relationships
  @moul                                      -> https://github.com/moul (is contained)
  #4242                                      -> https://github.com/moul/depviz/issues/4242
  moul2/depviz2#43                           -> https://github.com/moul2/depviz2/issues/43
  moul/depviz#42                             -> https://github.com/moul/depviz/issues/42 (equals)
  moul/depviz                                -> https://github.com/moul/depviz (is contained)
  github.com/moul2/depviz2#42                -> https://github.com/moul2/depviz2/issues/42
  https://github.com/moul2/depviz2#42        -> https://github.com/moul2/depviz2/issues/42
  https://example.com/a/b#42                 -> error: ambiguous uri "https://example.com/a/b#42"
  https://gitlab.com/moul/depviz/issues/42   -> https://gitlab.com/moul/depviz/issues/42
repo: https://github.com/moul/depviz
owner: https://github.com/moul
complex relationship: https://github.com/test3/test4/milestone/42

func (GitHubIssue) Contains added in v1.5.0

func (e GitHubIssue) Contains(other Entity) bool

func (GitHubIssue) Equals added in v1.5.0

func (e GitHubIssue) Equals(other Entity) bool

func (GitHubIssue) Hostname added in v1.0.0

func (e GitHubIssue) Hostname() string

func (GitHubIssue) ID

func (e GitHubIssue) ID() string

func (GitHubIssue) LocalID added in v1.10.0

func (e GitHubIssue) LocalID() string

func (GitHubIssue) Owner

func (e GitHubIssue) Owner() *GitHubOwner

func (GitHubIssue) OwnerEntity added in v1.2.0

func (e GitHubIssue) OwnerEntity() Entity

func (GitHubIssue) OwnerID added in v1.7.0

func (e GitHubIssue) OwnerID() string

func (GitHubIssue) Provider

func (e GitHubIssue) Provider() Provider

func (GitHubIssue) RelDecodeString

func (e GitHubIssue) RelDecodeString(input string) (Entity, error)

func (GitHubIssue) Repo

func (e GitHubIssue) Repo() *GitHubRepo

func (GitHubIssue) RepoEntity added in v1.2.0

func (e GitHubIssue) RepoEntity() Entity

func (GitHubIssue) RepoID added in v1.7.0

func (e GitHubIssue) RepoID() string

func (GitHubIssue) Service added in v1.7.0

func (e GitHubIssue) Service() *GitHubService

func (GitHubIssue) ServiceEntity added in v1.2.0

func (e GitHubIssue) ServiceEntity() Entity

func (GitHubIssue) String added in v1.5.0

func (e GitHubIssue) String() string

type GitHubIssueOrPullRequest

type GitHubIssueOrPullRequest struct {
	IssueOrMergeRequest
	// contains filtered or unexported fields
}

func NewGitHubIssueOrPullRequest added in v1.0.0

func NewGitHubIssueOrPullRequest(hostname, ownerID, repoID, id string) *GitHubIssueOrPullRequest

func (GitHubIssueOrPullRequest) Contains added in v1.5.0

func (e GitHubIssueOrPullRequest) Contains(other Entity) bool

func (GitHubIssueOrPullRequest) Equals added in v1.5.0

func (e GitHubIssueOrPullRequest) Equals(other Entity) bool

func (GitHubIssueOrPullRequest) Hostname added in v1.0.0

func (e GitHubIssueOrPullRequest) Hostname() string

func (GitHubIssueOrPullRequest) ID

func (e GitHubIssueOrPullRequest) ID() string

func (GitHubIssueOrPullRequest) LocalID added in v1.10.0

func (e GitHubIssueOrPullRequest) LocalID() string

func (GitHubIssueOrPullRequest) Owner

func (e GitHubIssueOrPullRequest) Owner() *GitHubOwner

func (GitHubIssueOrPullRequest) OwnerEntity added in v1.2.0

func (e GitHubIssueOrPullRequest) OwnerEntity() Entity

func (GitHubIssueOrPullRequest) OwnerID added in v1.7.0

func (e GitHubIssueOrPullRequest) OwnerID() string

func (GitHubIssueOrPullRequest) Provider

func (e GitHubIssueOrPullRequest) Provider() Provider

func (GitHubIssueOrPullRequest) RelDecodeString

func (e GitHubIssueOrPullRequest) RelDecodeString(input string) (Entity, error)

func (GitHubIssueOrPullRequest) Repo

func (e GitHubIssueOrPullRequest) Repo() *GitHubRepo

func (GitHubIssueOrPullRequest) RepoEntity added in v1.2.0

func (e GitHubIssueOrPullRequest) RepoEntity() Entity

func (GitHubIssueOrPullRequest) RepoID added in v1.7.0

func (e GitHubIssueOrPullRequest) RepoID() string

func (GitHubIssueOrPullRequest) Service added in v1.7.0

func (e GitHubIssueOrPullRequest) Service() *GitHubService

func (GitHubIssueOrPullRequest) ServiceEntity added in v1.2.0

func (e GitHubIssueOrPullRequest) ServiceEntity() Entity

func (GitHubIssueOrPullRequest) String added in v1.5.0

func (e GitHubIssueOrPullRequest) String() string

type GitHubLabel added in v1.11.0

type GitHubLabel struct {
	Label
	// contains filtered or unexported fields
}

func NewGitHubLabel added in v1.11.0

func NewGitHubLabel(hostname, ownerID, repoID, id string) *GitHubLabel

func (GitHubLabel) Contains added in v1.11.0

func (e GitHubLabel) Contains(other Entity) bool

func (GitHubLabel) Equals added in v1.11.0

func (e GitHubLabel) Equals(other Entity) bool

func (GitHubLabel) Hostname added in v1.11.0

func (e GitHubLabel) Hostname() string

func (GitHubLabel) ID added in v1.11.0

func (e GitHubLabel) ID() string

func (GitHubLabel) LocalID added in v1.11.0

func (e GitHubLabel) LocalID() string

func (GitHubLabel) Owner added in v1.11.0

func (e GitHubLabel) Owner() *GitHubOwner

func (GitHubLabel) OwnerEntity added in v1.11.0

func (e GitHubLabel) OwnerEntity() Entity

func (GitHubLabel) OwnerID added in v1.11.0

func (e GitHubLabel) OwnerID() string

func (GitHubLabel) Provider added in v1.11.0

func (e GitHubLabel) Provider() Provider

func (GitHubLabel) RelDecodeString added in v1.11.0

func (e GitHubLabel) RelDecodeString(input string) (Entity, error)

func (GitHubLabel) Repo added in v1.11.0

func (e GitHubLabel) Repo() *GitHubRepo

func (GitHubLabel) RepoEntity added in v1.11.0

func (e GitHubLabel) RepoEntity() Entity

func (GitHubLabel) RepoID added in v1.11.0

func (e GitHubLabel) RepoID() string

func (GitHubLabel) Service added in v1.11.0

func (e GitHubLabel) Service() *GitHubService

func (GitHubLabel) ServiceEntity added in v1.11.0

func (e GitHubLabel) ServiceEntity() Entity

func (GitHubLabel) String added in v1.11.0

func (e GitHubLabel) String() string

type GitHubMilestone

type GitHubMilestone struct {
	Milestone
	// contains filtered or unexported fields
}

func NewGitHubMilestone added in v1.0.0

func NewGitHubMilestone(hostname, ownerID, repoID, id string) *GitHubMilestone

func (GitHubMilestone) Contains added in v1.5.0

func (e GitHubMilestone) Contains(other Entity) bool

func (GitHubMilestone) Equals added in v1.5.0

func (e GitHubMilestone) Equals(other Entity) bool

func (GitHubMilestone) Hostname added in v1.0.0

func (e GitHubMilestone) Hostname() string

func (GitHubMilestone) ID

func (e GitHubMilestone) ID() string

func (GitHubMilestone) LocalID added in v1.10.0

func (e GitHubMilestone) LocalID() string

func (GitHubMilestone) Owner

func (e GitHubMilestone) Owner() *GitHubOwner

func (GitHubMilestone) OwnerEntity added in v1.2.0

func (e GitHubMilestone) OwnerEntity() Entity

func (GitHubMilestone) OwnerID added in v1.7.0

func (e GitHubMilestone) OwnerID() string

func (GitHubMilestone) Provider

func (e GitHubMilestone) Provider() Provider

func (GitHubMilestone) RelDecodeString

func (e GitHubMilestone) RelDecodeString(input string) (Entity, error)

func (GitHubMilestone) Repo

func (e GitHubMilestone) Repo() *GitHubRepo

func (GitHubMilestone) RepoEntity added in v1.2.0

func (e GitHubMilestone) RepoEntity() Entity

func (GitHubMilestone) RepoID added in v1.7.0

func (e GitHubMilestone) RepoID() string

func (GitHubMilestone) Service added in v1.7.0

func (e GitHubMilestone) Service() *GitHubService

func (GitHubMilestone) ServiceEntity added in v1.2.0

func (e GitHubMilestone) ServiceEntity() Entity

func (GitHubMilestone) String added in v1.5.0

func (e GitHubMilestone) String() string

type GitHubOwner added in v1.2.0

type GitHubOwner struct {
	UserOrOrganization
	// contains filtered or unexported fields
}

func NewGitHubOwner added in v1.2.0

func NewGitHubOwner(hostname, ownerID string) *GitHubOwner

func (GitHubOwner) Contains added in v1.5.0

func (e GitHubOwner) Contains(other Entity) bool

func (GitHubOwner) Equals added in v1.5.0

func (e GitHubOwner) Equals(other Entity) bool

func (GitHubOwner) Hostname added in v1.2.0

func (e GitHubOwner) Hostname() string

func (GitHubOwner) LocalID added in v1.10.0

func (e GitHubOwner) LocalID() string

func (GitHubOwner) Owner added in v1.2.0

func (e GitHubOwner) Owner() *GitHubOwner

func (GitHubOwner) OwnerEntity added in v1.7.0

func (e GitHubOwner) OwnerEntity() Entity

func (GitHubOwner) OwnerID added in v1.7.0

func (e GitHubOwner) OwnerID() string

func (GitHubOwner) Provider added in v1.2.0

func (e GitHubOwner) Provider() Provider

func (GitHubOwner) RelDecodeString added in v1.2.0

func (e GitHubOwner) RelDecodeString(input string) (Entity, error)

func (GitHubOwner) Repo added in v1.7.0

func (e GitHubOwner) Repo(repoID string) *GitHubRepo

func (GitHubOwner) RepoEntity added in v1.2.0

func (e GitHubOwner) RepoEntity(repoID string) Entity

func (GitHubOwner) Service added in v1.7.0

func (e GitHubOwner) Service() *GitHubService

func (GitHubOwner) ServiceEntity added in v1.2.0

func (e GitHubOwner) ServiceEntity() Entity

func (GitHubOwner) String added in v1.5.0

func (e GitHubOwner) String() string

type GitHubPullRequest

type GitHubPullRequest struct {
	MergeRequest
	// contains filtered or unexported fields
}

func NewGitHubPullRequest added in v1.0.0

func NewGitHubPullRequest(hostname, ownerID, repoID, id string) *GitHubPullRequest

func (GitHubPullRequest) Contains added in v1.5.0

func (e GitHubPullRequest) Contains(other Entity) bool

func (GitHubPullRequest) Equals added in v1.5.0

func (e GitHubPullRequest) Equals(other Entity) bool

func (GitHubPullRequest) Hostname added in v1.0.0

func (e GitHubPullRequest) Hostname() string

func (GitHubPullRequest) ID

func (e GitHubPullRequest) ID() string

func (GitHubPullRequest) LocalID added in v1.10.0

func (e GitHubPullRequest) LocalID() string

func (GitHubPullRequest) Owner

func (e GitHubPullRequest) Owner() *GitHubOwner

func (GitHubPullRequest) OwnerEntity added in v1.2.0

func (e GitHubPullRequest) OwnerEntity() Entity

func (GitHubPullRequest) OwnerID added in v1.7.0

func (e GitHubPullRequest) OwnerID() string

func (GitHubPullRequest) Provider

func (e GitHubPullRequest) Provider() Provider

func (GitHubPullRequest) RelDecodeString

func (e GitHubPullRequest) RelDecodeString(input string) (Entity, error)

func (GitHubPullRequest) Repo

func (e GitHubPullRequest) Repo() *GitHubRepo

func (GitHubPullRequest) RepoEntity added in v1.2.0

func (e GitHubPullRequest) RepoEntity() Entity

func (GitHubPullRequest) RepoID added in v1.7.0

func (e GitHubPullRequest) RepoID() string

func (GitHubPullRequest) Service added in v1.7.0

func (e GitHubPullRequest) Service() *GitHubService

func (GitHubPullRequest) ServiceEntity added in v1.2.0

func (e GitHubPullRequest) ServiceEntity() Entity

func (GitHubPullRequest) String added in v1.5.0

func (e GitHubPullRequest) String() string

type GitHubRepo

type GitHubRepo struct {
	Project
	// contains filtered or unexported fields
}

func NewGitHubRepo added in v1.0.0

func NewGitHubRepo(hostname, ownerID, repoID string) *GitHubRepo

func (GitHubRepo) Contains added in v1.5.0

func (e GitHubRepo) Contains(other Entity) bool

func (GitHubRepo) Equals added in v1.5.0

func (e GitHubRepo) Equals(other Entity) bool

func (GitHubRepo) Hostname added in v1.0.0

func (e GitHubRepo) Hostname() string

func (GitHubRepo) Issue added in v1.7.0

func (e GitHubRepo) Issue(id string) *GitHubIssue

func (GitHubRepo) IssueEntity added in v1.2.0

func (e GitHubRepo) IssueEntity(id string) Entity

func (GitHubRepo) LocalID added in v1.10.0

func (e GitHubRepo) LocalID() string

func (GitHubRepo) Milestone added in v1.7.0

func (e GitHubRepo) Milestone(id string) *GitHubMilestone

func (GitHubRepo) MilestoneEntity added in v1.2.0

func (e GitHubRepo) MilestoneEntity(id string) Entity

func (GitHubRepo) Owner

func (e GitHubRepo) Owner() *GitHubOwner

func (GitHubRepo) OwnerEntity added in v1.2.0

func (e GitHubRepo) OwnerEntity() Entity

func (GitHubRepo) OwnerID added in v1.7.0

func (e GitHubRepo) OwnerID() string

func (GitHubRepo) Provider

func (e GitHubRepo) Provider() Provider

func (GitHubRepo) RelDecodeString

func (e GitHubRepo) RelDecodeString(input string) (Entity, error)

func (GitHubRepo) Repo

func (e GitHubRepo) Repo() *GitHubRepo

func (GitHubRepo) RepoEntity added in v1.4.0

func (e GitHubRepo) RepoEntity() Entity

func (GitHubRepo) RepoID added in v1.7.0

func (e GitHubRepo) RepoID() string

func (GitHubRepo) Service added in v1.7.0

func (e GitHubRepo) Service() *GitHubService

func (GitHubRepo) ServiceEntity added in v1.2.0

func (e GitHubRepo) ServiceEntity() Entity

func (GitHubRepo) String added in v1.5.0

func (e GitHubRepo) String() string

type GitHubService

type GitHubService struct {
	Service
	// contains filtered or unexported fields
}

func NewGitHubService added in v1.0.0

func NewGitHubService(hostname string) *GitHubService
Example
entity := NewGitHubService("github.com")
fmt.Println("entity")
fmt.Println(" ", entity.String())
fmt.Println(" ", entity.Kind())
fmt.Println(" ", entity.Provider())

relatives := []string{
	"https://github.com",
	"github.com",
	"github.com/moul",
	"@moul",
	"github.com/moul/depviz",
	"moul/depviz",
	"moul/depviz/labels/bug",
	"moul/depviz/labels/a/b/c",
	"moul/depviz/milestone/1",
	"moul/depviz#1",
	"github.com/moul/depviz/issues/2",
	"github.com/moul/depviz/pull/1",
	"https://github.com/moul/depviz/issues/1",
	"https://github.com/moul/depviz#1",
	"github://moul/depviz#1",
	"github://github.com/moul/depviz#1",
	"github://https://github.com/moul/depviz#1",
}
fmt.Println("relationships")
for _, name := range relatives {
	rel, err := entity.RelDecodeString(name)
	if err != nil {
		fmt.Printf("  %-42s -> error: %v\n", name, err)
		continue
	}
	fmt.Printf("  %-42s -> %-43s %s\n", name, rel.String(), rel.Kind())
}
Output:

entity
  https://github.com/
  service
  github
relationships
  https://github.com                         -> https://github.com/                         service
  github.com                                 -> https://github.com/                         service
  github.com/moul                            -> https://github.com/moul                     user-or-organization
  @moul                                      -> https://github.com/moul                     user-or-organization
  github.com/moul/depviz                     -> https://github.com/moul/depviz              project
  moul/depviz                                -> https://github.com/moul/depviz              project
  moul/depviz/labels/bug                     -> https://github.com/moul/depviz/labels/bug   label
  moul/depviz/labels/a/b/c                   -> https://github.com/moul/depviz/labels/a/b/c label
  moul/depviz/milestone/1                    -> https://github.com/moul/depviz/milestone/1  milestone
  moul/depviz#1                              -> https://github.com/moul/depviz/issues/1     issue-or-merge-request
  github.com/moul/depviz/issues/2            -> https://github.com/moul/depviz/issues/2     issue
  github.com/moul/depviz/pull/1              -> https://github.com/moul/depviz/issues/1     merge-request
  https://github.com/moul/depviz/issues/1    -> https://github.com/moul/depviz/issues/1     issue
  https://github.com/moul/depviz#1           -> https://github.com/moul/depviz/issues/1     issue-or-merge-request
  github://moul/depviz#1                     -> https://github.com/moul/depviz/issues/1     issue-or-merge-request
  github://github.com/moul/depviz#1          -> https://github.com/moul/depviz/issues/1     issue-or-merge-request
  github://https://github.com/moul/depviz#1  -> https://github.com/moul/depviz/issues/1     issue-or-merge-request

func (GitHubService) Contains added in v1.5.0

func (e GitHubService) Contains(other Entity) bool

func (GitHubService) Equals added in v1.5.0

func (e GitHubService) Equals(other Entity) bool

func (GitHubService) Hostname added in v1.0.0

func (e GitHubService) Hostname() string

func (GitHubService) LocalID added in v1.10.0

func (e GitHubService) LocalID() string

func (GitHubService) Owner added in v1.7.0

func (e GitHubService) Owner(ownerID string) *GitHubOwner

func (GitHubService) OwnerEntity added in v1.2.0

func (e GitHubService) OwnerEntity(ownerID string) Entity

func (GitHubService) Provider

func (e GitHubService) Provider() Provider

func (GitHubService) RelDecodeString

func (e GitHubService) RelDecodeString(input string) (Entity, error)

func (GitHubService) Service added in v1.7.0

func (e GitHubService) Service() *GitHubService

func (GitHubService) ServiceEntity added in v1.7.0

func (e GitHubService) ServiceEntity() Entity

func (GitHubService) String added in v1.5.0

func (e GitHubService) String() string

type GitLabIssue added in v1.0.0

type GitLabIssue struct {
	Issue
	// contains filtered or unexported fields
}

func NewGitLabIssue added in v1.0.0

func NewGitLabIssue(hostname, owner, repo, id string) *GitLabIssue
Example
entity := NewGitLabIssue("", "moul", "depviz", "42")
fmt.Println("entity")
fmt.Println(" ", entity.String())
fmt.Println(" ", entity.Kind())
fmt.Println(" ", entity.Provider())

relatives := []string{
	"@moul",
	"#4242",
	"moul2/depviz2#43",
	"gitlab.com/moul2/depviz2#42",
	"https://gitlab.com/moul2/depviz2#42",
	"https://example.com/a/b#42",
	"https://gitlab.com/moul/depviz/issues/42",
}
fmt.Println("relationships")
for _, name := range relatives {
	rel, err := entity.RelDecodeString(name)
	if err != nil {
		fmt.Printf("  %-42s -> error: %v\n", name, err)
		continue
	}
	fmt.Printf("  %-42s -> %s\n", name, rel.String())
}
fmt.Println("repo:", entity.RepoEntity().String())
Output:

entity
  https://gitlab.com/moul/depviz/issues/42
  issue
  gitlab
relationships
  @moul                                      -> https://gitlab.com/moul
  #4242                                      -> https://gitlab.com/moul/depviz/issues/4242
  moul2/depviz2#43                           -> https://gitlab.com/moul2/depviz2/issues/43
  gitlab.com/moul2/depviz2#42                -> https://gitlab.com/moul2/depviz2/issues/42
  https://gitlab.com/moul2/depviz2#42        -> https://gitlab.com/moul2/depviz2/issues/42
  https://example.com/a/b#42                 -> error: ambiguous uri "https://example.com/a/b#42"
  https://gitlab.com/moul/depviz/issues/42   -> https://gitlab.com/moul/depviz/issues/42
repo: https://gitlab.com/moul/depviz

func (GitLabIssue) Contains added in v1.5.0

func (e GitLabIssue) Contains(other Entity) bool

func (GitLabIssue) Equals added in v1.5.0

func (e GitLabIssue) Equals(other Entity) bool

func (GitLabIssue) Hostname added in v1.0.0

func (e GitLabIssue) Hostname() string

func (GitLabIssue) ID added in v1.0.0

func (e GitLabIssue) ID() string

func (GitLabIssue) LocalID added in v1.10.0

func (e GitLabIssue) LocalID() string

func (GitLabIssue) Owner added in v1.0.0

func (e GitLabIssue) Owner() string

func (GitLabIssue) Provider added in v1.0.0

func (e GitLabIssue) Provider() Provider

func (GitLabIssue) RelDecodeString added in v1.0.0

func (e GitLabIssue) RelDecodeString(input string) (Entity, error)

func (GitLabIssue) Repo added in v1.0.0

func (e GitLabIssue) Repo() string

func (GitLabIssue) RepoEntity added in v1.3.0

func (e GitLabIssue) RepoEntity() *GitLabRepo

func (GitLabIssue) String added in v1.5.0

func (e GitLabIssue) String() string

type GitLabMergeRequest added in v1.0.0

type GitLabMergeRequest struct {
	MergeRequest
	// contains filtered or unexported fields
}

func NewGitLabMergeRequest added in v1.0.0

func NewGitLabMergeRequest(hostname, owner, repo, id string) *GitLabMergeRequest

func (GitLabMergeRequest) Contains added in v1.5.0

func (e GitLabMergeRequest) Contains(other Entity) bool

func (GitLabMergeRequest) Equals added in v1.5.0

func (e GitLabMergeRequest) Equals(other Entity) bool

func (GitLabMergeRequest) Hostname added in v1.0.0

func (e GitLabMergeRequest) Hostname() string

func (GitLabMergeRequest) ID added in v1.0.0

func (e GitLabMergeRequest) ID() string

func (GitLabMergeRequest) LocalID added in v1.10.0

func (e GitLabMergeRequest) LocalID() string

func (GitLabMergeRequest) Owner added in v1.0.0

func (e GitLabMergeRequest) Owner() string

func (GitLabMergeRequest) Provider added in v1.0.0

func (e GitLabMergeRequest) Provider() Provider

func (GitLabMergeRequest) RelDecodeString added in v1.0.0

func (e GitLabMergeRequest) RelDecodeString(input string) (Entity, error)

func (GitLabMergeRequest) Repo added in v1.0.0

func (e GitLabMergeRequest) Repo() string

func (GitLabMergeRequest) RepoEntity added in v1.3.0

func (e GitLabMergeRequest) RepoEntity() *GitLabRepo

func (GitLabMergeRequest) String added in v1.5.0

func (e GitLabMergeRequest) String() string

type GitLabMilestone added in v1.0.0

type GitLabMilestone struct {
	Milestone
	// contains filtered or unexported fields
}

func NewGitLabMilestone added in v1.0.0

func NewGitLabMilestone(hostname, owner, repo, id string) *GitLabMilestone

func (GitLabMilestone) Contains added in v1.5.0

func (e GitLabMilestone) Contains(other Entity) bool

func (GitLabMilestone) Equals added in v1.5.0

func (e GitLabMilestone) Equals(other Entity) bool

func (GitLabMilestone) Hostname added in v1.0.0

func (e GitLabMilestone) Hostname() string

func (GitLabMilestone) ID added in v1.0.0

func (e GitLabMilestone) ID() string

func (GitLabMilestone) LocalID added in v1.10.0

func (e GitLabMilestone) LocalID() string

func (GitLabMilestone) Owner added in v1.0.0

func (e GitLabMilestone) Owner() string

func (GitLabMilestone) Provider added in v1.0.0

func (e GitLabMilestone) Provider() Provider

func (GitLabMilestone) RelDecodeString added in v1.0.0

func (e GitLabMilestone) RelDecodeString(input string) (Entity, error)

func (GitLabMilestone) Repo added in v1.0.0

func (e GitLabMilestone) Repo() string

func (GitLabMilestone) RepoEntity added in v1.3.0

func (e GitLabMilestone) RepoEntity() *GitLabRepo

func (GitLabMilestone) String added in v1.5.0

func (e GitLabMilestone) String() string

type GitLabOwner added in v1.5.0

type GitLabOwner struct {
	UserOrOrganization
	// contains filtered or unexported fields
}

func NewGitLabOwner added in v1.5.0

func NewGitLabOwner(hostname, owner string) *GitLabOwner

func (GitLabOwner) Contains added in v1.5.0

func (e GitLabOwner) Contains(other Entity) bool

func (GitLabOwner) Equals added in v1.5.0

func (e GitLabOwner) Equals(other Entity) bool

func (GitLabOwner) Hostname added in v1.5.0

func (e GitLabOwner) Hostname() string

func (GitLabOwner) LocalID added in v1.10.0

func (e GitLabOwner) LocalID() string

func (GitLabOwner) Owner added in v1.5.0

func (e GitLabOwner) Owner() string

func (GitLabOwner) Provider added in v1.5.0

func (e GitLabOwner) Provider() Provider

func (GitLabOwner) RelDecodeString added in v1.5.0

func (e GitLabOwner) RelDecodeString(input string) (Entity, error)

func (GitLabOwner) RepoEntity added in v1.5.0

func (e GitLabOwner) RepoEntity(repo string) *GitLabRepo

func (GitLabOwner) ServiceEntity added in v1.5.0

func (e GitLabOwner) ServiceEntity() *GitLabService

func (GitLabOwner) String added in v1.5.0

func (e GitLabOwner) String() string

type GitLabOwnerOrRepo added in v1.5.0

type GitLabOwnerOrRepo struct {
	OrganizationOrProject
	// contains filtered or unexported fields
}

func NewGitLabOwnerOrRepo added in v1.5.0

func NewGitLabOwnerOrRepo(hostname, owner, repo string) *GitLabOwnerOrRepo

func (GitLabOwnerOrRepo) Contains added in v1.5.0

func (e GitLabOwnerOrRepo) Contains(other Entity) bool

func (GitLabOwnerOrRepo) Equals added in v1.5.0

func (e GitLabOwnerOrRepo) Equals(other Entity) bool

func (GitLabOwnerOrRepo) Hostname added in v1.5.0

func (e GitLabOwnerOrRepo) Hostname() string

func (GitLabOwnerOrRepo) LocalID added in v1.10.0

func (e GitLabOwnerOrRepo) LocalID() string

func (GitLabOwnerOrRepo) Owner added in v1.5.0

func (e GitLabOwnerOrRepo) Owner() string

func (GitLabOwnerOrRepo) Provider added in v1.5.0

func (e GitLabOwnerOrRepo) Provider() Provider

func (GitLabOwnerOrRepo) RelDecodeString added in v1.5.0

func (e GitLabOwnerOrRepo) RelDecodeString(input string) (Entity, error)

func (GitLabOwnerOrRepo) Repo added in v1.5.0

func (e GitLabOwnerOrRepo) Repo() string

func (GitLabOwnerOrRepo) RepoEntity added in v1.5.0

func (e GitLabOwnerOrRepo) RepoEntity() *GitLabRepo

func (GitLabOwnerOrRepo) ServiceEntity added in v1.5.0

func (e GitLabOwnerOrRepo) ServiceEntity() *GitLabService

func (GitLabOwnerOrRepo) String added in v1.5.0

func (e GitLabOwnerOrRepo) String() string

type GitLabRepo added in v1.0.0

type GitLabRepo struct {
	Project
	// contains filtered or unexported fields
}

func NewGitLabRepo added in v1.0.0

func NewGitLabRepo(hostname, owner, repo string) *GitLabRepo

func (GitLabRepo) Contains added in v1.5.0

func (e GitLabRepo) Contains(other Entity) bool

func (GitLabRepo) Equals added in v1.5.0

func (e GitLabRepo) Equals(other Entity) bool

func (GitLabRepo) Hostname added in v1.0.0

func (e GitLabRepo) Hostname() string

func (GitLabRepo) LocalID added in v1.10.0

func (e GitLabRepo) LocalID() string

func (GitLabRepo) Owner added in v1.0.0

func (e GitLabRepo) Owner() string

func (GitLabRepo) Provider added in v1.0.0

func (e GitLabRepo) Provider() Provider

func (GitLabRepo) RelDecodeString added in v1.0.0

func (e GitLabRepo) RelDecodeString(input string) (Entity, error)

func (GitLabRepo) Repo added in v1.0.0

func (e GitLabRepo) Repo() string

func (GitLabRepo) RepoEntity added in v1.3.0

func (e GitLabRepo) RepoEntity() *GitLabRepo

func (GitLabRepo) ServiceEntity added in v1.3.0

func (e GitLabRepo) ServiceEntity() *GitLabService

func (GitLabRepo) String added in v1.5.0

func (e GitLabRepo) String() string

type GitLabService added in v1.0.0

type GitLabService struct {
	Service
	// contains filtered or unexported fields
}

func NewGitLabService added in v1.0.0

func NewGitLabService(hostname string) *GitLabService
Example
entity := NewGitLabService("gitlab.com")
fmt.Println("entity")
fmt.Println(" ", entity.String())
fmt.Println(" ", entity.Kind())
fmt.Println(" ", entity.Provider())

relatives := []string{
	"https://gitlab.com",
	"gitlab.com",
	"gitlab.com/moul",
	"@moul",
	"gitlab.com/moul/depviz",
	"moul/depviz",
	"moul/depviz/-/milestones/1",
	"moul/depviz#1",
	"gitlab.com/moul/depviz/issues/2",
	"gitlab.com/moul/depviz/merge_requests/1",
	"https://gitlab.com/moul/depviz/issues/1",
	"https://gitlab.com/moul/depviz#1",
	"gitlab://moul/depviz#1",
	"gitlab://gitlab.com/moul/depviz#1",
	"gitlab://https://gitlab.com/moul/depviz#1",
	"gitlab.com/a/b/c/d/e/f",
	"gitlab.com/a/b/c/d/e/f#1",
	"gitlab.com/a/b/c/d/e/f!1",
	"a/b/c/d/e/f!1",
	"a/b/c/d/e/f#1",
	"a/b#1",
	"a/b!1",
}
fmt.Println("relationships")
for _, name := range relatives {
	rel, err := entity.RelDecodeString(name)
	if err != nil {
		fmt.Printf("  %-42s -> error: %v\n", name, err)
		continue
	}
	fmt.Printf("  %-42s -> %-48s %s\n", name, rel.String(), rel.Kind())
}
Output:

entity
  https://gitlab.com/
  service
  gitlab
relationships
  https://gitlab.com                         -> https://gitlab.com/                              service
  gitlab.com                                 -> https://gitlab.com/                              service
  gitlab.com/moul                            -> https://gitlab.com/moul                          user-or-organization
  @moul                                      -> https://gitlab.com/moul                          user-or-organization
  gitlab.com/moul/depviz                     -> https://gitlab.com/moul/depviz                   organization-or-project
  moul/depviz                                -> https://gitlab.com/moul/depviz                   organization-or-project
  moul/depviz/-/milestones/1                 -> https://gitlab.com/moul/depviz/-/milestones/1    milestone
  moul/depviz#1                              -> https://gitlab.com/moul/depviz/issues/1          issue
  gitlab.com/moul/depviz/issues/2            -> https://gitlab.com/moul/depviz/issues/2          issue
  gitlab.com/moul/depviz/merge_requests/1    -> https://gitlab.com/moul/depviz/merge_requests/1  merge-request
  https://gitlab.com/moul/depviz/issues/1    -> https://gitlab.com/moul/depviz/issues/1          issue
  https://gitlab.com/moul/depviz#1           -> https://gitlab.com/moul/depviz/issues/1          issue
  gitlab://moul/depviz#1                     -> https://gitlab.com/moul/depviz/issues/1          issue
  gitlab://gitlab.com/moul/depviz#1          -> https://gitlab.com/moul/depviz/issues/1          issue
  gitlab://https://gitlab.com/moul/depviz#1  -> https://gitlab.com/moul/depviz/issues/1          issue
  gitlab.com/a/b/c/d/e/f                     -> https://gitlab.com/a/b/c/d/e/f                   project
  gitlab.com/a/b/c/d/e/f#1                   -> https://gitlab.com/a/b/c/d/e/f/issues/1          issue
  gitlab.com/a/b/c/d/e/f!1                   -> https://gitlab.com/a/b/c/d/e/f/merge_requests/1  merge-request
  a/b/c/d/e/f!1                              -> https://gitlab.com/a/b/c/d/e/f/merge_requests/1  merge-request
  a/b/c/d/e/f#1                              -> https://gitlab.com/a/b/c/d/e/f/issues/1          issue
  a/b#1                                      -> https://gitlab.com/a/b/issues/1                  issue
  a/b!1                                      -> https://gitlab.com/a/b/merge_requests/1          merge-request

func (GitLabService) Contains added in v1.5.0

func (e GitLabService) Contains(other Entity) bool

func (GitLabService) Equals added in v1.5.0

func (e GitLabService) Equals(other Entity) bool

func (GitLabService) Hostname added in v1.0.0

func (e GitLabService) Hostname() string

func (GitLabService) LocalID added in v1.10.0

func (e GitLabService) LocalID() string

func (GitLabService) Provider added in v1.0.0

func (e GitLabService) Provider() Provider

func (GitLabService) RelDecodeString added in v1.0.0

func (e GitLabService) RelDecodeString(input string) (Entity, error)

func (GitLabService) ServiceEntity added in v1.3.0

func (e GitLabService) ServiceEntity() *GitLabService

func (GitLabService) String added in v1.5.0

func (e GitLabService) String() string

type Issue

type Issue interface {
	WithKind
	IsIssue()
}

type IssueOrMergeRequest added in v1.0.0

type IssueOrMergeRequest interface {
	WithKind
	IsIssueOrMergeRequest()
}

type Kind

type Kind string
const (
	UnknownKind               Kind = "unknown-kind"
	IssueKind                 Kind = "issue"
	MergeRequestKind          Kind = "merge-request"
	ProviderKind              Kind = "provider"
	UserOrOrganizationKind    Kind = "user-or-organization"
	OrganizationOrProjectKind Kind = "organization-or-project"
	ServiceKind               Kind = "service"
	MilestoneKind             Kind = "milestone"
	IssueOrMergeRequestKind   Kind = "issue-or-merge-request"
	UserKind                  Kind = "user"
	ProjectKind               Kind = "project"
	LabelKind                 Kind = "label"
)

type Label added in v1.11.0

type Label interface {
	WithKind
	IsLabel()
}

type MergeRequest

type MergeRequest interface {
	WithKind
	IsMergeRequest()
}

type Milestone added in v1.0.0

type Milestone interface {
	WithKind
	IsMilestone()
}

type OrganizationOrProject added in v1.0.0

type OrganizationOrProject interface {
	WithKind
	IsOrganizationOrProject()
}

type Project added in v1.0.0

type Project interface {
	WithKind
	IsProject()
}

type Provider

type Provider string
const (
	UnknownProvider Provider = "unknown-provider"
	GitHubProvider  Provider = "github"
	GitLabProvider  Provider = "gitlab"
	JiraProvider    Provider = "jira"
	TrelloProvider  Provider = "trello"
)

type Service

type Service interface {
	WithKind
	IsService()
}

type TrelloBoard added in v1.9.0

type TrelloBoard struct {
	Project
	// contains filtered or unexported fields
}

func NewTrelloBoard added in v1.9.0

func NewTrelloBoard(id string) *TrelloBoard

func (TrelloBoard) Contains added in v1.9.0

func (e TrelloBoard) Contains(other Entity) bool

func (TrelloBoard) Equals added in v1.9.0

func (e TrelloBoard) Equals(other Entity) bool

func (TrelloBoard) ID added in v1.9.0

func (e TrelloBoard) ID() string

func (TrelloBoard) LocalID added in v1.10.0

func (e TrelloBoard) LocalID() string

func (TrelloBoard) Provider added in v1.9.0

func (e TrelloBoard) Provider() Provider

func (TrelloBoard) RelDecodeString added in v1.9.0

func (e TrelloBoard) RelDecodeString(input string) (Entity, error)

func (TrelloBoard) String added in v1.9.0

func (e TrelloBoard) String() string

type TrelloCard added in v1.9.0

type TrelloCard struct {
	Issue
	// contains filtered or unexported fields
}

func NewTrelloCard added in v1.9.0

func NewTrelloCard(id string) *TrelloCard
Example
entity := NewTrelloCard("uworIKRP")
fmt.Println("entity")
fmt.Println(" ", entity.String())
fmt.Println(" ", entity.Kind())
fmt.Println(" ", entity.Provider())

relatives := []string{
	"https://trello.com/manfredtouron/boards",
	"https://trello.com/bertytech/home",
	"https://trello.com/manfredtouron",
	"https://trello.com/b/QO8ORojV/test",
	"https://trello.com/b/QO8ORojV",
	"https://trello.com/c/uworIKRP/1-card-1",
	"https://trello.com/c/uworIKRP",
	"https://trello.com/c/pqon4iMh/2-card-2#comment-5d79f330ae4a3225dff6faf9",
	"https://trello.com/c/pqon4iMh/blah#action-5d79f2b6053f4c137c9b9a28",
	"@manfredtouron",
}
fmt.Println("relationships")
for _, name := range relatives {
	attrs := ""
	rel, err := entity.RelDecodeString(name)
	if err != nil {
		fmt.Printf("  %-80s -> error: %v\n", name, err)
		continue
	}
	if rel.Equals(entity) {
		attrs += " (equals)"
	}
	if entity.Contains(rel) {
		attrs += " (contains)"
	}
	if rel.Contains(entity) {
		attrs += " (is contained)"
	}
	fmt.Printf("  %-80s -> %s %s%s\n", name, rel.String(), rel.Kind(), attrs)
}
Output:

entity
  https://trello.com/c/uworIKRP
  issue
  trello
relationships
  https://trello.com/manfredtouron/boards                                          -> https://trello.com/manfredtouron user-or-organization
  https://trello.com/bertytech/home                                                -> https://trello.com/bertytech user-or-organization
  https://trello.com/manfredtouron                                                 -> https://trello.com/manfredtouron user-or-organization
  https://trello.com/b/QO8ORojV/test                                               -> https://trello.com/b/QO8ORojV project
  https://trello.com/b/QO8ORojV                                                    -> https://trello.com/b/QO8ORojV project
  https://trello.com/c/uworIKRP/1-card-1                                           -> https://trello.com/c/uworIKRP issue (equals)
  https://trello.com/c/uworIKRP                                                    -> https://trello.com/c/uworIKRP issue (equals)
  https://trello.com/c/pqon4iMh/2-card-2#comment-5d79f330ae4a3225dff6faf9          -> https://trello.com/c/pqon4iMh issue
  https://trello.com/c/pqon4iMh/blah#action-5d79f2b6053f4c137c9b9a28               -> https://trello.com/c/pqon4iMh issue
  @manfredtouron                                                                   -> https://trello.com/manfredtouron user-or-organization

func (TrelloCard) Contains added in v1.9.0

func (e TrelloCard) Contains(other Entity) bool

func (TrelloCard) Equals added in v1.9.0

func (e TrelloCard) Equals(other Entity) bool

func (TrelloCard) ID added in v1.9.0

func (e TrelloCard) ID() string

func (TrelloCard) LocalID added in v1.10.0

func (e TrelloCard) LocalID() string

func (TrelloCard) Provider added in v1.9.0

func (e TrelloCard) Provider() Provider

func (TrelloCard) RelDecodeString added in v1.9.0

func (e TrelloCard) RelDecodeString(input string) (Entity, error)

func (TrelloCard) String added in v1.9.0

func (e TrelloCard) String() string

type TrelloService added in v1.9.0

type TrelloService struct {
	Service
}

func NewTrelloService added in v1.9.0

func NewTrelloService() *TrelloService

func (TrelloService) Contains added in v1.9.0

func (e TrelloService) Contains(other Entity) bool

func (TrelloService) Equals added in v1.9.0

func (e TrelloService) Equals(other Entity) bool

func (TrelloService) LocalID added in v1.10.0

func (e TrelloService) LocalID() string

func (TrelloService) Provider added in v1.9.0

func (e TrelloService) Provider() Provider

func (TrelloService) RelDecodeString added in v1.9.0

func (e TrelloService) RelDecodeString(input string) (Entity, error)

func (TrelloService) String added in v1.9.0

func (e TrelloService) String() string

type TrelloUser added in v1.9.0

type TrelloUser struct {
	UserOrOrganization
	// contains filtered or unexported fields
}

func NewTrelloUser added in v1.9.0

func NewTrelloUser(id string) *TrelloUser

func (TrelloUser) Contains added in v1.9.0

func (e TrelloUser) Contains(other Entity) bool

func (TrelloUser) Equals added in v1.9.0

func (e TrelloUser) Equals(other Entity) bool

func (TrelloUser) ID added in v1.9.0

func (e TrelloUser) ID() string

func (TrelloUser) LocalID added in v1.10.0

func (e TrelloUser) LocalID() string

func (TrelloUser) Provider added in v1.9.0

func (e TrelloUser) Provider() Provider

func (TrelloUser) RelDecodeString added in v1.9.0

func (e TrelloUser) RelDecodeString(input string) (Entity, error)

func (TrelloUser) String added in v1.9.0

func (e TrelloUser) String() string

type UserOrOrganization

type UserOrOrganization interface {
	WithKind
	IsUserOrOrganization()
}

type WithKind added in v1.0.0

type WithKind interface {
	Kind() Kind
}

type WithProvider added in v1.0.0

type WithProvider interface {
	Provider() Provider
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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