Documentation
Overview ¶
Package binacs_api_user_v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error
- func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type UnimplementedUserServer
- func (*UnimplementedUserServer) UserAuth(context.Context, *UserAuthReq) (*UserAuthResp, error)
- func (*UnimplementedUserServer) UserInfo(context.Context, *UserInfoReq) (*UserInfoResp, error)
- func (*UnimplementedUserServer) UserRefresh(context.Context, *UserRefreshReq) (*UserRefreshResp, error)
- func (*UnimplementedUserServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
- func (*UnimplementedUserServer) UserTest(context.Context, *UserTestReq) (*UserTestResp, error)
- type UserAuthReq
- type UserAuthResp
- func (*UserAuthResp) Descriptor() ([]byte, []int)
- func (x *UserAuthResp) GetCode() int64
- func (x *UserAuthResp) GetData() *UserTokenObj
- func (x *UserAuthResp) GetMsg() string
- func (*UserAuthResp) ProtoMessage()
- func (x *UserAuthResp) ProtoReflect() protoreflect.Message
- func (x *UserAuthResp) Reset()
- func (x *UserAuthResp) String() string
- type UserClient
- type UserInfoObj
- func (*UserInfoObj) Descriptor() ([]byte, []int)
- func (x *UserInfoObj) GetCtime() string
- func (x *UserInfoObj) GetDesc() string
- func (x *UserInfoObj) GetId() string
- func (x *UserInfoObj) GetMore() []string
- func (x *UserInfoObj) GetRole() string
- func (*UserInfoObj) ProtoMessage()
- func (x *UserInfoObj) ProtoReflect() protoreflect.Message
- func (x *UserInfoObj) Reset()
- func (x *UserInfoObj) String() string
- type UserInfoReq
- type UserInfoResp
- func (*UserInfoResp) Descriptor() ([]byte, []int)
- func (x *UserInfoResp) GetCode() int64
- func (x *UserInfoResp) GetData() *UserInfoObj
- func (x *UserInfoResp) GetMsg() string
- func (*UserInfoResp) ProtoMessage()
- func (x *UserInfoResp) ProtoReflect() protoreflect.Message
- func (x *UserInfoResp) Reset()
- func (x *UserInfoResp) String() string
- type UserRefreshReq
- type UserRefreshResp
- func (*UserRefreshResp) Descriptor() ([]byte, []int)
- func (x *UserRefreshResp) GetCode() int64
- func (x *UserRefreshResp) GetData() *UserTokenObj
- func (x *UserRefreshResp) GetMsg() string
- func (*UserRefreshResp) ProtoMessage()
- func (x *UserRefreshResp) ProtoReflect() protoreflect.Message
- func (x *UserRefreshResp) Reset()
- func (x *UserRefreshResp) String() string
- type UserRegisterDataObj
- func (*UserRegisterDataObj) Descriptor() ([]byte, []int)
- func (x *UserRegisterDataObj) GetId() string
- func (x *UserRegisterDataObj) GetPwd() string
- func (*UserRegisterDataObj) ProtoMessage()
- func (x *UserRegisterDataObj) ProtoReflect() protoreflect.Message
- func (x *UserRegisterDataObj) Reset()
- func (x *UserRegisterDataObj) String() string
- type UserRegisterReq
- func (*UserRegisterReq) Descriptor() ([]byte, []int)
- func (x *UserRegisterReq) GetId() string
- func (x *UserRegisterReq) GetPwd() string
- func (*UserRegisterReq) ProtoMessage()
- func (x *UserRegisterReq) ProtoReflect() protoreflect.Message
- func (x *UserRegisterReq) Reset()
- func (x *UserRegisterReq) String() string
- type UserRegisterResp
- func (*UserRegisterResp) Descriptor() ([]byte, []int)
- func (x *UserRegisterResp) GetCode() int64
- func (x *UserRegisterResp) GetData() *UserRegisterDataObj
- func (x *UserRegisterResp) GetMsg() string
- func (*UserRegisterResp) ProtoMessage()
- func (x *UserRegisterResp) ProtoReflect() protoreflect.Message
- func (x *UserRegisterResp) Reset()
- func (x *UserRegisterResp) String() string
- type UserServer
- type UserTestReq
- type UserTestResp
- type UserTokenObj
- func (*UserTokenObj) Descriptor() ([]byte, []int)
- func (x *UserTokenObj) GetAccessToken() string
- func (x *UserTokenObj) GetExpireTime() int64
- func (x *UserTokenObj) GetRefreshToken() string
- func (*UserTokenObj) ProtoMessage()
- func (x *UserTokenObj) ProtoReflect() protoreflect.Message
- func (x *UserTokenObj) Reset()
- func (x *UserTokenObj) String() string
Constants ¶
Variables ¶
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserHandler ¶
RegisterUserHandler registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserHandlerClient ¶
RegisterUserHandlerClient registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserClient" to call the correct interceptors.
func RegisterUserHandlerFromEndpoint ¶
func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserHandlerServer ¶
RegisterUserHandlerServer registers the http handlers for service User to "mux". UnaryRPC :call UserServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) UserAuth ¶
func (*UnimplementedUserServer) UserAuth(context.Context, *UserAuthReq) (*UserAuthResp, error)
func (*UnimplementedUserServer) UserInfo ¶
func (*UnimplementedUserServer) UserInfo(context.Context, *UserInfoReq) (*UserInfoResp, error)
func (*UnimplementedUserServer) UserRefresh ¶
func (*UnimplementedUserServer) UserRefresh(context.Context, *UserRefreshReq) (*UserRefreshResp, error)
func (*UnimplementedUserServer) UserRegister ¶
func (*UnimplementedUserServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
func (*UnimplementedUserServer) UserTest ¶
func (*UnimplementedUserServer) UserTest(context.Context, *UserTestReq) (*UserTestResp, error)
type UserAuthReq ¶
type UserAuthReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` // contains filtered or unexported fields }
func (*UserAuthReq) Descriptor ¶
func (*UserAuthReq) Descriptor() ([]byte, []int)
Deprecated: Use UserAuthReq.ProtoReflect.Descriptor instead.
func (*UserAuthReq) GetId ¶
func (x *UserAuthReq) GetId() string
func (*UserAuthReq) GetPwd ¶
func (x *UserAuthReq) GetPwd() string
func (*UserAuthReq) ProtoMessage ¶
func (*UserAuthReq) ProtoMessage()
func (*UserAuthReq) ProtoReflect ¶
func (x *UserAuthReq) ProtoReflect() protoreflect.Message
func (*UserAuthReq) Reset ¶
func (x *UserAuthReq) Reset()
func (*UserAuthReq) String ¶
func (x *UserAuthReq) String() string
type UserAuthResp ¶
type UserAuthResp struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Data *UserTokenObj `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserAuthResp) Descriptor ¶
func (*UserAuthResp) Descriptor() ([]byte, []int)
Deprecated: Use UserAuthResp.ProtoReflect.Descriptor instead.
func (*UserAuthResp) GetCode ¶
func (x *UserAuthResp) GetCode() int64
func (*UserAuthResp) GetData ¶
func (x *UserAuthResp) GetData() *UserTokenObj
func (*UserAuthResp) GetMsg ¶
func (x *UserAuthResp) GetMsg() string
func (*UserAuthResp) ProtoMessage ¶
func (*UserAuthResp) ProtoMessage()
func (*UserAuthResp) ProtoReflect ¶
func (x *UserAuthResp) ProtoReflect() protoreflect.Message
func (*UserAuthResp) Reset ¶
func (x *UserAuthResp) Reset()
func (*UserAuthResp) String ¶
func (x *UserAuthResp) String() string
type UserClient ¶
type UserClient interface { UserTest(ctx context.Context, in *UserTestReq, opts ...grpc.CallOption) (*UserTestResp, error) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) UserAuth(ctx context.Context, in *UserAuthReq, opts ...grpc.CallOption) (*UserAuthResp, error) UserRefresh(ctx context.Context, in *UserRefreshReq, opts ...grpc.CallOption) (*UserRefreshResp, error) UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, 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.ClientConnInterface) UserClient
type UserInfoObj ¶
type UserInfoObj struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` Ctime string `protobuf:"bytes,4,opt,name=ctime,proto3" json:"ctime,omitempty"` More []string `protobuf:"bytes,5,rep,name=more,proto3" json:"more,omitempty"` // contains filtered or unexported fields }
UserInfo
func (*UserInfoObj) Descriptor ¶
func (*UserInfoObj) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoObj.ProtoReflect.Descriptor instead.
func (*UserInfoObj) GetCtime ¶
func (x *UserInfoObj) GetCtime() string
func (*UserInfoObj) GetDesc ¶
func (x *UserInfoObj) GetDesc() string
func (*UserInfoObj) GetId ¶
func (x *UserInfoObj) GetId() string
func (*UserInfoObj) GetMore ¶
func (x *UserInfoObj) GetMore() []string
func (*UserInfoObj) GetRole ¶
func (x *UserInfoObj) GetRole() string
func (*UserInfoObj) ProtoMessage ¶
func (*UserInfoObj) ProtoMessage()
func (*UserInfoObj) ProtoReflect ¶
func (x *UserInfoObj) ProtoReflect() protoreflect.Message
func (*UserInfoObj) Reset ¶
func (x *UserInfoObj) Reset()
func (*UserInfoObj) String ¶
func (x *UserInfoObj) String() string
type UserInfoReq ¶
type UserInfoReq struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // contains filtered or unexported fields }
func (*UserInfoReq) Descriptor ¶
func (*UserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoReq.ProtoReflect.Descriptor instead.
func (*UserInfoReq) GetAccessToken ¶
func (x *UserInfoReq) GetAccessToken() string
func (*UserInfoReq) ProtoMessage ¶
func (*UserInfoReq) ProtoMessage()
func (*UserInfoReq) ProtoReflect ¶
func (x *UserInfoReq) ProtoReflect() protoreflect.Message
func (*UserInfoReq) Reset ¶
func (x *UserInfoReq) Reset()
func (*UserInfoReq) String ¶
func (x *UserInfoReq) String() string
type UserInfoResp ¶
type UserInfoResp struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Data *UserInfoObj `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserInfoResp) Descriptor ¶
func (*UserInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResp.ProtoReflect.Descriptor instead.
func (*UserInfoResp) GetCode ¶
func (x *UserInfoResp) GetCode() int64
func (*UserInfoResp) GetData ¶
func (x *UserInfoResp) GetData() *UserInfoObj
func (*UserInfoResp) GetMsg ¶
func (x *UserInfoResp) GetMsg() string
func (*UserInfoResp) ProtoMessage ¶
func (*UserInfoResp) ProtoMessage()
func (*UserInfoResp) ProtoReflect ¶
func (x *UserInfoResp) ProtoReflect() protoreflect.Message
func (*UserInfoResp) Reset ¶
func (x *UserInfoResp) Reset()
func (*UserInfoResp) String ¶
func (x *UserInfoResp) String() string
type UserRefreshReq ¶
type UserRefreshReq struct { RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
UserRefresh
func (*UserRefreshReq) Descriptor ¶
func (*UserRefreshReq) Descriptor() ([]byte, []int)
Deprecated: Use UserRefreshReq.ProtoReflect.Descriptor instead.
func (*UserRefreshReq) GetRefreshToken ¶
func (x *UserRefreshReq) GetRefreshToken() string
func (*UserRefreshReq) ProtoMessage ¶
func (*UserRefreshReq) ProtoMessage()
func (*UserRefreshReq) ProtoReflect ¶
func (x *UserRefreshReq) ProtoReflect() protoreflect.Message
func (*UserRefreshReq) Reset ¶
func (x *UserRefreshReq) Reset()
func (*UserRefreshReq) String ¶
func (x *UserRefreshReq) String() string
type UserRefreshResp ¶
type UserRefreshResp struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Data *UserTokenObj `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserRefreshResp) Descriptor ¶
func (*UserRefreshResp) Descriptor() ([]byte, []int)
Deprecated: Use UserRefreshResp.ProtoReflect.Descriptor instead.
func (*UserRefreshResp) GetCode ¶
func (x *UserRefreshResp) GetCode() int64
func (*UserRefreshResp) GetData ¶
func (x *UserRefreshResp) GetData() *UserTokenObj
func (*UserRefreshResp) GetMsg ¶
func (x *UserRefreshResp) GetMsg() string
func (*UserRefreshResp) ProtoMessage ¶
func (*UserRefreshResp) ProtoMessage()
func (*UserRefreshResp) ProtoReflect ¶
func (x *UserRefreshResp) ProtoReflect() protoreflect.Message
func (*UserRefreshResp) Reset ¶
func (x *UserRefreshResp) Reset()
func (*UserRefreshResp) String ¶
func (x *UserRefreshResp) String() string
type UserRegisterDataObj ¶
type UserRegisterDataObj struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` // contains filtered or unexported fields }
UserRegister
func (*UserRegisterDataObj) Descriptor ¶
func (*UserRegisterDataObj) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterDataObj.ProtoReflect.Descriptor instead.
func (*UserRegisterDataObj) GetId ¶
func (x *UserRegisterDataObj) GetId() string
func (*UserRegisterDataObj) GetPwd ¶
func (x *UserRegisterDataObj) GetPwd() string
func (*UserRegisterDataObj) ProtoMessage ¶
func (*UserRegisterDataObj) ProtoMessage()
func (*UserRegisterDataObj) ProtoReflect ¶
func (x *UserRegisterDataObj) ProtoReflect() protoreflect.Message
func (*UserRegisterDataObj) Reset ¶
func (x *UserRegisterDataObj) Reset()
func (*UserRegisterDataObj) String ¶
func (x *UserRegisterDataObj) String() string
type UserRegisterReq ¶
type UserRegisterReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterReq) Descriptor ¶
func (*UserRegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterReq.ProtoReflect.Descriptor instead.
func (*UserRegisterReq) GetId ¶
func (x *UserRegisterReq) GetId() string
func (*UserRegisterReq) GetPwd ¶
func (x *UserRegisterReq) GetPwd() string
func (*UserRegisterReq) ProtoMessage ¶
func (*UserRegisterReq) ProtoMessage()
func (*UserRegisterReq) ProtoReflect ¶
func (x *UserRegisterReq) ProtoReflect() protoreflect.Message
func (*UserRegisterReq) Reset ¶
func (x *UserRegisterReq) Reset()
func (*UserRegisterReq) String ¶
func (x *UserRegisterReq) String() string
type UserRegisterResp ¶
type UserRegisterResp struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Data *UserRegisterDataObj `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterResp) Descriptor ¶
func (*UserRegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterResp.ProtoReflect.Descriptor instead.
func (*UserRegisterResp) GetCode ¶
func (x *UserRegisterResp) GetCode() int64
func (*UserRegisterResp) GetData ¶
func (x *UserRegisterResp) GetData() *UserRegisterDataObj
func (*UserRegisterResp) GetMsg ¶
func (x *UserRegisterResp) GetMsg() string
func (*UserRegisterResp) ProtoMessage ¶
func (*UserRegisterResp) ProtoMessage()
func (*UserRegisterResp) ProtoReflect ¶
func (x *UserRegisterResp) ProtoReflect() protoreflect.Message
func (*UserRegisterResp) Reset ¶
func (x *UserRegisterResp) Reset()
func (*UserRegisterResp) String ¶
func (x *UserRegisterResp) String() string
type UserServer ¶
type UserServer interface { UserTest(context.Context, *UserTestReq) (*UserTestResp, error) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) UserAuth(context.Context, *UserAuthReq) (*UserAuthResp, error) UserRefresh(context.Context, *UserRefreshReq) (*UserRefreshResp, error) UserInfo(context.Context, *UserInfoReq) (*UserInfoResp, error) }
UserServer is the server API for User service.
type UserTestReq ¶
type UserTestReq struct {
// contains filtered or unexported fields
}
func (*UserTestReq) Descriptor ¶
func (*UserTestReq) Descriptor() ([]byte, []int)
Deprecated: Use UserTestReq.ProtoReflect.Descriptor instead.
func (*UserTestReq) ProtoMessage ¶
func (*UserTestReq) ProtoMessage()
func (*UserTestReq) ProtoReflect ¶
func (x *UserTestReq) ProtoReflect() protoreflect.Message
func (*UserTestReq) Reset ¶
func (x *UserTestReq) Reset()
func (*UserTestReq) String ¶
func (x *UserTestReq) String() string
type UserTestResp ¶
type UserTestResp struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*UserTestResp) Descriptor ¶
func (*UserTestResp) Descriptor() ([]byte, []int)
Deprecated: Use UserTestResp.ProtoReflect.Descriptor instead.
func (*UserTestResp) GetCode ¶
func (x *UserTestResp) GetCode() int64
func (*UserTestResp) GetMsg ¶
func (x *UserTestResp) GetMsg() string
func (*UserTestResp) ProtoMessage ¶
func (*UserTestResp) ProtoMessage()
func (*UserTestResp) ProtoReflect ¶
func (x *UserTestResp) ProtoReflect() protoreflect.Message
func (*UserTestResp) Reset ¶
func (x *UserTestResp) Reset()
func (*UserTestResp) String ¶
func (x *UserTestResp) String() string
type UserTokenObj ¶
type UserTokenObj struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` ExpireTime int64 `protobuf:"varint,2,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
UserAuth
func (*UserTokenObj) Descriptor ¶
func (*UserTokenObj) Descriptor() ([]byte, []int)
Deprecated: Use UserTokenObj.ProtoReflect.Descriptor instead.
func (*UserTokenObj) GetAccessToken ¶
func (x *UserTokenObj) GetAccessToken() string
func (*UserTokenObj) GetExpireTime ¶
func (x *UserTokenObj) GetExpireTime() int64
func (*UserTokenObj) GetRefreshToken ¶
func (x *UserTokenObj) GetRefreshToken() string
func (*UserTokenObj) ProtoMessage ¶
func (*UserTokenObj) ProtoMessage()
func (*UserTokenObj) ProtoReflect ¶
func (x *UserTokenObj) ProtoReflect() protoreflect.Message
func (*UserTokenObj) Reset ¶
func (x *UserTokenObj) Reset()
func (*UserTokenObj) String ¶
func (x *UserTokenObj) String() string