Documentation ¶
Index ¶
- Constants
- Variables
- func IsDockerOfficialRepository(uri string) bool
- func IsYoutubeValidChannelId(id string) bool
- func Marshal(v interface{}) (string, error)
- func ToURL(pu *PkgURI) string
- func Unmarshal(pkguri string, v interface{}) error
- type Marshaler
- type PkgURI
- func NewFromURI(pkguri string) (*PkgURI, error)
- func ParseDocker(rawurl string) (*PkgURI, error)
- func ParseGit(rawurl string) (*PkgURI, error)
- func ParseGithub(rawurl string) (*PkgURI, error)
- func ParseNpm(rawurl string) (*PkgURI, error)
- func ParseWebsite(rawurl string) (*PkgURI, error)
- func ParseYoutube(rawurl string) (*PkgURI, error)
- type Unmarshaler
Constants ¶
View Source
const (
DefaultProto = "https"
)
Variables ¶
View Source
var ( ErrNoURI = errors.New("pkguri: uri is not defined") ErrNoMarshaler = errors.New("pkguri: cannot be marshal") ErrNoUnmarshaler = errors.New("pkguri: cannot be unmarshal") ErrHost = errors.New("pkguri: host not match") ErrPath = errors.New("pkguri: path not match") )
Errors
Functions ¶
func IsYoutubeValidChannelId ¶
Types ¶
type PkgURI ¶
PkgURI contains
func NewFromURI ¶
func ParseDocker ¶
func ParseGithub ¶
ParseGithub parses github url to pkguri.
func ParseWebsite ¶
func ParseYoutube ¶
func (PkgURI) MarshalText ¶
func (*PkgURI) UnmarshalText ¶
type Unmarshaler ¶
Click to show internal directories.
Click to hide internal directories.