validate

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const GithubID = "github"

GithubID is id for github.

View Source
const TwitterID = "twitter"

TwitterID is the id for twitter.

Variables

View Source
var Echo = &echo{}

Echo service.

View Source
var Github = &github{}

Github service.

View Source
var HTTPS = &https{}

HTTPS service.

View Source
var Reddit = &reddit{}

Reddit service.

View Source
var Twitter = &twitter{}

Twitter ..

Functions

This section is empty.

Types

type Validator

type Validator interface {
	// Normalize the service user name.
	// For example, on Twitter, "@username" becomes "username" or "Gabriel"
	// becomes "gabriel".
	NormalizeName(name string) string

	// ValidateName validates the service user name.
	ValidateName(name string) error

	// NormalizeURL normalizes an url string.
	NormalizeURL(name string, urs string) (string, error)

	// ValidateURL validates the URL string.
	ValidateURL(name string, urs string) error
}

Validator describes a a validator for a user service.

func Lookup

func Lookup(service string) (Validator, error)

Lookup service by name.

Jump to

Keyboard shortcuts

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