multipmuri

package
v3.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entities

type Entities []Entity

type Entity

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
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

func NewUnknownEntity() Entity

func OwnerEntity

func OwnerEntity(source Entity) Entity
Example
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

func RepoEntity(source Entity) Entity
Example
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

func ServiceEntity(source Entity) Entity
Example
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

func NewGitHubIssue(hostname, ownerID, repoID, id string) *GitHubIssue
Example
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

func (e GitHubIssue) Contains(other Entity) bool

func (GitHubIssue) Equals

func (e GitHubIssue) Equals(other Entity) bool

func (GitHubIssue) Hostname

func (e GitHubIssue) Hostname() string

func (GitHubIssue) ID

func (e GitHubIssue) ID() string

func (GitHubIssue) LocalID

func (e GitHubIssue) LocalID() string

func (GitHubIssue) Owner

func (e GitHubIssue) Owner() *GitHubOwner

func (GitHubIssue) OwnerEntity

func (e GitHubIssue) OwnerEntity() Entity

func (GitHubIssue) OwnerID

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

func (e GitHubIssue) RepoEntity() Entity

func (GitHubIssue) RepoID

func (e GitHubIssue) RepoID() string

func (GitHubIssue) Service

func (e GitHubIssue) Service() *GitHubService

func (GitHubIssue) ServiceEntity

func (e GitHubIssue) ServiceEntity() Entity

func (GitHubIssue) String

func (e GitHubIssue) String() string

type GitHubIssueOrPullRequest

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

func NewGitHubIssueOrPullRequest

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

func (GitHubIssueOrPullRequest) Contains

func (e GitHubIssueOrPullRequest) Contains(other Entity) bool

func (GitHubIssueOrPullRequest) Equals

func (e GitHubIssueOrPullRequest) Equals(other Entity) bool

func (GitHubIssueOrPullRequest) Hostname

func (e GitHubIssueOrPullRequest) Hostname() string

func (GitHubIssueOrPullRequest) ID

func (e GitHubIssueOrPullRequest) ID() string

func (GitHubIssueOrPullRequest) LocalID

func (e GitHubIssueOrPullRequest) LocalID() string

func (GitHubIssueOrPullRequest) Owner

func (e GitHubIssueOrPullRequest) Owner() *GitHubOwner

func (GitHubIssueOrPullRequest) OwnerEntity

func (e GitHubIssueOrPullRequest) OwnerEntity() Entity

func (GitHubIssueOrPullRequest) OwnerID

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

func (e GitHubIssueOrPullRequest) RepoEntity() Entity

func (GitHubIssueOrPullRequest) RepoID

func (e GitHubIssueOrPullRequest) RepoID() string

func (GitHubIssueOrPullRequest) Service

func (e GitHubIssueOrPullRequest) Service() *GitHubService

func (GitHubIssueOrPullRequest) ServiceEntity

func (e GitHubIssueOrPullRequest) ServiceEntity() Entity

func (GitHubIssueOrPullRequest) String

func (e GitHubIssueOrPullRequest) String() string

type GitHubLabel

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

func NewGitHubLabel

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

func (GitHubLabel) Contains

func (e GitHubLabel) Contains(other Entity) bool

func (GitHubLabel) Equals

func (e GitHubLabel) Equals(other Entity) bool

func (GitHubLabel) Hostname

func (e GitHubLabel) Hostname() string

func (GitHubLabel) ID

func (e GitHubLabel) ID() string

func (GitHubLabel) LocalID

func (e GitHubLabel) LocalID() string

func (GitHubLabel) Owner

func (e GitHubLabel) Owner() *GitHubOwner

func (GitHubLabel) OwnerEntity

func (e GitHubLabel) OwnerEntity() Entity

func (GitHubLabel) OwnerID

func (e GitHubLabel) OwnerID() string

func (GitHubLabel) Provider

func (e GitHubLabel) Provider() Provider

func (GitHubLabel) RelDecodeString

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

func (GitHubLabel) Repo

func (e GitHubLabel) Repo() *GitHubRepo

func (GitHubLabel) RepoEntity

func (e GitHubLabel) RepoEntity() Entity

func (GitHubLabel) RepoID

func (e GitHubLabel) RepoID() string

func (GitHubLabel) Service

func (e GitHubLabel) Service() *GitHubService

func (GitHubLabel) ServiceEntity

func (e GitHubLabel) ServiceEntity() Entity

func (GitHubLabel) String

func (e GitHubLabel) String() string

type GitHubMilestone

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

func NewGitHubMilestone

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

func (GitHubMilestone) Contains

func (e GitHubMilestone) Contains(other Entity) bool

func (GitHubMilestone) Equals

func (e GitHubMilestone) Equals(other Entity) bool

func (GitHubMilestone) Hostname

func (e GitHubMilestone) Hostname() string

func (GitHubMilestone) ID

func (e GitHubMilestone) ID() string

func (GitHubMilestone) LocalID

func (e GitHubMilestone) LocalID() string

func (GitHubMilestone) Owner

func (e GitHubMilestone) Owner() *GitHubOwner

func (GitHubMilestone) OwnerEntity

func (e GitHubMilestone) OwnerEntity() Entity

func (GitHubMilestone) OwnerID

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

func (e GitHubMilestone) RepoEntity() Entity

func (GitHubMilestone) RepoID

func (e GitHubMilestone) RepoID() string

func (GitHubMilestone) Service

func (e GitHubMilestone) Service() *GitHubService

func (GitHubMilestone) ServiceEntity

func (e GitHubMilestone) ServiceEntity() Entity

func (GitHubMilestone) String

func (e GitHubMilestone) String() string

type GitHubOwner

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

func NewGitHubOwner

func NewGitHubOwner(hostname, ownerID string) *GitHubOwner

func (GitHubOwner) Contains

func (e GitHubOwner) Contains(other Entity) bool

func (GitHubOwner) Equals

func (e GitHubOwner) Equals(other Entity) bool

func (GitHubOwner) Hostname

func (e GitHubOwner) Hostname() string

func (GitHubOwner) LocalID

func (e GitHubOwner) LocalID() string

func (GitHubOwner) Owner

func (e GitHubOwner) Owner() *GitHubOwner

func (GitHubOwner) OwnerEntity

func (e GitHubOwner) OwnerEntity() Entity

func (GitHubOwner) OwnerID

func (e GitHubOwner) OwnerID() string

func (GitHubOwner) Provider

func (e GitHubOwner) Provider() Provider

func (GitHubOwner) RelDecodeString

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

func (GitHubOwner) Repo

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

func (GitHubOwner) RepoEntity

func (e GitHubOwner) RepoEntity(repoID string) Entity

func (GitHubOwner) Service

func (e GitHubOwner) Service() *GitHubService

func (GitHubOwner) ServiceEntity

func (e GitHubOwner) ServiceEntity() Entity

func (GitHubOwner) String

func (e GitHubOwner) String() string

type GitHubPullRequest

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

func NewGitHubPullRequest

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

func (GitHubPullRequest) Contains

func (e GitHubPullRequest) Contains(other Entity) bool

func (GitHubPullRequest) Equals

func (e GitHubPullRequest) Equals(other Entity) bool

func (GitHubPullRequest) Hostname

func (e GitHubPullRequest) Hostname() string

func (GitHubPullRequest) ID

func (e GitHubPullRequest) ID() string

func (GitHubPullRequest) LocalID

func (e GitHubPullRequest) LocalID() string

func (GitHubPullRequest) Owner

func (e GitHubPullRequest) Owner() *GitHubOwner

func (GitHubPullRequest) OwnerEntity

func (e GitHubPullRequest) OwnerEntity() Entity

func (GitHubPullRequest) OwnerID

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

func (e GitHubPullRequest) RepoEntity() Entity

func (GitHubPullRequest) RepoID

func (e GitHubPullRequest) RepoID() string

func (GitHubPullRequest) Service

func (e GitHubPullRequest) Service() *GitHubService

func (GitHubPullRequest) ServiceEntity

func (e GitHubPullRequest) ServiceEntity() Entity

func (GitHubPullRequest) String

func (e GitHubPullRequest) String() string

type GitHubRepo

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

func NewGitHubRepo

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

func (GitHubRepo) Contains

func (e GitHubRepo) Contains(other Entity) bool

func (GitHubRepo) Equals

func (e GitHubRepo) Equals(other Entity) bool

func (GitHubRepo) Hostname

func (e GitHubRepo) Hostname() string

func (GitHubRepo) Issue

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

func (GitHubRepo) IssueEntity

func (e GitHubRepo) IssueEntity(id string) Entity

func (GitHubRepo) LocalID

func (e GitHubRepo) LocalID() string

func (GitHubRepo) Milestone

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

func (GitHubRepo) MilestoneEntity

func (e GitHubRepo) MilestoneEntity(id string) Entity

func (GitHubRepo) Owner

func (e GitHubRepo) Owner() *GitHubOwner

func (GitHubRepo) OwnerEntity

func (e GitHubRepo) OwnerEntity() Entity

func (GitHubRepo) OwnerID

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

func (e GitHubRepo) RepoEntity() Entity

func (GitHubRepo) RepoID

func (e GitHubRepo) RepoID() string

func (GitHubRepo) Service

func (e GitHubRepo) Service() *GitHubService

func (GitHubRepo) ServiceEntity

func (e GitHubRepo) ServiceEntity() Entity

func (GitHubRepo) String

func (e GitHubRepo) String() string

type GitHubService

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

func NewGitHubService

func NewGitHubService(hostname string) *GitHubService
Example
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

func (e GitHubService) Contains(other Entity) bool

func (GitHubService) Equals

func (e GitHubService) Equals(other Entity) bool

func (GitHubService) Hostname

func (e GitHubService) Hostname() string

func (GitHubService) LocalID

func (e GitHubService) LocalID() string

func (GitHubService) Owner

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

func (GitHubService) OwnerEntity

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

func (e GitHubService) Service() *GitHubService

func (GitHubService) ServiceEntity

func (e GitHubService) ServiceEntity() Entity

func (GitHubService) String

func (e GitHubService) String() string

type GitLabIssue

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

func NewGitLabIssue

func NewGitLabIssue(hostname, owner, repo, id string) *GitLabIssue
Example
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

func (e GitLabIssue) Contains(other Entity) bool

func (GitLabIssue) Equals

func (e GitLabIssue) Equals(other Entity) bool

func (GitLabIssue) Hostname

func (e GitLabIssue) Hostname() string

func (GitLabIssue) ID

func (e GitLabIssue) ID() string

func (GitLabIssue) LocalID

func (e GitLabIssue) LocalID() string

func (GitLabIssue) Owner

func (e GitLabIssue) Owner() string

func (GitLabIssue) Provider

func (e GitLabIssue) Provider() Provider

func (GitLabIssue) RelDecodeString

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

func (GitLabIssue) Repo

func (e GitLabIssue) Repo() string

func (GitLabIssue) RepoEntity

func (e GitLabIssue) RepoEntity() *GitLabRepo

func (GitLabIssue) String

func (e GitLabIssue) String() string

type GitLabMergeRequest

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

func NewGitLabMergeRequest

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

func (GitLabMergeRequest) Contains

func (e GitLabMergeRequest) Contains(other Entity) bool

func (GitLabMergeRequest) Equals

func (e GitLabMergeRequest) Equals(other Entity) bool

func (GitLabMergeRequest) Hostname

func (e GitLabMergeRequest) Hostname() string

func (GitLabMergeRequest) ID

func (e GitLabMergeRequest) ID() string

func (GitLabMergeRequest) LocalID

func (e GitLabMergeRequest) LocalID() string

func (GitLabMergeRequest) Owner

func (e GitLabMergeRequest) Owner() string

func (GitLabMergeRequest) Provider

func (e GitLabMergeRequest) Provider() Provider

func (GitLabMergeRequest) RelDecodeString

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

func (GitLabMergeRequest) Repo

func (e GitLabMergeRequest) Repo() string

func (GitLabMergeRequest) RepoEntity

func (e GitLabMergeRequest) RepoEntity() *GitLabRepo

func (GitLabMergeRequest) String

func (e GitLabMergeRequest) String() string

type GitLabMilestone

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

func NewGitLabMilestone

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

func (GitLabMilestone) Contains

func (e GitLabMilestone) Contains(other Entity) bool

func (GitLabMilestone) Equals

func (e GitLabMilestone) Equals(other Entity) bool

func (GitLabMilestone) Hostname

func (e GitLabMilestone) Hostname() string

func (GitLabMilestone) ID

func (e GitLabMilestone) ID() string

func (GitLabMilestone) LocalID

func (e GitLabMilestone) LocalID() string

func (GitLabMilestone) Owner

func (e GitLabMilestone) Owner() string

func (GitLabMilestone) Provider

func (e GitLabMilestone) Provider() Provider

func (GitLabMilestone) RelDecodeString

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

func (GitLabMilestone) Repo

func (e GitLabMilestone) Repo() string

func (GitLabMilestone) RepoEntity

func (e GitLabMilestone) RepoEntity() *GitLabRepo

func (GitLabMilestone) String

func (e GitLabMilestone) String() string

type GitLabOwner

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

func NewGitLabOwner

func NewGitLabOwner(hostname, owner string) *GitLabOwner

func (GitLabOwner) Contains

func (e GitLabOwner) Contains(other Entity) bool

func (GitLabOwner) Equals

func (e GitLabOwner) Equals(other Entity) bool

func (GitLabOwner) Hostname

func (e GitLabOwner) Hostname() string

func (GitLabOwner) LocalID

func (e GitLabOwner) LocalID() string

func (GitLabOwner) Owner

func (e GitLabOwner) Owner() string

func (GitLabOwner) Provider

func (e GitLabOwner) Provider() Provider

func (GitLabOwner) RelDecodeString

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

func (GitLabOwner) RepoEntity

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

func (GitLabOwner) ServiceEntity

func (e GitLabOwner) ServiceEntity() *GitLabService

func (GitLabOwner) String

func (e GitLabOwner) String() string

type GitLabOwnerOrRepo

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

func NewGitLabOwnerOrRepo

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

func (GitLabOwnerOrRepo) Contains

func (e GitLabOwnerOrRepo) Contains(other Entity) bool

func (GitLabOwnerOrRepo) Equals

func (e GitLabOwnerOrRepo) Equals(other Entity) bool

func (GitLabOwnerOrRepo) Hostname

func (e GitLabOwnerOrRepo) Hostname() string

func (GitLabOwnerOrRepo) LocalID

func (e GitLabOwnerOrRepo) LocalID() string

func (GitLabOwnerOrRepo) Owner

func (e GitLabOwnerOrRepo) Owner() string

func (GitLabOwnerOrRepo) Provider

func (e GitLabOwnerOrRepo) Provider() Provider

func (GitLabOwnerOrRepo) RelDecodeString

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

func (GitLabOwnerOrRepo) Repo

func (e GitLabOwnerOrRepo) Repo() string

func (GitLabOwnerOrRepo) RepoEntity

func (e GitLabOwnerOrRepo) RepoEntity() *GitLabRepo

func (GitLabOwnerOrRepo) ServiceEntity

func (e GitLabOwnerOrRepo) ServiceEntity() *GitLabService

func (GitLabOwnerOrRepo) String

func (e GitLabOwnerOrRepo) String() string

type GitLabRepo

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

func NewGitLabRepo

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

func (GitLabRepo) Contains

func (e GitLabRepo) Contains(other Entity) bool

func (GitLabRepo) Equals

func (e GitLabRepo) Equals(other Entity) bool

func (GitLabRepo) Hostname

func (e GitLabRepo) Hostname() string

func (GitLabRepo) LocalID

func (e GitLabRepo) LocalID() string

func (GitLabRepo) Owner

func (e GitLabRepo) Owner() string

func (GitLabRepo) Provider

func (e GitLabRepo) Provider() Provider

func (GitLabRepo) RelDecodeString

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

func (GitLabRepo) Repo

func (e GitLabRepo) Repo() string

func (GitLabRepo) RepoEntity

func (e GitLabRepo) RepoEntity() *GitLabRepo

func (GitLabRepo) ServiceEntity

func (e GitLabRepo) ServiceEntity() *GitLabService

func (GitLabRepo) String

func (e GitLabRepo) String() string

type GitLabService

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

func NewGitLabService

func NewGitLabService(hostname string) *GitLabService
Example
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

func (e GitLabService) Contains(other Entity) bool

func (GitLabService) Equals

func (e GitLabService) Equals(other Entity) bool

func (GitLabService) Hostname

func (e GitLabService) Hostname() string

func (GitLabService) LocalID

func (e GitLabService) LocalID() string

func (GitLabService) Provider

func (e GitLabService) Provider() Provider

func (GitLabService) RelDecodeString

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

func (GitLabService) ServiceEntity

func (e GitLabService) ServiceEntity() *GitLabService

func (GitLabService) String

func (e GitLabService) String() string

type Issue

type Issue interface {
	WithKind
	IsIssue()
}

type IssueOrMergeRequest

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

type Label interface {
	WithKind
	IsLabel()
}

type MergeRequest

type MergeRequest interface {
	WithKind
	IsMergeRequest()
}

type Milestone

type Milestone interface {
	WithKind
	IsMilestone()
}

type OrganizationOrProject

type OrganizationOrProject interface {
	WithKind
	IsOrganizationOrProject()
}

type Project

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

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

func NewTrelloBoard

func NewTrelloBoard(id string) *TrelloBoard

func (TrelloBoard) Contains

func (e TrelloBoard) Contains(other Entity) bool

func (TrelloBoard) Equals

func (e TrelloBoard) Equals(other Entity) bool

func (TrelloBoard) ID

func (e TrelloBoard) ID() string

func (TrelloBoard) LocalID

func (e TrelloBoard) LocalID() string

func (TrelloBoard) Provider

func (e TrelloBoard) Provider() Provider

func (TrelloBoard) RelDecodeString

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

func (TrelloBoard) String

func (e TrelloBoard) String() string

type TrelloCard

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

func NewTrelloCard

func NewTrelloCard(id string) *TrelloCard
Example
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

func (e TrelloCard) Contains(other Entity) bool

func (TrelloCard) Equals

func (e TrelloCard) Equals(other Entity) bool

func (TrelloCard) ID

func (e TrelloCard) ID() string

func (TrelloCard) LocalID

func (e TrelloCard) LocalID() string

func (TrelloCard) Provider

func (e TrelloCard) Provider() Provider

func (TrelloCard) RelDecodeString

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

func (TrelloCard) String

func (e TrelloCard) String() string

type TrelloService

type TrelloService struct {
	Service
}

func NewTrelloService

func NewTrelloService() *TrelloService

func (TrelloService) Contains

func (e TrelloService) Contains(other Entity) bool

func (TrelloService) Equals

func (e TrelloService) Equals(other Entity) bool

func (TrelloService) LocalID

func (e TrelloService) LocalID() string

func (TrelloService) Provider

func (e TrelloService) Provider() Provider

func (TrelloService) RelDecodeString

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

func (TrelloService) String

func (e TrelloService) String() string

type TrelloUser

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

func NewTrelloUser

func NewTrelloUser(id string) *TrelloUser

func (TrelloUser) Contains

func (e TrelloUser) Contains(other Entity) bool

func (TrelloUser) Equals

func (e TrelloUser) Equals(other Entity) bool

func (TrelloUser) ID

func (e TrelloUser) ID() string

func (TrelloUser) LocalID

func (e TrelloUser) LocalID() string

func (TrelloUser) Provider

func (e TrelloUser) Provider() Provider

func (TrelloUser) RelDecodeString

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

func (TrelloUser) String

func (e TrelloUser) String() string

type UserOrOrganization

type UserOrOrganization interface {
	WithKind
	IsUserOrOrganization()
}

type WithKind

type WithKind interface {
	Kind() Kind
}

type WithProvider

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