From 8725cf08c40fe0b5f20c8d497a8e226286b25d64 Mon Sep 17 00:00:00 2001 From: Samuel Lock Date: Sun, 19 Jun 2022 23:42:40 +1000 Subject: [PATCH] added missing prototypes --- gen/go/headscale/v1/acls.pb.go | 156 ++++++++++-------- .../headscale/v1/headscale.swagger.json | 31 ++-- proto/headscale/v1/acls.proto | 5 +- 3 files changed, 103 insertions(+), 89 deletions(-) diff --git a/gen/go/headscale/v1/acls.pb.go b/gen/go/headscale/v1/acls.pb.go index 3ee28fef..0c9e05bd 100644 --- a/gen/go/headscale/v1/acls.pb.go +++ b/gen/go/headscale/v1/acls.pb.go @@ -25,11 +25,11 @@ type ACLPolicy struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Groups map[string]*Group `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Hosts map[string]string `protobuf:"bytes,2,rep,name=Hosts,proto3" json:"Hosts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - TagOwners map[string]*TagOwners `protobuf:"bytes,3,rep,name=TagOwners,proto3" json:"TagOwners,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Acl []*ACL `protobuf:"bytes,4,rep,name=Acl,proto3" json:"Acl,omitempty"` - AclTest []*ACLTest `protobuf:"bytes,5,rep,name=AclTest,proto3" json:"AclTest,omitempty"` + Groups map[string]*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Hosts map[string]string `protobuf:"bytes,2,rep,name=hosts,proto3" json:"hosts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TagOwners map[string]*TagOwners `protobuf:"bytes,3,rep,name=tag_owners,json=tagOwners,proto3" json:"tag_owners,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Acl []*ACL `protobuf:"bytes,4,rep,name=acl,proto3" json:"acl,omitempty"` + AclTest []*ACLTest `protobuf:"bytes,5,rep,name=acl_test,json=aclTest,proto3" json:"acl_test,omitempty"` } func (x *ACLPolicy) Reset() { @@ -104,7 +104,7 @@ type Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group []string `protobuf:"bytes,1,rep,name=Group,proto3" json:"Group,omitempty"` + Group []string `protobuf:"bytes,1,rep,name=group,proto3" json:"group,omitempty"` } func (x *Group) Reset() { @@ -151,7 +151,7 @@ type TagOwners struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TagOwners []string `protobuf:"bytes,1,rep,name=TagOwners,proto3" json:"TagOwners,omitempty"` + TagOwners []string `protobuf:"bytes,1,rep,name=tag_owners,json=tagOwners,proto3" json:"tag_owners,omitempty"` } func (x *TagOwners) Reset() { @@ -198,9 +198,10 @@ type ACL struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Action string `protobuf:"bytes,1,opt,name=Action,proto3" json:"Action,omitempty"` - Sources []string `protobuf:"bytes,2,rep,name=Sources,proto3" json:"Sources,omitempty"` - Destinations []string `protobuf:"bytes,3,rep,name=Destinations,proto3" json:"Destinations,omitempty"` + Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` + Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` + Sources []string `protobuf:"bytes,3,rep,name=sources,proto3" json:"sources,omitempty"` + Destinations []string `protobuf:"bytes,4,rep,name=destinations,proto3" json:"destinations,omitempty"` } func (x *ACL) Reset() { @@ -242,6 +243,13 @@ func (x *ACL) GetAction() string { return "" } +func (x *ACL) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + func (x *ACL) GetSources() []string { if x != nil { return x.Sources @@ -261,9 +269,9 @@ type ACLTest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Source string `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` - Accept []string `protobuf:"bytes,2,rep,name=Accept,proto3" json:"Accept,omitempty"` - Deny []string `protobuf:"bytes,3,rep,name=Deny,proto3" json:"Deny,omitempty"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Accept []string `protobuf:"bytes,2,rep,name=accept,proto3" json:"accept,omitempty"` + Deny []string `protobuf:"bytes,3,rep,name=deny,proto3" json:"deny,omitempty"` } func (x *ACLTest) Reset() { @@ -362,7 +370,7 @@ type ListACLPolicyResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Policy *ACLPolicy `protobuf:"bytes,1,opt,name=Policy,proto3" json:"Policy,omitempty"` + Policy *ACLPolicy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` } func (x *ListACLPolicyResponse) Reset() { @@ -409,64 +417,66 @@ var File_headscale_v1_acls_proto protoreflect.FileDescriptor var file_headscale_v1_acls_proto_rawDesc = []byte{ 0x0a, 0x17, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x73, - 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xff, 0x03, 0x0a, 0x09, 0x41, 0x43, 0x4c, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, + 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x81, 0x04, 0x0a, 0x09, 0x41, 0x43, 0x4c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x09, - 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x12, 0x23, 0x0a, 0x03, 0x41, 0x63, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x43, 0x4c, 0x52, 0x03, 0x41, 0x63, 0x6c, 0x12, 0x2f, 0x0a, 0x07, 0x41, 0x63, 0x6c, 0x54, 0x65, - 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, - 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x43, 0x4c, 0x54, 0x65, 0x73, 0x74, 0x52, - 0x07, 0x41, 0x63, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x1a, 0x4e, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, - 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x6f, 0x73, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0a, + 0x74, 0x61, 0x67, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x61, 0x67, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x12, 0x23, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x43, 0x4c, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x30, 0x0a, 0x08, 0x61, 0x63, 0x6c, 0x5f, + 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x43, 0x4c, 0x54, 0x65, 0x73, + 0x74, 0x52, 0x07, 0x61, 0x63, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x1a, 0x4e, 0x0a, 0x0b, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x6f, + 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0e, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0e, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1d, 0x0a, 0x05, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x29, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x4f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x22, 0x5b, 0x0a, 0x03, 0x41, 0x43, 0x4c, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x4d, 0x0a, 0x07, 0x41, 0x43, 0x4c, 0x54, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, - 0x65, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x22, - 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2f, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6a, 0x75, 0x61, 0x6e, 0x66, 0x6f, 0x6e, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, - 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, + 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1d, 0x0a, 0x05, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x2a, 0x0a, 0x09, 0x54, 0x61, + 0x67, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x67, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x77, 0x0a, 0x03, 0x41, 0x43, 0x4c, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x4d, 0x0a, 0x07, 0x41, 0x43, 0x4c, 0x54, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, + 0x6e, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x6e, 0x79, 0x22, 0x16, + 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x43, + 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, + 0x75, 0x61, 0x6e, 0x66, 0x6f, 0x6e, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x73, 0x63, 0x61, 0x6c, + 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -495,12 +505,12 @@ var file_headscale_v1_acls_proto_goTypes = []interface{}{ nil, // 9: headscale.v1.ACLPolicy.TagOwnersEntry } var file_headscale_v1_acls_proto_depIdxs = []int32{ - 7, // 0: headscale.v1.ACLPolicy.Groups:type_name -> headscale.v1.ACLPolicy.GroupsEntry - 8, // 1: headscale.v1.ACLPolicy.Hosts:type_name -> headscale.v1.ACLPolicy.HostsEntry - 9, // 2: headscale.v1.ACLPolicy.TagOwners:type_name -> headscale.v1.ACLPolicy.TagOwnersEntry - 3, // 3: headscale.v1.ACLPolicy.Acl:type_name -> headscale.v1.ACL - 4, // 4: headscale.v1.ACLPolicy.AclTest:type_name -> headscale.v1.ACLTest - 0, // 5: headscale.v1.ListACLPolicyResponse.Policy:type_name -> headscale.v1.ACLPolicy + 7, // 0: headscale.v1.ACLPolicy.groups:type_name -> headscale.v1.ACLPolicy.GroupsEntry + 8, // 1: headscale.v1.ACLPolicy.hosts:type_name -> headscale.v1.ACLPolicy.HostsEntry + 9, // 2: headscale.v1.ACLPolicy.tag_owners:type_name -> headscale.v1.ACLPolicy.TagOwnersEntry + 3, // 3: headscale.v1.ACLPolicy.acl:type_name -> headscale.v1.ACL + 4, // 4: headscale.v1.ACLPolicy.acl_test:type_name -> headscale.v1.ACLTest + 0, // 5: headscale.v1.ListACLPolicyResponse.policy:type_name -> headscale.v1.ACLPolicy 1, // 6: headscale.v1.ACLPolicy.GroupsEntry.value:type_name -> headscale.v1.Group 2, // 7: headscale.v1.ACLPolicy.TagOwnersEntry.value:type_name -> headscale.v1.TagOwners 8, // [8:8] is the sub-list for method output_type diff --git a/gen/openapiv2/headscale/v1/headscale.swagger.json b/gen/openapiv2/headscale/v1/headscale.swagger.json index 32246779..f53ff6ab 100644 --- a/gen/openapiv2/headscale/v1/headscale.swagger.json +++ b/gen/openapiv2/headscale/v1/headscale.swagger.json @@ -778,16 +778,19 @@ "v1ACL": { "type": "object", "properties": { - "Action": { + "action": { "type": "string" }, - "Sources": { + "protocol": { + "type": "string" + }, + "sources": { "type": "array", "items": { "type": "string" } }, - "Destinations": { + "destinations": { "type": "array", "items": { "type": "string" @@ -798,31 +801,31 @@ "v1ACLPolicy": { "type": "object", "properties": { - "Groups": { + "groups": { "type": "object", "additionalProperties": { "$ref": "#/definitions/v1Group" } }, - "Hosts": { + "hosts": { "type": "object", "additionalProperties": { "type": "string" } }, - "TagOwners": { + "tagOwners": { "type": "object", "additionalProperties": { "$ref": "#/definitions/v1TagOwners" } }, - "Acl": { + "acl": { "type": "array", "items": { "$ref": "#/definitions/v1ACL" } }, - "AclTest": { + "aclTest": { "type": "array", "items": { "$ref": "#/definitions/v1ACLTest" @@ -833,16 +836,16 @@ "v1ACLTest": { "type": "object", "properties": { - "Source": { + "source": { "type": "string" }, - "Accept": { + "accept": { "type": "array", "items": { "type": "string" } }, - "Deny": { + "deny": { "type": "array", "items": { "type": "string" @@ -1035,7 +1038,7 @@ "v1Group": { "type": "object", "properties": { - "Group": { + "group": { "type": "array", "items": { "type": "string" @@ -1046,7 +1049,7 @@ "v1ListACLPolicyResponse": { "type": "object", "properties": { - "Policy": { + "policy": { "$ref": "#/definitions/v1ACLPolicy" } } @@ -1284,7 +1287,7 @@ "v1TagOwners": { "type": "object", "properties": { - "TagOwners": { + "tagOwners": { "type": "array", "items": { "type": "string" diff --git a/proto/headscale/v1/acls.proto b/proto/headscale/v1/acls.proto index 9fcb5004..320f6e80 100644 --- a/proto/headscale/v1/acls.proto +++ b/proto/headscale/v1/acls.proto @@ -20,8 +20,9 @@ message TagOwners { message ACL { string action = 1; - repeated string sources = 2; - repeated string destinations = 3; + string protocol = 2; + repeated string sources = 3; + repeated string destinations = 4; } message ACLTest {