Documentation ¶
Overview ¶
Package v2 is a generated blademaster stub package. This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1.
It is generated from these files:
api/grpc/v2/user_resource.proto
Index ¶
- Constants
- Variables
- func RegisterUserResourceServer(s *grpc.Server, srv UserResourceServer)
- func RegisterV2UserResourceService(e *bm.Engine, svc UserResource, midMap map[string]bm.HandlerFunc)
- type AddReq
- func (*AddReq) Descriptor() ([]byte, []int)
- func (m *AddReq) GetCreator() string
- func (m *AddReq) GetResType() int32
- func (m *AddReq) GetTitle() string
- func (m *AddReq) GetUrl() string
- func (m *AddReq) GetWeight() int32
- func (m *AddReq) Marshal() (dAtA []byte, err error)
- func (m *AddReq) MarshalTo(dAtA []byte) (int, error)
- func (*AddReq) ProtoMessage()
- func (m *AddReq) Reset()
- func (m *AddReq) Size() (n int)
- func (m *AddReq) String() string
- func (m *AddReq) Unmarshal(dAtA []byte) error
- func (m *AddReq) XXX_DiscardUnknown()
- func (m *AddReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AddReq) XXX_Merge(src proto.Message)
- func (m *AddReq) XXX_Size() int
- func (m *AddReq) XXX_Unmarshal(b []byte) error
- type AddResp
- func (*AddResp) Descriptor() ([]byte, []int)
- func (m *AddResp) GetCreator() string
- func (m *AddResp) GetCtime() string
- func (m *AddResp) GetCustomId() int32
- func (m *AddResp) GetId() int32
- func (m *AddResp) GetMtime() string
- func (m *AddResp) GetResType() int32
- func (m *AddResp) GetStatus() int32
- func (m *AddResp) GetTitle() string
- func (m *AddResp) GetUrl() string
- func (m *AddResp) GetWeight() int32
- func (m *AddResp) Marshal() (dAtA []byte, err error)
- func (m *AddResp) MarshalTo(dAtA []byte) (int, error)
- func (*AddResp) ProtoMessage()
- func (m *AddResp) Reset()
- func (m *AddResp) Size() (n int)
- func (m *AddResp) String() string
- func (m *AddResp) Unmarshal(dAtA []byte) error
- func (m *AddResp) XXX_DiscardUnknown()
- func (m *AddResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AddResp) XXX_Merge(src proto.Message)
- func (m *AddResp) XXX_Size() int
- func (m *AddResp) XXX_Unmarshal(b []byte) error
- type Client
- type EditReq
- func (*EditReq) Descriptor() ([]byte, []int)
- func (m *EditReq) GetCustomId() int32
- func (m *EditReq) GetResType() int32
- func (m *EditReq) GetTitle() string
- func (m *EditReq) GetUrl() string
- func (m *EditReq) GetWeight() int32
- func (m *EditReq) Marshal() (dAtA []byte, err error)
- func (m *EditReq) MarshalTo(dAtA []byte) (int, error)
- func (*EditReq) ProtoMessage()
- func (m *EditReq) Reset()
- func (m *EditReq) Size() (n int)
- func (m *EditReq) String() string
- func (m *EditReq) Unmarshal(dAtA []byte) error
- func (m *EditReq) XXX_DiscardUnknown()
- func (m *EditReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EditReq) XXX_Merge(src proto.Message)
- func (m *EditReq) XXX_Size() int
- func (m *EditReq) XXX_Unmarshal(b []byte) error
- type EditResp
- func (*EditResp) Descriptor() ([]byte, []int)
- func (m *EditResp) GetCreator() string
- func (m *EditResp) GetCtime() string
- func (m *EditResp) GetCustomId() int32
- func (m *EditResp) GetId() int32
- func (m *EditResp) GetMtime() string
- func (m *EditResp) GetResType() int32
- func (m *EditResp) GetStatus() int32
- func (m *EditResp) GetTitle() string
- func (m *EditResp) GetUrl() string
- func (m *EditResp) GetWeight() int32
- func (m *EditResp) Marshal() (dAtA []byte, err error)
- func (m *EditResp) MarshalTo(dAtA []byte) (int, error)
- func (*EditResp) ProtoMessage()
- func (m *EditResp) Reset()
- func (m *EditResp) Size() (n int)
- func (m *EditResp) String() string
- func (m *EditResp) Unmarshal(dAtA []byte) error
- func (m *EditResp) XXX_DiscardUnknown()
- func (m *EditResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EditResp) XXX_Merge(src proto.Message)
- func (m *EditResp) XXX_Size() int
- func (m *EditResp) XXX_Unmarshal(b []byte) error
- type ListReq
- func (*ListReq) Descriptor() ([]byte, []int)
- func (m *ListReq) GetPage() int32
- func (m *ListReq) GetPageSize() int32
- func (m *ListReq) GetResType() int32
- func (m *ListReq) Marshal() (dAtA []byte, err error)
- func (m *ListReq) MarshalTo(dAtA []byte) (int, error)
- func (*ListReq) ProtoMessage()
- func (m *ListReq) Reset()
- func (m *ListReq) Size() (n int)
- func (m *ListReq) String() string
- func (m *ListReq) Unmarshal(dAtA []byte) error
- func (m *ListReq) XXX_DiscardUnknown()
- func (m *ListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ListReq) XXX_Merge(src proto.Message)
- func (m *ListReq) XXX_Size() int
- func (m *ListReq) XXX_Unmarshal(b []byte) error
- type ListResp
- func (*ListResp) Descriptor() ([]byte, []int)
- func (m *ListResp) GetCurrentPage() int32
- func (m *ListResp) GetList() []*ListResp_List
- func (m *ListResp) GetTotalCount() int32
- func (m *ListResp) Marshal() (dAtA []byte, err error)
- func (m *ListResp) MarshalTo(dAtA []byte) (int, error)
- func (*ListResp) ProtoMessage()
- func (m *ListResp) Reset()
- func (m *ListResp) Size() (n int)
- func (m *ListResp) String() string
- func (m *ListResp) Unmarshal(dAtA []byte) error
- func (m *ListResp) XXX_DiscardUnknown()
- func (m *ListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ListResp) XXX_Merge(src proto.Message)
- func (m *ListResp) XXX_Size() int
- func (m *ListResp) XXX_Unmarshal(b []byte) error
- type ListResp_List
- func (*ListResp_List) Descriptor() ([]byte, []int)
- func (m *ListResp_List) GetCreator() string
- func (m *ListResp_List) GetCtime() string
- func (m *ListResp_List) GetCustomId() int32
- func (m *ListResp_List) GetId() int32
- func (m *ListResp_List) GetMtime() string
- func (m *ListResp_List) GetResType() int32
- func (m *ListResp_List) GetStatus() int32
- func (m *ListResp_List) GetTitle() string
- func (m *ListResp_List) GetUrl() string
- func (m *ListResp_List) GetWeight() int32
- func (m *ListResp_List) Marshal() (dAtA []byte, err error)
- func (m *ListResp_List) MarshalTo(dAtA []byte) (int, error)
- func (*ListResp_List) ProtoMessage()
- func (m *ListResp_List) Reset()
- func (m *ListResp_List) Size() (n int)
- func (m *ListResp_List) String() string
- func (m *ListResp_List) Unmarshal(dAtA []byte) error
- func (m *ListResp_List) XXX_DiscardUnknown()
- func (m *ListResp_List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ListResp_List) XXX_Merge(src proto.Message)
- func (m *ListResp_List) XXX_Size() int
- func (m *ListResp_List) XXX_Unmarshal(b []byte) error
- type QueryReq
- func (*QueryReq) Descriptor() ([]byte, []int)
- func (m *QueryReq) GetCustomId() int32
- func (m *QueryReq) GetResType() int32
- func (m *QueryReq) Marshal() (dAtA []byte, err error)
- func (m *QueryReq) MarshalTo(dAtA []byte) (int, error)
- func (*QueryReq) ProtoMessage()
- func (m *QueryReq) Reset()
- func (m *QueryReq) Size() (n int)
- func (m *QueryReq) String() string
- func (m *QueryReq) Unmarshal(dAtA []byte) error
- func (m *QueryReq) XXX_DiscardUnknown()
- func (m *QueryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *QueryReq) XXX_Merge(src proto.Message)
- func (m *QueryReq) XXX_Size() int
- func (m *QueryReq) XXX_Unmarshal(b []byte) error
- type QueryResp
- func (*QueryResp) Descriptor() ([]byte, []int)
- func (m *QueryResp) GetCreator() string
- func (m *QueryResp) GetCtime() string
- func (m *QueryResp) GetCustomId() int32
- func (m *QueryResp) GetId() int32
- func (m *QueryResp) GetMtime() string
- func (m *QueryResp) GetResType() int32
- func (m *QueryResp) GetStatus() int32
- func (m *QueryResp) GetTitle() string
- func (m *QueryResp) GetUrl() string
- func (m *QueryResp) GetWeight() int32
- func (m *QueryResp) Marshal() (dAtA []byte, err error)
- func (m *QueryResp) MarshalTo(dAtA []byte) (int, error)
- func (*QueryResp) ProtoMessage()
- func (m *QueryResp) Reset()
- func (m *QueryResp) Size() (n int)
- func (m *QueryResp) String() string
- func (m *QueryResp) Unmarshal(dAtA []byte) error
- func (m *QueryResp) XXX_DiscardUnknown()
- func (m *QueryResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *QueryResp) XXX_Merge(src proto.Message)
- func (m *QueryResp) XXX_Size() int
- func (m *QueryResp) XXX_Unmarshal(b []byte) error
- type SetStatusReq
- func (*SetStatusReq) Descriptor() ([]byte, []int)
- func (m *SetStatusReq) GetCustomId() int32
- func (m *SetStatusReq) GetResType() int32
- func (m *SetStatusReq) GetStatus() int32
- func (m *SetStatusReq) Marshal() (dAtA []byte, err error)
- func (m *SetStatusReq) MarshalTo(dAtA []byte) (int, error)
- func (*SetStatusReq) ProtoMessage()
- func (m *SetStatusReq) Reset()
- func (m *SetStatusReq) Size() (n int)
- func (m *SetStatusReq) String() string
- func (m *SetStatusReq) Unmarshal(dAtA []byte) error
- func (m *SetStatusReq) XXX_DiscardUnknown()
- func (m *SetStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SetStatusReq) XXX_Merge(src proto.Message)
- func (m *SetStatusReq) XXX_Size() int
- func (m *SetStatusReq) XXX_Unmarshal(b []byte) error
- type SetStatusResp
- func (*SetStatusResp) Descriptor() ([]byte, []int)
- func (m *SetStatusResp) Marshal() (dAtA []byte, err error)
- func (m *SetStatusResp) MarshalTo(dAtA []byte) (int, error)
- func (*SetStatusResp) ProtoMessage()
- func (m *SetStatusResp) Reset()
- func (m *SetStatusResp) Size() (n int)
- func (m *SetStatusResp) String() string
- func (m *SetStatusResp) Unmarshal(dAtA []byte) error
- func (m *SetStatusResp) XXX_DiscardUnknown()
- func (m *SetStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SetStatusResp) XXX_Merge(src proto.Message)
- func (m *SetStatusResp) XXX_Size() int
- func (m *SetStatusResp) XXX_Unmarshal(b []byte) error
- type UserResource
- type UserResourceClient
- type UserResourceServer
Constants ¶
const AppID = "live.resource"
AppID 应用程序标识
Variables ¶
var ( ErrInvalidLengthUserResource = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowUserResource = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterUserResourceServer ¶
func RegisterUserResourceServer(s *grpc.Server, srv UserResourceServer)
func RegisterV2UserResourceService ¶
func RegisterV2UserResourceService(e *bm.Engine, svc UserResource, midMap map[string]bm.HandlerFunc)
RegisterV2UserResourceService Register the blademaster route with middleware map midMap is the middleware map, the key is defined in proto
Types ¶
type AddReq ¶
type AddReq struct { // 资源类型 ResType int32 `protobuf:"varint,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty" form:"res_type" validate:"required"` // 名称 Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty" form:"title" validate:"required"` // URL Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty" form:"url" validate:"required"` // 权重 Weight int32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty" form:"weight" validate:"required"` // 创建人 Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty" form:"creator" validate:"required"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
请求创建资源
func (*AddReq) Descriptor ¶
func (*AddReq) GetCreator ¶
func (*AddReq) GetResType ¶
func (*AddReq) ProtoMessage ¶
func (*AddReq) ProtoMessage()
func (*AddReq) XXX_DiscardUnknown ¶
func (m *AddReq) XXX_DiscardUnknown()
func (*AddReq) XXX_Marshal ¶
func (*AddReq) XXX_Unmarshal ¶
type AddResp ¶
type AddResp struct { // ID Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 资源类型 ResType int32 `protobuf:"varint,2,opt,name=res_type,json=resType,proto3" json:"res_type"` // 资源ID CustomId int32 `protobuf:"varint,3,opt,name=custom_id,json=customId,proto3" json:"custom_id"` // 名称 Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title"` // URL Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url"` // 权重 Weight int32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight"` // 创建人 Creator string `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator"` // "状态1.上线中2.下线" Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status"` // 创建时刻 Ctime string `protobuf:"bytes,9,opt,name=ctime,proto3" json:"ctime"` // 修改时刻 Mtime string `protobuf:"bytes,10,opt,name=mtime,proto3" json:"mtime"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
返回创建结果
func (*AddResp) Descriptor ¶
func (*AddResp) GetCreator ¶
func (*AddResp) GetCustomId ¶
func (*AddResp) GetResType ¶
func (*AddResp) ProtoMessage ¶
func (*AddResp) ProtoMessage()
func (*AddResp) XXX_DiscardUnknown ¶
func (m *AddResp) XXX_DiscardUnknown()
func (*AddResp) XXX_Marshal ¶
func (*AddResp) XXX_Unmarshal ¶
type Client ¶
type Client struct {
UserResourceClient
}
Client 对外服务接口
func NewClient ¶
func NewClient(cfg *warden.ClientConfig, opts ...grpc.DialOption) (*Client, error)
NewClient 用户资源 grpc Client
type EditReq ¶
type EditReq struct { // 资源类型 ResType int32 `protobuf:"varint,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty" form:"res_type" validate:"required"` // 资源ID CustomId int32 `protobuf:"varint,2,opt,name=custom_id,json=customId,proto3" json:"custom_id,omitempty" form:"custom_id" validate:"required"` // 名称 Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty" form:"title"` // URL Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty" form:"url"` // 权重 Weight int32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty" form:"weight"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
请求编辑资源
func (*EditReq) Descriptor ¶
func (*EditReq) GetCustomId ¶
func (*EditReq) GetResType ¶
func (*EditReq) ProtoMessage ¶
func (*EditReq) ProtoMessage()
func (*EditReq) XXX_DiscardUnknown ¶
func (m *EditReq) XXX_DiscardUnknown()
func (*EditReq) XXX_Marshal ¶
func (*EditReq) XXX_Unmarshal ¶
type EditResp ¶
type EditResp struct { // ID Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 资源类型 ResType int32 `protobuf:"varint,2,opt,name=res_type,json=resType,proto3" json:"res_type"` // 资源ID CustomId int32 `protobuf:"varint,3,opt,name=custom_id,json=customId,proto3" json:"custom_id"` // 名称 Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title"` // URL Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url"` // 权重 Weight int32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight"` // 创建人 Creator string `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator"` // "状态1.上线中2.下线" Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status"` // 创建时刻 Ctime string `protobuf:"bytes,9,opt,name=ctime,proto3" json:"ctime"` // 修改时刻 Mtime string `protobuf:"bytes,10,opt,name=mtime,proto3" json:"mtime"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
返回编辑结果
func (*EditResp) Descriptor ¶
func (*EditResp) GetCreator ¶
func (*EditResp) GetCustomId ¶
func (*EditResp) GetResType ¶
func (*EditResp) ProtoMessage ¶
func (*EditResp) ProtoMessage()
func (*EditResp) XXX_DiscardUnknown ¶
func (m *EditResp) XXX_DiscardUnknown()
func (*EditResp) XXX_Marshal ¶
func (*EditResp) XXX_Unmarshal ¶
type ListReq ¶
type ListReq struct { // 资源类型 ResType int32 `protobuf:"varint,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty" form:"res_type" validate:"required"` // 页码 Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty" form:"page"` // 每页数据量 PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty" form:"page_size"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
请求资源列表
func (*ListReq) Descriptor ¶
func (*ListReq) GetPageSize ¶
func (*ListReq) GetResType ¶
func (*ListReq) ProtoMessage ¶
func (*ListReq) ProtoMessage()
func (*ListReq) XXX_DiscardUnknown ¶
func (m *ListReq) XXX_DiscardUnknown()
func (*ListReq) XXX_Marshal ¶
func (*ListReq) XXX_Unmarshal ¶
type ListResp ¶
type ListResp struct { CurrentPage int32 `protobuf:"varint,1,opt,name=currentPage,proto3" json:"currentPage"` TotalCount int32 `protobuf:"varint,2,opt,name=totalCount,proto3" json:"totalCount"` List []*ListResp_List `protobuf:"bytes,3,rep,name=list" json:"list"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
返回资源列表
func (*ListResp) Descriptor ¶
func (*ListResp) GetCurrentPage ¶
func (*ListResp) GetList ¶
func (m *ListResp) GetList() []*ListResp_List
func (*ListResp) GetTotalCount ¶
func (*ListResp) ProtoMessage ¶
func (*ListResp) ProtoMessage()
func (*ListResp) XXX_DiscardUnknown ¶
func (m *ListResp) XXX_DiscardUnknown()
func (*ListResp) XXX_Marshal ¶
func (*ListResp) XXX_Unmarshal ¶
type ListResp_List ¶
type ListResp_List struct { // ID Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 资源类型 ResType int32 `protobuf:"varint,2,opt,name=res_type,json=resType,proto3" json:"res_type"` // 资源ID CustomId int32 `protobuf:"varint,3,opt,name=custom_id,json=customId,proto3" json:"custom_id"` // 名称 Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title"` // URL Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url"` // 权重 Weight int32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight"` // 创建人 Creator string `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator"` // "状态1.上线中2.下线" Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status"` // 创建时刻 Ctime string `protobuf:"bytes,9,opt,name=ctime,proto3" json:"ctime"` // 修改时刻 Mtime string `protobuf:"bytes,10,opt,name=mtime,proto3" json:"mtime"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListResp_List) Descriptor ¶
func (*ListResp_List) Descriptor() ([]byte, []int)
func (*ListResp_List) GetCreator ¶
func (m *ListResp_List) GetCreator() string
func (*ListResp_List) GetCtime ¶
func (m *ListResp_List) GetCtime() string
func (*ListResp_List) GetCustomId ¶
func (m *ListResp_List) GetCustomId() int32
func (*ListResp_List) GetId ¶
func (m *ListResp_List) GetId() int32
func (*ListResp_List) GetMtime ¶
func (m *ListResp_List) GetMtime() string
func (*ListResp_List) GetResType ¶
func (m *ListResp_List) GetResType() int32
func (*ListResp_List) GetStatus ¶
func (m *ListResp_List) GetStatus() int32
func (*ListResp_List) GetTitle ¶
func (m *ListResp_List) GetTitle() string
func (*ListResp_List) GetUrl ¶
func (m *ListResp_List) GetUrl() string
func (*ListResp_List) GetWeight ¶
func (m *ListResp_List) GetWeight() int32
func (*ListResp_List) Marshal ¶
func (m *ListResp_List) Marshal() (dAtA []byte, err error)
func (*ListResp_List) ProtoMessage ¶
func (*ListResp_List) ProtoMessage()
func (*ListResp_List) Reset ¶
func (m *ListResp_List) Reset()
func (*ListResp_List) Size ¶
func (m *ListResp_List) Size() (n int)
func (*ListResp_List) String ¶
func (m *ListResp_List) String() string
func (*ListResp_List) Unmarshal ¶
func (m *ListResp_List) Unmarshal(dAtA []byte) error
func (*ListResp_List) XXX_DiscardUnknown ¶
func (m *ListResp_List) XXX_DiscardUnknown()
func (*ListResp_List) XXX_Marshal ¶
func (m *ListResp_List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListResp_List) XXX_Merge ¶
func (dst *ListResp_List) XXX_Merge(src proto.Message)
func (*ListResp_List) XXX_Size ¶
func (m *ListResp_List) XXX_Size() int
func (*ListResp_List) XXX_Unmarshal ¶
func (m *ListResp_List) XXX_Unmarshal(b []byte) error
type QueryReq ¶
type QueryReq struct { // 资源类型 ResType int32 `protobuf:"varint,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty" form:"res_type" validate:"required"` // 资源ID CustomId int32 `protobuf:"varint,2,opt,name=custom_id,json=customId,proto3" json:"custom_id,omitempty" form:"custom_id" validate:"required"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
请求单个资源
func (*QueryReq) Descriptor ¶
func (*QueryReq) GetCustomId ¶
func (*QueryReq) GetResType ¶
func (*QueryReq) ProtoMessage ¶
func (*QueryReq) ProtoMessage()
func (*QueryReq) XXX_DiscardUnknown ¶
func (m *QueryReq) XXX_DiscardUnknown()
func (*QueryReq) XXX_Marshal ¶
func (*QueryReq) XXX_Unmarshal ¶
type QueryResp ¶
type QueryResp struct { // ID Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 资源类型 ResType int32 `protobuf:"varint,2,opt,name=res_type,json=resType,proto3" json:"res_type"` // 资源ID CustomId int32 `protobuf:"varint,3,opt,name=custom_id,json=customId,proto3" json:"custom_id"` // 名称 Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title"` // URL Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url"` // 权重 Weight int32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight"` // 创建人 Creator string `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator"` // "状态1.上线中2.下线" Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status"` // 创建时刻 Ctime string `protobuf:"bytes,9,opt,name=ctime,proto3" json:"ctime"` // 修改时刻 Mtime string `protobuf:"bytes,10,opt,name=mtime,proto3" json:"mtime"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
返回单个资源
func (*QueryResp) Descriptor ¶
func (*QueryResp) GetCreator ¶
func (*QueryResp) GetCustomId ¶
func (*QueryResp) GetResType ¶
func (*QueryResp) ProtoMessage ¶
func (*QueryResp) ProtoMessage()
func (*QueryResp) XXX_DiscardUnknown ¶
func (m *QueryResp) XXX_DiscardUnknown()
func (*QueryResp) XXX_Marshal ¶
func (*QueryResp) XXX_Unmarshal ¶
type SetStatusReq ¶
type SetStatusReq struct { // 资源类型 ResType int32 `protobuf:"varint,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty" form:"res_type" validate:"required"` // 页码 CustomId int32 `protobuf:"varint,2,opt,name=custom_id,json=customId,proto3" json:"custom_id,omitempty" form:"custom_id" validate:"required"` // 每页数据量 Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty" form:"status" validate:"required"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
请求变更资源状态
func (*SetStatusReq) Descriptor ¶
func (*SetStatusReq) Descriptor() ([]byte, []int)
func (*SetStatusReq) GetCustomId ¶
func (m *SetStatusReq) GetCustomId() int32
func (*SetStatusReq) GetResType ¶
func (m *SetStatusReq) GetResType() int32
func (*SetStatusReq) GetStatus ¶
func (m *SetStatusReq) GetStatus() int32
func (*SetStatusReq) Marshal ¶
func (m *SetStatusReq) Marshal() (dAtA []byte, err error)
func (*SetStatusReq) ProtoMessage ¶
func (*SetStatusReq) ProtoMessage()
func (*SetStatusReq) Reset ¶
func (m *SetStatusReq) Reset()
func (*SetStatusReq) Size ¶
func (m *SetStatusReq) Size() (n int)
func (*SetStatusReq) String ¶
func (m *SetStatusReq) String() string
func (*SetStatusReq) Unmarshal ¶
func (m *SetStatusReq) Unmarshal(dAtA []byte) error
func (*SetStatusReq) XXX_DiscardUnknown ¶
func (m *SetStatusReq) XXX_DiscardUnknown()
func (*SetStatusReq) XXX_Marshal ¶
func (m *SetStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetStatusReq) XXX_Merge ¶
func (dst *SetStatusReq) XXX_Merge(src proto.Message)
func (*SetStatusReq) XXX_Size ¶
func (m *SetStatusReq) XXX_Size() int
func (*SetStatusReq) XXX_Unmarshal ¶
func (m *SetStatusReq) XXX_Unmarshal(b []byte) error
type SetStatusResp ¶
type SetStatusResp struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
返回变更结果
func (*SetStatusResp) Descriptor ¶
func (*SetStatusResp) Descriptor() ([]byte, []int)
func (*SetStatusResp) Marshal ¶
func (m *SetStatusResp) Marshal() (dAtA []byte, err error)
func (*SetStatusResp) ProtoMessage ¶
func (*SetStatusResp) ProtoMessage()
func (*SetStatusResp) Reset ¶
func (m *SetStatusResp) Reset()
func (*SetStatusResp) Size ¶
func (m *SetStatusResp) Size() (n int)
func (*SetStatusResp) String ¶
func (m *SetStatusResp) String() string
func (*SetStatusResp) Unmarshal ¶
func (m *SetStatusResp) Unmarshal(dAtA []byte) error
func (*SetStatusResp) XXX_DiscardUnknown ¶
func (m *SetStatusResp) XXX_DiscardUnknown()
func (*SetStatusResp) XXX_Marshal ¶
func (m *SetStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetStatusResp) XXX_Merge ¶
func (dst *SetStatusResp) XXX_Merge(src proto.Message)
func (*SetStatusResp) XXX_Size ¶
func (m *SetStatusResp) XXX_Size() int
func (*SetStatusResp) XXX_Unmarshal ¶
func (m *SetStatusResp) XXX_Unmarshal(b []byte) error
type UserResource ¶
type UserResource interface { // Add 添加资源接口 Add(ctx context.Context, req *AddReq) (resp *AddResp, err error) // Edit 编辑现有资源 Edit(ctx context.Context, req *EditReq) (resp *EditResp, err error) // Query 请求单个资源 Query(ctx context.Context, req *QueryReq) (resp *QueryResp, err error) // List 获取资源列表 List(ctx context.Context, req *ListReq) (resp *ListResp, err error) // SetStatus 更改资源状态 SetStatus(ctx context.Context, req *SetStatusReq) (resp *SetStatusResp, err error) }
type UserResourceClient ¶
type UserResourceClient interface { // Add 添加资源接口 Add(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) // Edit 编辑现有资源 Edit(ctx context.Context, in *EditReq, opts ...grpc.CallOption) (*EditResp, error) // Query 请求单个资源 Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*QueryResp, error) // List 获取资源列表 List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) // SetStatus 更改资源状态 SetStatus(ctx context.Context, in *SetStatusReq, opts ...grpc.CallOption) (*SetStatusResp, error) }
UserResourceClient is the client API for UserResource service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserResourceClient ¶
func NewUserResourceClient(cc *grpc.ClientConn) UserResourceClient
type UserResourceServer ¶
type UserResourceServer interface { // Add 添加资源接口 Add(context.Context, *AddReq) (*AddResp, error) // Edit 编辑现有资源 Edit(context.Context, *EditReq) (*EditResp, error) // Query 请求单个资源 Query(context.Context, *QueryReq) (*QueryResp, error) // List 获取资源列表 List(context.Context, *ListReq) (*ListResp, error) // SetStatus 更改资源状态 SetStatus(context.Context, *SetStatusReq) (*SetStatusResp, error) }
UserResourceServer is the server API for UserResource service.