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 + +

Top

+ +## 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 | | + + + + + + + + + +

Top

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 { + constructor() { + super("resources.internet.DomainAccess", [ + { no: 1, name: "jobs", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DomainJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } }, + { no: 2, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DomainUserAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } } + ]); + } + create(value?: PartialMessage): DomainAccess { + const message = globalThis.Object.create((this.messagePrototype!)); + message.jobs = []; + message.users = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DomainAccess): DomainAccess { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated resources.internet.DomainJobAccess jobs */ 1: + message.jobs.push(DomainJobAccess.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated resources.internet.DomainUserAccess users */ 2: + message.users.push(DomainUserAccess.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DomainAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated resources.internet.DomainJobAccess jobs = 1; */ + for (let i = 0; i < message.jobs.length; i++) + DomainJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* repeated resources.internet.DomainUserAccess users = 2; */ + for (let i = 0; i < message.users.length; i++) + DomainUserAccess.internalBinaryWrite(message.users[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message resources.internet.DomainAccess + */ +export const DomainAccess = new DomainAccess$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DomainJobAccess$Type extends MessageType { + constructor() { + super("resources.internet.DomainJobAccess", [ + { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 2, name: "created_at", kind: "message", T: () => Timestamp }, + { no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } }, + { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } }, + { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } }, + { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } }, + { no: 8, name: "access", kind: "enum", T: () => ["resources.internet.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } } + ]); + } + create(value?: PartialMessage): DomainJobAccess { + const message = globalThis.Object.create((this.messagePrototype!)); + message.id = 0; + message.targetId = 0; + message.job = ""; + message.minimumGrade = 0; + message.access = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DomainJobAccess): DomainJobAccess { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* uint64 id */ 1: + message.id = reader.uint64().toNumber(); + break; + case /* optional resources.timestamp.Timestamp created_at */ 2: + message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); + break; + case /* uint64 target_id */ 3: + message.targetId = reader.uint64().toNumber(); + break; + case /* string job */ 4: + message.job = reader.string(); + break; + case /* optional string job_label */ 5: + message.jobLabel = reader.string(); + break; + case /* int32 minimum_grade */ 6: + message.minimumGrade = reader.int32(); + break; + case /* optional string job_grade_label */ 7: + message.jobGradeLabel = reader.string(); + break; + case /* resources.internet.AccessLevel access */ 8: + message.access = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DomainJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* uint64 id = 1; */ + if (message.id !== 0) + writer.tag(1, WireType.Varint).uint64(message.id); + /* optional resources.timestamp.Timestamp created_at = 2; */ + if (message.createdAt) + Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* uint64 target_id = 3; */ + if (message.targetId !== 0) + writer.tag(3, WireType.Varint).uint64(message.targetId); + /* string job = 4; */ + if (message.job !== "") + writer.tag(4, WireType.LengthDelimited).string(message.job); + /* optional string job_label = 5; */ + if (message.jobLabel !== undefined) + writer.tag(5, WireType.LengthDelimited).string(message.jobLabel); + /* int32 minimum_grade = 6; */ + if (message.minimumGrade !== 0) + writer.tag(6, WireType.Varint).int32(message.minimumGrade); + /* optional string job_grade_label = 7; */ + if (message.jobGradeLabel !== undefined) + writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel); + /* resources.internet.AccessLevel access = 8; */ + if (message.access !== 0) + writer.tag(8, WireType.Varint).int32(message.access); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message resources.internet.DomainJobAccess + */ +export const DomainJobAccess = new DomainJobAccess$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DomainUserAccess$Type extends MessageType { + constructor() { + super("resources.internet.DomainUserAccess", [ + { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 2, name: "created_at", kind: "message", T: () => Timestamp }, + { no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } }, + { no: 5, name: "user", kind: "message", T: () => UserShort }, + { no: 6, name: "access", kind: "enum", T: () => ["resources.internet.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } } + ]); + } + create(value?: PartialMessage): DomainUserAccess { + const message = globalThis.Object.create((this.messagePrototype!)); + message.id = 0; + message.targetId = 0; + message.userId = 0; + message.access = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DomainUserAccess): DomainUserAccess { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* uint64 id */ 1: + message.id = reader.uint64().toNumber(); + break; + case /* optional resources.timestamp.Timestamp created_at */ 2: + message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); + break; + case /* uint64 target_id */ 3: + message.targetId = reader.uint64().toNumber(); + break; + case /* int32 user_id */ 4: + message.userId = reader.int32(); + break; + case /* optional resources.users.UserShort user */ 5: + message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user); + break; + case /* resources.internet.AccessLevel access */ 6: + message.access = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DomainUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* uint64 id = 1; */ + if (message.id !== 0) + writer.tag(1, WireType.Varint).uint64(message.id); + /* optional resources.timestamp.Timestamp created_at = 2; */ + if (message.createdAt) + Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* uint64 target_id = 3; */ + if (message.targetId !== 0) + writer.tag(3, WireType.Varint).uint64(message.targetId); + /* int32 user_id = 4; */ + if (message.userId !== 0) + writer.tag(4, WireType.Varint).int32(message.userId); + /* optional resources.users.UserShort user = 5; */ + if (message.user) + UserShort.internalBinaryWrite(message.user, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* resources.internet.AccessLevel access = 6; */ + if (message.access !== 0) + writer.tag(6, WireType.Varint).int32(message.access); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message resources.internet.DomainUserAccess + */ +export const DomainUserAccess = new DomainUserAccess$Type(); diff --git a/gen/ts/resources/internet/domain.ts b/gen/ts/resources/internet/domain.ts index 4402e9271..5e67dd96f 100644 --- a/gen/ts/resources/internet/domain.ts +++ b/gen/ts/resources/internet/domain.ts @@ -35,6 +35,14 @@ export interface TLD { * @generated from protobuf field: string name = 5; */ name: string; + /** + * @generated from protobuf field: bool internal = 6; + */ + internal: boolean; + /** + * @generated from protobuf field: optional int32 creator_id = 7; + */ + creatorId?: number; } /** * @generated from protobuf message resources.internet.Domain @@ -65,9 +73,9 @@ export interface Domain { */ tld?: TLD; /** - * @generated from protobuf field: bool online = 7; + * @generated from protobuf field: bool active = 7; */ - online: boolean; + active: boolean; /** * @generated from protobuf field: string name = 8; */ @@ -89,13 +97,16 @@ class TLD$Type extends MessageType { { no: 2, name: "created_at", kind: "message", T: () => Timestamp }, { no: 3, name: "updated_at", kind: "message", T: () => Timestamp }, { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp }, - { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "2", maxLen: "24" } } } } + { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "2", maxLen: "24" } } } }, + { no: 6, name: "internal", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } ]); } create(value?: PartialMessage): TLD { const message = globalThis.Object.create((this.messagePrototype!)); message.id = 0; message.name = ""; + message.internal = false; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -120,6 +131,12 @@ class TLD$Type extends MessageType { case /* string name */ 5: message.name = reader.string(); break; + case /* bool internal */ 6: + message.internal = reader.bool(); + break; + case /* optional int32 creator_id */ 7: + message.creatorId = reader.int32(); + break; default: let u = options.readUnknownField; if (u === "throw") @@ -147,6 +164,12 @@ class TLD$Type extends MessageType { /* string name = 5; */ if (message.name !== "") writer.tag(5, WireType.LengthDelimited).string(message.name); + /* bool internal = 6; */ + if (message.internal !== false) + writer.tag(6, WireType.Varint).bool(message.internal); + /* optional int32 creator_id = 7; */ + if (message.creatorId !== undefined) + writer.tag(7, WireType.Varint).int32(message.creatorId); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -167,7 +190,7 @@ class Domain$Type extends MessageType { { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp }, { no: 5, name: "tld_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, { no: 6, name: "tld", kind: "message", T: () => TLD }, - { no: 7, name: "online", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "active", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, { no: 8, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } }, { no: 9, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 10, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } @@ -177,7 +200,7 @@ class Domain$Type extends MessageType { const message = globalThis.Object.create((this.messagePrototype!)); message.id = 0; message.tldId = 0; - message.online = false; + message.active = false; message.name = ""; if (value !== undefined) reflectionMergePartial(this, message, value); @@ -206,8 +229,8 @@ class Domain$Type extends MessageType { case /* optional resources.internet.TLD tld */ 6: message.tld = TLD.internalBinaryRead(reader, reader.uint32(), options, message.tld); break; - case /* bool online */ 7: - message.online = reader.bool(); + case /* bool active */ 7: + message.active = reader.bool(); break; case /* string name */ 8: message.name = reader.string(); @@ -248,9 +271,9 @@ class Domain$Type extends MessageType { /* optional resources.internet.TLD tld = 6; */ if (message.tld) TLD.internalBinaryWrite(message.tld, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* bool online = 7; */ - if (message.online !== false) - writer.tag(7, WireType.Varint).bool(message.online); + /* bool active = 7; */ + if (message.active !== false) + writer.tag(7, WireType.Varint).bool(message.active); /* string name = 8; */ if (message.name !== "") writer.tag(8, WireType.LengthDelimited).string(message.name); diff --git a/gen/ts/svcs.ts b/gen/ts/svcs.ts index 8435485d4..9bb9220d2 100644 --- a/gen/ts/svcs.ts +++ b/gen/ts/svcs.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/proto/resources/internet/access.proto b/proto/resources/internet/access.proto new file mode 100644 index 000000000..e55dbcf91 --- /dev/null +++ b/proto/resources/internet/access.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package resources.internet; + +import "resources/timestamp/timestamp.proto"; +import "resources/users/users.proto"; +import "validate/validate.proto"; + +option go_package = "github.com/fivenet-app/fivenet/gen/go/proto/resources/internet;internet"; + +enum AccessLevel { + ACCESS_LEVEL_UNSPECIFIED = 0; + ACCESS_LEVEL_BLOCKED = 1; + ACCESS_LEVEL_VIEW = 2; + ACCESS_LEVEL_EDIT = 3; + ACCESS_LEVEL_OWNER = 4; +} + +message DomainAccess { + repeated DomainJobAccess jobs = 1 [(validate.rules).repeated.max_items = 20]; // @gotags: alias:"job_access" + repeated DomainUserAccess users = 2 [(validate.rules).repeated.max_items = 20]; // @gotags: alias:"user_access" +} + +message DomainJobAccess { + uint64 id = 1; + optional resources.timestamp.Timestamp created_at = 2; + uint64 target_id = 3; // @gotags: alias:"page_id" + string job = 4 [(validate.rules).string.max_len = 20]; + optional string job_label = 5 [(validate.rules).string.max_len = 50]; + int32 minimum_grade = 6 [(validate.rules).int32.gte = 0]; + optional string job_grade_label = 7 [(validate.rules).string.max_len = 50]; + AccessLevel access = 8 [(validate.rules).enum.defined_only = true]; +} + +message DomainUserAccess { + uint64 id = 1; + optional resources.timestamp.Timestamp created_at = 2; + uint64 target_id = 3; // @gotags: alias:"page_id" + int32 user_id = 4 [(validate.rules).int32.gt = 0]; + optional resources.users.UserShort user = 5; + AccessLevel access = 6 [(validate.rules).enum.defined_only = true]; +} diff --git a/proto/resources/internet/domain.proto b/proto/resources/internet/domain.proto index ed23a374e..f333faa61 100644 --- a/proto/resources/internet/domain.proto +++ b/proto/resources/internet/domain.proto @@ -16,6 +16,8 @@ message TLD { min_len: 2, max_len: 24, }]; + bool internal = 6; + optional int32 creator_id = 7; } message Domain { @@ -25,7 +27,7 @@ message Domain { optional resources.timestamp.Timestamp deleted_at = 4; uint64 tld_id = 5; optional TLD tld = 6; - bool online = 7; + bool active = 7; string name = 8 [(validate.rules).string.max_len = 128]; optional string creator_job = 9; optional int32 creator_id = 10; diff --git a/query/migrations/1734531087_internet_base.up.sql b/query/migrations/1734531087_internet_base.up.sql index 7a666770c..7be19c0fd 100644 --- a/query/migrations/1734531087_internet_base.up.sql +++ b/query/migrations/1734531087_internet_base.up.sql @@ -7,10 +7,11 @@ CREATE TABLE IF NOT EXISTS `fivenet_internet_tlds` ( `updated_at` datetime(3) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(3), `deleted_at` datetime(3) DEFAULT NULL, `name` varchar(64) NOT NULL, + `internal` tinyint(1) DEFAULT 0 NULL, `creator_id`int(11) DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `idx_fivenet_internet_domains_name` (`name`), - CONSTRAINT `fk_fivenet_internet_domains_creator_id` FOREIGN KEY (`creator_id`) REFERENCES `{{.UsersTableName}}` (`id`) ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `idx_fivenet_internet_tlds_name` (`name`), + CONSTRAINT `fk_fivenet_internet_tlds_creator_id` FOREIGN KEY (`creator_id`) REFERENCES `{{.UsersTableName}}` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB; -- Table: fivenet_internet_domains @@ -20,11 +21,11 @@ CREATE TABLE IF NOT EXISTS `fivenet_internet_domains` ( `updated_at` datetime(3) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(3), `deleted_at` datetime(3) DEFAULT NULL, `expires_at` datetime(3) DEFAULT NULL, - `tld_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `tld_id` bigint(20) unsigned NOT NULL, `name` varchar(64) NOT NULL, `active` tinyint(1) DEFAULT 0 NULL, `approver_job` varchar(40) DEFAULT NULL, - `approver_id`int(11) DEFAULT NULL. + `approver_id`int(11) DEFAULT NULL, `creator_job` varchar(40) DEFAULT NULL, `creator_id`int(11) DEFAULT NULL, PRIMARY KEY (`id`), @@ -58,7 +59,7 @@ CREATE TABLE IF NOT EXISTS `fivenet_internet_domains_user_access` ( UNIQUE KEY `idx_fivenet_internet_domains_user_access` (`domain_id`, `user_id`), KEY `idx_fivenet_internet_domains_user_access_domain_id` (`domain_id`), CONSTRAINT `fk_fivenet_internet_domains_user_access_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `fivenet_internet_domains` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `fk_fivenet_documents_user_access_user_id` FOREIGN KEY (`user_id`) REFERENCES `{{.UsersTableName}}` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `fk_fivenet_internet_domains_user_access_user_id` FOREIGN KEY (`user_id`) REFERENCES `{{.UsersTableName}}` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; -- Table: fivenet_internet_pages @@ -82,8 +83,6 @@ CREATE TABLE IF NOT EXISTS `fivenet_internet_pages` ( CONSTRAINT `fk_fivenet_internet_pages_creator_id` FOREIGN KEY (`creator_id`) REFERENCES `{{.UsersTableName}}` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB; --- Table: TODO pages job and user access - -- Table: fivenet_internet_ads CREATE TABLE IF NOT EXISTS `fivenet_internet_ads` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,