Documentation ¶
Index ¶
- func RegisterService(s giraffe_micro.Server, srv Service)
- type Client
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)
- func (m *CreateRequest) GetLeftDescription() string
- func (m *CreateRequest) GetLeftGroups() []string
- func (m *CreateRequest) GetLeftId() string
- func (m *CreateRequest) GetLeftMax() int32
- func (m *CreateRequest) GetLeftMin() int32
- func (m *CreateRequest) GetLeftObjectId() string
- func (m *CreateRequest) GetLeftTags() []string
- func (m *CreateRequest) GetName() string
- func (m *CreateRequest) GetRightDescription() string
- func (m *CreateRequest) GetRightGroups() []string
- func (m *CreateRequest) GetRightId() string
- func (m *CreateRequest) GetRightMax() int32
- func (m *CreateRequest) GetRightMin() int32
- func (m *CreateRequest) GetRightObjectId() string
- func (m *CreateRequest) GetRightTags() []string
- func (*CreateRequest) ProtoMessage()
- func (m *CreateRequest) Reset()
- func (m *CreateRequest) String() string
- func (this *CreateRequest) Validate() error
- func (m *CreateRequest) XXX_DiscardUnknown()
- func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateRequest) XXX_Merge(src proto.Message)
- func (m *CreateRequest) XXX_Size() int
- func (m *CreateRequest) XXX_Unmarshal(b []byte) error
- type CreateResponseWrapper
- func (*CreateResponseWrapper) Descriptor() ([]byte, []int)
- func (m *CreateResponseWrapper) GetCode() int32
- func (m *CreateResponseWrapper) GetCodeExplain() string
- func (m *CreateResponseWrapper) GetData() *cmdb.ObjectRelation
- func (m *CreateResponseWrapper) GetError() string
- func (*CreateResponseWrapper) ProtoMessage()
- func (m *CreateResponseWrapper) Reset()
- func (m *CreateResponseWrapper) String() string
- func (this *CreateResponseWrapper) Validate() error
- func (m *CreateResponseWrapper) XXX_DiscardUnknown()
- func (m *CreateResponseWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateResponseWrapper) XXX_Merge(src proto.Message)
- func (m *CreateResponseWrapper) XXX_Size() int
- func (m *CreateResponseWrapper) XXX_Unmarshal(b []byte) error
- type GetRelationsByGroupIdRequest
- func (*GetRelationsByGroupIdRequest) Descriptor() ([]byte, []int)
- func (m *GetRelationsByGroupIdRequest) GetGroupId() string
- func (m *GetRelationsByGroupIdRequest) GetObjectId() string
- func (*GetRelationsByGroupIdRequest) ProtoMessage()
- func (m *GetRelationsByGroupIdRequest) Reset()
- func (m *GetRelationsByGroupIdRequest) String() string
- func (this *GetRelationsByGroupIdRequest) Validate() error
- func (m *GetRelationsByGroupIdRequest) XXX_DiscardUnknown()
- func (m *GetRelationsByGroupIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRelationsByGroupIdRequest) XXX_Merge(src proto.Message)
- func (m *GetRelationsByGroupIdRequest) XXX_Size() int
- func (m *GetRelationsByGroupIdRequest) XXX_Unmarshal(b []byte) error
- type GetRelationsByGroupIdResponse
- func (*GetRelationsByGroupIdResponse) Descriptor() ([]byte, []int)
- func (m *GetRelationsByGroupIdResponse) GetCode() int32
- func (m *GetRelationsByGroupIdResponse) GetData() []*cmdb.ObjectRelation
- func (m *GetRelationsByGroupIdResponse) GetError() string
- func (m *GetRelationsByGroupIdResponse) GetMessage() string
- func (*GetRelationsByGroupIdResponse) ProtoMessage()
- func (m *GetRelationsByGroupIdResponse) Reset()
- func (m *GetRelationsByGroupIdResponse) String() string
- func (this *GetRelationsByGroupIdResponse) Validate() error
- func (m *GetRelationsByGroupIdResponse) XXX_DiscardUnknown()
- func (m *GetRelationsByGroupIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRelationsByGroupIdResponse) XXX_Merge(src proto.Message)
- func (m *GetRelationsByGroupIdResponse) XXX_Size() int
- func (m *GetRelationsByGroupIdResponse) XXX_Unmarshal(b []byte) error
- type GetRelationsByGroupIdResponseWrapper
- func (*GetRelationsByGroupIdResponseWrapper) Descriptor() ([]byte, []int)
- func (m *GetRelationsByGroupIdResponseWrapper) GetCode() int32
- func (m *GetRelationsByGroupIdResponseWrapper) GetCodeExplain() string
- func (m *GetRelationsByGroupIdResponseWrapper) GetData() *GetRelationsByGroupIdResponse
- func (m *GetRelationsByGroupIdResponseWrapper) GetError() string
- func (*GetRelationsByGroupIdResponseWrapper) ProtoMessage()
- func (m *GetRelationsByGroupIdResponseWrapper) Reset()
- func (m *GetRelationsByGroupIdResponseWrapper) String() string
- func (this *GetRelationsByGroupIdResponseWrapper) Validate() error
- func (m *GetRelationsByGroupIdResponseWrapper) XXX_DiscardUnknown()
- func (m *GetRelationsByGroupIdResponseWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRelationsByGroupIdResponseWrapper) XXX_Merge(src proto.Message)
- func (m *GetRelationsByGroupIdResponseWrapper) XXX_Size() int
- func (m *GetRelationsByGroupIdResponseWrapper) XXX_Unmarshal(b []byte) error
- type ObjectRelationSnapshotRequest
- func (*ObjectRelationSnapshotRequest) Descriptor() ([]byte, []int)
- func (m *ObjectRelationSnapshotRequest) GetRelationId() string
- func (m *ObjectRelationSnapshotRequest) GetXVersion() int32
- func (*ObjectRelationSnapshotRequest) ProtoMessage()
- func (m *ObjectRelationSnapshotRequest) Reset()
- func (m *ObjectRelationSnapshotRequest) String() string
- func (this *ObjectRelationSnapshotRequest) Validate() error
- func (m *ObjectRelationSnapshotRequest) XXX_DiscardUnknown()
- func (m *ObjectRelationSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ObjectRelationSnapshotRequest) XXX_Merge(src proto.Message)
- func (m *ObjectRelationSnapshotRequest) XXX_Size() int
- func (m *ObjectRelationSnapshotRequest) XXX_Unmarshal(b []byte) error
- type ObjectRelationSnapshotResponse
- func (*ObjectRelationSnapshotResponse) Descriptor() ([]byte, []int)
- func (m *ObjectRelationSnapshotResponse) GetCreator() string
- func (m *ObjectRelationSnapshotResponse) GetCtime() string
- func (m *ObjectRelationSnapshotResponse) GetIsInherit() bool
- func (m *ObjectRelationSnapshotResponse) GetLeftDescription() string
- func (m *ObjectRelationSnapshotResponse) GetLeftGroups() []string
- func (m *ObjectRelationSnapshotResponse) GetLeftId() string
- func (m *ObjectRelationSnapshotResponse) GetLeftMax() int32
- func (m *ObjectRelationSnapshotResponse) GetLeftMin() int32
- func (m *ObjectRelationSnapshotResponse) GetLeftName() string
- func (m *ObjectRelationSnapshotResponse) GetLeftObjectId() string
- func (m *ObjectRelationSnapshotResponse) GetLeftTags() []string
- func (m *ObjectRelationSnapshotResponse) GetName() string
- func (m *ObjectRelationSnapshotResponse) GetProtected() bool
- func (m *ObjectRelationSnapshotResponse) GetRelationId() string
- func (m *ObjectRelationSnapshotResponse) GetRightDescription() string
- func (m *ObjectRelationSnapshotResponse) GetRightGroups() []string
- func (m *ObjectRelationSnapshotResponse) GetRightId() string
- func (m *ObjectRelationSnapshotResponse) GetRightMax() int32
- func (m *ObjectRelationSnapshotResponse) GetRightMin() int32
- func (m *ObjectRelationSnapshotResponse) GetRightName() string
- func (m *ObjectRelationSnapshotResponse) GetRightObjectId() string
- func (m *ObjectRelationSnapshotResponse) GetRightTags() []string
- func (m *ObjectRelationSnapshotResponse) GetXId() string
- func (m *ObjectRelationSnapshotResponse) GetXTs() int32
- func (m *ObjectRelationSnapshotResponse) GetXVersion() int32
- func (*ObjectRelationSnapshotResponse) ProtoMessage()
- func (m *ObjectRelationSnapshotResponse) Reset()
- func (m *ObjectRelationSnapshotResponse) String() string
- func (this *ObjectRelationSnapshotResponse) Validate() error
- func (m *ObjectRelationSnapshotResponse) XXX_DiscardUnknown()
- func (m *ObjectRelationSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ObjectRelationSnapshotResponse) XXX_Merge(src proto.Message)
- func (m *ObjectRelationSnapshotResponse) XXX_Size() int
- func (m *ObjectRelationSnapshotResponse) XXX_Unmarshal(b []byte) error
- type ObjectRelationSnapshotResponseWrapper
- func (*ObjectRelationSnapshotResponseWrapper) Descriptor() ([]byte, []int)
- func (m *ObjectRelationSnapshotResponseWrapper) GetCode() int32
- func (m *ObjectRelationSnapshotResponseWrapper) GetCodeExplain() string
- func (m *ObjectRelationSnapshotResponseWrapper) GetData() *ObjectRelationSnapshotResponse
- func (m *ObjectRelationSnapshotResponseWrapper) GetError() string
- func (*ObjectRelationSnapshotResponseWrapper) ProtoMessage()
- func (m *ObjectRelationSnapshotResponseWrapper) Reset()
- func (m *ObjectRelationSnapshotResponseWrapper) String() string
- func (this *ObjectRelationSnapshotResponseWrapper) Validate() error
- func (m *ObjectRelationSnapshotResponseWrapper) XXX_DiscardUnknown()
- func (m *ObjectRelationSnapshotResponseWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ObjectRelationSnapshotResponseWrapper) XXX_Merge(src proto.Message)
- func (m *ObjectRelationSnapshotResponseWrapper) XXX_Size() int
- func (m *ObjectRelationSnapshotResponseWrapper) XXX_Unmarshal(b []byte) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterService ¶
func RegisterService(s giraffe_micro.Server, srv Service)
Types ¶
type Client ¶
type Client interface { Create(ctx context.Context, in *CreateRequest) (*cmdb.ObjectRelation, error) ObjectRelationSnapshot(ctx context.Context, in *ObjectRelationSnapshotRequest) (*ObjectRelationSnapshotResponse, error) GetRelationsByGroupId(ctx context.Context, in *GetRelationsByGroupIdRequest) (*GetRelationsByGroupIdResponse, error) }
Client is the client API for object_relation service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClient ¶
func NewClient(c giraffe_micro.Client) Client
type CreateRequest ¶
type CreateRequest struct { // //关系名称, 不是必填, 而且在引入了 left_description 和 right_description 之后这个字段几乎处于废弃状态 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name"` // //关系左端的模型ID LeftObjectId string `protobuf:"bytes,2,opt,name=left_object_id,json=leftObjectId,proto3" json:"left_object_id" form:"left_object_id"` // //关系左端模型中表达右端模型实例的别名字段: 比如应用的负责人需要在应用的实例中表达出一个字段; 对已有模型添加关系时这个ID需要加下划线前缀避免冲突 LeftId string `protobuf:"bytes,3,opt,name=left_id,json=leftId,proto3" json:"left_id" form:"left_id"` // //是与 left_id 相反的含义, 但仅用于前端展示 (p.s.: 关系左端模型的描述) LeftDescription string `protobuf:"bytes,4,opt,name=left_description,json=leftDescription,proto3" json:"left_description" form:"left_description"` // //关系左端的资源模型实例至少包含多少数量的关系: 目前来说这个字段是过度设计的字段, 一般填0就好了 LeftMin int32 `protobuf:"varint,5,opt,name=left_min,json=leftMin,proto3" json:"left_min" form:"left_min"` // //关系左端的资源模型实例最多包含多少数量的关系: 有数据库级别的索引支持, 一般情况填1 或者 -1, -1表示无限多 LeftMax int32 `protobuf:"varint,6,opt,name=left_max,json=leftMax,proto3" json:"left_max" form:"left_max"` // //关系在左端模型的哪些分组里 LeftGroups []string `protobuf:"bytes,7,rep,name=left_groups,json=leftGroups,proto3" json:"left_groups" form:"left_groups"` // //关系左端标签 LeftTags []string `protobuf:"bytes,8,rep,name=left_tags,json=leftTags,proto3" json:"left_tags" form:"left_tags"` // //关系右端的模型ID RightObjectId string `protobuf:"bytes,9,opt,name=right_object_id,json=rightObjectId,proto3" json:"right_object_id" form:"right_object_id"` // //关系右端模型中表达左端模型实例的别名字段: 比如应用的负责人需要在应用的实例中表达出一个字段; 对已有模型添加关系时这个ID需要加下划线前缀避免冲突 RightId string `protobuf:"bytes,10,opt,name=right_id,json=rightId,proto3" json:"right_id" form:"right_id"` // //是与 right_id 相反的含义, 但仅用于前端展示 (p.s.: 关系右端模型的描述) RightDescription string `protobuf:"bytes,11,opt,name=right_description,json=rightDescription,proto3" json:"right_description" form:"right_description"` // //关系右端的资源模型实例至少包含多少数量的关系: 目前来说这个字段是过度设计的字段, 一般填 0 就好了 RightMin int32 `protobuf:"varint,12,opt,name=right_min,json=rightMin,proto3" json:"right_min" form:"right_min"` // //关系右端的资源模型实例最多包含多少数量的关系: 有数据库级别的索引支持, 一般情况填 1 或者 -1, -1表示无限多 RightMax int32 `protobuf:"varint,13,opt,name=right_max,json=rightMax,proto3" json:"right_max" form:"right_max"` // //关系在右端模型的哪些分组里 RightGroups []string `protobuf:"bytes,14,rep,name=right_groups,json=rightGroups,proto3" json:"right_groups" form:"right_groups"` // //关系右端标签 RightTags []string `protobuf:"bytes,15,rep,name=right_tags,json=rightTags,proto3" json:"right_tags" form:"right_tags"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Create请求
func (*CreateRequest) Descriptor ¶
func (*CreateRequest) Descriptor() ([]byte, []int)
func (*CreateRequest) GetLeftDescription ¶
func (m *CreateRequest) GetLeftDescription() string
func (*CreateRequest) GetLeftGroups ¶
func (m *CreateRequest) GetLeftGroups() []string
func (*CreateRequest) GetLeftId ¶
func (m *CreateRequest) GetLeftId() string
func (*CreateRequest) GetLeftMax ¶
func (m *CreateRequest) GetLeftMax() int32
func (*CreateRequest) GetLeftMin ¶
func (m *CreateRequest) GetLeftMin() int32
func (*CreateRequest) GetLeftObjectId ¶
func (m *CreateRequest) GetLeftObjectId() string
func (*CreateRequest) GetLeftTags ¶
func (m *CreateRequest) GetLeftTags() []string
func (*CreateRequest) GetName ¶
func (m *CreateRequest) GetName() string
func (*CreateRequest) GetRightDescription ¶
func (m *CreateRequest) GetRightDescription() string
func (*CreateRequest) GetRightGroups ¶
func (m *CreateRequest) GetRightGroups() []string
func (*CreateRequest) GetRightId ¶
func (m *CreateRequest) GetRightId() string
func (*CreateRequest) GetRightMax ¶
func (m *CreateRequest) GetRightMax() int32
func (*CreateRequest) GetRightMin ¶
func (m *CreateRequest) GetRightMin() int32
func (*CreateRequest) GetRightObjectId ¶
func (m *CreateRequest) GetRightObjectId() string
func (*CreateRequest) GetRightTags ¶
func (m *CreateRequest) GetRightTags() []string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) Reset ¶
func (m *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (m *CreateRequest) String() string
func (*CreateRequest) Validate ¶
func (this *CreateRequest) Validate() error
func (*CreateRequest) XXX_DiscardUnknown ¶
func (m *CreateRequest) XXX_DiscardUnknown()
func (*CreateRequest) XXX_Marshal ¶
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateRequest) XXX_Merge ¶
func (m *CreateRequest) XXX_Merge(src proto.Message)
func (*CreateRequest) XXX_Size ¶
func (m *CreateRequest) XXX_Size() int
func (*CreateRequest) XXX_Unmarshal ¶
func (m *CreateRequest) XXX_Unmarshal(b []byte) error
type CreateResponseWrapper ¶
type CreateResponseWrapper struct { // //返回码 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"` // //返回码解释 CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"` // //错误详情 Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"` // //返回数据 Data *cmdb.ObjectRelation `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CreateApi返回
func (*CreateResponseWrapper) Descriptor ¶
func (*CreateResponseWrapper) Descriptor() ([]byte, []int)
func (*CreateResponseWrapper) GetCode ¶
func (m *CreateResponseWrapper) GetCode() int32
func (*CreateResponseWrapper) GetCodeExplain ¶
func (m *CreateResponseWrapper) GetCodeExplain() string
func (*CreateResponseWrapper) GetData ¶
func (m *CreateResponseWrapper) GetData() *cmdb.ObjectRelation
func (*CreateResponseWrapper) GetError ¶
func (m *CreateResponseWrapper) GetError() string
func (*CreateResponseWrapper) ProtoMessage ¶
func (*CreateResponseWrapper) ProtoMessage()
func (*CreateResponseWrapper) Reset ¶
func (m *CreateResponseWrapper) Reset()
func (*CreateResponseWrapper) String ¶
func (m *CreateResponseWrapper) String() string
func (*CreateResponseWrapper) Validate ¶
func (this *CreateResponseWrapper) Validate() error
func (*CreateResponseWrapper) XXX_DiscardUnknown ¶
func (m *CreateResponseWrapper) XXX_DiscardUnknown()
func (*CreateResponseWrapper) XXX_Marshal ¶
func (m *CreateResponseWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateResponseWrapper) XXX_Merge ¶
func (m *CreateResponseWrapper) XXX_Merge(src proto.Message)
func (*CreateResponseWrapper) XXX_Size ¶
func (m *CreateResponseWrapper) XXX_Size() int
func (*CreateResponseWrapper) XXX_Unmarshal ¶
func (m *CreateResponseWrapper) XXX_Unmarshal(b []byte) error
type GetRelationsByGroupIdRequest ¶
type GetRelationsByGroupIdRequest struct { // //模型ID ObjectId string `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id" form:"object_id"` // //分组ID GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id" form:"group_id"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
GetRelationsByGroupId请求
func (*GetRelationsByGroupIdRequest) Descriptor ¶
func (*GetRelationsByGroupIdRequest) Descriptor() ([]byte, []int)
func (*GetRelationsByGroupIdRequest) GetGroupId ¶
func (m *GetRelationsByGroupIdRequest) GetGroupId() string
func (*GetRelationsByGroupIdRequest) GetObjectId ¶
func (m *GetRelationsByGroupIdRequest) GetObjectId() string
func (*GetRelationsByGroupIdRequest) ProtoMessage ¶
func (*GetRelationsByGroupIdRequest) ProtoMessage()
func (*GetRelationsByGroupIdRequest) Reset ¶
func (m *GetRelationsByGroupIdRequest) Reset()
func (*GetRelationsByGroupIdRequest) String ¶
func (m *GetRelationsByGroupIdRequest) String() string
func (*GetRelationsByGroupIdRequest) Validate ¶
func (this *GetRelationsByGroupIdRequest) Validate() error
func (*GetRelationsByGroupIdRequest) XXX_DiscardUnknown ¶
func (m *GetRelationsByGroupIdRequest) XXX_DiscardUnknown()
func (*GetRelationsByGroupIdRequest) XXX_Marshal ¶
func (m *GetRelationsByGroupIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRelationsByGroupIdRequest) XXX_Merge ¶
func (m *GetRelationsByGroupIdRequest) XXX_Merge(src proto.Message)
func (*GetRelationsByGroupIdRequest) XXX_Size ¶
func (m *GetRelationsByGroupIdRequest) XXX_Size() int
func (*GetRelationsByGroupIdRequest) XXX_Unmarshal ¶
func (m *GetRelationsByGroupIdRequest) XXX_Unmarshal(b []byte) error
type GetRelationsByGroupIdResponse ¶
type GetRelationsByGroupIdResponse struct { // //返回码 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"` // //页码 Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error" form:"error"` // //返回信息 Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message" form:"message"` // //数据 Data []*cmdb.ObjectRelation `protobuf:"bytes,4,rep,name=data,proto3" json:"data" form:"data"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
GetRelationsByGroupId返回
func (*GetRelationsByGroupIdResponse) Descriptor ¶
func (*GetRelationsByGroupIdResponse) Descriptor() ([]byte, []int)
func (*GetRelationsByGroupIdResponse) GetCode ¶
func (m *GetRelationsByGroupIdResponse) GetCode() int32
func (*GetRelationsByGroupIdResponse) GetData ¶
func (m *GetRelationsByGroupIdResponse) GetData() []*cmdb.ObjectRelation
func (*GetRelationsByGroupIdResponse) GetError ¶
func (m *GetRelationsByGroupIdResponse) GetError() string
func (*GetRelationsByGroupIdResponse) GetMessage ¶
func (m *GetRelationsByGroupIdResponse) GetMessage() string
func (*GetRelationsByGroupIdResponse) ProtoMessage ¶
func (*GetRelationsByGroupIdResponse) ProtoMessage()
func (*GetRelationsByGroupIdResponse) Reset ¶
func (m *GetRelationsByGroupIdResponse) Reset()
func (*GetRelationsByGroupIdResponse) String ¶
func (m *GetRelationsByGroupIdResponse) String() string
func (*GetRelationsByGroupIdResponse) Validate ¶
func (this *GetRelationsByGroupIdResponse) Validate() error
func (*GetRelationsByGroupIdResponse) XXX_DiscardUnknown ¶
func (m *GetRelationsByGroupIdResponse) XXX_DiscardUnknown()
func (*GetRelationsByGroupIdResponse) XXX_Marshal ¶
func (m *GetRelationsByGroupIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRelationsByGroupIdResponse) XXX_Merge ¶
func (m *GetRelationsByGroupIdResponse) XXX_Merge(src proto.Message)
func (*GetRelationsByGroupIdResponse) XXX_Size ¶
func (m *GetRelationsByGroupIdResponse) XXX_Size() int
func (*GetRelationsByGroupIdResponse) XXX_Unmarshal ¶
func (m *GetRelationsByGroupIdResponse) XXX_Unmarshal(b []byte) error
type GetRelationsByGroupIdResponseWrapper ¶
type GetRelationsByGroupIdResponseWrapper struct { // //返回码 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"` // //返回码解释 CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"` // //错误详情 Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"` // //返回数据 Data *GetRelationsByGroupIdResponse `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
GetRelationsByGroupIdApi返回
func (*GetRelationsByGroupIdResponseWrapper) Descriptor ¶
func (*GetRelationsByGroupIdResponseWrapper) Descriptor() ([]byte, []int)
func (*GetRelationsByGroupIdResponseWrapper) GetCode ¶
func (m *GetRelationsByGroupIdResponseWrapper) GetCode() int32
func (*GetRelationsByGroupIdResponseWrapper) GetCodeExplain ¶
func (m *GetRelationsByGroupIdResponseWrapper) GetCodeExplain() string
func (*GetRelationsByGroupIdResponseWrapper) GetData ¶
func (m *GetRelationsByGroupIdResponseWrapper) GetData() *GetRelationsByGroupIdResponse
func (*GetRelationsByGroupIdResponseWrapper) GetError ¶
func (m *GetRelationsByGroupIdResponseWrapper) GetError() string
func (*GetRelationsByGroupIdResponseWrapper) ProtoMessage ¶
func (*GetRelationsByGroupIdResponseWrapper) ProtoMessage()
func (*GetRelationsByGroupIdResponseWrapper) Reset ¶
func (m *GetRelationsByGroupIdResponseWrapper) Reset()
func (*GetRelationsByGroupIdResponseWrapper) String ¶
func (m *GetRelationsByGroupIdResponseWrapper) String() string
func (*GetRelationsByGroupIdResponseWrapper) Validate ¶
func (this *GetRelationsByGroupIdResponseWrapper) Validate() error
func (*GetRelationsByGroupIdResponseWrapper) XXX_DiscardUnknown ¶
func (m *GetRelationsByGroupIdResponseWrapper) XXX_DiscardUnknown()
func (*GetRelationsByGroupIdResponseWrapper) XXX_Marshal ¶
func (m *GetRelationsByGroupIdResponseWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRelationsByGroupIdResponseWrapper) XXX_Merge ¶
func (m *GetRelationsByGroupIdResponseWrapper) XXX_Merge(src proto.Message)
func (*GetRelationsByGroupIdResponseWrapper) XXX_Size ¶
func (m *GetRelationsByGroupIdResponseWrapper) XXX_Size() int
func (*GetRelationsByGroupIdResponseWrapper) XXX_Unmarshal ¶
func (m *GetRelationsByGroupIdResponseWrapper) XXX_Unmarshal(b []byte) error
type ObjectRelationSnapshotRequest ¶
type ObjectRelationSnapshotRequest struct { // //关系ID RelationId string `protobuf:"bytes,1,opt,name=relation_id,json=relationId,proto3" json:"relation_id" form:"relation_id"` // //版本号(-1表示查询最新版本) XVersion int32 `protobuf:"varint,2,opt,name=_version,json=Version,proto3" json:"_version" form:"_version"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ObjectRelationSnapshot请求
func (*ObjectRelationSnapshotRequest) Descriptor ¶
func (*ObjectRelationSnapshotRequest) Descriptor() ([]byte, []int)
func (*ObjectRelationSnapshotRequest) GetRelationId ¶
func (m *ObjectRelationSnapshotRequest) GetRelationId() string
func (*ObjectRelationSnapshotRequest) GetXVersion ¶
func (m *ObjectRelationSnapshotRequest) GetXVersion() int32
func (*ObjectRelationSnapshotRequest) ProtoMessage ¶
func (*ObjectRelationSnapshotRequest) ProtoMessage()
func (*ObjectRelationSnapshotRequest) Reset ¶
func (m *ObjectRelationSnapshotRequest) Reset()
func (*ObjectRelationSnapshotRequest) String ¶
func (m *ObjectRelationSnapshotRequest) String() string
func (*ObjectRelationSnapshotRequest) Validate ¶
func (this *ObjectRelationSnapshotRequest) Validate() error
func (*ObjectRelationSnapshotRequest) XXX_DiscardUnknown ¶
func (m *ObjectRelationSnapshotRequest) XXX_DiscardUnknown()
func (*ObjectRelationSnapshotRequest) XXX_Marshal ¶
func (m *ObjectRelationSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObjectRelationSnapshotRequest) XXX_Merge ¶
func (m *ObjectRelationSnapshotRequest) XXX_Merge(src proto.Message)
func (*ObjectRelationSnapshotRequest) XXX_Size ¶
func (m *ObjectRelationSnapshotRequest) XXX_Size() int
func (*ObjectRelationSnapshotRequest) XXX_Unmarshal ¶
func (m *ObjectRelationSnapshotRequest) XXX_Unmarshal(b []byte) error
type ObjectRelationSnapshotResponse ¶
type ObjectRelationSnapshotResponse struct { // //快照ID XId string `protobuf:"bytes,1,opt,name=_id,json=Id,proto3" json:"_id" form:"_id"` // //关系名称, 不是必填, 而且在引入了 left_description 和 right_description 之后这个字段几乎处于废弃状态 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" form:"name"` // //true 内置关系 Protected bool `protobuf:"varint,3,opt,name=protected,proto3" json:"protected" form:"protected"` // //必须全局唯一: 新添加的关系ID字段建议增加下划线前缀 RelationId string `protobuf:"bytes,4,opt,name=relation_id,json=relationId,proto3" json:"relation_id" form:"relation_id"` // //关系右端模型中表达左端模型实例的别名字段: 比如应用的负责人需要在应用的实例中表达出一个字段; 对已有模型添加关系时这个ID需要加下划线前缀避免冲突 RightId string `protobuf:"bytes,5,opt,name=right_id,json=rightId,proto3" json:"right_id" form:"right_id"` // //是与 right_id 对应的含义, 但仅用于前端展示 RightName string `protobuf:"bytes,6,opt,name=right_name,json=rightName,proto3" json:"right_name" form:"right_name"` // //是与 right_id 相反的含义, 但仅用于前端展示 (p.s.: 关系右端模型的描述) RightDescription string `protobuf:"bytes,7,opt,name=right_description,json=rightDescription,proto3" json:"right_description" form:"right_description"` // //关系在右端模型的哪些分组里 RightGroups []string `protobuf:"bytes,8,rep,name=right_groups,json=rightGroups,proto3" json:"right_groups" form:"right_groups"` // //关系右端标签 RightTags []string `protobuf:"bytes,9,rep,name=right_tags,json=rightTags,proto3" json:"right_tags" form:"right_tags"` // //关系右端的资源模型实例最多包含多少数量的关系: 有数据库级别的索引支持, 一般情况填 1 或者 -1, -1表示无限多 RightMax int32 `protobuf:"varint,10,opt,name=right_max,json=rightMax,proto3" json:"right_max" form:"right_max"` // //关系右端的资源模型实例至少包含多少数量的关系: 目前来说这个字段是过度设计的字段, 一般填 0 就好了 RightMin int32 `protobuf:"varint,11,opt,name=right_min,json=rightMin,proto3" json:"right_min" form:"right_min"` // //关系右端的模型ID RightObjectId string `protobuf:"bytes,12,opt,name=right_object_id,json=rightObjectId,proto3" json:"right_object_id" form:"right_object_id"` // //关系左端模型中表达右端模型实例的别名字段: 比如应用的负责人需要在应用的实例中表达出一个字段; 对已有模型添加关系时这个ID需要加下划线前缀避免冲突 LeftId string `protobuf:"bytes,13,opt,name=left_id,json=leftId,proto3" json:"left_id" form:"left_id"` // //是与 left_id 对应的含义, 但仅用于前端展示 LeftName string `protobuf:"bytes,14,opt,name=left_name,json=leftName,proto3" json:"left_name" form:"left_name"` // //是与 left_id 相反的含义, 但仅用于前端展示 (p.s.: 关系左端模型的描述) LeftDescription string `protobuf:"bytes,15,opt,name=left_description,json=leftDescription,proto3" json:"left_description" form:"left_description"` // //关系在左端模型的哪些分组里 LeftGroups []string `protobuf:"bytes,16,rep,name=left_groups,json=leftGroups,proto3" json:"left_groups" form:"left_groups"` // //关系左端标签 LeftTags []string `protobuf:"bytes,17,rep,name=left_tags,json=leftTags,proto3" json:"left_tags" form:"left_tags"` // //关系左端的资源模型实例最多包含多少数量的关系: 有数据库级别的索引支持, 一般情况填1 或者 -1, -1表示无限多 LeftMax int32 `protobuf:"varint,18,opt,name=left_max,json=leftMax,proto3" json:"left_max" form:"left_max"` // //关系左端的资源模型实例至少包含多少数量的关系: 目前来说这个字段是过度设计的字段, 一般填0就好了 LeftMin int32 `protobuf:"varint,19,opt,name=left_min,json=leftMin,proto3" json:"left_min" form:"left_min"` // //关系左端的模型ID LeftObjectId string `protobuf:"bytes,20,opt,name=left_object_id,json=leftObjectId,proto3" json:"left_object_id" form:"left_object_id"` // //创建者 Creator string `protobuf:"bytes,21,opt,name=creator,proto3" json:"creator" form:"creator"` // //创建时间 Ctime string `protobuf:"bytes,22,opt,name=ctime,proto3" json:"ctime" form:"ctime"` // //创建时间的时间截 XTs int32 `protobuf:"varint,23,opt,name=_ts,json=Ts,proto3" json:"_ts" form:"_ts"` // //版本 XVersion int32 `protobuf:"varint,24,opt,name=_version,json=Version,proto3" json:"_version" form:"_version"` // //是否继承自父模型 IsInherit bool `protobuf:"varint,25,opt,name=isInherit,proto3" json:"isInherit" form:"isInherit"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ObjectRelationSnapshot返回
func (*ObjectRelationSnapshotResponse) Descriptor ¶
func (*ObjectRelationSnapshotResponse) Descriptor() ([]byte, []int)
func (*ObjectRelationSnapshotResponse) GetCreator ¶
func (m *ObjectRelationSnapshotResponse) GetCreator() string
func (*ObjectRelationSnapshotResponse) GetCtime ¶
func (m *ObjectRelationSnapshotResponse) GetCtime() string
func (*ObjectRelationSnapshotResponse) GetIsInherit ¶
func (m *ObjectRelationSnapshotResponse) GetIsInherit() bool
func (*ObjectRelationSnapshotResponse) GetLeftDescription ¶
func (m *ObjectRelationSnapshotResponse) GetLeftDescription() string
func (*ObjectRelationSnapshotResponse) GetLeftGroups ¶
func (m *ObjectRelationSnapshotResponse) GetLeftGroups() []string
func (*ObjectRelationSnapshotResponse) GetLeftId ¶
func (m *ObjectRelationSnapshotResponse) GetLeftId() string
func (*ObjectRelationSnapshotResponse) GetLeftMax ¶
func (m *ObjectRelationSnapshotResponse) GetLeftMax() int32
func (*ObjectRelationSnapshotResponse) GetLeftMin ¶
func (m *ObjectRelationSnapshotResponse) GetLeftMin() int32
func (*ObjectRelationSnapshotResponse) GetLeftName ¶
func (m *ObjectRelationSnapshotResponse) GetLeftName() string
func (*ObjectRelationSnapshotResponse) GetLeftObjectId ¶
func (m *ObjectRelationSnapshotResponse) GetLeftObjectId() string
func (*ObjectRelationSnapshotResponse) GetLeftTags ¶
func (m *ObjectRelationSnapshotResponse) GetLeftTags() []string
func (*ObjectRelationSnapshotResponse) GetName ¶
func (m *ObjectRelationSnapshotResponse) GetName() string
func (*ObjectRelationSnapshotResponse) GetProtected ¶
func (m *ObjectRelationSnapshotResponse) GetProtected() bool
func (*ObjectRelationSnapshotResponse) GetRelationId ¶
func (m *ObjectRelationSnapshotResponse) GetRelationId() string
func (*ObjectRelationSnapshotResponse) GetRightDescription ¶
func (m *ObjectRelationSnapshotResponse) GetRightDescription() string
func (*ObjectRelationSnapshotResponse) GetRightGroups ¶
func (m *ObjectRelationSnapshotResponse) GetRightGroups() []string
func (*ObjectRelationSnapshotResponse) GetRightId ¶
func (m *ObjectRelationSnapshotResponse) GetRightId() string
func (*ObjectRelationSnapshotResponse) GetRightMax ¶
func (m *ObjectRelationSnapshotResponse) GetRightMax() int32
func (*ObjectRelationSnapshotResponse) GetRightMin ¶
func (m *ObjectRelationSnapshotResponse) GetRightMin() int32
func (*ObjectRelationSnapshotResponse) GetRightName ¶
func (m *ObjectRelationSnapshotResponse) GetRightName() string
func (*ObjectRelationSnapshotResponse) GetRightObjectId ¶
func (m *ObjectRelationSnapshotResponse) GetRightObjectId() string
func (*ObjectRelationSnapshotResponse) GetRightTags ¶
func (m *ObjectRelationSnapshotResponse) GetRightTags() []string
func (*ObjectRelationSnapshotResponse) GetXId ¶
func (m *ObjectRelationSnapshotResponse) GetXId() string
func (*ObjectRelationSnapshotResponse) GetXTs ¶
func (m *ObjectRelationSnapshotResponse) GetXTs() int32
func (*ObjectRelationSnapshotResponse) GetXVersion ¶
func (m *ObjectRelationSnapshotResponse) GetXVersion() int32
func (*ObjectRelationSnapshotResponse) ProtoMessage ¶
func (*ObjectRelationSnapshotResponse) ProtoMessage()
func (*ObjectRelationSnapshotResponse) Reset ¶
func (m *ObjectRelationSnapshotResponse) Reset()
func (*ObjectRelationSnapshotResponse) String ¶
func (m *ObjectRelationSnapshotResponse) String() string
func (*ObjectRelationSnapshotResponse) Validate ¶
func (this *ObjectRelationSnapshotResponse) Validate() error
func (*ObjectRelationSnapshotResponse) XXX_DiscardUnknown ¶
func (m *ObjectRelationSnapshotResponse) XXX_DiscardUnknown()
func (*ObjectRelationSnapshotResponse) XXX_Marshal ¶
func (m *ObjectRelationSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObjectRelationSnapshotResponse) XXX_Merge ¶
func (m *ObjectRelationSnapshotResponse) XXX_Merge(src proto.Message)
func (*ObjectRelationSnapshotResponse) XXX_Size ¶
func (m *ObjectRelationSnapshotResponse) XXX_Size() int
func (*ObjectRelationSnapshotResponse) XXX_Unmarshal ¶
func (m *ObjectRelationSnapshotResponse) XXX_Unmarshal(b []byte) error
type ObjectRelationSnapshotResponseWrapper ¶
type ObjectRelationSnapshotResponseWrapper struct { // //返回码 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"` // //返回码解释 CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"` // //错误详情 Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"` // //返回数据 Data *ObjectRelationSnapshotResponse `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ObjectRelationSnapshotApi返回
func (*ObjectRelationSnapshotResponseWrapper) Descriptor ¶
func (*ObjectRelationSnapshotResponseWrapper) Descriptor() ([]byte, []int)
func (*ObjectRelationSnapshotResponseWrapper) GetCode ¶
func (m *ObjectRelationSnapshotResponseWrapper) GetCode() int32
func (*ObjectRelationSnapshotResponseWrapper) GetCodeExplain ¶
func (m *ObjectRelationSnapshotResponseWrapper) GetCodeExplain() string
func (*ObjectRelationSnapshotResponseWrapper) GetData ¶
func (m *ObjectRelationSnapshotResponseWrapper) GetData() *ObjectRelationSnapshotResponse
func (*ObjectRelationSnapshotResponseWrapper) GetError ¶
func (m *ObjectRelationSnapshotResponseWrapper) GetError() string
func (*ObjectRelationSnapshotResponseWrapper) ProtoMessage ¶
func (*ObjectRelationSnapshotResponseWrapper) ProtoMessage()
func (*ObjectRelationSnapshotResponseWrapper) Reset ¶
func (m *ObjectRelationSnapshotResponseWrapper) Reset()
func (*ObjectRelationSnapshotResponseWrapper) String ¶
func (m *ObjectRelationSnapshotResponseWrapper) String() string
func (*ObjectRelationSnapshotResponseWrapper) Validate ¶
func (this *ObjectRelationSnapshotResponseWrapper) Validate() error
func (*ObjectRelationSnapshotResponseWrapper) XXX_DiscardUnknown ¶
func (m *ObjectRelationSnapshotResponseWrapper) XXX_DiscardUnknown()
func (*ObjectRelationSnapshotResponseWrapper) XXX_Marshal ¶
func (m *ObjectRelationSnapshotResponseWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObjectRelationSnapshotResponseWrapper) XXX_Merge ¶
func (m *ObjectRelationSnapshotResponseWrapper) XXX_Merge(src proto.Message)
func (*ObjectRelationSnapshotResponseWrapper) XXX_Size ¶
func (m *ObjectRelationSnapshotResponseWrapper) XXX_Size() int
func (*ObjectRelationSnapshotResponseWrapper) XXX_Unmarshal ¶
func (m *ObjectRelationSnapshotResponseWrapper) XXX_Unmarshal(b []byte) error
type Service ¶
type Service interface { Create(context.Context, *CreateRequest) (*cmdb.ObjectRelation, error) ObjectRelationSnapshot(context.Context, *ObjectRelationSnapshotRequest) (*ObjectRelationSnapshotResponse, error) GetRelationsByGroupId(context.Context, *GetRelationsByGroupIdRequest) (*GetRelationsByGroupIdResponse, error) }
Service is the server API for object_relation service.
Click to show internal directories.
Click to hide internal directories.