Documentation ¶
Index ¶
- Variables
- func HttpEntry() *http.EntrySet
- func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer)
- type CreateNamespaceRequest
- func (*CreateNamespaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateNamespaceRequest) GetDepartmentId() string
- func (x *CreateNamespaceRequest) GetDescription() string
- func (x *CreateNamespaceRequest) GetName() string
- func (x *CreateNamespaceRequest) GetOwner() string
- func (x *CreateNamespaceRequest) GetPicture() string
- func (*CreateNamespaceRequest) ProtoMessage()
- func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message
- func (x *CreateNamespaceRequest) Reset()
- func (x *CreateNamespaceRequest) String() string
- func (req *CreateNamespaceRequest) Validate() error
- type DeleteNamespaceRequest
- func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteNamespaceRequest) GetId() string
- func (*DeleteNamespaceRequest) ProtoMessage()
- func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteNamespaceRequest) Reset()
- func (x *DeleteNamespaceRequest) String() string
- func (req *DeleteNamespaceRequest) Validate() error
- type DescriptNamespaceRequest
- func (*DescriptNamespaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescriptNamespaceRequest) GetId() string
- func (x *DescriptNamespaceRequest) GetWithDepartment() bool
- func (*DescriptNamespaceRequest) ProtoMessage()
- func (x *DescriptNamespaceRequest) ProtoReflect() protoreflect.Message
- func (x *DescriptNamespaceRequest) Reset()
- func (x *DescriptNamespaceRequest) String() string
- func (req *DescriptNamespaceRequest) Validate() error
- type Namespace
- func (*Namespace) Descriptor() ([]byte, []int)deprecated
- func (x *Namespace) GetCreateAt() int64
- func (x *Namespace) GetCreater() string
- func (x *Namespace) GetDepartment() *department.Department
- func (x *Namespace) GetDepartmentId() string
- func (x *Namespace) GetDescription() string
- func (x *Namespace) GetDomain() string
- func (x *Namespace) GetEnabled() bool
- func (x *Namespace) GetId() string
- func (x *Namespace) GetName() string
- func (x *Namespace) GetOwner() string
- func (x *Namespace) GetPicture() string
- func (x *Namespace) GetUpdateAt() int64
- func (x *Namespace) GetVisible() Visible
- func (*Namespace) ProtoMessage()
- func (x *Namespace) ProtoReflect() protoreflect.Message
- func (x *Namespace) Reset()
- func (x *Namespace) String() string
- type NamespaceServiceClient
- type NamespaceServiceServer
- type QueryNamespaceRequest
- func (*QueryNamespaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryNamespaceRequest) GetDepartmentId() string
- func (x *QueryNamespaceRequest) GetPage() *page.PageRequest
- func (x *QueryNamespaceRequest) GetWithDepartment() bool
- func (x *QueryNamespaceRequest) GetWithSubDepartment() bool
- func (*QueryNamespaceRequest) ProtoMessage()
- func (x *QueryNamespaceRequest) ProtoReflect() protoreflect.Message
- func (x *QueryNamespaceRequest) Reset()
- func (x *QueryNamespaceRequest) String() string
- type Set
- type UnimplementedNamespaceServiceServer
- func (UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error)
- func (UnimplementedNamespaceServiceServer) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*Namespace, error)
- func (UnimplementedNamespaceServiceServer) DescribeNamespace(context.Context, *DescriptNamespaceRequest) (*Namespace, error)
- func (UnimplementedNamespaceServiceServer) QueryNamespace(context.Context, *QueryNamespaceRequest) (*Set, error)
- type UnsafeNamespaceServiceServer
- type Visible
- func (Visible) Descriptor() protoreflect.EnumDescriptor
- func (x Visible) Enum() *Visible
- func (Visible) EnumDescriptor() ([]byte, []int)deprecated
- func (t Visible) Equal(target Visible) bool
- func (t Visible) IsIn(targets ...Visible) bool
- func (t Visible) MarshalJSON() ([]byte, error)
- func (x Visible) Number() protoreflect.EnumNumber
- func (x Visible) String() string
- func (Visible) Type() protoreflect.EnumType
- func (t *Visible) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( Visible_name = map[int32]string{ 0: "PRIVATE", 1: "PUBLIC", } Visible_value = map[string]int32{ "PRIVATE": 0, "PUBLIC": 1, } )
Enum value maps for Visible.
var File_pkg_namespace_pb_namespace_proto protoreflect.FileDescriptor
var File_pkg_namespace_pb_request_proto protoreflect.FileDescriptor
var File_pkg_namespace_pb_service_proto protoreflect.FileDescriptor
var NamespaceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "keyauth.namespace.NamespaceService", HandlerType: (*NamespaceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateNamespace", Handler: _NamespaceService_CreateNamespace_Handler, }, { MethodName: "QueryNamespace", Handler: _NamespaceService_QueryNamespace_Handler, }, { MethodName: "DescribeNamespace", Handler: _NamespaceService_DescribeNamespace_Handler, }, { MethodName: "DeleteNamespace", Handler: _NamespaceService_DeleteNamespace_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/namespace/pb/service.proto", }
NamespaceService_ServiceDesc is the grpc.ServiceDesc for NamespaceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNamespaceServiceServer ¶ added in v0.2.0
func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer)
Types ¶
type CreateNamespaceRequest ¶
type CreateNamespaceRequest struct { // 所属部门 DepartmentId string `` /* 135-byte string literal not displayed */ // 项目名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name" validate:"required,lte=80"` // 项目描述图片 Picture string `protobuf:"bytes,3,opt,name=picture,proto3" json:"picture,omitempty" bson:"picture"` // 项目所有者, PMO Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty" bson:"owner"` // 项目描述 Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty" bson:"description"` // contains filtered or unexported fields }
CreateNamespaceRequest 创建项目请求
func NewCreateNamespaceRequest ¶ added in v0.2.0
func NewCreateNamespaceRequest() *CreateNamespaceRequest
NewCreateNamespaceRequest todo
func (*CreateNamespaceRequest) Descriptor
deprecated
added in
v0.2.0
func (*CreateNamespaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateNamespaceRequest.ProtoReflect.Descriptor instead.
func (*CreateNamespaceRequest) GetDepartmentId ¶ added in v0.2.0
func (x *CreateNamespaceRequest) GetDepartmentId() string
func (*CreateNamespaceRequest) GetDescription ¶ added in v0.2.0
func (x *CreateNamespaceRequest) GetDescription() string
func (*CreateNamespaceRequest) GetName ¶ added in v0.2.0
func (x *CreateNamespaceRequest) GetName() string
func (*CreateNamespaceRequest) GetOwner ¶ added in v0.2.0
func (x *CreateNamespaceRequest) GetOwner() string
func (*CreateNamespaceRequest) GetPicture ¶ added in v0.2.0
func (x *CreateNamespaceRequest) GetPicture() string
func (*CreateNamespaceRequest) ProtoMessage ¶ added in v0.2.0
func (*CreateNamespaceRequest) ProtoMessage()
func (*CreateNamespaceRequest) ProtoReflect ¶ added in v0.2.0
func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message
func (*CreateNamespaceRequest) Reset ¶ added in v0.2.0
func (x *CreateNamespaceRequest) Reset()
func (*CreateNamespaceRequest) String ¶ added in v0.2.0
func (x *CreateNamespaceRequest) String() string
func (*CreateNamespaceRequest) Validate ¶ added in v0.2.0
func (req *CreateNamespaceRequest) Validate() error
Validate todo
type DeleteNamespaceRequest ¶ added in v0.2.0
type DeleteNamespaceRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` // contains filtered or unexported fields }
DeleteNamespaceRequest todo
func NewDeleteNamespaceRequestWithID ¶ added in v0.2.0
func NewDeleteNamespaceRequestWithID(id string) *DeleteNamespaceRequest
NewDeleteNamespaceRequestWithID todo
func (*DeleteNamespaceRequest) Descriptor
deprecated
added in
v0.2.0
func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteNamespaceRequest.ProtoReflect.Descriptor instead.
func (*DeleteNamespaceRequest) GetId ¶ added in v0.2.0
func (x *DeleteNamespaceRequest) GetId() string
func (*DeleteNamespaceRequest) ProtoMessage ¶ added in v0.2.0
func (*DeleteNamespaceRequest) ProtoMessage()
func (*DeleteNamespaceRequest) ProtoReflect ¶ added in v0.2.0
func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message
func (*DeleteNamespaceRequest) Reset ¶ added in v0.2.0
func (x *DeleteNamespaceRequest) Reset()
func (*DeleteNamespaceRequest) String ¶ added in v0.2.0
func (x *DeleteNamespaceRequest) String() string
func (*DeleteNamespaceRequest) Validate ¶ added in v0.2.0
func (req *DeleteNamespaceRequest) Validate() error
Validate todo
type DescriptNamespaceRequest ¶ added in v0.2.0
type DescriptNamespaceRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` WithDepartment bool `protobuf:"varint,2,opt,name=with_department,json=withDepartment,proto3" json:"with_department"` // contains filtered or unexported fields }
DescriptNamespaceRequest 查询应用详情
func NewDescriptNamespaceRequest ¶ added in v0.2.0
func NewDescriptNamespaceRequest() *DescriptNamespaceRequest
NewDescriptNamespaceRequest new实例
func NewNewDescriptNamespaceRequestWithID ¶ added in v0.2.0
func NewNewDescriptNamespaceRequestWithID(id string) *DescriptNamespaceRequest
NewNewDescriptNamespaceRequestWithID todo
func (*DescriptNamespaceRequest) Descriptor
deprecated
added in
v0.2.0
func (*DescriptNamespaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescriptNamespaceRequest.ProtoReflect.Descriptor instead.
func (*DescriptNamespaceRequest) GetId ¶ added in v0.2.0
func (x *DescriptNamespaceRequest) GetId() string
func (*DescriptNamespaceRequest) GetWithDepartment ¶ added in v0.2.0
func (x *DescriptNamespaceRequest) GetWithDepartment() bool
func (*DescriptNamespaceRequest) ProtoMessage ¶ added in v0.2.0
func (*DescriptNamespaceRequest) ProtoMessage()
func (*DescriptNamespaceRequest) ProtoReflect ¶ added in v0.2.0
func (x *DescriptNamespaceRequest) ProtoReflect() protoreflect.Message
func (*DescriptNamespaceRequest) Reset ¶ added in v0.2.0
func (x *DescriptNamespaceRequest) Reset()
func (*DescriptNamespaceRequest) String ¶ added in v0.2.0
func (x *DescriptNamespaceRequest) String() string
func (*DescriptNamespaceRequest) Validate ¶ added in v0.2.0
func (req *DescriptNamespaceRequest) Validate() error
Validate 校验详情查询请求
type Namespace ¶
type Namespace struct { // 项目唯一ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // 所属域ID Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain" bson:"domain"` // 创建人 Creater string `protobuf:"bytes,3,opt,name=creater,proto3" json:"creater" bson:"creater"` // 创建时间 CreateAt int64 `protobuf:"varint,4,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"` // 项目修改时间 UpdateAt int64 `protobuf:"varint,5,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"` // 禁用项目, 该项目所有人暂时都无法访问 Enabled bool `protobuf:"varint,6,opt,name=enabled,proto3" json:"enabled" bson:"enabled"` // 所属部门 DepartmentId string `protobuf:"bytes,7,opt,name=department_id,json=departmentId,proto3" json:"department_id" bson:"department_id"` // 项目名称 Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name" bson:"name"` // 项目描述图片 Picture string `protobuf:"bytes,9,opt,name=picture,proto3" json:"picture" bson:"picture"` // 项目所有者, PMO Owner string `protobuf:"bytes,10,opt,name=owner,proto3" json:"owner" bson:"owner"` // 项目描述 Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description" bson:"description"` // 补充的部门 Department *department.Department `protobuf:"bytes,12,opt,name=department,proto3" json:"department,omitempty" bson:"-"` // 空间可见性, 默认是私有空间 Visible Visible `protobuf:"varint,13,opt,name=visible,proto3,enum=keyauth.namespace.Visible" json:"visible" bson:"visible"` // contains filtered or unexported fields }
Namespace tenant resource container
func NewDefaultNamespace ¶ added in v0.2.0
func NewDefaultNamespace() *Namespace
NewDefaultNamespace todo
func (*Namespace) Descriptor
deprecated
added in
v0.2.0
func (*Namespace) GetCreateAt ¶ added in v0.2.0
func (*Namespace) GetCreater ¶ added in v0.2.0
func (*Namespace) GetDepartment ¶ added in v0.2.0
func (x *Namespace) GetDepartment() *department.Department
func (*Namespace) GetDepartmentId ¶ added in v0.2.0
func (*Namespace) GetDescription ¶ added in v0.2.0
func (*Namespace) GetEnabled ¶ added in v0.2.0
func (*Namespace) GetPicture ¶ added in v0.2.0
func (*Namespace) GetUpdateAt ¶ added in v0.2.0
func (*Namespace) GetVisible ¶ added in v0.3.2
func (*Namespace) ProtoMessage ¶ added in v0.2.0
func (*Namespace) ProtoMessage()
func (*Namespace) ProtoReflect ¶ added in v0.2.0
func (x *Namespace) ProtoReflect() protoreflect.Message
type NamespaceServiceClient ¶ added in v0.2.0
type NamespaceServiceClient interface { CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) QueryNamespace(ctx context.Context, in *QueryNamespaceRequest, opts ...grpc.CallOption) (*Set, error) DescribeNamespace(ctx context.Context, in *DescriptNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) }
NamespaceServiceClient is the client API for NamespaceService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewNamespaceServiceClient ¶ added in v0.2.0
func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient
type NamespaceServiceServer ¶ added in v0.2.0
type NamespaceServiceServer interface { CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) QueryNamespace(context.Context, *QueryNamespaceRequest) (*Set, error) DescribeNamespace(context.Context, *DescriptNamespaceRequest) (*Namespace, error) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*Namespace, error) // contains filtered or unexported methods }
NamespaceServiceServer is the server API for NamespaceService service. All implementations must embed UnimplementedNamespaceServiceServer for forward compatibility
type QueryNamespaceRequest ¶ added in v0.2.0
type QueryNamespaceRequest struct { Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"` DepartmentId string `protobuf:"bytes,2,opt,name=department_id,json=departmentId,proto3" json:"department_id"` WithSubDepartment bool `protobuf:"varint,3,opt,name=with_sub_department,json=withSubDepartment,proto3" json:"with_sub_department"` WithDepartment bool `protobuf:"varint,4,opt,name=with_department,json=withDepartment,proto3" json:"with_department"` // contains filtered or unexported fields }
QueryNamespaceRequest 查询应用列表
func NewQueryNamespaceRequest ¶ added in v0.2.0
func NewQueryNamespaceRequest(pageReq *request.PageRequest) *QueryNamespaceRequest
NewQueryNamespaceRequest 列表查询请求
func NewQueryNamespaceRequestFromHTTP ¶ added in v0.2.0
func NewQueryNamespaceRequestFromHTTP(r *http.Request) *QueryNamespaceRequest
NewQueryNamespaceRequestFromHTTP 列表查询请求
func (*QueryNamespaceRequest) Descriptor
deprecated
added in
v0.2.0
func (*QueryNamespaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryNamespaceRequest.ProtoReflect.Descriptor instead.
func (*QueryNamespaceRequest) GetDepartmentId ¶ added in v0.2.0
func (x *QueryNamespaceRequest) GetDepartmentId() string
func (*QueryNamespaceRequest) GetPage ¶ added in v0.2.0
func (x *QueryNamespaceRequest) GetPage() *page.PageRequest
func (*QueryNamespaceRequest) GetWithDepartment ¶ added in v0.2.0
func (x *QueryNamespaceRequest) GetWithDepartment() bool
func (*QueryNamespaceRequest) GetWithSubDepartment ¶ added in v0.2.0
func (x *QueryNamespaceRequest) GetWithSubDepartment() bool
func (*QueryNamespaceRequest) ProtoMessage ¶ added in v0.2.0
func (*QueryNamespaceRequest) ProtoMessage()
func (*QueryNamespaceRequest) ProtoReflect ¶ added in v0.2.0
func (x *QueryNamespaceRequest) ProtoReflect() protoreflect.Message
func (*QueryNamespaceRequest) Reset ¶ added in v0.2.0
func (x *QueryNamespaceRequest) Reset()
func (*QueryNamespaceRequest) String ¶ added in v0.2.0
func (x *QueryNamespaceRequest) String() string
type Set ¶ added in v0.2.0
type Set struct { Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"` Items []*Namespace `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"` // contains filtered or unexported fields }
func (*Set) Descriptor
deprecated
added in
v0.2.0
func (*Set) ProtoMessage ¶ added in v0.2.0
func (*Set) ProtoMessage()
func (*Set) ProtoReflect ¶ added in v0.2.0
func (x *Set) ProtoReflect() protoreflect.Message
type UnimplementedNamespaceServiceServer ¶ added in v0.2.0
type UnimplementedNamespaceServiceServer struct { }
UnimplementedNamespaceServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedNamespaceServiceServer) CreateNamespace ¶ added in v0.2.0
func (UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error)
func (UnimplementedNamespaceServiceServer) DeleteNamespace ¶ added in v0.2.0
func (UnimplementedNamespaceServiceServer) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*Namespace, error)
func (UnimplementedNamespaceServiceServer) DescribeNamespace ¶ added in v0.2.0
func (UnimplementedNamespaceServiceServer) DescribeNamespace(context.Context, *DescriptNamespaceRequest) (*Namespace, error)
func (UnimplementedNamespaceServiceServer) QueryNamespace ¶ added in v0.2.0
func (UnimplementedNamespaceServiceServer) QueryNamespace(context.Context, *QueryNamespaceRequest) (*Set, error)
type UnsafeNamespaceServiceServer ¶ added in v0.2.0
type UnsafeNamespaceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNamespaceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NamespaceServiceServer will result in compilation errors.
type Visible ¶ added in v0.3.2
type Visible int32
func ParseVisibleFromString ¶ added in v0.3.2
ParseVisibleFromString Parse Visible from string
func (Visible) Descriptor ¶ added in v0.3.2
func (Visible) Descriptor() protoreflect.EnumDescriptor
func (Visible) EnumDescriptor
deprecated
added in
v0.3.2
func (Visible) MarshalJSON ¶ added in v0.3.2
MarshalJSON todo
func (Visible) Number ¶ added in v0.3.2
func (x Visible) Number() protoreflect.EnumNumber
func (Visible) Type ¶ added in v0.3.2
func (Visible) Type() protoreflect.EnumType
func (*Visible) UnmarshalJSON ¶ added in v0.3.2
UnmarshalJSON todo