diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..719bfcc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.vscode +vendor diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/api/manifest.pb.go b/api/manifest.pb.go new file mode 100644 index 0000000..b69cd9c --- /dev/null +++ b/api/manifest.pb.go @@ -0,0 +1,294 @@ +// Copyright 2019 Tetrate +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: api/manifest.proto + +package api + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type Compliance int32 + +const ( + Compliance_NONE Compliance = 0 + Compliance_FIPS_1402 Compliance = 1 +) + +var Compliance_name = map[int32]string{ + 0: "NONE", + 1: "FIPS_1402", +} + +var Compliance_value = map[string]int32{ + "NONE": 0, + "FIPS_1402": 1, +} + +func (x Compliance) String() string { + return proto.EnumName(Compliance_name, int32(x)) +} + +func (Compliance) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_346685e380de5b1f, []int{0} +} + +// Builds must be uniquely addressable from the top level so that they can be used to look up the location of binaries. +// Format: filter_profile(-compliance_profile)/operating_system-operating_system_version:envoy_version +type Manifest struct { + Version float32 `protobuf:"fixed32,1,opt,name=version,proto3" json:"version,omitempty"` + // Key is composite key of the value's filter_profile and compliance_profile + // Note: compliance_profile is optional + // Format: filter_profile(-compliance_profile) + Flavors map[string]*Flavor `protobuf:"bytes,2,rep,name=flavors,proto3" json:"flavors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Manifest) Reset() { *m = Manifest{} } +func (m *Manifest) String() string { return proto.CompactTextString(m) } +func (*Manifest) ProtoMessage() {} +func (*Manifest) Descriptor() ([]byte, []int) { + return fileDescriptor_346685e380de5b1f, []int{0} +} + +func (m *Manifest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Manifest.Unmarshal(m, b) +} +func (m *Manifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Manifest.Marshal(b, m, deterministic) +} +func (m *Manifest) XXX_Merge(src proto.Message) { + xxx_messageInfo_Manifest.Merge(m, src) +} +func (m *Manifest) XXX_Size() int { + return xxx_messageInfo_Manifest.Size(m) +} +func (m *Manifest) XXX_DiscardUnknown() { + xxx_messageInfo_Manifest.DiscardUnknown(m) +} + +var xxx_messageInfo_Manifest proto.InternalMessageInfo + +func (m *Manifest) GetVersion() float32 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *Manifest) GetFlavors() map[string]*Flavor { + if m != nil { + return m.Flavors + } + return nil +} + +type Flavor struct { + // Filter profile is the name of the collection of filters + // E.g. Standard, Minimal, Istio + FilterProfile string `protobuf:"bytes,1,opt,name=filter_profile,json=filterProfile,proto3" json:"filter_profile,omitempty"` + // All filters available in this flavor + Filters []string `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + // Compliance profile is a Camelcase concatenation of the compliances + // Format: Compliance0Compliance1 + ComplianceProfile string `protobuf:"bytes,3,opt,name=compliance_profile,json=complianceProfile,proto3" json:"compliance_profile,omitempty"` + Compliances []Compliance `protobuf:"varint,4,rep,packed,name=compliances,proto3,enum=api.Compliance" json:"compliances,omitempty"` + // Key is composite key of the value's operating_system, operating_system_version and envoy_version + // Format: operating_system-operating_system_version:envoy_version + Builds map[string]*Build `protobuf:"bytes,5,rep,name=builds,proto3" json:"builds,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Flavor) Reset() { *m = Flavor{} } +func (m *Flavor) String() string { return proto.CompactTextString(m) } +func (*Flavor) ProtoMessage() {} +func (*Flavor) Descriptor() ([]byte, []int) { + return fileDescriptor_346685e380de5b1f, []int{1} +} + +func (m *Flavor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Flavor.Unmarshal(m, b) +} +func (m *Flavor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Flavor.Marshal(b, m, deterministic) +} +func (m *Flavor) XXX_Merge(src proto.Message) { + xxx_messageInfo_Flavor.Merge(m, src) +} +func (m *Flavor) XXX_Size() int { + return xxx_messageInfo_Flavor.Size(m) +} +func (m *Flavor) XXX_DiscardUnknown() { + xxx_messageInfo_Flavor.DiscardUnknown(m) +} + +var xxx_messageInfo_Flavor proto.InternalMessageInfo + +func (m *Flavor) GetFilterProfile() string { + if m != nil { + return m.FilterProfile + } + return "" +} + +func (m *Flavor) GetFilters() []string { + if m != nil { + return m.Filters + } + return nil +} + +func (m *Flavor) GetComplianceProfile() string { + if m != nil { + return m.ComplianceProfile + } + return "" +} + +func (m *Flavor) GetCompliances() []Compliance { + if m != nil { + return m.Compliances + } + return nil +} + +func (m *Flavor) GetBuilds() map[string]*Build { + if m != nil { + return m.Builds + } + return nil +} + +type Build struct { + OperatingSystem string `protobuf:"bytes,1,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` + OperatingSystemVersion string `protobuf:"bytes,2,opt,name=operating_system_version,json=operatingSystemVersion,proto3" json:"operating_system_version,omitempty"` + EnvoyVersion string `protobuf:"bytes,3,opt,name=envoy_version,json=envoyVersion,proto3" json:"envoy_version,omitempty"` + DownloadLocation string `protobuf:"bytes,4,opt,name=download_location,json=downloadLocation,proto3" json:"download_location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Build) Reset() { *m = Build{} } +func (m *Build) String() string { return proto.CompactTextString(m) } +func (*Build) ProtoMessage() {} +func (*Build) Descriptor() ([]byte, []int) { + return fileDescriptor_346685e380de5b1f, []int{2} +} + +func (m *Build) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Build.Unmarshal(m, b) +} +func (m *Build) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Build.Marshal(b, m, deterministic) +} +func (m *Build) XXX_Merge(src proto.Message) { + xxx_messageInfo_Build.Merge(m, src) +} +func (m *Build) XXX_Size() int { + return xxx_messageInfo_Build.Size(m) +} +func (m *Build) XXX_DiscardUnknown() { + xxx_messageInfo_Build.DiscardUnknown(m) +} + +var xxx_messageInfo_Build proto.InternalMessageInfo + +func (m *Build) GetOperatingSystem() string { + if m != nil { + return m.OperatingSystem + } + return "" +} + +func (m *Build) GetOperatingSystemVersion() string { + if m != nil { + return m.OperatingSystemVersion + } + return "" +} + +func (m *Build) GetEnvoyVersion() string { + if m != nil { + return m.EnvoyVersion + } + return "" +} + +func (m *Build) GetDownloadLocation() string { + if m != nil { + return m.DownloadLocation + } + return "" +} + +func init() { + proto.RegisterEnum("api.Compliance", Compliance_name, Compliance_value) + proto.RegisterType((*Manifest)(nil), "api.Manifest") + proto.RegisterMapType((map[string]*Flavor)(nil), "api.Manifest.FlavorsEntry") + proto.RegisterType((*Flavor)(nil), "api.Flavor") + proto.RegisterMapType((map[string]*Build)(nil), "api.Flavor.BuildsEntry") + proto.RegisterType((*Build)(nil), "api.Build") +} + +func init() { proto.RegisterFile("api/manifest.proto", fileDescriptor_346685e380de5b1f) } + +var fileDescriptor_346685e380de5b1f = []byte{ + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x5f, 0xcf, 0xd2, 0x30, + 0x18, 0xc5, 0xdd, 0x06, 0xbc, 0x2f, 0xcf, 0xf8, 0x33, 0x7a, 0xa1, 0x0b, 0x57, 0x13, 0x43, 0x32, + 0x35, 0x0e, 0x99, 0x5c, 0x10, 0x2f, 0x35, 0x60, 0x4c, 0x14, 0xc9, 0x48, 0xbc, 0x5d, 0x0a, 0x74, + 0xa6, 0xb1, 0xac, 0xcb, 0x36, 0x66, 0xf6, 0x79, 0xf8, 0x1e, 0x7e, 0x36, 0x43, 0xbb, 0x8e, 0x49, + 0xde, 0xbb, 0xf6, 0x77, 0xce, 0x73, 0xd2, 0x9e, 0x3c, 0x80, 0x70, 0x42, 0x67, 0x27, 0x1c, 0xd3, + 0x88, 0x64, 0xb9, 0x97, 0xa4, 0x3c, 0xe7, 0xc8, 0xc0, 0x09, 0x9d, 0x5c, 0x34, 0x78, 0xfc, 0x5e, + 0x71, 0x64, 0xc3, 0x43, 0x41, 0xd2, 0x8c, 0xf2, 0xd8, 0xd6, 0x1c, 0xcd, 0xd5, 0x03, 0x75, 0x45, + 0x0b, 0x78, 0x88, 0x18, 0x2e, 0x78, 0x9a, 0xd9, 0xba, 0x63, 0xb8, 0xa6, 0x3f, 0xf6, 0x70, 0x42, + 0x3d, 0x35, 0xe9, 0xad, 0xa5, 0xb8, 0x8a, 0xf3, 0xb4, 0x0c, 0x94, 0x75, 0xfc, 0x05, 0x7a, 0x4d, + 0x01, 0x59, 0x60, 0xfc, 0x26, 0xa5, 0xc8, 0xee, 0x06, 0xd7, 0x23, 0x7a, 0x09, 0xed, 0x02, 0xb3, + 0x33, 0xb1, 0x75, 0x47, 0x73, 0x4d, 0xdf, 0x14, 0xa9, 0x72, 0x26, 0x90, 0xca, 0x47, 0x7d, 0xa9, + 0x4d, 0x2e, 0x3a, 0x74, 0x24, 0x45, 0x53, 0x18, 0x44, 0x94, 0xe5, 0x24, 0x0d, 0x93, 0x94, 0x47, + 0x94, 0x91, 0x2a, 0xae, 0x2f, 0xe9, 0x56, 0xc2, 0xeb, 0x57, 0x24, 0x90, 0x0f, 0xee, 0x06, 0xea, + 0x8a, 0xde, 0x01, 0x3a, 0xf0, 0x53, 0xc2, 0x28, 0x8e, 0x0f, 0xa4, 0x0e, 0x31, 0x44, 0xc8, 0xe8, + 0xa6, 0xa8, 0xa0, 0x39, 0x98, 0x37, 0x98, 0xd9, 0x2d, 0xc7, 0x70, 0x07, 0xfe, 0x50, 0xbc, 0xf3, + 0x73, 0xcd, 0x83, 0xa6, 0x07, 0xcd, 0xa0, 0xb3, 0x3f, 0x53, 0x76, 0xcc, 0xec, 0xb6, 0xe8, 0xea, + 0x45, 0xe3, 0x57, 0xde, 0x27, 0xa1, 0xc8, 0xa2, 0x2a, 0xdb, 0x78, 0x05, 0x66, 0x03, 0x3f, 0x51, + 0x93, 0xf3, 0x7f, 0x4d, 0x20, 0x02, 0xc5, 0x48, 0xb3, 0xa5, 0xbf, 0x1a, 0xb4, 0x05, 0x44, 0xaf, + 0xc1, 0xe2, 0x09, 0x49, 0x71, 0x4e, 0xe3, 0x5f, 0x61, 0x56, 0x66, 0x39, 0x39, 0x55, 0x71, 0xc3, + 0x9a, 0xef, 0x04, 0x46, 0x4b, 0xb0, 0xef, 0xad, 0xa1, 0x5a, 0x02, 0x5d, 0x8c, 0x3c, 0xbf, 0x1b, + 0xf9, 0x59, 0xed, 0xc4, 0x2b, 0xe8, 0x93, 0xb8, 0xe0, 0x65, 0x6d, 0x97, 0x1d, 0xf6, 0x04, 0x54, + 0xa6, 0xb7, 0x30, 0x3a, 0xf2, 0x3f, 0x31, 0xe3, 0xf8, 0x18, 0x32, 0x7e, 0xc0, 0xf9, 0xd5, 0xd8, + 0x12, 0x46, 0x4b, 0x09, 0xdf, 0x2a, 0xfe, 0x66, 0x0a, 0x70, 0xeb, 0x14, 0x3d, 0x42, 0x6b, 0xf3, + 0x63, 0xb3, 0xb2, 0x9e, 0xa1, 0x3e, 0x74, 0xd7, 0x5f, 0xb7, 0xbb, 0x70, 0xbe, 0x78, 0xef, 0x5b, + 0xda, 0xbe, 0x23, 0xf6, 0xf7, 0xc3, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x0f, 0x51, 0xd0, + 0xd5, 0x02, 0x00, 0x00, +} diff --git a/api/manifest.proto b/api/manifest.proto new file mode 100644 index 0000000..2322b32 --- /dev/null +++ b/api/manifest.proto @@ -0,0 +1,57 @@ +// Copyright 2019 Tetrate +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package api; + +// Builds must be uniquely addressable from the top level so that they can be used to look up the location of binaries. +// Format: filter_profile(-compliance_profile)/operating_system-operating_system_version:envoy_version +message Manifest { + float version = 1; + + // Key is composite key of the value's filter_profile and compliance_profile + // Note: compliance_profile is optional + // Format: filter_profile(-compliance_profile) + map flavors = 2; +} + +message Flavor { + // Filter profile is the name of the collection of filters + // E.g. Standard, Minimal, Istio + string filter_profile = 1; + + // All filters available in this flavor + repeated string filters = 2; + + // Compliance profile is a Camelcase concatenation of the compliances + // Format: Compliance0Compliance1 + string compliance_profile = 3; + repeated Compliance compliances = 4; + + // Key is composite key of the value's operating_system, operating_system_version and envoy_version + // Format: operating_system-operating_system_version:envoy_version + map builds = 5; +} + +message Build { + string operating_system = 1; + string operating_system_version = 2; + string envoy_version = 3; + string download_location = 4; +} + +enum Compliance { + NONE = 0; + FIPS_1402 = 1; +} diff --git a/ci/lint b/ci/lint new file mode 100755 index 0000000..b24b32d --- /dev/null +++ b/ci/lint @@ -0,0 +1,31 @@ +#!/bin/bash + +SUCCESS=true + +# Ensure Licenses are present +if licenser verify -r .; then + echo "Licenses are present on all recognised files." +else + echo "Licenses are missing." + SUCCESS=false +fi + +# Ensure Protos are generated and up-to-date +# +# NOTE: This must be done after license verification as we need to +# generate licenses as part of proto generation. +find api -type f -name '*.proto' | xargs protoc --go_out=. +licenser apply -r . "Tetrate" +if [ "$(git status --porcelain)" != "" ]; then + echo "The following Protos need to be regenerated:" + git status --porcelain -v + SUCCESS=false +fi + + +if [ "$SUCCESS" = false ] ; then + echo "Lint failed." + exit 1 +else + echo "Lint passed!" +fi