Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7974,14 +7974,14 @@ <h3 id="metalstack.api.v2.Network">Network</h3>
<tr>
<td>type</td>
<td><a href="#metalstack.api.v2.NetworkType">NetworkType</a></td>
<td>optional</td>
<td></td>
<td><p>Type of the network </p></td>
</tr>

<tr>
<td>nat_type</td>
<td><a href="#metalstack.api.v2.NATType">NATType</a></td>
<td>optional</td>
<td></td>
<td><p>NATType of this network </p></td>
</tr>

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.26

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1
buf.build/go/protovalidate v1.1.3
connectrpc.com/connect v1.19.1
buf.build/go/protovalidate v1.2.0
connectrpc.com/connect v1.19.2
github.com/bufbuild/protocompile v0.14.1
github.com/go-task/slim-sprig/v3 v3.0.0
github.com/golang-jwt/jwt/v5 v5.3.1
Expand All @@ -28,8 +28,8 @@ require (
github.com/stretchr/objx v0.5.3 // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/text v0.36.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-202604152011
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM=
buf.build/go/protovalidate v1.1.3 h1:m2GVEgQWd7rk+vIoAZ+f0ygGjvQTuqPQapBBdcpWVPE=
buf.build/go/protovalidate v1.1.3/go.mod h1:9XIuohWz+kj+9JVn3WQneHA5LZP50mjvneZMnbLkiIE=
buf.build/go/protovalidate v1.2.0 h1:DQVrUWkmGTBij+kOYv/x2LLxwcLaGKMdzShj1/6/3H0=
buf.build/go/protovalidate v1.2.0/go.mod h1:7rYiQEhqvAipoazpVNBBH2S2f8bjG4huMVy1V2Yofn4=
cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=
cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
connectrpc.com/connect v1.19.1 h1:R5M57z05+90EfEvCY1b7hBxDVOUl45PrtXtAV2fOC14=
connectrpc.com/connect v1.19.1/go.mod h1:tN20fjdGlewnSFeZxLKb0xwIZ6ozc3OQs2hTXy4du9w=
connectrpc.com/connect v1.19.2 h1:McQ83FGdzL+t60peksi0gXC7MQ/iLKgLduAnThbM0mo=
connectrpc.com/connect v1.19.2/go.mod h1:tN20fjdGlewnSFeZxLKb0xwIZ6ozc3OQs2hTXy4du9w=
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4=
Expand Down Expand Up @@ -55,10 +57,10 @@ golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJk
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 h1:yQugLulqltosq0B/f8l4w9VryjV+N/5gcW0jQ3N8Qec=
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478/go.mod h1:C6ADNqOxbgdUUeRTU+LCHDPB9ttAMCTff6auwCVa4uc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 h1:RmoJA1ujG+/lRGNfUnOMfhCy5EipVMyvUE+KNbPbTlw=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529 h1:zUWMZsvo/IJcD1t6MNCPO/azZTwz0TvwCBqr5aifoVY=
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529/go.mod h1:a5OGAgyRr4lqco7AG9hQM9Fwh0N2ZV4grR0eXFEsXQg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 h1:XF8+t6QQiS0o9ArVan/HW8Q7cycNPGsJf6GA2nXxYAg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
4 changes: 2 additions & 2 deletions go/metalstack/admin/v2/network.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 21 additions & 23 deletions go/metalstack/api/v2/network.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go/metalstack/api/v2/project.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions go/tests/api_scopes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,18 @@ func Test_FieldNumbering(t *testing.T) {

for _, mt := range fd.GetMessageType() {
var (
firstFiled = true
firstField = true
lastNumber int32
)

for _, field := range mt.GetField() {
if field.Number != nil {
if firstFiled {
firstFiled = false
if firstField {
// Enable if the first field must start with 1
// if *field.Number != 1 {
// errs = append(errs, fmt.Errorf("%s %s %s %d != %d", filename, *mt.Name, *field.Name, 1, *field.Number))
// }
firstField = false
} else {
if lastNumber+1 != *field.Number {
errs = append(errs, fmt.Errorf("%s %s %s %d != %d", filename, *mt.Name, *field.Name, lastNumber+1, *field.Number))
Expand All @@ -161,14 +165,17 @@ func Test_FieldNumbering(t *testing.T) {

for _, et := range fd.GetEnumType() {
var (
firstFiled = true
firstField = true
lastNumber int32
)

for _, value := range et.GetValue() {
if value.Number != nil {
if firstFiled {
firstFiled = false
if firstField {
if *value.Number != 0 {
errs = append(errs, fmt.Errorf("%s %s %s %d != %d", filename, *et.Name, *value.Name, 0, *value.Number))
}
firstField = false
} else {
if lastNumber+1 != *value.Number {
errs = append(errs, fmt.Errorf("%s %s %s %d != %d", filename, *et.Name, *value.Name, lastNumber+1, *value.Number))
Expand Down
18 changes: 9 additions & 9 deletions js/buf/validate/validate_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3741,7 +3741,7 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
*
* @generated from field: optional buf.validate.FieldRules items = 4;
*/
items?: FieldRules;
items?: FieldRules | undefined;
};
/**
* Describes the message buf.validate.RepeatedRules.
Expand Down Expand Up @@ -3801,7 +3801,7 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
*
* @generated from field: optional buf.validate.FieldRules keys = 4;
*/
keys?: FieldRules;
keys?: FieldRules | undefined;
/**
* Specifies the rules to be applied to the value of each key in the
* field. Message values will still have their validations evaluated unless
Expand All @@ -3822,7 +3822,7 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
*
* @generated from field: optional buf.validate.FieldRules values = 5;
*/
values?: FieldRules;
values?: FieldRules | undefined;
};
/**
* Describes the message buf.validate.MapRules.
Expand Down Expand Up @@ -3893,7 +3893,7 @@ export type DurationRules = Message<"buf.validate.DurationRules"> & {
*
* @generated from field: optional google.protobuf.Duration const = 2;
*/
const?: Duration;
const?: Duration | undefined;
/**
* @generated from oneof buf.validate.DurationRules.less_than
*/
Expand Down Expand Up @@ -4068,7 +4068,7 @@ export type FieldMaskRules = Message<"buf.validate.FieldMaskRules"> & {
*
* @generated from field: optional google.protobuf.FieldMask const = 1;
*/
const?: FieldMask;
const?: FieldMask | undefined;
/**
* `in` requires the field value to only contain paths matching specified
* values or their subpaths.
Expand Down Expand Up @@ -4148,7 +4148,7 @@ export type TimestampRules = Message<"buf.validate.TimestampRules"> & {
*
* @generated from field: optional google.protobuf.Timestamp const = 2;
*/
const?: Timestamp;
const?: Timestamp | undefined;
/**
* @generated from oneof buf.validate.TimestampRules.less_than
*/
Expand Down Expand Up @@ -4285,7 +4285,7 @@ export type TimestampRules = Message<"buf.validate.TimestampRules"> & {
*
* @generated from field: optional google.protobuf.Duration within = 9;
*/
within?: Duration;
within?: Duration | undefined;
/**
* `example` specifies values that the field may have. These values SHOULD
* conform to other rules. `example` values will not impact validation
Expand Down Expand Up @@ -4400,7 +4400,7 @@ export type Violation = Message<"buf.validate.Violation"> & {
*
* @generated from field: optional buf.validate.FieldPath field = 5;
*/
field?: FieldPath;
field?: FieldPath | undefined;
/**
* `rule` is a machine-readable path that points to the specific rule that failed validation.
* This will be a nested field starting from the FieldRules of the field that failed validation.
Expand Down Expand Up @@ -4433,7 +4433,7 @@ export type Violation = Message<"buf.validate.Violation"> & {
*
* @generated from field: optional buf.validate.FieldPath rule = 6;
*/
rule?: FieldPath;
rule?: FieldPath | undefined;
/**
* `rule_id` is the unique identifier of the `Rule` that was not fulfilled.
* This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated.
Expand Down
Loading
Loading