namespace

package
v4.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Overview

Package namespace is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Namespace_All_FullMethodName      = "/namespace.Namespace/All"
	Namespace_Create_FullMethodName   = "/namespace.Namespace/Create"
	Namespace_Show_FullMethodName     = "/namespace.Namespace/Show"
	Namespace_Delete_FullMethodName   = "/namespace.Namespace/Delete"
	Namespace_IsExists_FullMethodName = "/namespace.Namespace/IsExists"
)

Variables

View Source
var File_namespace_namespace_proto protoreflect.FileDescriptor
View Source
var Namespace_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "namespace.Namespace",
	HandlerType: (*NamespaceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "All",
			Handler:    _Namespace_All_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Namespace_Create_Handler,
		},
		{
			MethodName: "Show",
			Handler:    _Namespace_Show_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Namespace_Delete_Handler,
		},
		{
			MethodName: "IsExists",
			Handler:    _Namespace_IsExists_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "namespace/namespace.proto",
}

Namespace_ServiceDesc is the grpc.ServiceDesc for Namespace service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNamespaceHandler

func RegisterNamespaceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNamespaceHandler registers the http handlers for service Namespace to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNamespaceHandlerClient

func RegisterNamespaceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceClient) error

RegisterNamespaceHandlerClient registers the http handlers for service Namespace to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespaceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespaceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NamespaceClient" to call the correct interceptors.

func RegisterNamespaceHandlerFromEndpoint

func RegisterNamespaceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNamespaceHandlerFromEndpoint is same as RegisterNamespaceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNamespaceHandlerServer

func RegisterNamespaceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServer) error

RegisterNamespaceHandlerServer registers the http handlers for service Namespace to "mux". UnaryRPC :call NamespaceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNamespaceHandlerFromEndpoint instead.

func RegisterNamespaceServer

func RegisterNamespaceServer(s grpc.ServiceRegistrar, srv NamespaceServer)

Types

type AllRequest

type AllRequest struct {
	// contains filtered or unexported fields
}

func (*AllRequest) Descriptor deprecated

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

Deprecated: Use AllRequest.ProtoReflect.Descriptor instead.

func (*AllRequest) ProtoMessage

func (*AllRequest) ProtoMessage()

func (*AllRequest) ProtoReflect

func (x *AllRequest) ProtoReflect() protoreflect.Message

func (*AllRequest) Reset

func (x *AllRequest) Reset()

func (*AllRequest) String

func (x *AllRequest) String() string

func (*AllRequest) Validate

func (m *AllRequest) Validate() error

Validate checks the field values on AllRequest 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 (*AllRequest) ValidateAll

func (m *AllRequest) ValidateAll() error

ValidateAll checks the field values on AllRequest 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 AllRequestMultiError, or nil if none found.

type AllRequestMultiError

type AllRequestMultiError []error

AllRequestMultiError is an error wrapping multiple validation errors returned by AllRequest.ValidateAll() if the designated constraints aren't met.

func (AllRequestMultiError) AllErrors

func (m AllRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AllRequestMultiError) Error

func (m AllRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type AllRequestValidationError

type AllRequestValidationError struct {
	// contains filtered or unexported fields
}

AllRequestValidationError is the validation error returned by AllRequest.Validate if the designated constraints aren't met.

func (AllRequestValidationError) Cause

func (e AllRequestValidationError) Cause() error

Cause function returns cause value.

func (AllRequestValidationError) Error

Error satisfies the builtin error interface

func (AllRequestValidationError) ErrorName

func (e AllRequestValidationError) ErrorName() string

ErrorName returns error name.

func (AllRequestValidationError) Field

Field function returns field value.

func (AllRequestValidationError) Key

Key function returns key value.

func (AllRequestValidationError) Reason

func (e AllRequestValidationError) Reason() string

Reason function returns reason value.

type AllResponse

type AllResponse struct {
	Items []*types.NamespaceModel `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*AllResponse) Descriptor deprecated

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

Deprecated: Use AllResponse.ProtoReflect.Descriptor instead.

func (*AllResponse) GetItems

func (x *AllResponse) GetItems() []*types.NamespaceModel

func (*AllResponse) ProtoMessage

func (*AllResponse) ProtoMessage()

func (*AllResponse) ProtoReflect

func (x *AllResponse) ProtoReflect() protoreflect.Message

func (*AllResponse) Reset

func (x *AllResponse) Reset()

func (*AllResponse) String

func (x *AllResponse) String() string

func (*AllResponse) Validate

func (m *AllResponse) Validate() error

Validate checks the field values on AllResponse 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 (*AllResponse) ValidateAll

func (m *AllResponse) ValidateAll() error

ValidateAll checks the field values on AllResponse 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 AllResponseMultiError, or nil if none found.

type AllResponseMultiError

type AllResponseMultiError []error

AllResponseMultiError is an error wrapping multiple validation errors returned by AllResponse.ValidateAll() if the designated constraints aren't met.

func (AllResponseMultiError) AllErrors

func (m AllResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AllResponseMultiError) Error

func (m AllResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type AllResponseValidationError

type AllResponseValidationError struct {
	// contains filtered or unexported fields
}

AllResponseValidationError is the validation error returned by AllResponse.Validate if the designated constraints aren't met.

func (AllResponseValidationError) Cause

Cause function returns cause value.

func (AllResponseValidationError) Error

Error satisfies the builtin error interface

func (AllResponseValidationError) ErrorName

func (e AllResponseValidationError) ErrorName() string

ErrorName returns error name.

func (AllResponseValidationError) Field

Field function returns field value.

func (AllResponseValidationError) Key

Key function returns key value.

func (AllResponseValidationError) Reason

Reason function returns reason value.

type CreateRequest

type CreateRequest struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// 已存在则忽略,不会报错
	IgnoreIfExists bool `protobuf:"varint,2,opt,name=ignore_if_exists,json=ignoreIfExists,proto3" json:"ignore_if_exists,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetIgnoreIfExists

func (x *CreateRequest) GetIgnoreIfExists() bool

func (*CreateRequest) GetNamespace

func (x *CreateRequest) GetNamespace() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

func (*CreateRequest) Validate

func (m *CreateRequest) Validate() error

Validate checks the field values on CreateRequest 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 (*CreateRequest) ValidateAll

func (m *CreateRequest) ValidateAll() error

ValidateAll checks the field values on CreateRequest 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 CreateRequestMultiError, or nil if none found.

type CreateRequestMultiError

type CreateRequestMultiError []error

CreateRequestMultiError is an error wrapping multiple validation errors returned by CreateRequest.ValidateAll() if the designated constraints aren't met.

func (CreateRequestMultiError) AllErrors

func (m CreateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateRequestMultiError) Error

func (m CreateRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CreateRequestValidationError

type CreateRequestValidationError struct {
	// contains filtered or unexported fields
}

CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.

func (CreateRequestValidationError) Cause

Cause function returns cause value.

func (CreateRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRequestValidationError) ErrorName

func (e CreateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (CreateRequestValidationError) Field

Field function returns field value.

func (CreateRequestValidationError) Key

Key function returns key value.

func (CreateRequestValidationError) Reason

Reason function returns reason value.

type CreateResponse

type CreateResponse struct {
	Namespace *types.NamespaceModel `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Exists    bool                  `protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetExists

func (x *CreateResponse) GetExists() bool

func (*CreateResponse) GetNamespace

func (x *CreateResponse) GetNamespace() *types.NamespaceModel

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

func (*CreateResponse) Validate

func (m *CreateResponse) Validate() error

Validate checks the field values on CreateResponse 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 (*CreateResponse) ValidateAll

func (m *CreateResponse) ValidateAll() error

ValidateAll checks the field values on CreateResponse 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 CreateResponseMultiError, or nil if none found.

type CreateResponseMultiError

type CreateResponseMultiError []error

CreateResponseMultiError is an error wrapping multiple validation errors returned by CreateResponse.ValidateAll() if the designated constraints aren't met.

func (CreateResponseMultiError) AllErrors

func (m CreateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateResponseMultiError) Error

func (m CreateResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CreateResponseValidationError

type CreateResponseValidationError struct {
	// contains filtered or unexported fields
}

CreateResponseValidationError is the validation error returned by CreateResponse.Validate if the designated constraints aren't met.

func (CreateResponseValidationError) Cause

Cause function returns cause value.

func (CreateResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateResponseValidationError) ErrorName

func (e CreateResponseValidationError) ErrorName() string

ErrorName returns error name.

func (CreateResponseValidationError) Field

Field function returns field value.

func (CreateResponseValidationError) Key

Key function returns key value.

func (CreateResponseValidationError) Reason

Reason function returns reason value.

type DeleteRequest

type DeleteRequest struct {
	NamespaceId int64 `protobuf:"varint,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetNamespaceId

func (x *DeleteRequest) GetNamespaceId() int64

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

func (*DeleteRequest) Validate

func (m *DeleteRequest) Validate() error

Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll

func (m *DeleteRequest) ValidateAll() error

ValidateAll checks the field values on DeleteRequest 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 DeleteRequestMultiError, or nil if none found.

type DeleteRequestMultiError

type DeleteRequestMultiError []error

DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.

func (DeleteRequestMultiError) AllErrors

func (m DeleteRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteRequestMultiError) Error

func (m DeleteRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DeleteRequestValidationError

type DeleteRequestValidationError struct {
	// contains filtered or unexported fields
}

DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.

func (DeleteRequestValidationError) Cause

Cause function returns cause value.

func (DeleteRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteRequestValidationError) ErrorName

func (e DeleteRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteRequestValidationError) Field

Field function returns field value.

func (DeleteRequestValidationError) Key

Key function returns key value.

func (DeleteRequestValidationError) Reason

Reason function returns reason value.

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

func (*DeleteResponse) Validate

func (m *DeleteResponse) Validate() error

Validate checks the field values on DeleteResponse 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 (*DeleteResponse) ValidateAll

func (m *DeleteResponse) ValidateAll() error

ValidateAll checks the field values on DeleteResponse 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 DeleteResponseMultiError, or nil if none found.

type DeleteResponseMultiError

type DeleteResponseMultiError []error

DeleteResponseMultiError is an error wrapping multiple validation errors returned by DeleteResponse.ValidateAll() if the designated constraints aren't met.

func (DeleteResponseMultiError) AllErrors

func (m DeleteResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteResponseMultiError) Error

func (m DeleteResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DeleteResponseValidationError

type DeleteResponseValidationError struct {
	// contains filtered or unexported fields
}

DeleteResponseValidationError is the validation error returned by DeleteResponse.Validate if the designated constraints aren't met.

func (DeleteResponseValidationError) Cause

Cause function returns cause value.

func (DeleteResponseValidationError) Error

Error satisfies the builtin error interface

func (DeleteResponseValidationError) ErrorName

func (e DeleteResponseValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteResponseValidationError) Field

Field function returns field value.

func (DeleteResponseValidationError) Key

Key function returns key value.

func (DeleteResponseValidationError) Reason

Reason function returns reason value.

type IsExistsRequest

type IsExistsRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*IsExistsRequest) Descriptor deprecated

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

Deprecated: Use IsExistsRequest.ProtoReflect.Descriptor instead.

func (*IsExistsRequest) GetName

func (x *IsExistsRequest) GetName() string

func (*IsExistsRequest) ProtoMessage

func (*IsExistsRequest) ProtoMessage()

func (*IsExistsRequest) ProtoReflect

func (x *IsExistsRequest) ProtoReflect() protoreflect.Message

func (*IsExistsRequest) Reset

func (x *IsExistsRequest) Reset()

func (*IsExistsRequest) String

func (x *IsExistsRequest) String() string

func (*IsExistsRequest) Validate

func (m *IsExistsRequest) Validate() error

Validate checks the field values on IsExistsRequest 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 (*IsExistsRequest) ValidateAll

func (m *IsExistsRequest) ValidateAll() error

ValidateAll checks the field values on IsExistsRequest 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 IsExistsRequestMultiError, or nil if none found.

type IsExistsRequestMultiError

type IsExistsRequestMultiError []error

IsExistsRequestMultiError is an error wrapping multiple validation errors returned by IsExistsRequest.ValidateAll() if the designated constraints aren't met.

func (IsExistsRequestMultiError) AllErrors

func (m IsExistsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IsExistsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type IsExistsRequestValidationError

type IsExistsRequestValidationError struct {
	// contains filtered or unexported fields
}

IsExistsRequestValidationError is the validation error returned by IsExistsRequest.Validate if the designated constraints aren't met.

func (IsExistsRequestValidationError) Cause

Cause function returns cause value.

func (IsExistsRequestValidationError) Error

Error satisfies the builtin error interface

func (IsExistsRequestValidationError) ErrorName

func (e IsExistsRequestValidationError) ErrorName() string

ErrorName returns error name.

func (IsExistsRequestValidationError) Field

Field function returns field value.

func (IsExistsRequestValidationError) Key

Key function returns key value.

func (IsExistsRequestValidationError) Reason

Reason function returns reason value.

type IsExistsResponse

type IsExistsResponse struct {
	Exists bool  `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
	Id     int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*IsExistsResponse) Descriptor deprecated

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

Deprecated: Use IsExistsResponse.ProtoReflect.Descriptor instead.

func (*IsExistsResponse) GetExists

func (x *IsExistsResponse) GetExists() bool

func (*IsExistsResponse) GetId

func (x *IsExistsResponse) GetId() int64

func (*IsExistsResponse) ProtoMessage

func (*IsExistsResponse) ProtoMessage()

func (*IsExistsResponse) ProtoReflect

func (x *IsExistsResponse) ProtoReflect() protoreflect.Message

func (*IsExistsResponse) Reset

func (x *IsExistsResponse) Reset()

func (*IsExistsResponse) String

func (x *IsExistsResponse) String() string

func (*IsExistsResponse) Validate

func (m *IsExistsResponse) Validate() error

Validate checks the field values on IsExistsResponse 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 (*IsExistsResponse) ValidateAll

func (m *IsExistsResponse) ValidateAll() error

ValidateAll checks the field values on IsExistsResponse 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 IsExistsResponseMultiError, or nil if none found.

type IsExistsResponseMultiError

type IsExistsResponseMultiError []error

IsExistsResponseMultiError is an error wrapping multiple validation errors returned by IsExistsResponse.ValidateAll() if the designated constraints aren't met.

func (IsExistsResponseMultiError) AllErrors

func (m IsExistsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IsExistsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type IsExistsResponseValidationError

type IsExistsResponseValidationError struct {
	// contains filtered or unexported fields
}

IsExistsResponseValidationError is the validation error returned by IsExistsResponse.Validate if the designated constraints aren't met.

func (IsExistsResponseValidationError) Cause

Cause function returns cause value.

func (IsExistsResponseValidationError) Error

Error satisfies the builtin error interface

func (IsExistsResponseValidationError) ErrorName

ErrorName returns error name.

func (IsExistsResponseValidationError) Field

Field function returns field value.

func (IsExistsResponseValidationError) Key

Key function returns key value.

func (IsExistsResponseValidationError) Reason

Reason function returns reason value.

type NamespaceClient

type NamespaceClient interface {
	// All 获取所有的名称空间
	All(ctx context.Context, in *AllRequest, opts ...grpc.CallOption) (*AllResponse, error)
	// Create 创建名称空间
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	// Show 查看名称空间详情
	Show(ctx context.Context, in *ShowRequest, opts ...grpc.CallOption) (*ShowResponse, error)
	// Delete 删除名称空间
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// IsExists 名称空间是否存在
	IsExists(ctx context.Context, in *IsExistsRequest, opts ...grpc.CallOption) (*IsExistsResponse, error)
}

NamespaceClient is the client API for Namespace 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 NewNamespaceClient

func NewNamespaceClient(cc grpc.ClientConnInterface) NamespaceClient

type NamespaceServer

type NamespaceServer interface {
	// All 获取所有的名称空间
	All(context.Context, *AllRequest) (*AllResponse, error)
	// Create 创建名称空间
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	// Show 查看名称空间详情
	Show(context.Context, *ShowRequest) (*ShowResponse, error)
	// Delete 删除名称空间
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// IsExists 名称空间是否存在
	IsExists(context.Context, *IsExistsRequest) (*IsExistsResponse, error)
	// contains filtered or unexported methods
}

NamespaceServer is the server API for Namespace service. All implementations must embed UnimplementedNamespaceServer for forward compatibility

type ShowRequest

type ShowRequest struct {
	NamespaceId int64 `protobuf:"varint,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ShowRequest) Descriptor deprecated

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

Deprecated: Use ShowRequest.ProtoReflect.Descriptor instead.

func (*ShowRequest) GetNamespaceId

func (x *ShowRequest) GetNamespaceId() int64

func (*ShowRequest) ProtoMessage

func (*ShowRequest) ProtoMessage()

func (*ShowRequest) ProtoReflect

func (x *ShowRequest) ProtoReflect() protoreflect.Message

func (*ShowRequest) Reset

func (x *ShowRequest) Reset()

func (*ShowRequest) String

func (x *ShowRequest) String() string

func (*ShowRequest) Validate

func (m *ShowRequest) Validate() error

Validate checks the field values on ShowRequest 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 (*ShowRequest) ValidateAll

func (m *ShowRequest) ValidateAll() error

ValidateAll checks the field values on ShowRequest 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 ShowRequestMultiError, or nil if none found.

type ShowRequestMultiError

type ShowRequestMultiError []error

ShowRequestMultiError is an error wrapping multiple validation errors returned by ShowRequest.ValidateAll() if the designated constraints aren't met.

func (ShowRequestMultiError) AllErrors

func (m ShowRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ShowRequestMultiError) Error

func (m ShowRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ShowRequestValidationError

type ShowRequestValidationError struct {
	// contains filtered or unexported fields
}

ShowRequestValidationError is the validation error returned by ShowRequest.Validate if the designated constraints aren't met.

func (ShowRequestValidationError) Cause

Cause function returns cause value.

func (ShowRequestValidationError) Error

Error satisfies the builtin error interface

func (ShowRequestValidationError) ErrorName

func (e ShowRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ShowRequestValidationError) Field

Field function returns field value.

func (ShowRequestValidationError) Key

Key function returns key value.

func (ShowRequestValidationError) Reason

Reason function returns reason value.

type ShowResponse

type ShowResponse struct {
	Namespace *types.NamespaceModel `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ShowResponse) Descriptor deprecated

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

Deprecated: Use ShowResponse.ProtoReflect.Descriptor instead.

func (*ShowResponse) GetNamespace

func (x *ShowResponse) GetNamespace() *types.NamespaceModel

func (*ShowResponse) ProtoMessage

func (*ShowResponse) ProtoMessage()

func (*ShowResponse) ProtoReflect

func (x *ShowResponse) ProtoReflect() protoreflect.Message

func (*ShowResponse) Reset

func (x *ShowResponse) Reset()

func (*ShowResponse) String

func (x *ShowResponse) String() string

func (*ShowResponse) Validate

func (m *ShowResponse) Validate() error

Validate checks the field values on ShowResponse 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 (*ShowResponse) ValidateAll

func (m *ShowResponse) ValidateAll() error

ValidateAll checks the field values on ShowResponse 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 ShowResponseMultiError, or nil if none found.

type ShowResponseMultiError

type ShowResponseMultiError []error

ShowResponseMultiError is an error wrapping multiple validation errors returned by ShowResponse.ValidateAll() if the designated constraints aren't met.

func (ShowResponseMultiError) AllErrors

func (m ShowResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ShowResponseMultiError) Error

func (m ShowResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ShowResponseValidationError

type ShowResponseValidationError struct {
	// contains filtered or unexported fields
}

ShowResponseValidationError is the validation error returned by ShowResponse.Validate if the designated constraints aren't met.

func (ShowResponseValidationError) Cause

Cause function returns cause value.

func (ShowResponseValidationError) Error

Error satisfies the builtin error interface

func (ShowResponseValidationError) ErrorName

func (e ShowResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ShowResponseValidationError) Field

Field function returns field value.

func (ShowResponseValidationError) Key

Key function returns key value.

func (ShowResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedNamespaceServer

type UnimplementedNamespaceServer struct {
}

UnimplementedNamespaceServer must be embedded to have forward compatible implementations.

func (UnimplementedNamespaceServer) All

func (UnimplementedNamespaceServer) Create

func (UnimplementedNamespaceServer) Delete

func (UnimplementedNamespaceServer) IsExists

func (UnimplementedNamespaceServer) Show

type UnsafeNamespaceServer

type UnsafeNamespaceServer interface {
	// contains filtered or unexported methods
}

UnsafeNamespaceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NamespaceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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