provider

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotFoundProvider

type NotFoundProvider struct{}

NotFoundProvider for an url not identified

func (*NotFoundProvider) GetProjectName

func (p *NotFoundProvider) GetProjectName() string

GetProjectName of the the current url.

func (*NotFoundProvider) GetProjectPath

func (p *NotFoundProvider) GetProjectPath() string

GetProjectPath of the the current url.

func (*NotFoundProvider) GetProjectURL

func (p *NotFoundProvider) GetProjectURL() string

GetProjectURL of the the current url.

func (*NotFoundProvider) GetProviderID

func (p *NotFoundProvider) GetProviderID() string

GetProviderID of the the current url.

func (*NotFoundProvider) GetProviderURL

func (p *NotFoundProvider) GetProviderURL() string

GetProviderURL of the the current url.

func (*NotFoundProvider) GetURL

func (p *NotFoundProvider) GetURL() string

GetURL of the the current url.

func (*NotFoundProvider) GetUserName

func (p *NotFoundProvider) GetUserName() string

GetUserName of the the current url.

func (*NotFoundProvider) Is

func (p *NotFoundProvider) Is(u string) bool

Is always return false.

func (*NotFoundProvider) SetURL

func (p *NotFoundProvider) SetURL(u string)

SetURL si no op.

type Provider

type Provider interface {
	Is(string) bool
	SetURL(string)
	GetUserName() string
	GetProjectName() string
	GetProjectPath() string
	GetProviderURL() string
	GetProviderID() string
	GetURL() string
	GetProjectURL() string
}

Provider identify an url.

type Providers

type Providers struct {
	URL       string
	Providers []Provider
}

Providers if a facade of many Provider.

func Default

func Default(url string) Providers

Default makes a new Providers facade with pre loaded gh provider.

func New

func New(url string) Providers

New providers for url.

func (Providers) Add

func (p Providers) Add(provider ...Provider) Providers

Add a concrete provider.

func (Providers) GetProjectName

func (p Providers) GetProjectName() string

GetProjectName of the the current url.

func (Providers) GetProjectPath

func (p Providers) GetProjectPath() string

GetProjectPath of the the current url.

func (Providers) GetProjectURL

func (p Providers) GetProjectURL() string

GetProjectURL of the the current url.

func (Providers) GetProviderID

func (p Providers) GetProviderID() string

GetProviderID of the the current url.

func (Providers) GetProviderURL

func (p Providers) GetProviderURL() string

GetProviderURL of the the current url.

func (Providers) GetURL

func (p Providers) GetURL() string

GetURL of the the current url.

func (Providers) GetUserName

func (p Providers) GetUserName() string

GetUserName of the the current url.

func (Providers) Match

func (p Providers) Match() bool

Match tells if an url matches a provider.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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