url

package
v0.0.0-...-de02b07 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkProvider

type LinkProvider func(r *seabird.Request, url *url.URL) bool

LinkProvider is a callback to be registered with the Plugin. It takes the same parameters as a normal IRC callback in addition to a *url.URL representing the found url. It returns true if it was able to handle that url and false otherwise.

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin stores all registered URL LinkProviders

func CtxPlugin

func CtxPlugin(ctx context.Context) *Plugin

func (*Plugin) RegisterProvider

func (p *Plugin) RegisterProvider(domain string, f LinkProvider) error

RegisterProvider registers a LinkProvider for a specific domain.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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