Back to godoc.org

Package api

v0.3.3
Latest Go to latest

The latest major version is .

Published: Jan 20, 2020 | License: MIT | Module: github.com/bilibili/kratos

Index

Variables

var (
	UserNotExist         = ecode.New(-404)
	UserUpdateNameFailed = ecode.New(10000)
)

UserErrCode ecode

var (
	ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)
var PathUserCard = "/user.api.User/Card"
var PathUserInfo = "/user.api.User/Info"
var UserErrCode_name = map[int32]string{
	0:     "OK",
	-404:  "UserNotExist",
	10000: "UserUpdateNameFailed",
}
var UserErrCode_value = map[string]int32{
	"OK":                   0,
	"UserNotExist":         -404,
	"UserUpdateNameFailed": 10000,
}

func RegisterUserBMServer

func RegisterUserBMServer(e *bm.Engine, server UserBMServer)

RegisterUserBMServer Register the blademaster route

func RegisterUserServer

func RegisterUserServer(s *grpc.Server, srv UserServer)

type Info

type Info struct {
	Mid                  int64    `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Sex                  string   `protobuf:"bytes,3,opt,name=sex,proto3" json:"sex"`
	Face                 string   `protobuf:"bytes,4,opt,name=face,proto3" json:"face"`
	Sign                 string   `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Info) Descriptor

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

func (*Info) GetFace

func (m *Info) GetFace() string

func (*Info) GetMid

func (m *Info) GetMid() int64

func (*Info) GetName

func (m *Info) GetName() string

func (*Info) GetSex

func (m *Info) GetSex() string

func (*Info) GetSign

func (m *Info) GetSign() string

func (*Info) Marshal

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

func (*Info) MarshalTo

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

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) Reset

func (m *Info) Reset()

func (*Info) Size

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

func (*Info) String

func (m *Info) String() string

func (*Info) Unmarshal

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

func (*Info) XXX_DiscardUnknown

func (m *Info) XXX_DiscardUnknown()

func (*Info) XXX_Marshal

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

func (*Info) XXX_Merge

func (m *Info) XXX_Merge(src proto.Message)

func (*Info) XXX_Size

func (m *Info) XXX_Size() int

func (*Info) XXX_Unmarshal

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

type InfoReply

type InfoReply struct {
	Info                 *Info    `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InfoReply) Descriptor

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

func (*InfoReply) GetInfo

func (m *InfoReply) GetInfo() *Info

func (*InfoReply) Marshal

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

func (*InfoReply) MarshalTo

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

func (*InfoReply) ProtoMessage

func (*InfoReply) ProtoMessage()

func (*InfoReply) Reset

func (m *InfoReply) Reset()

func (*InfoReply) Size

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

func (*InfoReply) String

func (m *InfoReply) String() string

func (*InfoReply) Unmarshal

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

func (*InfoReply) XXX_DiscardUnknown

func (m *InfoReply) XXX_DiscardUnknown()

func (*InfoReply) XXX_Marshal

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

func (*InfoReply) XXX_Merge

func (m *InfoReply) XXX_Merge(src proto.Message)

func (*InfoReply) XXX_Size

func (m *InfoReply) XXX_Size() int

func (*InfoReply) XXX_Unmarshal

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

type UserBMServer

type UserBMServer interface {
	Info(ctx context.Context, req *UserReq) (resp *InfoReply, err error)

	Card(ctx context.Context, req *UserReq) (resp *google_protobuf1.Empty, err error)
}

UserBMServer is the server API for User service.

var UserSvc UserBMServer

type UserClient

type UserClient interface {
	Info(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*InfoReply, error)
}

UserClient is the client API for User service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUserClient

func NewUserClient(cc *grpc.ClientConn) UserClient

type UserErrCode

type UserErrCode int32
const (
	UserErrCode_OK                   UserErrCode = 0
	UserErrCode_UserNotExist         UserErrCode = -404
	UserErrCode_UserUpdateNameFailed UserErrCode = 10000
)

func (UserErrCode) EnumDescriptor

func (UserErrCode) EnumDescriptor() ([]byte, []int)

func (UserErrCode) String

func (x UserErrCode) String() string

type UserReq

type UserReq struct {
	Mid                  int64    `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" validate:"gt=0,required"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserReq) Descriptor

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

func (*UserReq) GetMid

func (m *UserReq) GetMid() int64

func (*UserReq) Marshal

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

func (*UserReq) MarshalTo

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

func (*UserReq) ProtoMessage

func (*UserReq) ProtoMessage()

func (*UserReq) Reset

func (m *UserReq) Reset()

func (*UserReq) Size

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

func (*UserReq) String

func (m *UserReq) String() string

func (*UserReq) Unmarshal

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

func (*UserReq) XXX_DiscardUnknown

func (m *UserReq) XXX_DiscardUnknown()

func (*UserReq) XXX_Marshal

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

func (*UserReq) XXX_Merge

func (m *UserReq) XXX_Merge(src proto.Message)

func (*UserReq) XXX_Size

func (m *UserReq) XXX_Size() int

func (*UserReq) XXX_Unmarshal

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

type UserServer

type UserServer interface {
	Info(context.Context, *UserReq) (*InfoReply, error)
}

UserServer is the server API for User service.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier