add functions/vendor files

This commit is contained in:
Reed Allman
2017-06-11 02:05:36 -07:00
parent 6ee9c1fa0a
commit f2c7aa5ee6
7294 changed files with 1629834 additions and 0 deletions

18
vendor/github.com/go-openapi/strfmt/conv/date.go generated vendored Normal file
View File

@@ -0,0 +1,18 @@
package conv
import "github.com/go-openapi/strfmt"
// Date returns a pointer to of the Date value passed in.
func Date(v strfmt.Date) *strfmt.Date {
return &v
}
// DateValue returns the value of the Date pointer passed in or
// the default value if the pointer is nil.
func DateValue(v *strfmt.Date) strfmt.Date {
if v == nil {
return strfmt.Date{}
}
return *v
}

15
vendor/github.com/go-openapi/strfmt/conv/date_test.go generated vendored Normal file
View File

@@ -0,0 +1,15 @@
package conv
import (
"testing"
"time"
"github.com/go-openapi/strfmt"
"github.com/stretchr/testify/assert"
)
func TestDateValue(t *testing.T) {
assert.Equal(t, strfmt.Date{}, DateValue(nil))
date := strfmt.Date(time.Now())
assert.Equal(t, date, DateValue(&date))
}

290
vendor/github.com/go-openapi/strfmt/conv/default.go generated vendored Normal file
View File

@@ -0,0 +1,290 @@
package conv
import (
"github.com/go-openapi/strfmt"
)
// Base64 returns a pointer to of the Base64 value passed in.
func Base64(v strfmt.Base64) *strfmt.Base64 {
return &v
}
// Base64Value returns the value of the Base64 pointer passed in or
// the default value if the pointer is nil.
func Base64Value(v *strfmt.Base64) strfmt.Base64 {
if v == nil {
return nil
}
return *v
}
// URI returns a pointer to of the URI value passed in.
func URI(v strfmt.URI) *strfmt.URI {
return &v
}
// URIValue returns the value of the URI pointer passed in or
// the default value if the pointer is nil.
func URIValue(v *strfmt.URI) strfmt.URI {
if v == nil {
return strfmt.URI("")
}
return *v
}
// Email returns a pointer to of the Email value passed in.
func Email(v strfmt.Email) *strfmt.Email {
return &v
}
// EmailValue returns the value of the Email pointer passed in or
// the default value if the pointer is nil.
func EmailValue(v *strfmt.Email) strfmt.Email {
if v == nil {
return strfmt.Email("")
}
return *v
}
// Hostname returns a pointer to of the Hostname value passed in.
func Hostname(v strfmt.Hostname) *strfmt.Hostname {
return &v
}
// HostnameValue returns the value of the Hostname pointer passed in or
// the default value if the pointer is nil.
func HostnameValue(v *strfmt.Hostname) strfmt.Hostname {
if v == nil {
return strfmt.Hostname("")
}
return *v
}
// IPv4 returns a pointer to of the IPv4 value passed in.
func IPv4(v strfmt.IPv4) *strfmt.IPv4 {
return &v
}
// IPv4Value returns the value of the IPv4 pointer passed in or
// the default value if the pointer is nil.
func IPv4Value(v *strfmt.IPv4) strfmt.IPv4 {
if v == nil {
return strfmt.IPv4("")
}
return *v
}
// IPv6 returns a pointer to of the IPv6 value passed in.
func IPv6(v strfmt.IPv6) *strfmt.IPv6 {
return &v
}
// IPv6Value returns the value of the IPv6 pointer passed in or
// the default value if the pointer is nil.
func IPv6Value(v *strfmt.IPv6) strfmt.IPv6 {
if v == nil {
return strfmt.IPv6("")
}
return *v
}
// MAC returns a pointer to of the MAC value passed in.
func MAC(v strfmt.MAC) *strfmt.MAC {
return &v
}
// MACValue returns the value of the MAC pointer passed in or
// the default value if the pointer is nil.
func MACValue(v *strfmt.MAC) strfmt.MAC {
if v == nil {
return strfmt.MAC("")
}
return *v
}
// UUID returns a pointer to of the UUID value passed in.
func UUID(v strfmt.UUID) *strfmt.UUID {
return &v
}
// UUIDValue returns the value of the UUID pointer passed in or
// the default value if the pointer is nil.
func UUIDValue(v *strfmt.UUID) strfmt.UUID {
if v == nil {
return strfmt.UUID("")
}
return *v
}
// UUID3 returns a pointer to of the UUID3 value passed in.
func UUID3(v strfmt.UUID3) *strfmt.UUID3 {
return &v
}
// UUID3Value returns the value of the UUID3 pointer passed in or
// the default value if the pointer is nil.
func UUID3Value(v *strfmt.UUID3) strfmt.UUID3 {
if v == nil {
return strfmt.UUID3("")
}
return *v
}
// UUID4 returns a pointer to of the UUID4 value passed in.
func UUID4(v strfmt.UUID4) *strfmt.UUID4 {
return &v
}
// UUID4Value returns the value of the UUID4 pointer passed in or
// the default value if the pointer is nil.
func UUID4Value(v *strfmt.UUID4) strfmt.UUID4 {
if v == nil {
return strfmt.UUID4("")
}
return *v
}
// UUID5 returns a pointer to of the UUID5 value passed in.
func UUID5(v strfmt.UUID5) *strfmt.UUID5 {
return &v
}
// UUID5Value returns the value of the UUID5 pointer passed in or
// the default value if the pointer is nil.
func UUID5Value(v *strfmt.UUID5) strfmt.UUID5 {
if v == nil {
return strfmt.UUID5("")
}
return *v
}
// ISBN returns a pointer to of the ISBN value passed in.
func ISBN(v strfmt.ISBN) *strfmt.ISBN {
return &v
}
// ISBNValue returns the value of the ISBN pointer passed in or
// the default value if the pointer is nil.
func ISBNValue(v *strfmt.ISBN) strfmt.ISBN {
if v == nil {
return strfmt.ISBN("")
}
return *v
}
// ISBN10 returns a pointer to of the ISBN10 value passed in.
func ISBN10(v strfmt.ISBN10) *strfmt.ISBN10 {
return &v
}
// ISBN10Value returns the value of the ISBN10 pointer passed in or
// the default value if the pointer is nil.
func ISBN10Value(v *strfmt.ISBN10) strfmt.ISBN10 {
if v == nil {
return strfmt.ISBN10("")
}
return *v
}
// ISBN13 returns a pointer to of the ISBN13 value passed in.
func ISBN13(v strfmt.ISBN13) *strfmt.ISBN13 {
return &v
}
// ISBN13Value returns the value of the ISBN13 pointer passed in or
// the default value if the pointer is nil.
func ISBN13Value(v *strfmt.ISBN13) strfmt.ISBN13 {
if v == nil {
return strfmt.ISBN13("")
}
return *v
}
// CreditCard returns a pointer to of the CreditCard value passed in.
func CreditCard(v strfmt.CreditCard) *strfmt.CreditCard {
return &v
}
// CreditCardValue returns the value of the CreditCard pointer passed in or
// the default value if the pointer is nil.
func CreditCardValue(v *strfmt.CreditCard) strfmt.CreditCard {
if v == nil {
return strfmt.CreditCard("")
}
return *v
}
// SSN returns a pointer to of the SSN value passed in.
func SSN(v strfmt.SSN) *strfmt.SSN {
return &v
}
// SSNValue returns the value of the SSN pointer passed in or
// the default value if the pointer is nil.
func SSNValue(v *strfmt.SSN) strfmt.SSN {
if v == nil {
return strfmt.SSN("")
}
return *v
}
// HexColor returns a pointer to of the HexColor value passed in.
func HexColor(v strfmt.HexColor) *strfmt.HexColor {
return &v
}
// HexColorValue returns the value of the HexColor pointer passed in or
// the default value if the pointer is nil.
func HexColorValue(v *strfmt.HexColor) strfmt.HexColor {
if v == nil {
return strfmt.HexColor("")
}
return *v
}
// RGBColor returns a pointer to of the RGBColor value passed in.
func RGBColor(v strfmt.RGBColor) *strfmt.RGBColor {
return &v
}
// RGBColorValue returns the value of the RGBColor pointer passed in or
// the default value if the pointer is nil.
func RGBColorValue(v *strfmt.RGBColor) strfmt.RGBColor {
if v == nil {
return strfmt.RGBColor("")
}
return *v
}
// Password returns a pointer to of the Password value passed in.
func Password(v strfmt.Password) *strfmt.Password {
return &v
}
// PasswordValue returns the value of the Password pointer passed in or
// the default value if the pointer is nil.
func PasswordValue(v *strfmt.Password) strfmt.Password {
if v == nil {
return strfmt.Password("")
}
return *v
}

View File

@@ -0,0 +1,122 @@
package conv
import (
"testing"
"github.com/go-openapi/strfmt"
"github.com/stretchr/testify/assert"
)
func TestBase64Value(t *testing.T) {
assert.Equal(t, strfmt.Base64(nil), Base64Value(nil))
base64 := strfmt.Base64([]byte{4, 2})
assert.Equal(t, base64, Base64Value(&base64))
}
func TestURIValue(t *testing.T) {
assert.Equal(t, strfmt.URI(""), URIValue(nil))
value := strfmt.URI("foo")
assert.Equal(t, value, URIValue(&value))
}
func TestEmailValue(t *testing.T) {
assert.Equal(t, strfmt.Email(""), EmailValue(nil))
value := strfmt.Email("foo")
assert.Equal(t, value, EmailValue(&value))
}
func TestHostnameValue(t *testing.T) {
assert.Equal(t, strfmt.Hostname(""), HostnameValue(nil))
value := strfmt.Hostname("foo")
assert.Equal(t, value, HostnameValue(&value))
}
func TestIPv4Value(t *testing.T) {
assert.Equal(t, strfmt.IPv4(""), IPv4Value(nil))
value := strfmt.IPv4("foo")
assert.Equal(t, value, IPv4Value(&value))
}
func TestIPv6Value(t *testing.T) {
assert.Equal(t, strfmt.IPv6(""), IPv6Value(nil))
value := strfmt.IPv6("foo")
assert.Equal(t, value, IPv6Value(&value))
}
func TestMACValue(t *testing.T) {
assert.Equal(t, strfmt.MAC(""), MACValue(nil))
value := strfmt.MAC("foo")
assert.Equal(t, value, MACValue(&value))
}
func TestUUIDValue(t *testing.T) {
assert.Equal(t, strfmt.UUID(""), UUIDValue(nil))
value := strfmt.UUID("foo")
assert.Equal(t, value, UUIDValue(&value))
}
func TestUUID3Value(t *testing.T) {
assert.Equal(t, strfmt.UUID3(""), UUID3Value(nil))
value := strfmt.UUID3("foo")
assert.Equal(t, value, UUID3Value(&value))
}
func TestUUID4Value(t *testing.T) {
assert.Equal(t, strfmt.UUID4(""), UUID4Value(nil))
value := strfmt.UUID4("foo")
assert.Equal(t, value, UUID4Value(&value))
}
func TestUUID5Value(t *testing.T) {
assert.Equal(t, strfmt.UUID5(""), UUID5Value(nil))
value := strfmt.UUID5("foo")
assert.Equal(t, value, UUID5Value(&value))
}
func TestISBNValue(t *testing.T) {
assert.Equal(t, strfmt.ISBN(""), ISBNValue(nil))
value := strfmt.ISBN("foo")
assert.Equal(t, value, ISBNValue(&value))
}
func TestISBN10Value(t *testing.T) {
assert.Equal(t, strfmt.ISBN10(""), ISBN10Value(nil))
value := strfmt.ISBN10("foo")
assert.Equal(t, value, ISBN10Value(&value))
}
func TestISBN13Value(t *testing.T) {
assert.Equal(t, strfmt.ISBN13(""), ISBN13Value(nil))
value := strfmt.ISBN13("foo")
assert.Equal(t, value, ISBN13Value(&value))
}
func TestCreditCardValue(t *testing.T) {
assert.Equal(t, strfmt.CreditCard(""), CreditCardValue(nil))
value := strfmt.CreditCard("foo")
assert.Equal(t, value, CreditCardValue(&value))
}
func TestSSNValue(t *testing.T) {
assert.Equal(t, strfmt.SSN(""), SSNValue(nil))
value := strfmt.SSN("foo")
assert.Equal(t, value, SSNValue(&value))
}
func TestHexColorValue(t *testing.T) {
assert.Equal(t, strfmt.HexColor(""), HexColorValue(nil))
value := strfmt.HexColor("foo")
assert.Equal(t, value, HexColorValue(&value))
}
func TestRGBColorValue(t *testing.T) {
assert.Equal(t, strfmt.RGBColor(""), RGBColorValue(nil))
value := strfmt.RGBColor("foo")
assert.Equal(t, value, RGBColorValue(&value))
}
func TestPasswordValue(t *testing.T) {
assert.Equal(t, strfmt.Password(""), PasswordValue(nil))
value := strfmt.Password("foo")
assert.Equal(t, value, PasswordValue(&value))
}

18
vendor/github.com/go-openapi/strfmt/conv/duration.go generated vendored Normal file
View File

@@ -0,0 +1,18 @@
package conv
import "github.com/go-openapi/strfmt"
// Duration returns a pointer to of the Duration value passed in.
func Duration(v strfmt.Duration) *strfmt.Duration {
return &v
}
// DurationValue returns the value of the Duration pointer passed in or
// the default value if the pointer is nil.
func DurationValue(v *strfmt.Duration) strfmt.Duration {
if v == nil {
return strfmt.Duration(0)
}
return *v
}

View File

@@ -0,0 +1,14 @@
package conv
import (
"testing"
"github.com/go-openapi/strfmt"
"github.com/stretchr/testify/assert"
)
func TestDurationValue(t *testing.T) {
assert.Equal(t, strfmt.Duration(0), DurationValue(nil))
duration := strfmt.Duration(42)
assert.Equal(t, duration, DurationValue(&duration))
}

18
vendor/github.com/go-openapi/strfmt/conv/time.go generated vendored Normal file
View File

@@ -0,0 +1,18 @@
package conv
import "github.com/go-openapi/strfmt"
// DateTime returns a pointer to of the DateTime value passed in.
func DateTime(v strfmt.DateTime) *strfmt.DateTime {
return &v
}
// DateTimeValue returns the value of the DateTime pointer passed in or
// the default value if the pointer is nil.
func DateTimeValue(v *strfmt.DateTime) strfmt.DateTime {
if v == nil {
return strfmt.DateTime{}
}
return *v
}

15
vendor/github.com/go-openapi/strfmt/conv/time_test.go generated vendored Normal file
View File

@@ -0,0 +1,15 @@
package conv
import (
"testing"
"time"
"github.com/go-openapi/strfmt"
"github.com/stretchr/testify/assert"
)
func TestDateTimeValue(t *testing.T) {
assert.Equal(t, strfmt.DateTime{}, DateTimeValue(nil))
time := strfmt.DateTime(time.Now())
assert.Equal(t, time, DateTimeValue(&time))
}