|
| 1 | +/* |
| 2 | +Copyright AppsCode Inc. and Contributors |
| 3 | +
|
| 4 | +Licensed under the AppsCode Community License 1.0.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +package v1alpha1 |
| 18 | + |
| 19 | +import gwapi "sigs.k8s.io/gateway-api/apis/v1" |
| 20 | + |
| 21 | +type AppHTTPRoute struct { |
| 22 | + Enabled bool `json:"enabled"` |
| 23 | + *HTTPRouteSpec `json:",inline,omitempty"` |
| 24 | + Hosts []HTTPRouteHost `json:"hosts"` |
| 25 | +} |
| 26 | + |
| 27 | +type HTTPRouteSpec struct { |
| 28 | + Annotations map[string]string `json:"annotations,omitempty"` |
| 29 | + GatewayClassName string `json:"gatewayClassName"` |
| 30 | + TLS *HTTPRouteTLS `json:"tls"` |
| 31 | +} |
| 32 | + |
| 33 | +type HTTPRouteTLS struct { |
| 34 | + Enabled bool `json:"enabled"` |
| 35 | + Secret *LocalObjectReference `json:"secret"` |
| 36 | +} |
| 37 | + |
| 38 | +type HTTPRouteHost struct { |
| 39 | + Host string `json:"host"` |
| 40 | + Paths HTTPRoutePath `json:"paths"` |
| 41 | +} |
| 42 | + |
| 43 | +type HTTPRoutePath struct { |
| 44 | + Path string `json:"path"` |
| 45 | + PathType gwapi.PathMatchType `json:"pathType,omitempty"` |
| 46 | +} |
0 commit comments