diff --git a/gen/go/proto/resources/internet/access.pb.go b/gen/go/proto/resources/internet/access.pb.go new file mode 100644 index 000000000..86260a629 --- /dev/null +++ b/gen/go/proto/resources/internet/access.pb.go @@ -0,0 +1,464 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc v3.20.3 +// source: resources/internet/access.proto + +package internet + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + timestamp "github.com/fivenet-app/fivenet/gen/go/proto/resources/timestamp" + users "github.com/fivenet-app/fivenet/gen/go/proto/resources/users" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AccessLevel int32 + +const ( + AccessLevel_ACCESS_LEVEL_UNSPECIFIED AccessLevel = 0 + AccessLevel_ACCESS_LEVEL_BLOCKED AccessLevel = 1 + AccessLevel_ACCESS_LEVEL_VIEW AccessLevel = 2 + AccessLevel_ACCESS_LEVEL_EDIT AccessLevel = 3 + AccessLevel_ACCESS_LEVEL_OWNER AccessLevel = 4 +) + +// Enum value maps for AccessLevel. +var ( + AccessLevel_name = map[int32]string{ + 0: "ACCESS_LEVEL_UNSPECIFIED", + 1: "ACCESS_LEVEL_BLOCKED", + 2: "ACCESS_LEVEL_VIEW", + 3: "ACCESS_LEVEL_EDIT", + 4: "ACCESS_LEVEL_OWNER", + } + AccessLevel_value = map[string]int32{ + "ACCESS_LEVEL_UNSPECIFIED": 0, + "ACCESS_LEVEL_BLOCKED": 1, + "ACCESS_LEVEL_VIEW": 2, + "ACCESS_LEVEL_EDIT": 3, + "ACCESS_LEVEL_OWNER": 4, + } +) + +func (x AccessLevel) Enum() *AccessLevel { + p := new(AccessLevel) + *p = x + return p +} + +func (x AccessLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccessLevel) Descriptor() protoreflect.EnumDescriptor { + return file_resources_internet_access_proto_enumTypes[0].Descriptor() +} + +func (AccessLevel) Type() protoreflect.EnumType { + return &file_resources_internet_access_proto_enumTypes[0] +} + +func (x AccessLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccessLevel.Descriptor instead. +func (AccessLevel) EnumDescriptor() ([]byte, []int) { + return file_resources_internet_access_proto_rawDescGZIP(), []int{0} +} + +type DomainAccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + Jobs []*DomainJobAccess `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty" alias:"job_access"` // @gotags: alias:"job_access" + Users []*DomainUserAccess `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty" alias:"user_access"` // @gotags: alias:"user_access" + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DomainAccess) Reset() { + *x = DomainAccess{} + mi := &file_resources_internet_access_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DomainAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DomainAccess) ProtoMessage() {} + +func (x *DomainAccess) ProtoReflect() protoreflect.Message { + mi := &file_resources_internet_access_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DomainAccess.ProtoReflect.Descriptor instead. +func (*DomainAccess) Descriptor() ([]byte, []int) { + return file_resources_internet_access_proto_rawDescGZIP(), []int{0} +} + +func (x *DomainAccess) GetJobs() []*DomainJobAccess { + if x != nil { + return x.Jobs + } + return nil +} + +func (x *DomainAccess) GetUsers() []*DomainUserAccess { + if x != nil { + return x.Users + } + return nil +} + +type DomainJobAccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"` + TargetId uint64 `protobuf:"varint,3,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty" alias:"page_id"` // @gotags: alias:"page_id" + Job string `protobuf:"bytes,4,opt,name=job,proto3" json:"job,omitempty"` + JobLabel *string `protobuf:"bytes,5,opt,name=job_label,json=jobLabel,proto3,oneof" json:"job_label,omitempty"` + MinimumGrade int32 `protobuf:"varint,6,opt,name=minimum_grade,json=minimumGrade,proto3" json:"minimum_grade,omitempty"` + JobGradeLabel *string `protobuf:"bytes,7,opt,name=job_grade_label,json=jobGradeLabel,proto3,oneof" json:"job_grade_label,omitempty"` + Access AccessLevel `protobuf:"varint,8,opt,name=access,proto3,enum=resources.internet.AccessLevel" json:"access,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DomainJobAccess) Reset() { + *x = DomainJobAccess{} + mi := &file_resources_internet_access_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DomainJobAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DomainJobAccess) ProtoMessage() {} + +func (x *DomainJobAccess) ProtoReflect() protoreflect.Message { + mi := &file_resources_internet_access_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DomainJobAccess.ProtoReflect.Descriptor instead. +func (*DomainJobAccess) Descriptor() ([]byte, []int) { + return file_resources_internet_access_proto_rawDescGZIP(), []int{1} +} + +func (x *DomainJobAccess) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DomainJobAccess) GetCreatedAt() *timestamp.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *DomainJobAccess) GetTargetId() uint64 { + if x != nil { + return x.TargetId + } + return 0 +} + +func (x *DomainJobAccess) GetJob() string { + if x != nil { + return x.Job + } + return "" +} + +func (x *DomainJobAccess) GetJobLabel() string { + if x != nil && x.JobLabel != nil { + return *x.JobLabel + } + return "" +} + +func (x *DomainJobAccess) GetMinimumGrade() int32 { + if x != nil { + return x.MinimumGrade + } + return 0 +} + +func (x *DomainJobAccess) GetJobGradeLabel() string { + if x != nil && x.JobGradeLabel != nil { + return *x.JobGradeLabel + } + return "" +} + +func (x *DomainJobAccess) GetAccess() AccessLevel { + if x != nil { + return x.Access + } + return AccessLevel_ACCESS_LEVEL_UNSPECIFIED +} + +type DomainUserAccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"` + TargetId uint64 `protobuf:"varint,3,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty" alias:"page_id"` // @gotags: alias:"page_id" + UserId int32 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + User *users.UserShort `protobuf:"bytes,5,opt,name=user,proto3,oneof" json:"user,omitempty"` + Access AccessLevel `protobuf:"varint,6,opt,name=access,proto3,enum=resources.internet.AccessLevel" json:"access,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DomainUserAccess) Reset() { + *x = DomainUserAccess{} + mi := &file_resources_internet_access_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DomainUserAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DomainUserAccess) ProtoMessage() {} + +func (x *DomainUserAccess) ProtoReflect() protoreflect.Message { + mi := &file_resources_internet_access_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DomainUserAccess.ProtoReflect.Descriptor instead. +func (*DomainUserAccess) Descriptor() ([]byte, []int) { + return file_resources_internet_access_proto_rawDescGZIP(), []int{2} +} + +func (x *DomainUserAccess) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DomainUserAccess) GetCreatedAt() *timestamp.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *DomainUserAccess) GetTargetId() uint64 { + if x != nil { + return x.TargetId + } + return 0 +} + +func (x *DomainUserAccess) GetUserId() int32 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *DomainUserAccess) GetUser() *users.UserShort { + if x != nil { + return x.User + } + return nil +} + +func (x *DomainUserAccess) GetAccess() AccessLevel { + if x != nil { + return x.Access + } + return AccessLevel_ACCESS_LEVEL_UNSPECIFIED +} + +var File_resources_internet_access_proto protoreflect.FileDescriptor + +var file_resources_internet_access_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x1a, 0x23, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x97, 0x01, 0x0a, 0x0c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x41, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x14, 0x52, 0x04, + 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x44, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, + 0x02, 0x10, 0x14, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xa0, 0x03, 0x0a, 0x0f, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x19, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x18, 0x14, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x29, 0x0a, 0x09, 0x6a, 0x6f, + 0x62, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x18, 0x32, 0x48, 0x01, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x47, 0x72, + 0x61, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x0f, 0x6a, 0x6f, 0x62, 0x5f, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x18, 0x32, 0x48, 0x02, 0x52, 0x0d, 0x6a, 0x6f, 0x62, 0x47, 0x72, 0x61, 0x64, + 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, 0x06, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x6a, 0x6f, 0x62, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6a, 0x6f, + 0x62, 0x5f, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0xb5, 0x02, + 0x0a, 0x10, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x48, + 0x01, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, 0x06, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2a, 0x8b, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, + 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4c, 0x45, + 0x56, 0x45, 0x4c, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, + 0x11, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x56, 0x49, + 0x45, 0x57, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x41, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x4f, 0x57, 0x4e, 0x45, + 0x52, 0x10, 0x04, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x66, 0x69, 0x76, 0x65, 0x6e, 0x65, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x2f, 0x66, 0x69, + 0x76, 0x65, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_resources_internet_access_proto_rawDescOnce sync.Once + file_resources_internet_access_proto_rawDescData = file_resources_internet_access_proto_rawDesc +) + +func file_resources_internet_access_proto_rawDescGZIP() []byte { + file_resources_internet_access_proto_rawDescOnce.Do(func() { + file_resources_internet_access_proto_rawDescData = protoimpl.X.CompressGZIP(file_resources_internet_access_proto_rawDescData) + }) + return file_resources_internet_access_proto_rawDescData +} + +var file_resources_internet_access_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_resources_internet_access_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_resources_internet_access_proto_goTypes = []any{ + (AccessLevel)(0), // 0: resources.internet.AccessLevel + (*DomainAccess)(nil), // 1: resources.internet.DomainAccess + (*DomainJobAccess)(nil), // 2: resources.internet.DomainJobAccess + (*DomainUserAccess)(nil), // 3: resources.internet.DomainUserAccess + (*timestamp.Timestamp)(nil), // 4: resources.timestamp.Timestamp + (*users.UserShort)(nil), // 5: resources.users.UserShort +} +var file_resources_internet_access_proto_depIdxs = []int32{ + 2, // 0: resources.internet.DomainAccess.jobs:type_name -> resources.internet.DomainJobAccess + 3, // 1: resources.internet.DomainAccess.users:type_name -> resources.internet.DomainUserAccess + 4, // 2: resources.internet.DomainJobAccess.created_at:type_name -> resources.timestamp.Timestamp + 0, // 3: resources.internet.DomainJobAccess.access:type_name -> resources.internet.AccessLevel + 4, // 4: resources.internet.DomainUserAccess.created_at:type_name -> resources.timestamp.Timestamp + 5, // 5: resources.internet.DomainUserAccess.user:type_name -> resources.users.UserShort + 0, // 6: resources.internet.DomainUserAccess.access:type_name -> resources.internet.AccessLevel + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_resources_internet_access_proto_init() } +func file_resources_internet_access_proto_init() { + if File_resources_internet_access_proto != nil { + return + } + file_resources_internet_access_proto_msgTypes[1].OneofWrappers = []any{} + file_resources_internet_access_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_resources_internet_access_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_resources_internet_access_proto_goTypes, + DependencyIndexes: file_resources_internet_access_proto_depIdxs, + EnumInfos: file_resources_internet_access_proto_enumTypes, + MessageInfos: file_resources_internet_access_proto_msgTypes, + }.Build() + File_resources_internet_access_proto = out.File + file_resources_internet_access_proto_rawDesc = nil + file_resources_internet_access_proto_goTypes = nil + file_resources_internet_access_proto_depIdxs = nil +} diff --git a/gen/go/proto/resources/internet/access.pb.sanitizer.go b/gen/go/proto/resources/internet/access.pb.sanitizer.go new file mode 100644 index 000000000..9b13f32d8 --- /dev/null +++ b/gen/go/proto/resources/internet/access.pb.sanitizer.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-customizer. DO NOT EDIT. +// source: resources/internet/access.proto + +package internet + +func (m *DomainAccess) Sanitize() error { + if m == nil { + return nil + } + + // Field: Jobs + for idx, item := range m.Jobs { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Sanitize() error }); ok { + if err := v.Sanitize(); err != nil { + return err + } + } + + } + + // Field: Users + for idx, item := range m.Users { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Sanitize() error }); ok { + if err := v.Sanitize(); err != nil { + return err + } + } + + } + + return nil +} + +func (m *DomainJobAccess) Sanitize() error { + if m == nil { + return nil + } + + // Field: CreatedAt + if m.CreatedAt != nil { + if v, ok := interface{}(m.GetCreatedAt()).(interface{ Sanitize() error }); ok { + if err := v.Sanitize(); err != nil { + return err + } + } + } + + return nil +} + +func (m *DomainUserAccess) Sanitize() error { + if m == nil { + return nil + } + + // Field: CreatedAt + if m.CreatedAt != nil { + if v, ok := interface{}(m.GetCreatedAt()).(interface{ Sanitize() error }); ok { + if err := v.Sanitize(); err != nil { + return err + } + } + } + + // Field: User + if m.User != nil { + if v, ok := interface{}(m.GetUser()).(interface{ Sanitize() error }); ok { + if err := v.Sanitize(); err != nil { + return err + } + } + } + + return nil +} diff --git a/gen/go/proto/resources/internet/access.pb.validate.go b/gen/go/proto/resources/internet/access.pb.validate.go new file mode 100644 index 000000000..a335cb527 --- /dev/null +++ b/gen/go/proto/resources/internet/access.pb.validate.go @@ -0,0 +1,617 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: resources/internet/access.proto + +package internet + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DomainAccess with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *DomainAccess) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DomainAccess with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DomainAccessMultiError, or +// nil if none found. +func (m *DomainAccess) ValidateAll() error { + return m.validate(true) +} + +func (m *DomainAccess) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetJobs()) > 20 { + err := DomainAccessValidationError{ + field: "Jobs", + reason: "value must contain no more than 20 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetJobs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DomainAccessValidationError{ + field: fmt.Sprintf("Jobs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DomainAccessValidationError{ + field: fmt.Sprintf("Jobs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DomainAccessValidationError{ + field: fmt.Sprintf("Jobs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(m.GetUsers()) > 20 { + err := DomainAccessValidationError{ + field: "Users", + reason: "value must contain no more than 20 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetUsers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DomainAccessValidationError{ + field: fmt.Sprintf("Users[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DomainAccessValidationError{ + field: fmt.Sprintf("Users[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DomainAccessValidationError{ + field: fmt.Sprintf("Users[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DomainAccessMultiError(errors) + } + + return nil +} + +// DomainAccessMultiError is an error wrapping multiple validation errors +// returned by DomainAccess.ValidateAll() if the designated constraints aren't met. +type DomainAccessMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DomainAccessMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DomainAccessMultiError) AllErrors() []error { return m } + +// DomainAccessValidationError is the validation error returned by +// DomainAccess.Validate if the designated constraints aren't met. +type DomainAccessValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DomainAccessValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DomainAccessValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DomainAccessValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DomainAccessValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DomainAccessValidationError) ErrorName() string { return "DomainAccessValidationError" } + +// Error satisfies the builtin error interface +func (e DomainAccessValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDomainAccess.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DomainAccessValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DomainAccessValidationError{} + +// Validate checks the field values on DomainJobAccess with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *DomainJobAccess) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DomainJobAccess with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DomainJobAccessMultiError, or nil if none found. +func (m *DomainJobAccess) ValidateAll() error { + return m.validate(true) +} + +func (m *DomainJobAccess) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for TargetId + + if utf8.RuneCountInString(m.GetJob()) > 20 { + err := DomainJobAccessValidationError{ + field: "Job", + reason: "value length must be at most 20 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetMinimumGrade() < 0 { + err := DomainJobAccessValidationError{ + field: "MinimumGrade", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := AccessLevel_name[int32(m.GetAccess())]; !ok { + err := DomainJobAccessValidationError{ + field: "Access", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.CreatedAt != nil { + + if all { + switch v := interface{}(m.GetCreatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DomainJobAccessValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DomainJobAccessValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DomainJobAccessValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.JobLabel != nil { + + if utf8.RuneCountInString(m.GetJobLabel()) > 50 { + err := DomainJobAccessValidationError{ + field: "JobLabel", + reason: "value length must be at most 50 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.JobGradeLabel != nil { + + if utf8.RuneCountInString(m.GetJobGradeLabel()) > 50 { + err := DomainJobAccessValidationError{ + field: "JobGradeLabel", + reason: "value length must be at most 50 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return DomainJobAccessMultiError(errors) + } + + return nil +} + +// DomainJobAccessMultiError is an error wrapping multiple validation errors +// returned by DomainJobAccess.ValidateAll() if the designated constraints +// aren't met. +type DomainJobAccessMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DomainJobAccessMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DomainJobAccessMultiError) AllErrors() []error { return m } + +// DomainJobAccessValidationError is the validation error returned by +// DomainJobAccess.Validate if the designated constraints aren't met. +type DomainJobAccessValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DomainJobAccessValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DomainJobAccessValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DomainJobAccessValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DomainJobAccessValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DomainJobAccessValidationError) ErrorName() string { return "DomainJobAccessValidationError" } + +// Error satisfies the builtin error interface +func (e DomainJobAccessValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDomainJobAccess.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DomainJobAccessValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DomainJobAccessValidationError{} + +// Validate checks the field values on DomainUserAccess with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *DomainUserAccess) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DomainUserAccess with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DomainUserAccessMultiError, or nil if none found. +func (m *DomainUserAccess) ValidateAll() error { + return m.validate(true) +} + +func (m *DomainUserAccess) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for TargetId + + if m.GetUserId() <= 0 { + err := DomainUserAccessValidationError{ + field: "UserId", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := AccessLevel_name[int32(m.GetAccess())]; !ok { + err := DomainUserAccessValidationError{ + field: "Access", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.CreatedAt != nil { + + if all { + switch v := interface{}(m.GetCreatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DomainUserAccessValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DomainUserAccessValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DomainUserAccessValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.User != nil { + + if all { + switch v := interface{}(m.GetUser()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DomainUserAccessValidationError{ + field: "User", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DomainUserAccessValidationError{ + field: "User", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUser()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DomainUserAccessValidationError{ + field: "User", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DomainUserAccessMultiError(errors) + } + + return nil +} + +// DomainUserAccessMultiError is an error wrapping multiple validation errors +// returned by DomainUserAccess.ValidateAll() if the designated constraints +// aren't met. +type DomainUserAccessMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DomainUserAccessMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DomainUserAccessMultiError) AllErrors() []error { return m } + +// DomainUserAccessValidationError is the validation error returned by +// DomainUserAccess.Validate if the designated constraints aren't met. +type DomainUserAccessValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DomainUserAccessValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DomainUserAccessValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DomainUserAccessValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DomainUserAccessValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DomainUserAccessValidationError) ErrorName() string { return "DomainUserAccessValidationError" } + +// Error satisfies the builtin error interface +func (e DomainUserAccessValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDomainUserAccess.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DomainUserAccessValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DomainUserAccessValidationError{} diff --git a/gen/go/proto/resources/internet/domain.pb.go b/gen/go/proto/resources/internet/domain.pb.go index 69b72eb52..138a34989 100644 --- a/gen/go/proto/resources/internet/domain.pb.go +++ b/gen/go/proto/resources/internet/domain.pb.go @@ -29,6 +29,8 @@ type TLD struct { UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3,oneof" json:"updated_at,omitempty"` DeletedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3,oneof" json:"deleted_at,omitempty"` Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Internal bool `protobuf:"varint,6,opt,name=internal,proto3" json:"internal,omitempty"` + CreatorId *int32 `protobuf:"varint,7,opt,name=creator_id,json=creatorId,proto3,oneof" json:"creator_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -98,6 +100,20 @@ func (x *TLD) GetName() string { return "" } +func (x *TLD) GetInternal() bool { + if x != nil { + return x.Internal + } + return false +} + +func (x *TLD) GetCreatorId() int32 { + if x != nil && x.CreatorId != nil { + return *x.CreatorId + } + return 0 +} + type Domain struct { state protoimpl.MessageState `protogen:"open.v1"` Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -106,7 +122,7 @@ type Domain struct { DeletedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3,oneof" json:"deleted_at,omitempty"` TldId uint64 `protobuf:"varint,5,opt,name=tld_id,json=tldId,proto3" json:"tld_id,omitempty"` Tld *TLD `protobuf:"bytes,6,opt,name=tld,proto3,oneof" json:"tld,omitempty"` - Online bool `protobuf:"varint,7,opt,name=online,proto3" json:"online,omitempty"` + Active bool `protobuf:"varint,7,opt,name=active,proto3" json:"active,omitempty"` Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` CreatorJob *string `protobuf:"bytes,9,opt,name=creator_job,json=creatorJob,proto3,oneof" json:"creator_job,omitempty"` CreatorId *int32 `protobuf:"varint,10,opt,name=creator_id,json=creatorId,proto3,oneof" json:"creator_id,omitempty"` @@ -186,9 +202,9 @@ func (x *Domain) GetTld() *TLD { return nil } -func (x *Domain) GetOnline() bool { +func (x *Domain) GetActive() bool { if x != nil { - return x.Online + return x.Active } return false } @@ -224,7 +240,7 @@ var file_resources_internet_domain_proto_rawDesc = []byte{ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x02, 0x0a, 0x03, 0x54, 0x4c, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x02, 0x0a, 0x03, 0x54, 0x4c, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, @@ -240,44 +256,49 @@ var file_resources_internet_domain_proto_rawDesc = []byte{ 0x6d, 0x70, 0x48, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, 0x18, 0x18, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, - 0xeb, 0x03, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x22, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x48, 0x02, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x88, 0x01, + 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, + 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x22, 0xeb, + 0x03, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, - 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x48, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x74, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x03, 0x74, 0x6c, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x4c, 0x44, 0x48, 0x02, - 0x52, 0x03, 0x74, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0x18, 0x80, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, - 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4a, 0x6f, - 0x62, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x6c, 0x64, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6a, 0x6f, 0x62, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x49, 0x5a, - 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x76, 0x65, - 0x6e, 0x65, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x2f, 0x66, 0x69, 0x76, 0x65, 0x6e, 0x65, 0x74, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x3b, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x0a, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x48, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x74, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x03, 0x74, 0x6c, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x4c, 0x44, 0x48, 0x02, 0x52, + 0x03, 0x74, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, + 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x72, 0x03, 0x18, 0x80, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4a, 0x6f, 0x62, + 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x6c, 0x64, 0x42, 0x0e, 0x0a, + 0x0c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6a, 0x6f, 0x62, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x49, 0x5a, 0x47, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x76, 0x65, 0x6e, + 0x65, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x2f, 0x66, 0x69, 0x76, 0x65, 0x6e, 0x65, 0x74, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x3b, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/go/proto/resources/internet/domain.pb.validate.go b/gen/go/proto/resources/internet/domain.pb.validate.go index 1b131c5ca..48572a191 100644 --- a/gen/go/proto/resources/internet/domain.pb.validate.go +++ b/gen/go/proto/resources/internet/domain.pb.validate.go @@ -98,6 +98,8 @@ func (m *TLD) validate(all bool) error { errors = append(errors, err) } + // no validation rules for Internal + if m.UpdatedAt != nil { if all { @@ -164,6 +166,10 @@ func (m *TLD) validate(all bool) error { } + if m.CreatorId != nil { + // no validation rules for CreatorId + } + if len(errors) > 0 { return TLDMultiError(errors) } @@ -295,7 +301,7 @@ func (m *Domain) validate(all bool) error { // no validation rules for TldId - // no validation rules for Online + // no validation rules for Active if utf8.RuneCountInString(m.GetName()) > 128 { err := DomainValidationError{ diff --git a/gen/grpc-api.md b/gen/grpc-api.md index 3e131dc86..cd5390981 100644 --- a/gen/grpc-api.md +++ b/gen/grpc-api.md @@ -389,6 +389,13 @@ - [resources/internet/search.proto](#resources_internet_search-proto) - [SearchResult](#resources-internet-SearchResult) +- [resources/internet/access.proto](#resources_internet_access-proto) + - [DomainAccess](#resources-internet-DomainAccess) + - [DomainJobAccess](#resources-internet-DomainJobAccess) + - [DomainUserAccess](#resources-internet-DomainUserAccess) + + - [AccessLevel](#resources-internet-AccessLevel) + - [resources/mailer/access.proto](#resources_mailer_access-proto) - [Access](#resources-mailer-Access) - [JobAccess](#resources-mailer-JobAccess) @@ -6296,7 +6303,7 @@ Timestamp for storage messages. We've defined a new local type wrapper of google | deleted_at | [resources.timestamp.Timestamp](#resources-timestamp-Timestamp) | optional | | | tld_id | [uint64](#uint64) | | | | tld | [TLD](#resources-internet-TLD) | optional | | -| online | [bool](#bool) | | | +| active | [bool](#bool) | | | | name | [string](#string) | | | | creator_job | [string](#string) | optional | | | creator_id | [int32](#int32) | optional | | @@ -6319,6 +6326,8 @@ Timestamp for storage messages. We've defined a new local type wrapper of google | updated_at | [resources.timestamp.Timestamp](#resources-timestamp-Timestamp) | optional | | | deleted_at | [resources.timestamp.Timestamp](#resources-timestamp-Timestamp) | optional | | | name | [string](#string) | | | +| internal | [bool](#bool) | | | +| creator_id | [int32](#int32) | optional | | @@ -6432,6 +6441,95 @@ TODO + +
+ +## resources/internet/access.proto + + + + + +### DomainAccess + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| jobs | [DomainJobAccess](#resources-internet-DomainJobAccess) | repeated | @gotags: alias:"job_access" | +| users | [DomainUserAccess](#resources-internet-DomainUserAccess) | repeated | @gotags: alias:"user_access" | + + + + + + + + +### DomainJobAccess + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [uint64](#uint64) | | | +| created_at | [resources.timestamp.Timestamp](#resources-timestamp-Timestamp) | optional | | +| target_id | [uint64](#uint64) | | @gotags: alias:"page_id" | +| job | [string](#string) | | | +| job_label | [string](#string) | optional | | +| minimum_grade | [int32](#int32) | | | +| job_grade_label | [string](#string) | optional | | +| access | [AccessLevel](#resources-internet-AccessLevel) | | | + + + + + + + + +### DomainUserAccess + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [uint64](#uint64) | | | +| created_at | [resources.timestamp.Timestamp](#resources-timestamp-Timestamp) | optional | | +| target_id | [uint64](#uint64) | | @gotags: alias:"page_id" | +| user_id | [int32](#int32) | | | +| user | [resources.users.UserShort](#resources-users-UserShort) | optional | | +| access | [AccessLevel](#resources-internet-AccessLevel) | | | + + + + + + + + + + +### AccessLevel + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| ACCESS_LEVEL_UNSPECIFIED | 0 | | +| ACCESS_LEVEL_BLOCKED | 1 | | +| ACCESS_LEVEL_VIEW | 2 | | +| ACCESS_LEVEL_EDIT | 3 | | +| ACCESS_LEVEL_OWNER | 4 | | + + + + + + + + + + diff --git a/gen/ts/perms.ts b/gen/ts/perms.ts index 19de9f747..b02b21944 100644 --- a/gen/ts/perms.ts +++ b/gen/ts/perms.ts @@ -24,6 +24,7 @@ // source: resources/documents/templates.proto // source: resources/documents/workflow.proto // source: resources/filestore/file.proto +// source: resources/internet/access.proto // source: resources/internet/ads.proto // source: resources/internet/domain.proto // source: resources/internet/page.proto diff --git a/gen/ts/resources/internet/access.ts b/gen/ts/resources/internet/access.ts new file mode 100644 index 000000000..79f0152ac --- /dev/null +++ b/gen/ts/resources/internet/access.ts @@ -0,0 +1,358 @@ +// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none +// @generated from protobuf file "resources/internet/access.proto" (package "resources.internet", syntax proto3) +// @ts-nocheck +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { UserShort } from "../users/users"; +import { Timestamp } from "../timestamp/timestamp"; +/** + * @generated from protobuf message resources.internet.DomainAccess + */ +export interface DomainAccess { + /** + * @generated from protobuf field: repeated resources.internet.DomainJobAccess jobs = 1; + */ + jobs: DomainJobAccess[]; // @gotags: alias:"job_access" + /** + * @generated from protobuf field: repeated resources.internet.DomainUserAccess users = 2; + */ + users: DomainUserAccess[]; // @gotags: alias:"user_access" +} +/** + * @generated from protobuf message resources.internet.DomainJobAccess + */ +export interface DomainJobAccess { + /** + * @generated from protobuf field: uint64 id = 1; + */ + id: number; + /** + * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2; + */ + createdAt?: Timestamp; + /** + * @generated from protobuf field: uint64 target_id = 3; + */ + targetId: number; // @gotags: alias:"page_id" + /** + * @generated from protobuf field: string job = 4; + */ + job: string; + /** + * @generated from protobuf field: optional string job_label = 5; + */ + jobLabel?: string; + /** + * @generated from protobuf field: int32 minimum_grade = 6; + */ + minimumGrade: number; + /** + * @generated from protobuf field: optional string job_grade_label = 7; + */ + jobGradeLabel?: string; + /** + * @generated from protobuf field: resources.internet.AccessLevel access = 8; + */ + access: AccessLevel; +} +/** + * @generated from protobuf message resources.internet.DomainUserAccess + */ +export interface DomainUserAccess { + /** + * @generated from protobuf field: uint64 id = 1; + */ + id: number; + /** + * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2; + */ + createdAt?: Timestamp; + /** + * @generated from protobuf field: uint64 target_id = 3; + */ + targetId: number; // @gotags: alias:"page_id" + /** + * @generated from protobuf field: int32 user_id = 4; + */ + userId: number; + /** + * @generated from protobuf field: optional resources.users.UserShort user = 5; + */ + user?: UserShort; + /** + * @generated from protobuf field: resources.internet.AccessLevel access = 6; + */ + access: AccessLevel; +} +/** + * @generated from protobuf enum resources.internet.AccessLevel + */ +export enum AccessLevel { + /** + * @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1; + */ + BLOCKED = 1, + /** + * @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 2; + */ + VIEW = 2, + /** + * @generated from protobuf enum value: ACCESS_LEVEL_EDIT = 3; + */ + EDIT = 3, + /** + * @generated from protobuf enum value: ACCESS_LEVEL_OWNER = 4; + */ + OWNER = 4 +} +// @generated message type with reflection information, may provide speed optimized methods +class DomainAccess$Type extends MessageType