opencap

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: MIT Imports: 5 Imported by: 2

README

go-opencap

A simple golang library to exeucte basic OpenCAP functions. Be sure to vendor dependencies as there may be breaking changes from time to time.

SRV Lookup

Use the opencap.GetHost() function to get the host domain given the domain in the alias. Use the opencap.ValidateAlias() function check whether an alias is formatted correctly.

Documentation

Index

Constants

View Source
const MaxUsernameLength = 25

MaxUsernameLength is the maxiumum length allowable for usernames

View Source
const MinUsernameLength = 1

MinUsernameLength is the minimum length allowable for usernames

Variables

This section is empty.

Functions

func GetHost

func GetHost(domain string) (string, error)

GetHost returns the highest priority opencap host URL at a given domain name.

func ValidateAlias

func ValidateAlias(alias string) (string, string, error)

ValidateAlias splits an alias, validates it parts and returns err if anything is wrong

func ValidateDomain

func ValidateDomain(username string) bool

ValidateDomain returns true if string is a valid domain format

func ValidateUsername

func ValidateUsername(username string) bool

ValidateUsername returns true if string is a valid username format

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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