namespace

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_namespace_pb_namespace_proto protoreflect.FileDescriptor
View Source
var File_pkg_namespace_pb_request_proto protoreflect.FileDescriptor
View Source
var File_pkg_namespace_pb_service_proto protoreflect.FileDescriptor

Functions

func HttpEntry added in v0.2.0

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterNamespaceServiceServer added in v0.2.0

func RegisterNamespaceServiceServer(s *grpc.Server, 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:"-"`
	// 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) Descriptor() ([]byte, []int)

Deprecated: Use Namespace.ProtoReflect.Descriptor instead.

func (*Namespace) GetCreateAt added in v0.2.0

func (x *Namespace) GetCreateAt() int64

func (*Namespace) GetCreater added in v0.2.0

func (x *Namespace) GetCreater() string

func (*Namespace) GetDepartment added in v0.2.0

func (x *Namespace) GetDepartment() *department.Department

func (*Namespace) GetDepartmentId added in v0.2.0

func (x *Namespace) GetDepartmentId() string

func (*Namespace) GetDescription added in v0.2.0

func (x *Namespace) GetDescription() string

func (*Namespace) GetDomain added in v0.2.0

func (x *Namespace) GetDomain() string

func (*Namespace) GetEnabled added in v0.2.0

func (x *Namespace) GetEnabled() bool

func (*Namespace) GetId added in v0.2.0

func (x *Namespace) GetId() string

func (*Namespace) GetName added in v0.2.0

func (x *Namespace) GetName() string

func (*Namespace) GetOwner added in v0.2.0

func (x *Namespace) GetOwner() string

func (*Namespace) GetPicture added in v0.2.0

func (x *Namespace) GetPicture() string

func (*Namespace) GetUpdateAt added in v0.2.0

func (x *Namespace) GetUpdateAt() int64

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

func (*Namespace) Reset added in v0.2.0

func (x *Namespace) Reset()

func (*Namespace) String added in v0.2.0

func (x *Namespace) String() string

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 NewNamespaceSet added in v0.2.0

func NewNamespaceSet() *Set

NewNamespaceSet 实例化

func (*Set) Add added in v0.2.0

func (s *Set) Add(item *Namespace)

Add 添加应用

func (*Set) Descriptor deprecated added in v0.2.0

func (*Set) Descriptor() ([]byte, []int)

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) GetItems added in v0.2.0

func (x *Set) GetItems() []*Namespace

func (*Set) GetTotal added in v0.2.0

func (x *Set) GetTotal() int64

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

func (*Set) Reset added in v0.2.0

func (x *Set) Reset()

func (*Set) String added in v0.2.0

func (x *Set) String() string

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) DeleteNamespace added in v0.2.0

func (UnimplementedNamespaceServiceServer) DescribeNamespace added in v0.2.0

func (UnimplementedNamespaceServiceServer) QueryNamespace added in v0.2.0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL