Documentation ¶
Index ¶
- func RegisterService(s giraffe_micro.Server, srv Service)
- type Client
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)
- func (m *CreateRequest) GetDescription() string
- func (m *CreateRequest) GetId() string
- func (m *CreateRequest) GetName() string
- func (m *CreateRequest) GetObjectId() string
- func (m *CreateRequest) GetReadonly() string
- func (m *CreateRequest) GetRequired() string
- func (m *CreateRequest) GetTag() []string
- func (m *CreateRequest) GetTips() string
- func (m *CreateRequest) GetUnique() string
- func (m *CreateRequest) GetValue() *cmdb.ObjectAttrValue
- 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.ObjectAttr
- 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 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.ObjectAttr, error)
}
Client is the client API for object_attribute 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 { // //模型Id ObjectId string `protobuf:"bytes,1,opt,name=objectId,proto3" json:"objectId" form:"objectId"` // //属性ID Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id" form:"id"` // //属性名称 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name" form:"name"` // //'true' 唯一属性 Unique string `protobuf:"bytes,4,opt,name=unique,proto3" json:"unique" form:"unique"` // //'true' 只读属性,'false' 可写属性 Readonly string `protobuf:"bytes,5,opt,name=readonly,proto3" json:"readonly" form:"readonly"` // //'true' 必填属性,'false' 非必填属性 Required string `protobuf:"bytes,6,opt,name=required,proto3" json:"required" form:"required"` // //属性分类 Tag []string `protobuf:"bytes,7,rep,name=tag,proto3" json:"tag" form:"tag"` // //属性的描述 Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description" form:"description"` // //属性的提示 Tips string `protobuf:"bytes,9,opt,name=tips,proto3" json:"tips" form:"tips"` // //属性值类型,不同类型有不同字段 Value *cmdb.ObjectAttrValue `protobuf:"bytes,10,opt,name=value,proto3" json:"value" form:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Create请求
func (*CreateRequest) Descriptor ¶
func (*CreateRequest) Descriptor() ([]byte, []int)
func (*CreateRequest) GetDescription ¶
func (m *CreateRequest) GetDescription() string
func (*CreateRequest) GetId ¶
func (m *CreateRequest) GetId() string
func (*CreateRequest) GetName ¶
func (m *CreateRequest) GetName() string
func (*CreateRequest) GetObjectId ¶
func (m *CreateRequest) GetObjectId() string
func (*CreateRequest) GetReadonly ¶
func (m *CreateRequest) GetReadonly() string
func (*CreateRequest) GetRequired ¶
func (m *CreateRequest) GetRequired() string
func (*CreateRequest) GetTag ¶
func (m *CreateRequest) GetTag() []string
func (*CreateRequest) GetTips ¶
func (m *CreateRequest) GetTips() string
func (*CreateRequest) GetUnique ¶
func (m *CreateRequest) GetUnique() string
func (*CreateRequest) GetValue ¶
func (m *CreateRequest) GetValue() *cmdb.ObjectAttrValue
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.ObjectAttr `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.ObjectAttr
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 Service ¶
type Service interface {
Create(context.Context, *CreateRequest) (*cmdb.ObjectAttr, error)
}
Service is the server API for object_attribute service.
Click to show internal directories.
Click to hide internal directories.