Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
eb0ac601
Commit
eb0ac601
authored
Jan 10, 2018
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove OpenAPI import from types
parent
820ea04f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
76 deletions
+46
-76
BUILD
pkg/api/unversioned/BUILD
+1
-5
time.go
pkg/api/unversioned/time.go
+9
-13
BUILD
staging/src/k8s.io/apimachinery/pkg/api/resource/BUILD
+0
-2
quantity.go
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
+9
-13
BUILD
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD
+0
-2
micro_time.go
...ng/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go
+9
-13
time.go
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
+9
-13
BUILD
staging/src/k8s.io/apimachinery/pkg/util/intstr/BUILD
+0
-2
intstr.go
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go
+9
-13
No files found.
pkg/api/unversioned/BUILD
View file @
eb0ac601
...
@@ -13,11 +13,7 @@ go_library(
...
@@ -13,11 +13,7 @@ go_library(
"types.go",
"types.go",
],
],
importpath = "k8s.io/kubernetes/pkg/api/unversioned",
importpath = "k8s.io/kubernetes/pkg/api/unversioned",
deps = [
deps = ["//vendor/github.com/google/gofuzz:go_default_library"],
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
)
)
filegroup(
filegroup(
...
...
pkg/api/unversioned/time.go
View file @
eb0ac601
...
@@ -20,9 +20,6 @@ import (
...
@@ -20,9 +20,6 @@ import (
"encoding/json"
"encoding/json"
"time"
"time"
openapi
"k8s.io/kube-openapi/pkg/common"
"github.com/go-openapi/spec"
"github.com/google/gofuzz"
"github.com/google/gofuzz"
)
)
...
@@ -141,16 +138,15 @@ func (t Time) MarshalJSON() ([]byte, error) {
...
@@ -141,16 +138,15 @@ func (t Time) MarshalJSON() ([]byte, error) {
return
json
.
Marshal
(
t
.
UTC
()
.
Format
(
time
.
RFC3339
))
return
json
.
Marshal
(
t
.
UTC
()
.
Format
(
time
.
RFC3339
))
}
}
func
(
_
Time
)
OpenAPIDefinition
()
openapi
.
OpenAPIDefinition
{
// OpenAPISchemaType is used by the kube-openapi generator when constructing
return
openapi
.
OpenAPIDefinition
{
// the OpenAPI spec of this type.
Schema
:
spec
.
Schema
{
//
SchemaProps
:
spec
.
SchemaProps
{
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
Type
:
[]
string
{
"string"
},
func
(
_
Time
)
OpenAPISchemaType
()
[]
string
{
return
[]
string
{
"string"
}
}
Format
:
"date-time"
,
},
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
},
// the OpenAPI spec of this type.
}
func
(
_
Time
)
OpenAPISchemaFormat
()
string
{
return
"date-time"
}
}
// MarshalQueryParameter converts to a URL query parameter value
// MarshalQueryParameter converts to a URL query parameter value
func
(
t
Time
)
MarshalQueryParameter
()
(
string
,
error
)
{
func
(
t
Time
)
MarshalQueryParameter
()
(
string
,
error
)
{
...
...
staging/src/k8s.io/apimachinery/pkg/api/resource/BUILD
View file @
eb0ac601
...
@@ -38,11 +38,9 @@ go_library(
...
@@ -38,11 +38,9 @@ go_library(
],
],
importpath = "k8s.io/apimachinery/pkg/api/resource",
importpath = "k8s.io/apimachinery/pkg/api/resource",
deps = [
deps = [
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/gopkg.in/inf.v0:go_default_library",
"//vendor/gopkg.in/inf.v0:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
],
)
)
...
...
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
View file @
eb0ac601
...
@@ -27,9 +27,7 @@ import (
...
@@ -27,9 +27,7 @@ import (
flag
"github.com/spf13/pflag"
flag
"github.com/spf13/pflag"
"github.com/go-openapi/spec"
inf
"gopkg.in/inf.v0"
inf
"gopkg.in/inf.v0"
openapi
"k8s.io/kube-openapi/pkg/common"
)
)
// Quantity is a fixed-point representation of a number.
// Quantity is a fixed-point representation of a number.
...
@@ -399,17 +397,15 @@ func (q Quantity) DeepCopy() Quantity {
...
@@ -399,17 +397,15 @@ func (q Quantity) DeepCopy() Quantity {
return
q
return
q
}
}
// OpenAPIDefinition returns openAPI definition for this type.
// OpenAPISchemaType is used by the kube-openapi generator when constructing
func
(
_
Quantity
)
OpenAPIDefinition
()
openapi
.
OpenAPIDefinition
{
// the OpenAPI spec of this type.
return
openapi
.
OpenAPIDefinition
{
//
Schema
:
spec
.
Schema
{
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
SchemaProps
:
spec
.
SchemaProps
{
func
(
_
Quantity
)
OpenAPISchemaType
()
[]
string
{
return
[]
string
{
"string"
}
}
Type
:
[]
string
{
"string"
},
Format
:
""
,
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
},
// the OpenAPI spec of this type.
},
func
(
_
Quantity
)
OpenAPISchemaFormat
()
string
{
return
""
}
}
}
// CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).
// CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).
//
//
...
...
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD
View file @
eb0ac601
...
@@ -53,7 +53,6 @@ go_library(
...
@@ -53,7 +53,6 @@ go_library(
],
],
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1",
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1",
deps = [
deps = [
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",
...
@@ -67,7 +66,6 @@ go_library(
...
@@ -67,7 +66,6 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
],
)
)
...
...
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go
View file @
eb0ac601
...
@@ -20,9 +20,6 @@ import (
...
@@ -20,9 +20,6 @@ import (
"encoding/json"
"encoding/json"
"time"
"time"
openapi
"k8s.io/kube-openapi/pkg/common"
"github.com/go-openapi/spec"
"github.com/google/gofuzz"
"github.com/google/gofuzz"
)
)
...
@@ -149,16 +146,15 @@ func (t MicroTime) MarshalJSON() ([]byte, error) {
...
@@ -149,16 +146,15 @@ func (t MicroTime) MarshalJSON() ([]byte, error) {
return
json
.
Marshal
(
t
.
UTC
()
.
Format
(
RFC3339Micro
))
return
json
.
Marshal
(
t
.
UTC
()
.
Format
(
RFC3339Micro
))
}
}
func
(
_
MicroTime
)
OpenAPIDefinition
()
openapi
.
OpenAPIDefinition
{
// OpenAPISchemaType is used by the kube-openapi generator when constructing
return
openapi
.
OpenAPIDefinition
{
// the OpenAPI spec of this type.
Schema
:
spec
.
Schema
{
//
SchemaProps
:
spec
.
SchemaProps
{
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
Type
:
[]
string
{
"string"
},
func
(
_
MicroTime
)
OpenAPISchemaType
()
[]
string
{
return
[]
string
{
"string"
}
}
Format
:
"date-time"
,
},
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
},
// the OpenAPI spec of this type.
}
func
(
_
MicroTime
)
OpenAPISchemaFormat
()
string
{
return
"date-time"
}
}
// MarshalQueryParameter converts to a URL query parameter value
// MarshalQueryParameter converts to a URL query parameter value
func
(
t
MicroTime
)
MarshalQueryParameter
()
(
string
,
error
)
{
func
(
t
MicroTime
)
MarshalQueryParameter
()
(
string
,
error
)
{
...
...
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
View file @
eb0ac601
...
@@ -20,9 +20,6 @@ import (
...
@@ -20,9 +20,6 @@ import (
"encoding/json"
"encoding/json"
"time"
"time"
openapi
"k8s.io/kube-openapi/pkg/common"
"github.com/go-openapi/spec"
"github.com/google/gofuzz"
"github.com/google/gofuzz"
)
)
...
@@ -151,16 +148,15 @@ func (t Time) MarshalJSON() ([]byte, error) {
...
@@ -151,16 +148,15 @@ func (t Time) MarshalJSON() ([]byte, error) {
return
json
.
Marshal
(
t
.
UTC
()
.
Format
(
time
.
RFC3339
))
return
json
.
Marshal
(
t
.
UTC
()
.
Format
(
time
.
RFC3339
))
}
}
func
(
_
Time
)
OpenAPIDefinition
()
openapi
.
OpenAPIDefinition
{
// OpenAPISchemaType is used by the kube-openapi generator when constructing
return
openapi
.
OpenAPIDefinition
{
// the OpenAPI spec of this type.
Schema
:
spec
.
Schema
{
//
SchemaProps
:
spec
.
SchemaProps
{
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
Type
:
[]
string
{
"string"
},
func
(
_
Time
)
OpenAPISchemaType
()
[]
string
{
return
[]
string
{
"string"
}
}
Format
:
"date-time"
,
},
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
},
// the OpenAPI spec of this type.
}
func
(
_
Time
)
OpenAPISchemaFormat
()
string
{
return
"date-time"
}
}
// MarshalQueryParameter converts to a URL query parameter value
// MarshalQueryParameter converts to a URL query parameter value
func
(
t
Time
)
MarshalQueryParameter
()
(
string
,
error
)
{
func
(
t
Time
)
MarshalQueryParameter
()
(
string
,
error
)
{
...
...
staging/src/k8s.io/apimachinery/pkg/util/intstr/BUILD
View file @
eb0ac601
...
@@ -22,11 +22,9 @@ go_library(
...
@@ -22,11 +22,9 @@ go_library(
],
],
importpath = "k8s.io/apimachinery/pkg/util/intstr",
importpath = "k8s.io/apimachinery/pkg/util/intstr",
deps = [
deps = [
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
],
)
)
...
...
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go
View file @
eb0ac601
...
@@ -24,9 +24,6 @@ import (
...
@@ -24,9 +24,6 @@ import (
"strconv"
"strconv"
"strings"
"strings"
openapi
"k8s.io/kube-openapi/pkg/common"
"github.com/go-openapi/spec"
"github.com/golang/glog"
"github.com/golang/glog"
"github.com/google/gofuzz"
"github.com/google/gofuzz"
)
)
...
@@ -120,16 +117,15 @@ func (intstr IntOrString) MarshalJSON() ([]byte, error) {
...
@@ -120,16 +117,15 @@ func (intstr IntOrString) MarshalJSON() ([]byte, error) {
}
}
}
}
func
(
_
IntOrString
)
OpenAPIDefinition
()
openapi
.
OpenAPIDefinition
{
// OpenAPISchemaType is used by the kube-openapi generator when constructing
return
openapi
.
OpenAPIDefinition
{
// the OpenAPI spec of this type.
Schema
:
spec
.
Schema
{
//
SchemaProps
:
spec
.
SchemaProps
{
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
Type
:
[]
string
{
"string"
},
func
(
_
IntOrString
)
OpenAPISchemaType
()
[]
string
{
return
[]
string
{
"string"
}
}
Format
:
"int-or-string"
,
},
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
},
// the OpenAPI spec of this type.
}
func
(
_
IntOrString
)
OpenAPISchemaFormat
()
string
{
return
"int-or-string"
}
}
func
(
intstr
*
IntOrString
)
Fuzz
(
c
fuzz
.
Continue
)
{
func
(
intstr
*
IntOrString
)
Fuzz
(
c
fuzz
.
Continue
)
{
if
intstr
==
nil
{
if
intstr
==
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment