Fix api mistakes

Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
This commit is contained in:
Kevin Dorosh
2020-12-22 10:05:55 -05:00
parent 47dcf6a7b9
commit 8fceafc017
2 changed files with 5 additions and 28 deletions
+5 -11
View File
@@ -16,26 +16,20 @@ type RouteTable struct {
}
type RouteTableSpec struct {
Routes []Route `json:"destinations,omitempty"`
Routes []Route `json:"routes,omitempty"`
}
type Route struct {
Matchers []Matcher `json:"destinations,omitempty"`
Action RouteAction `json:"action,omitempty"`
Matchers []Matcher `json:"matchers,omitempty"`
Action RouteAction `json:"route_action,omitempty"`
}
type Matcher struct {
PathSpecifier Matcher_Prefix `json:"path_specifier,omitempty"`
}
type Matcher_Prefix struct {
// If specified, the route is a prefix rule meaning that the prefix must
// match the beginning of the *:path* header.
Prefix string `prefix:"path_specifier,omitempty"`
Prefix string `json:"prefix,omitempty"`
}
type RouteAction struct {
Destination MultiDestination `json:"destination,omitempty"`
Destination MultiDestination `json:"multi,omitempty"`
}
type MultiDestination struct {
-17
View File
@@ -44,7 +44,6 @@ func (in *Destination) DeepCopy() *Destination {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Matcher) DeepCopyInto(out *Matcher) {
*out = *in
out.PathSpecifier = in.PathSpecifier
return
}
@@ -58,22 +57,6 @@ func (in *Matcher) DeepCopy() *Matcher {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Matcher_Prefix) DeepCopyInto(out *Matcher_Prefix) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matcher_Prefix.
func (in *Matcher_Prefix) DeepCopy() *Matcher_Prefix {
if in == nil {
return nil
}
out := new(Matcher_Prefix)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MultiDestination) DeepCopyInto(out *MultiDestination) {
*out = *in