group

package
v3.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_group_collection_proto protoreflect.FileDescriptor
View Source
var File_proto_group_element_proto protoreflect.FileDescriptor
View Source
var File_proto_group_healthy_proto protoreflect.FileDescriptor
View Source
var File_proto_group_shared_proto protoreflect.FileDescriptor

Functions

func NewCollectionEndpoints

func NewCollectionEndpoints() []*api.Endpoint

func NewElementEndpoints

func NewElementEndpoints() []*api.Endpoint

func NewHealthyEndpoints

func NewHealthyEndpoints() []*api.Endpoint

func RegisterCollectionHandler

func RegisterCollectionHandler(s server.Server, hdlr CollectionHandler, opts ...server.HandlerOption) error

func RegisterElementHandler

func RegisterElementHandler(s server.Server, hdlr ElementHandler, opts ...server.HandlerOption) error

func RegisterHealthyHandler added in v1.2.0

func RegisterHealthyHandler(s server.Server, hdlr HealthyHandler, opts ...server.HandlerOption) error

Types

type BlankRequest

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

空白请求

func (*BlankRequest) Descriptor deprecated

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

Deprecated: Use BlankRequest.ProtoReflect.Descriptor instead.

func (*BlankRequest) ProtoMessage

func (*BlankRequest) ProtoMessage()

func (*BlankRequest) ProtoReflect

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

func (*BlankRequest) Reset

func (x *BlankRequest) Reset()

func (*BlankRequest) String

func (x *BlankRequest) String() string

type BlankResponse

type BlankResponse struct {
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	// contains filtered or unexported fields
}

空白回复

func (*BlankResponse) Descriptor deprecated

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

Deprecated: Use BlankResponse.ProtoReflect.Descriptor instead.

func (*BlankResponse) GetStatus

func (x *BlankResponse) GetStatus() *Status

func (*BlankResponse) ProtoMessage

func (*BlankResponse) ProtoMessage()

func (*BlankResponse) ProtoReflect

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

func (*BlankResponse) Reset

func (x *BlankResponse) Reset()

func (*BlankResponse) String

func (x *BlankResponse) String() string

type CollectionEntity

type CollectionEntity struct {
	Uuid     string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`          // uuid
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`          // 名称
	Capacity uint64 `protobuf:"varint,3,opt,name=capacity,proto3" json:"capacity,omitempty"` // 成员上限, 0为无限制
	// contains filtered or unexported fields
}

集合实体

func (*CollectionEntity) Descriptor deprecated

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

Deprecated: Use CollectionEntity.ProtoReflect.Descriptor instead.

func (*CollectionEntity) GetCapacity

func (x *CollectionEntity) GetCapacity() uint64

func (*CollectionEntity) GetName

func (x *CollectionEntity) GetName() string

func (*CollectionEntity) GetUuid

func (x *CollectionEntity) GetUuid() string

func (*CollectionEntity) ProtoMessage

func (*CollectionEntity) ProtoMessage()

func (*CollectionEntity) ProtoReflect

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

func (*CollectionEntity) Reset

func (x *CollectionEntity) Reset()

func (*CollectionEntity) String

func (x *CollectionEntity) String() string

type CollectionGetRequest

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

获取集合信息的请求

func (*CollectionGetRequest) Descriptor deprecated

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

Deprecated: Use CollectionGetRequest.ProtoReflect.Descriptor instead.

func (*CollectionGetRequest) GetUuid

func (x *CollectionGetRequest) GetUuid() string

func (*CollectionGetRequest) ProtoMessage

func (*CollectionGetRequest) ProtoMessage()

func (*CollectionGetRequest) ProtoReflect

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

func (*CollectionGetRequest) Reset

func (x *CollectionGetRequest) Reset()

func (*CollectionGetRequest) String

func (x *CollectionGetRequest) String() string

type CollectionGetResponse

type CollectionGetResponse struct {
	Status *Status           `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Entity *CollectionEntity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` // 实体
	// contains filtered or unexported fields
}

获取集合信息的回复

func (*CollectionGetResponse) Descriptor deprecated

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

Deprecated: Use CollectionGetResponse.ProtoReflect.Descriptor instead.

func (*CollectionGetResponse) GetEntity

func (x *CollectionGetResponse) GetEntity() *CollectionEntity

func (*CollectionGetResponse) GetStatus

func (x *CollectionGetResponse) GetStatus() *Status

func (*CollectionGetResponse) ProtoMessage

func (*CollectionGetResponse) ProtoMessage()

func (*CollectionGetResponse) ProtoReflect

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

func (*CollectionGetResponse) Reset

func (x *CollectionGetResponse) Reset()

func (*CollectionGetResponse) String

func (x *CollectionGetResponse) String() string

type CollectionHandler

type CollectionHandler interface {
	// 创建一个集合
	Make(context.Context, *CollectionMakeRequest, *UuidResponse) error
	// 更新一个集合
	Update(context.Context, *CollectionUpdateRequest, *UuidResponse) error
	// 列举集合
	List(context.Context, *CollectionListRequest, *CollectionListResponse) error
	// 搜索集合
	Search(context.Context, *CollectionSearchRequest, *CollectionListResponse) error
	// 删除集合
	Remove(context.Context, *CollectionRemoveRequest, *UuidResponse) error
	// 获取集合信息
	Get(context.Context, *CollectionGetRequest, *CollectionGetResponse) error
}

type CollectionListRequest

type CollectionListRequest struct {
	Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // 偏移值
	Count  int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`   // 数量
	// contains filtered or unexported fields
}

列举集合的请求

func (*CollectionListRequest) Descriptor deprecated

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

Deprecated: Use CollectionListRequest.ProtoReflect.Descriptor instead.

func (*CollectionListRequest) GetCount

func (x *CollectionListRequest) GetCount() int64

func (*CollectionListRequest) GetOffset

func (x *CollectionListRequest) GetOffset() int64

func (*CollectionListRequest) ProtoMessage

func (*CollectionListRequest) ProtoMessage()

func (*CollectionListRequest) ProtoReflect

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

func (*CollectionListRequest) Reset

func (x *CollectionListRequest) Reset()

func (*CollectionListRequest) String

func (x *CollectionListRequest) String() string

type CollectionListResponse

type CollectionListResponse struct {
	Status *Status             `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Total  uint64              `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`  // 总数
	Entity []*CollectionEntity `protobuf:"bytes,3,rep,name=entity,proto3" json:"entity,omitempty"` // 实体列表
	// contains filtered or unexported fields
}

列举集合的回复

func (*CollectionListResponse) Descriptor deprecated

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

Deprecated: Use CollectionListResponse.ProtoReflect.Descriptor instead.

func (*CollectionListResponse) GetEntity

func (x *CollectionListResponse) GetEntity() []*CollectionEntity

func (*CollectionListResponse) GetStatus

func (x *CollectionListResponse) GetStatus() *Status

func (*CollectionListResponse) GetTotal

func (x *CollectionListResponse) GetTotal() uint64

func (*CollectionListResponse) ProtoMessage

func (*CollectionListResponse) ProtoMessage()

func (*CollectionListResponse) ProtoReflect

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

func (*CollectionListResponse) Reset

func (x *CollectionListResponse) Reset()

func (*CollectionListResponse) String

func (x *CollectionListResponse) String() string

type CollectionMakeRequest

type CollectionMakeRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`          // 名称
	Capacity uint64 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"` // 成员上限,0为无限制
	// contains filtered or unexported fields
}

创建集合的请求

func (*CollectionMakeRequest) Descriptor deprecated

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

Deprecated: Use CollectionMakeRequest.ProtoReflect.Descriptor instead.

func (*CollectionMakeRequest) GetCapacity

func (x *CollectionMakeRequest) GetCapacity() uint64

func (*CollectionMakeRequest) GetName

func (x *CollectionMakeRequest) GetName() string

func (*CollectionMakeRequest) ProtoMessage

func (*CollectionMakeRequest) ProtoMessage()

func (*CollectionMakeRequest) ProtoReflect

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

func (*CollectionMakeRequest) Reset

func (x *CollectionMakeRequest) Reset()

func (*CollectionMakeRequest) String

func (x *CollectionMakeRequest) String() string

type CollectionRemoveRequest

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

删除集合的请求

func (*CollectionRemoveRequest) Descriptor deprecated

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

Deprecated: Use CollectionRemoveRequest.ProtoReflect.Descriptor instead.

func (*CollectionRemoveRequest) GetUuid

func (x *CollectionRemoveRequest) GetUuid() string

func (*CollectionRemoveRequest) ProtoMessage

func (*CollectionRemoveRequest) ProtoMessage()

func (*CollectionRemoveRequest) ProtoReflect

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

func (*CollectionRemoveRequest) Reset

func (x *CollectionRemoveRequest) Reset()

func (*CollectionRemoveRequest) String

func (x *CollectionRemoveRequest) String() string

type CollectionSearchRequest

type CollectionSearchRequest struct {
	Offset int64  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // 偏移值
	Count  int64  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`   // 数量
	Name   string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`      // 名称
	// contains filtered or unexported fields
}

搜索集合的请求

func (*CollectionSearchRequest) Descriptor deprecated

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

Deprecated: Use CollectionSearchRequest.ProtoReflect.Descriptor instead.

func (*CollectionSearchRequest) GetCount

func (x *CollectionSearchRequest) GetCount() int64

func (*CollectionSearchRequest) GetName

func (x *CollectionSearchRequest) GetName() string

func (*CollectionSearchRequest) GetOffset

func (x *CollectionSearchRequest) GetOffset() int64

func (*CollectionSearchRequest) ProtoMessage

func (*CollectionSearchRequest) ProtoMessage()

func (*CollectionSearchRequest) ProtoReflect

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

func (*CollectionSearchRequest) Reset

func (x *CollectionSearchRequest) Reset()

func (*CollectionSearchRequest) String

func (x *CollectionSearchRequest) String() string

type CollectionService

type CollectionService interface {
	// 创建一个集合
	Make(ctx context.Context, in *CollectionMakeRequest, opts ...client.CallOption) (*UuidResponse, error)
	// 更新一个集合
	Update(ctx context.Context, in *CollectionUpdateRequest, opts ...client.CallOption) (*UuidResponse, error)
	// 列举集合
	List(ctx context.Context, in *CollectionListRequest, opts ...client.CallOption) (*CollectionListResponse, error)
	// 搜索集合
	Search(ctx context.Context, in *CollectionSearchRequest, opts ...client.CallOption) (*CollectionListResponse, error)
	// 删除集合
	Remove(ctx context.Context, in *CollectionRemoveRequest, opts ...client.CallOption) (*UuidResponse, error)
	// 获取集合信息
	Get(ctx context.Context, in *CollectionGetRequest, opts ...client.CallOption) (*CollectionGetResponse, error)
}

func NewCollectionService

func NewCollectionService(name string, c client.Client) CollectionService

type CollectionUpdateRequest

type CollectionUpdateRequest struct {
	Uuid     string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`          // uuid
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`          // 名称
	Capacity uint64 `protobuf:"varint,3,opt,name=capacity,proto3" json:"capacity,omitempty"` // 成员上限,0为无限制
	// contains filtered or unexported fields
}

更新集合的请求

func (*CollectionUpdateRequest) Descriptor deprecated

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

Deprecated: Use CollectionUpdateRequest.ProtoReflect.Descriptor instead.

func (*CollectionUpdateRequest) GetCapacity

func (x *CollectionUpdateRequest) GetCapacity() uint64

func (*CollectionUpdateRequest) GetName

func (x *CollectionUpdateRequest) GetName() string

func (*CollectionUpdateRequest) GetUuid

func (x *CollectionUpdateRequest) GetUuid() string

func (*CollectionUpdateRequest) ProtoMessage

func (*CollectionUpdateRequest) ProtoMessage()

func (*CollectionUpdateRequest) ProtoReflect

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

func (*CollectionUpdateRequest) Reset

func (x *CollectionUpdateRequest) Reset()

func (*CollectionUpdateRequest) String

func (x *CollectionUpdateRequest) String() string

type EchoRequest added in v1.2.0

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

回显的请求

func (*EchoRequest) Descriptor deprecated added in v1.2.0

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMsg added in v1.2.0

func (x *EchoRequest) GetMsg() string

func (*EchoRequest) ProtoMessage added in v1.2.0

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset added in v1.2.0

func (x *EchoRequest) Reset()

func (*EchoRequest) String added in v1.2.0

func (x *EchoRequest) String() string

type EchoResponse added in v1.2.0

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

回显的回复

func (*EchoResponse) Descriptor deprecated added in v1.2.0

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetMsg added in v1.2.0

func (x *EchoResponse) GetMsg() string

func (*EchoResponse) ProtoMessage added in v1.2.0

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) ProtoReflect

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

func (*EchoResponse) Reset added in v1.2.0

func (x *EchoResponse) Reset()

func (*EchoResponse) String added in v1.2.0

func (x *EchoResponse) String() string

type ElementAddRequest

type ElementAddRequest struct {
	Collection string   `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` // 集合UUID
	Key        string   `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`               // 键
	Alias      string   `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"`           // 别名
	Label      []string `protobuf:"bytes,4,rep,name=label,proto3" json:"label,omitempty"`           // 标签
	// contains filtered or unexported fields
}

加入成员的请求

func (*ElementAddRequest) Descriptor deprecated

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

Deprecated: Use ElementAddRequest.ProtoReflect.Descriptor instead.

func (*ElementAddRequest) GetAlias

func (x *ElementAddRequest) GetAlias() string

func (*ElementAddRequest) GetCollection

func (x *ElementAddRequest) GetCollection() string

func (*ElementAddRequest) GetKey

func (x *ElementAddRequest) GetKey() string

func (*ElementAddRequest) GetLabel

func (x *ElementAddRequest) GetLabel() []string

func (*ElementAddRequest) ProtoMessage

func (*ElementAddRequest) ProtoMessage()

func (*ElementAddRequest) ProtoReflect

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

func (*ElementAddRequest) Reset

func (x *ElementAddRequest) Reset()

func (*ElementAddRequest) String

func (x *ElementAddRequest) String() string

type ElementEntity

type ElementEntity struct {
	Uuid       string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`             // uuid
	Collection string   `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` // 集合uuid
	Key        string   `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`               // 键
	Alias      string   `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias,omitempty"`           // 别名
	Label      []string `protobuf:"bytes,5,rep,name=label,proto3" json:"label,omitempty"`           // 标签
	// contains filtered or unexported fields
}

元素实体

func (*ElementEntity) Descriptor deprecated

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

Deprecated: Use ElementEntity.ProtoReflect.Descriptor instead.

func (*ElementEntity) GetAlias

func (x *ElementEntity) GetAlias() string

func (*ElementEntity) GetCollection

func (x *ElementEntity) GetCollection() string

func (*ElementEntity) GetKey

func (x *ElementEntity) GetKey() string

func (*ElementEntity) GetLabel

func (x *ElementEntity) GetLabel() []string

func (*ElementEntity) GetUuid

func (x *ElementEntity) GetUuid() string

func (*ElementEntity) ProtoMessage

func (*ElementEntity) ProtoMessage()

func (*ElementEntity) ProtoReflect

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

func (*ElementEntity) Reset

func (x *ElementEntity) Reset()

func (*ElementEntity) String

func (x *ElementEntity) String() string

type ElementGetRequest

type ElementGetRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // 成员uuid
	// contains filtered or unexported fields
}

获取成员的请求

func (*ElementGetRequest) Descriptor deprecated

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

Deprecated: Use ElementGetRequest.ProtoReflect.Descriptor instead.

func (*ElementGetRequest) GetUuid

func (x *ElementGetRequest) GetUuid() string

func (*ElementGetRequest) ProtoMessage

func (*ElementGetRequest) ProtoMessage()

func (*ElementGetRequest) ProtoReflect

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

func (*ElementGetRequest) Reset

func (x *ElementGetRequest) Reset()

func (*ElementGetRequest) String

func (x *ElementGetRequest) String() string

type ElementGetResponse

type ElementGetResponse struct {
	Status *Status        `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Entity *ElementEntity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` // 实体
	// contains filtered or unexported fields
}

获取成员信息的回复

func (*ElementGetResponse) Descriptor deprecated

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

Deprecated: Use ElementGetResponse.ProtoReflect.Descriptor instead.

func (*ElementGetResponse) GetEntity

func (x *ElementGetResponse) GetEntity() *ElementEntity

func (*ElementGetResponse) GetStatus

func (x *ElementGetResponse) GetStatus() *Status

func (*ElementGetResponse) ProtoMessage

func (*ElementGetResponse) ProtoMessage()

func (*ElementGetResponse) ProtoReflect

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

func (*ElementGetResponse) Reset

func (x *ElementGetResponse) Reset()

func (*ElementGetResponse) String

func (x *ElementGetResponse) String() string

type ElementHandler

type ElementHandler interface {
	// 加入一个元素
	Add(context.Context, *ElementAddRequest, *UuidResponse) error
	// 更新一个元素
	Update(context.Context, *ElementUpdateRequest, *UuidResponse) error
	// 列举一个集合的元素
	List(context.Context, *ElementListRequest, *ElementListResponse) error
	// 搜索一个集合中的元素
	Search(context.Context, *ElementSearchRequest, *ElementListResponse) error
	// 移除一个元素
	Remove(context.Context, *ElementRemoveRequest, *UuidResponse) error
	// 获取一个元素信息
	Get(context.Context, *ElementGetRequest, *ElementGetResponse) error
	// 获取所在的集合
	Where(context.Context, *ElementWhereRequest, *ElementWhereResponse) error
}

type ElementListRequest

type ElementListRequest struct {
	Offset     int64  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`        // 偏移值
	Count      int64  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`          // 数量
	Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"` // 集合UUID, 空值时列举所有集合
	// contains filtered or unexported fields
}

列举成员的请求

func (*ElementListRequest) Descriptor deprecated

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

Deprecated: Use ElementListRequest.ProtoReflect.Descriptor instead.

func (*ElementListRequest) GetCollection

func (x *ElementListRequest) GetCollection() string

func (*ElementListRequest) GetCount

func (x *ElementListRequest) GetCount() int64

func (*ElementListRequest) GetOffset

func (x *ElementListRequest) GetOffset() int64

func (*ElementListRequest) ProtoMessage

func (*ElementListRequest) ProtoMessage()

func (*ElementListRequest) ProtoReflect

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

func (*ElementListRequest) Reset

func (x *ElementListRequest) Reset()

func (*ElementListRequest) String

func (x *ElementListRequest) String() string

type ElementListResponse

type ElementListResponse struct {
	Status *Status          `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Total  uint64           `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`  // 总数
	Entity []*ElementEntity `protobuf:"bytes,3,rep,name=entity,proto3" json:"entity,omitempty"` // 实体列表
	// contains filtered or unexported fields
}

列举成员的回复

func (*ElementListResponse) Descriptor deprecated

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

Deprecated: Use ElementListResponse.ProtoReflect.Descriptor instead.

func (*ElementListResponse) GetEntity

func (x *ElementListResponse) GetEntity() []*ElementEntity

func (*ElementListResponse) GetStatus

func (x *ElementListResponse) GetStatus() *Status

func (*ElementListResponse) GetTotal

func (x *ElementListResponse) GetTotal() uint64

func (*ElementListResponse) ProtoMessage

func (*ElementListResponse) ProtoMessage()

func (*ElementListResponse) ProtoReflect

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

func (*ElementListResponse) Reset

func (x *ElementListResponse) Reset()

func (*ElementListResponse) String

func (x *ElementListResponse) String() string

type ElementRemoveRequest

type ElementRemoveRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // 成员UUID
	// contains filtered or unexported fields
}

移除成员的请求

func (*ElementRemoveRequest) Descriptor deprecated

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

Deprecated: Use ElementRemoveRequest.ProtoReflect.Descriptor instead.

func (*ElementRemoveRequest) GetUuid

func (x *ElementRemoveRequest) GetUuid() string

func (*ElementRemoveRequest) ProtoMessage

func (*ElementRemoveRequest) ProtoMessage()

func (*ElementRemoveRequest) ProtoReflect

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

func (*ElementRemoveRequest) Reset

func (x *ElementRemoveRequest) Reset()

func (*ElementRemoveRequest) String

func (x *ElementRemoveRequest) String() string

type ElementSearchRequest

type ElementSearchRequest struct {
	Offset     int64  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`        // 偏移值
	Count      int64  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`          // 数量
	Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"` // 集合UUID, 空值时列举所有集合
	Key        string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`               // 键
	Alias      string `protobuf:"bytes,5,opt,name=alias,proto3" json:"alias,omitempty"`           // 别名
	// contains filtered or unexported fields
}

搜索成员的请求

func (*ElementSearchRequest) Descriptor deprecated

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

Deprecated: Use ElementSearchRequest.ProtoReflect.Descriptor instead.

func (*ElementSearchRequest) GetAlias

func (x *ElementSearchRequest) GetAlias() string

func (*ElementSearchRequest) GetCollection

func (x *ElementSearchRequest) GetCollection() string

func (*ElementSearchRequest) GetCount

func (x *ElementSearchRequest) GetCount() int64

func (*ElementSearchRequest) GetKey

func (x *ElementSearchRequest) GetKey() string

func (*ElementSearchRequest) GetOffset

func (x *ElementSearchRequest) GetOffset() int64

func (*ElementSearchRequest) ProtoMessage

func (*ElementSearchRequest) ProtoMessage()

func (*ElementSearchRequest) ProtoReflect

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

func (*ElementSearchRequest) Reset

func (x *ElementSearchRequest) Reset()

func (*ElementSearchRequest) String

func (x *ElementSearchRequest) String() string

type ElementService

type ElementService interface {
	// 加入一个元素
	Add(ctx context.Context, in *ElementAddRequest, opts ...client.CallOption) (*UuidResponse, error)
	// 更新一个元素
	Update(ctx context.Context, in *ElementUpdateRequest, opts ...client.CallOption) (*UuidResponse, error)
	// 列举一个集合的元素
	List(ctx context.Context, in *ElementListRequest, opts ...client.CallOption) (*ElementListResponse, error)
	// 搜索一个集合中的元素
	Search(ctx context.Context, in *ElementSearchRequest, opts ...client.CallOption) (*ElementListResponse, error)
	// 移除一个元素
	Remove(ctx context.Context, in *ElementRemoveRequest, opts ...client.CallOption) (*UuidResponse, error)
	// 获取一个元素信息
	Get(ctx context.Context, in *ElementGetRequest, opts ...client.CallOption) (*ElementGetResponse, error)
	// 获取所在的集合
	Where(ctx context.Context, in *ElementWhereRequest, opts ...client.CallOption) (*ElementWhereResponse, error)
}

func NewElementService

func NewElementService(name string, c client.Client) ElementService

type ElementUpdateRequest

type ElementUpdateRequest struct {
	Uuid  string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`   // 成员UUID
	Key   string   `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`     // 键
	Alias string   `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"` // 别名
	Label []string `protobuf:"bytes,4,rep,name=label,proto3" json:"label,omitempty"` // 标签
	// contains filtered or unexported fields
}

更新成员的请求

func (*ElementUpdateRequest) Descriptor deprecated

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

Deprecated: Use ElementUpdateRequest.ProtoReflect.Descriptor instead.

func (*ElementUpdateRequest) GetAlias

func (x *ElementUpdateRequest) GetAlias() string

func (*ElementUpdateRequest) GetKey

func (x *ElementUpdateRequest) GetKey() string

func (*ElementUpdateRequest) GetLabel

func (x *ElementUpdateRequest) GetLabel() []string

func (*ElementUpdateRequest) GetUuid

func (x *ElementUpdateRequest) GetUuid() string

func (*ElementUpdateRequest) ProtoMessage

func (*ElementUpdateRequest) ProtoMessage()

func (*ElementUpdateRequest) ProtoReflect

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

func (*ElementUpdateRequest) Reset

func (x *ElementUpdateRequest) Reset()

func (*ElementUpdateRequest) String

func (x *ElementUpdateRequest) String() string

type ElementWhereRequest

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

获取成员所在的集合的请求

func (*ElementWhereRequest) Descriptor deprecated

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

Deprecated: Use ElementWhereRequest.ProtoReflect.Descriptor instead.

func (*ElementWhereRequest) GetKey

func (x *ElementWhereRequest) GetKey() string

func (*ElementWhereRequest) ProtoMessage

func (*ElementWhereRequest) ProtoMessage()

func (*ElementWhereRequest) ProtoReflect

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

func (*ElementWhereRequest) Reset

func (x *ElementWhereRequest) Reset()

func (*ElementWhereRequest) String

func (x *ElementWhereRequest) String() string

type ElementWhereResponse

type ElementWhereResponse struct {
	Status *Status           `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Uuid   map[string]string ``                                                                  // 在各集合中的UUID
	/* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

获取成员所在的集合的回复

func (*ElementWhereResponse) Descriptor deprecated

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

Deprecated: Use ElementWhereResponse.ProtoReflect.Descriptor instead.

func (*ElementWhereResponse) GetStatus

func (x *ElementWhereResponse) GetStatus() *Status

func (*ElementWhereResponse) GetUuid

func (x *ElementWhereResponse) GetUuid() map[string]string

func (*ElementWhereResponse) ProtoMessage

func (*ElementWhereResponse) ProtoMessage()

func (*ElementWhereResponse) ProtoReflect

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

func (*ElementWhereResponse) Reset

func (x *ElementWhereResponse) Reset()

func (*ElementWhereResponse) String

func (x *ElementWhereResponse) String() string

type HealthyHandler added in v1.2.0

type HealthyHandler interface {
	// 回显
	Echo(context.Context, *EchoRequest, *EchoResponse) error
}

type HealthyService added in v1.2.0

type HealthyService interface {
	// 回显
	Echo(ctx context.Context, in *EchoRequest, opts ...client.CallOption) (*EchoResponse, error)
}

func NewHealthyService added in v1.2.0

func NewHealthyService(name string, c client.Client) HealthyService

type Status

type Status struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`      // 状态码
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态信息
	// contains filtered or unexported fields
}

状态

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCode

func (x *Status) GetCode() int32

func (*Status) GetMessage

func (x *Status) GetMessage() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type UuidResponse

type UuidResponse struct {
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Uuid   string  `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`     // uuid
	// contains filtered or unexported fields
}

Uuid回复

func (*UuidResponse) Descriptor deprecated

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

Deprecated: Use UuidResponse.ProtoReflect.Descriptor instead.

func (*UuidResponse) GetStatus

func (x *UuidResponse) GetStatus() *Status

func (*UuidResponse) GetUuid

func (x *UuidResponse) GetUuid() string

func (*UuidResponse) ProtoMessage

func (*UuidResponse) ProtoMessage()

func (*UuidResponse) ProtoReflect

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

func (*UuidResponse) Reset

func (x *UuidResponse) Reset()

func (*UuidResponse) String

func (x *UuidResponse) String() string

Jump to

Keyboard shortcuts

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