util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForID

func CheckForID(url *url.URL) string

CheckForID checks to see if an ID (e.g. 59317629-bcc3-11e6-9f43-6c4008bcfa84) has been appended to the end of the specified URL. If one has, then that ID will be returned. If not, then an empty string is returned ("").

func GetProperty

func GetProperty(key string) string

GetProperty returns the value from the environment or key/value store

func IsValidEndpoint

func IsValidEndpoint(endpoint string) bool

IsValidEndpoint() returns true if endpoint is an endpoint being served by the SkillDirectory server AND doesn't contain an ID.

func LogInit

func LogInit() *log.Logger

func NewID

func NewID() string

NewID returns a uuid from the current library

func SanitizeInput

func SanitizeInput(input string) string

Escapes the single quotes in the Cassandra query

func StringSliceContains

func StringSliceContains(slice []string, target string) bool

StringSliceContains() returns true if slice contains target, false if not.

func ValidateIcon

func ValidateIcon(icon io.Reader) (string, error)

ValidateIcon returns a non-nil error if the icon cannot be decoded into a recognized image format. If image is successfully decoded, then return string contains the image encoding format (e.g. PNG, JPG, GIF)

Types

This section is empty.

Jump to

Keyboard shortcuts

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