commonpb

package
v2.0.0-alpha.19 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VISIABLE_MODE_name = map[int32]string{
		0: "NAMESPACE",
		1: "DOMAIN",
		2: "GLOBAL",
	}
	VISIABLE_MODE_value = map[string]int32{
		"NAMESPACE": 0,
		"DOMAIN":    1,
		"GLOBAL":    2,
	}
)

Enum value maps for VISIABLE_MODE.

View Source
var File_commonpb_page_proto protoreflect.FileDescriptor
View Source
var File_commonpb_request_info_proto protoreflect.FileDescriptor
View Source
var File_commonpb_resource_proto protoreflect.FileDescriptor
View Source
var File_commonpb_response_proto protoreflect.FileDescriptor

Functions

func VISIABLE_MODEValues

func VISIABLE_MODEValues() []string

Types

type Identifier

type Identifier struct {

	// An application identifier that will be used among
	// other infrastructure services to identify the application
	ApplicationName string `protobuf:"bytes,1,opt,name=application_name,json=applicationName,proto3" json:"application_name,omitempty"`
	// An application specific type name of a resource
	ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
	// An application specific resource identity of a resource
	ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
	// contains filtered or unexported fields
}

A number of application services require a mechanism to encode the identity of a particular resource across applications. The resource identifiers consist of the application ID, an application-defined resource type, and an application-defined ID for that resource

func (*Identifier) Descriptor deprecated

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

Deprecated: Use Identifier.ProtoReflect.Descriptor instead.

func (*Identifier) GetApplicationName

func (x *Identifier) GetApplicationName() string

func (*Identifier) GetResourceId

func (x *Identifier) GetResourceId() string

func (*Identifier) GetResourceType

func (x *Identifier) GetResourceType() string

func (*Identifier) ProtoMessage

func (*Identifier) ProtoMessage()

func (*Identifier) ProtoReflect

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

func (*Identifier) Reset

func (x *Identifier) Reset()

func (*Identifier) String

func (x *Identifier) String() string

type PageRequest

type PageRequest struct {
	PageSize   uint64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageNumber uint64 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	Offset     int64  `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*PageRequest) Descriptor deprecated

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

Deprecated: Use PageRequest.ProtoReflect.Descriptor instead.

func (*PageRequest) GetOffset

func (x *PageRequest) GetOffset() int64

func (*PageRequest) GetPageNumber

func (x *PageRequest) GetPageNumber() uint64

func (*PageRequest) GetPageSize

func (x *PageRequest) GetPageSize() uint64

func (*PageRequest) ProtoMessage

func (*PageRequest) ProtoMessage()

func (*PageRequest) ProtoReflect

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

func (*PageRequest) Reset

func (x *PageRequest) Reset()

func (*PageRequest) String

func (x *PageRequest) String() string

type Response

type Response struct {

	// 自定义返回码  0:表示正常
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// 数据类型, 可以缺省
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// 异常的范围
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// 异常原因
	Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
	// 关于这次响应的说明信息
	Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// 数据meta
	Meta map[string]string `` /* 149-byte string literal not displayed */
	// data 具体的数据
	Data *anypb.Any `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Response to be used by controllers.

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetCode

func (x *Response) GetCode() int32

func (*Response) GetData

func (x *Response) GetData() *anypb.Any

func (*Response) GetMessage

func (x *Response) GetMessage() string

func (*Response) GetMeta

func (x *Response) GetMeta() map[string]string

func (*Response) GetNamespace

func (x *Response) GetNamespace() string

func (*Response) GetReason

func (x *Response) GetReason() string

func (*Response) GetType

func (x *Response) GetType() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type VISIABLE_MODE

type VISIABLE_MODE int32
const (
	// 默认Namespace可见
	VISIABLE_MODE_NAMESPACE VISIABLE_MODE = 0
	// 域内可见
	VISIABLE_MODE_DOMAIN VISIABLE_MODE = 1
	// 全局可见
	VISIABLE_MODE_GLOBAL VISIABLE_MODE = 2
)

func VISIABLE_MODEDecode

func VISIABLE_MODEDecode(name string) VISIABLE_MODE

func (VISIABLE_MODE) Descriptor

func (VISIABLE_MODE) Enum

func (x VISIABLE_MODE) Enum() *VISIABLE_MODE

func (VISIABLE_MODE) EnumDescriptor deprecated

func (VISIABLE_MODE) EnumDescriptor() ([]byte, []int)

Deprecated: Use VISIABLE_MODE.Descriptor instead.

func (VISIABLE_MODE) Number

func (VISIABLE_MODE) String

func (x VISIABLE_MODE) String() string

func (VISIABLE_MODE) Type

Jump to

Keyboard shortcuts

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