v2

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

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

View Source
const AppID = "live.resource"

AppID 应用程序标识

Variables

View Source
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) Descriptor() ([]byte, []int)

func (*AddReq) GetCreator

func (m *AddReq) GetCreator() string

func (*AddReq) GetResType

func (m *AddReq) GetResType() int32

func (*AddReq) GetTitle

func (m *AddReq) GetTitle() string

func (*AddReq) GetUrl

func (m *AddReq) GetUrl() string

func (*AddReq) GetWeight

func (m *AddReq) GetWeight() int32

func (*AddReq) Marshal

func (m *AddReq) Marshal() (dAtA []byte, err error)

func (*AddReq) MarshalTo

func (m *AddReq) MarshalTo(dAtA []byte) (int, error)

func (*AddReq) ProtoMessage

func (*AddReq) ProtoMessage()

func (*AddReq) Reset

func (m *AddReq) Reset()

func (*AddReq) Size

func (m *AddReq) Size() (n int)

func (*AddReq) String

func (m *AddReq) String() string

func (*AddReq) Unmarshal

func (m *AddReq) Unmarshal(dAtA []byte) error

func (*AddReq) XXX_DiscardUnknown

func (m *AddReq) XXX_DiscardUnknown()

func (*AddReq) XXX_Marshal

func (m *AddReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddReq) XXX_Merge

func (dst *AddReq) XXX_Merge(src proto.Message)

func (*AddReq) XXX_Size

func (m *AddReq) XXX_Size() int

func (*AddReq) XXX_Unmarshal

func (m *AddReq) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*AddResp) GetCreator

func (m *AddResp) GetCreator() string

func (*AddResp) GetCtime

func (m *AddResp) GetCtime() string

func (*AddResp) GetCustomId

func (m *AddResp) GetCustomId() int32

func (*AddResp) GetId

func (m *AddResp) GetId() int32

func (*AddResp) GetMtime

func (m *AddResp) GetMtime() string

func (*AddResp) GetResType

func (m *AddResp) GetResType() int32

func (*AddResp) GetStatus

func (m *AddResp) GetStatus() int32

func (*AddResp) GetTitle

func (m *AddResp) GetTitle() string

func (*AddResp) GetUrl

func (m *AddResp) GetUrl() string

func (*AddResp) GetWeight

func (m *AddResp) GetWeight() int32

func (*AddResp) Marshal

func (m *AddResp) Marshal() (dAtA []byte, err error)

func (*AddResp) MarshalTo

func (m *AddResp) MarshalTo(dAtA []byte) (int, error)

func (*AddResp) ProtoMessage

func (*AddResp) ProtoMessage()

func (*AddResp) Reset

func (m *AddResp) Reset()

func (*AddResp) Size

func (m *AddResp) Size() (n int)

func (*AddResp) String

func (m *AddResp) String() string

func (*AddResp) Unmarshal

func (m *AddResp) Unmarshal(dAtA []byte) error

func (*AddResp) XXX_DiscardUnknown

func (m *AddResp) XXX_DiscardUnknown()

func (*AddResp) XXX_Marshal

func (m *AddResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddResp) XXX_Merge

func (dst *AddResp) XXX_Merge(src proto.Message)

func (*AddResp) XXX_Size

func (m *AddResp) XXX_Size() int

func (*AddResp) XXX_Unmarshal

func (m *AddResp) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*EditReq) GetCustomId

func (m *EditReq) GetCustomId() int32

func (*EditReq) GetResType

func (m *EditReq) GetResType() int32

func (*EditReq) GetTitle

func (m *EditReq) GetTitle() string

func (*EditReq) GetUrl

func (m *EditReq) GetUrl() string

func (*EditReq) GetWeight

func (m *EditReq) GetWeight() int32

func (*EditReq) Marshal

func (m *EditReq) Marshal() (dAtA []byte, err error)

func (*EditReq) MarshalTo

func (m *EditReq) MarshalTo(dAtA []byte) (int, error)

func (*EditReq) ProtoMessage

func (*EditReq) ProtoMessage()

func (*EditReq) Reset

func (m *EditReq) Reset()

func (*EditReq) Size

func (m *EditReq) Size() (n int)

func (*EditReq) String

func (m *EditReq) String() string

func (*EditReq) Unmarshal

func (m *EditReq) Unmarshal(dAtA []byte) error

func (*EditReq) XXX_DiscardUnknown

func (m *EditReq) XXX_DiscardUnknown()

func (*EditReq) XXX_Marshal

func (m *EditReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EditReq) XXX_Merge

func (dst *EditReq) XXX_Merge(src proto.Message)

func (*EditReq) XXX_Size

func (m *EditReq) XXX_Size() int

func (*EditReq) XXX_Unmarshal

func (m *EditReq) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*EditResp) GetCreator

func (m *EditResp) GetCreator() string

func (*EditResp) GetCtime

func (m *EditResp) GetCtime() string

func (*EditResp) GetCustomId

func (m *EditResp) GetCustomId() int32

func (*EditResp) GetId

func (m *EditResp) GetId() int32

func (*EditResp) GetMtime

func (m *EditResp) GetMtime() string

func (*EditResp) GetResType

func (m *EditResp) GetResType() int32

func (*EditResp) GetStatus

func (m *EditResp) GetStatus() int32

func (*EditResp) GetTitle

func (m *EditResp) GetTitle() string

func (*EditResp) GetUrl

func (m *EditResp) GetUrl() string

func (*EditResp) GetWeight

func (m *EditResp) GetWeight() int32

func (*EditResp) Marshal

func (m *EditResp) Marshal() (dAtA []byte, err error)

func (*EditResp) MarshalTo

func (m *EditResp) MarshalTo(dAtA []byte) (int, error)

func (*EditResp) ProtoMessage

func (*EditResp) ProtoMessage()

func (*EditResp) Reset

func (m *EditResp) Reset()

func (*EditResp) Size

func (m *EditResp) Size() (n int)

func (*EditResp) String

func (m *EditResp) String() string

func (*EditResp) Unmarshal

func (m *EditResp) Unmarshal(dAtA []byte) error

func (*EditResp) XXX_DiscardUnknown

func (m *EditResp) XXX_DiscardUnknown()

func (*EditResp) XXX_Marshal

func (m *EditResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EditResp) XXX_Merge

func (dst *EditResp) XXX_Merge(src proto.Message)

func (*EditResp) XXX_Size

func (m *EditResp) XXX_Size() int

func (*EditResp) XXX_Unmarshal

func (m *EditResp) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*ListReq) GetPage

func (m *ListReq) GetPage() int32

func (*ListReq) GetPageSize

func (m *ListReq) GetPageSize() int32

func (*ListReq) GetResType

func (m *ListReq) GetResType() int32

func (*ListReq) Marshal

func (m *ListReq) Marshal() (dAtA []byte, err error)

func (*ListReq) MarshalTo

func (m *ListReq) MarshalTo(dAtA []byte) (int, error)

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) Reset

func (m *ListReq) Reset()

func (*ListReq) Size

func (m *ListReq) Size() (n int)

func (*ListReq) String

func (m *ListReq) String() string

func (*ListReq) Unmarshal

func (m *ListReq) Unmarshal(dAtA []byte) error

func (*ListReq) XXX_DiscardUnknown

func (m *ListReq) XXX_DiscardUnknown()

func (*ListReq) XXX_Marshal

func (m *ListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListReq) XXX_Merge

func (dst *ListReq) XXX_Merge(src proto.Message)

func (*ListReq) XXX_Size

func (m *ListReq) XXX_Size() int

func (*ListReq) XXX_Unmarshal

func (m *ListReq) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*ListResp) GetCurrentPage

func (m *ListResp) GetCurrentPage() int32

func (*ListResp) GetList

func (m *ListResp) GetList() []*ListResp_List

func (*ListResp) GetTotalCount

func (m *ListResp) GetTotalCount() int32

func (*ListResp) Marshal

func (m *ListResp) Marshal() (dAtA []byte, err error)

func (*ListResp) MarshalTo

func (m *ListResp) MarshalTo(dAtA []byte) (int, error)

func (*ListResp) ProtoMessage

func (*ListResp) ProtoMessage()

func (*ListResp) Reset

func (m *ListResp) Reset()

func (*ListResp) Size

func (m *ListResp) Size() (n int)

func (*ListResp) String

func (m *ListResp) String() string

func (*ListResp) Unmarshal

func (m *ListResp) Unmarshal(dAtA []byte) error

func (*ListResp) XXX_DiscardUnknown

func (m *ListResp) XXX_DiscardUnknown()

func (*ListResp) XXX_Marshal

func (m *ListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListResp) XXX_Merge

func (dst *ListResp) XXX_Merge(src proto.Message)

func (*ListResp) XXX_Size

func (m *ListResp) XXX_Size() int

func (*ListResp) XXX_Unmarshal

func (m *ListResp) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *ListResp_List) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*QueryReq) GetCustomId

func (m *QueryReq) GetCustomId() int32

func (*QueryReq) GetResType

func (m *QueryReq) GetResType() int32

func (*QueryReq) Marshal

func (m *QueryReq) Marshal() (dAtA []byte, err error)

func (*QueryReq) MarshalTo

func (m *QueryReq) MarshalTo(dAtA []byte) (int, error)

func (*QueryReq) ProtoMessage

func (*QueryReq) ProtoMessage()

func (*QueryReq) Reset

func (m *QueryReq) Reset()

func (*QueryReq) Size

func (m *QueryReq) Size() (n int)

func (*QueryReq) String

func (m *QueryReq) String() string

func (*QueryReq) Unmarshal

func (m *QueryReq) Unmarshal(dAtA []byte) error

func (*QueryReq) XXX_DiscardUnknown

func (m *QueryReq) XXX_DiscardUnknown()

func (*QueryReq) XXX_Marshal

func (m *QueryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryReq) XXX_Merge

func (dst *QueryReq) XXX_Merge(src proto.Message)

func (*QueryReq) XXX_Size

func (m *QueryReq) XXX_Size() int

func (*QueryReq) XXX_Unmarshal

func (m *QueryReq) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*QueryResp) GetCreator

func (m *QueryResp) GetCreator() string

func (*QueryResp) GetCtime

func (m *QueryResp) GetCtime() string

func (*QueryResp) GetCustomId

func (m *QueryResp) GetCustomId() int32

func (*QueryResp) GetId

func (m *QueryResp) GetId() int32

func (*QueryResp) GetMtime

func (m *QueryResp) GetMtime() string

func (*QueryResp) GetResType

func (m *QueryResp) GetResType() int32

func (*QueryResp) GetStatus

func (m *QueryResp) GetStatus() int32

func (*QueryResp) GetTitle

func (m *QueryResp) GetTitle() string

func (*QueryResp) GetUrl

func (m *QueryResp) GetUrl() string

func (*QueryResp) GetWeight

func (m *QueryResp) GetWeight() int32

func (*QueryResp) Marshal

func (m *QueryResp) Marshal() (dAtA []byte, err error)

func (*QueryResp) MarshalTo

func (m *QueryResp) MarshalTo(dAtA []byte) (int, error)

func (*QueryResp) ProtoMessage

func (*QueryResp) ProtoMessage()

func (*QueryResp) Reset

func (m *QueryResp) Reset()

func (*QueryResp) Size

func (m *QueryResp) Size() (n int)

func (*QueryResp) String

func (m *QueryResp) String() string

func (*QueryResp) Unmarshal

func (m *QueryResp) Unmarshal(dAtA []byte) error

func (*QueryResp) XXX_DiscardUnknown

func (m *QueryResp) XXX_DiscardUnknown()

func (*QueryResp) XXX_Marshal

func (m *QueryResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResp) XXX_Merge

func (dst *QueryResp) XXX_Merge(src proto.Message)

func (*QueryResp) XXX_Size

func (m *QueryResp) XXX_Size() int

func (*QueryResp) XXX_Unmarshal

func (m *QueryResp) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *SetStatusReq) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *SetStatusResp) MarshalTo(dAtA []byte) (int, 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.

Jump to

Keyboard shortcuts

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